:root{font-family:"Yu Gothic",Meiryo,sans-serif;color:#254e53;background:#e5efed;font-synthesis:none}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0;overflow:hidden;touch-action:none;overscroll-behavior:none}button{font:inherit;cursor:pointer;border:0;touch-action:none;color:inherit}button:focus-visible{outline:3px solid #ce7d37;outline-offset:4px}[hidden]{display:none!important}#scene,#scene canvas,#vignette,#flash{position:absolute;inset:0;width:100%;height:100%}#vignette{pointer-events:none;box-shadow:inset 0 0 90px #efbd6500;z-index:2}#flash{pointer-events:none;background:#e55454;opacity:0;z-index:8}header{position:absolute;top:27px;left:35px;right:30px;display:flex;justify-content:space-between;z-index:10;pointer-events:none}.brand{font-weight:900;font-size:21px;letter-spacing:2px}.brand span{color:#c28b51}.brand small{display:block;font-size:8px;letter-spacing:2.5px;margin-top:5px}.tools{display:flex;gap:9px;pointer-events:auto}.tools button{background:#ffffffb5;border:1px solid #fff;border-radius:50px;height:38px;min-width:42px;padding:0 13px;font-size:11px;font-weight:bold}.overlay{position:absolute;inset:0;z-index:5}.title{pointer-events:none;background:linear-gradient(90deg,#edf3f0f2 0%,#edf3f0df 24%,#edf3f000 62%)}.intro{position:absolute;left:8%;top:18%;pointer-events:auto}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:bold;color:#7b958c}h1{font-size:76px;line-height:1.13;letter-spacing:7px;margin:23px 0 14px;font-weight:900}h1 span{color:#c7935e}h1 br{display:none}.subtitle{font-size:13px;letter-spacing:4px;margin-bottom:26px}.pitch{line-height:1.9;font-size:14px}.rules{font-size:12px;margin:23px 0}.rules p{margin:6px 0}.primary{background:#285956;color:white;min-width:245px;padding:17px 24px;border-radius:7px;font-weight:bold;letter-spacing:3px;box-shadow:0 7px 20px #254e5320}.primary:hover{background:#37716b}.primary span{float:right}.instructions{font-size:10px;line-height:1.7;margin-top:20px;color:#65807b}.instructions p{margin:4px 0}.instructions b{margin-right:8px}.best{font-size:10px;letter-spacing:2px;margin-top:17px}.scene-caption{position:absolute;right:5%;bottom:6%;letter-spacing:4px;font-size:12px}.scene-caption span{display:block;font-size:10px;margin-top:9px}.shade{background:#e7efedb8;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center}.panel{text-align:center;background:#f7faf5ed;border:1px solid white;padding:36px;border-radius:19px;max-width:480px;width:90%;box-shadow:0 25px 90px #244d5020}.panel.wide{max-width:820px}h2{font-size:26px;letter-spacing:2px;margin:15px 0}.panel>p{font-size:12px;line-height:1.8;color:#6e8580}.panel .primary{margin-top:20px;width:100%}#cards{display:flex;gap:14px;margin-top:27px}#cards button{flex:1;background:white;border:1px solid #cdded5;border-radius:12px;padding:23px 14px;transition:transform .15s;min-width:0}#cards button:hover{transform:translateY(-5px);border-color:#b8854e}#cards .card-icon{font-size:30px;display:block;margin-bottom:15px}#cards b{display:block;font-size:15px}#cards p{font-size:11px;line-height:1.8;color:#69847d}.hud-top{position:absolute;left:35px;right:35px;top:94px;display:flex;justify-content:space-between;pointer-events:none}.hud-top small{display:block;font-size:10px;letter-spacing:2px}.hud-top strong{display:block;font-size:37px;font-weight:500}.hud-right{text-align:right}#life{color:#b67455;letter-spacing:5px;font-size:22px}.hud-right small{margin-top:8px}.greed{position:absolute;left:35px;bottom:38px;width:225px}.greed>div:first-child{display:flex;justify-content:space-between;align-items:center}.greed span{font-size:12px}.greed strong{font-size:28px;color:#996937}.track{height:5px;background:#b3c8bf;margin:10px 0;border-radius:5px;overflow:hidden}.track i{display:block;height:100%;background:#b58647;width:0%}.greed small{font-size:10px;color:#67887e;letter-spacing:1px}#switch{position:absolute;right:35px;bottom:34px;width:104px;height:104px;background:#faf9ebeb;border:2px solid #fff;border-radius:50%;box-shadow:0 7px 23px #345b5c26;overflow:hidden;z-index:6}#switch span{display:block;font-size:25px}#switch b{font-size:14px}#switch small{display:block;font-size:9px;margin-top:4px}#switch i{position:absolute;bottom:0;left:0;width:100%;background:#7eaca644;pointer-events:none}.bottom-tip{position:absolute;bottom:39px;left:50%;transform:translateX(-50%);font-size:10px;color:#6b8279;white-space:nowrap}#toast{position:absolute;top:24%;width:100%;text-align:center;font-size:15px;letter-spacing:3px;color:#8a653a;pointer-events:none}#result-score{font-size:65px;line-height:1.3;letter-spacing:3px}.score-label{display:block;margin-top:24px;font-size:9px;letter-spacing:3px}.stats{display:flex;border-top:1px solid #dce5dd;border-bottom:1px solid #dce5dd;padding:17px 0;margin:20px 0;gap:30px;justify-content:center}.stats small,.stats b{display:block}.stats small{font-size:10px;margin-bottom:8px;color:#78908a}.stats b{font-size:21px}.picked-label{margin-bottom:8px}#picked{font-size:11px;line-height:1.9;color:#6a817a}.text-button{background:transparent;font-size:11px;margin-top:18px}#joystick{position:absolute;width:86px;height:86px;border:1px solid #fff9;background:#ffffff38;border-radius:50%;pointer-events:none;z-index:4}#joystick i{position:absolute;width:30px;height:30px;left:27px;top:27px;border-radius:50%;background:#618c8280}
@media(max-width:600px){header{top:19px;left:20px;right:17px}.brand{font-size:17px}.brand small{font-size:7px}.tools{gap:5px}.tools button{height:33px;padding:0 10px}.title{background:linear-gradient(180deg,#edf3f0c9,#edf3f000 53%,#edf3f0ec 78%)}.intro{inset:100px 22px auto;text-align:center}.eyebrow{font-size:9px;letter-spacing:1px}h1{font-size:51px;letter-spacing:3px;margin:12px 0 8px}.subtitle{font-size:10px;letter-spacing:2px;margin:0}.pitch{font-size:11px;margin:15px 0}.rules{margin:170px 0 13px;font-size:11px}.primary{padding:15px 22px;min-width:230px}.instructions{font-size:8px;margin-top:13px}.best{margin-top:9px}.scene-caption{display:none}.hud-top{left:20px;right:20px;top:80px}.hud-top strong{font-size:30px}#life{font-size:19px}.greed{left:20px;bottom:32px;width:180px}#switch{right:19px;bottom:26px;width:91px;height:91px}.bottom-tip{bottom:145px;font-size:9px}.panel{padding:25px 20px}h2{font-size:22px}#cards{flex-direction:column;gap:9px;margin-top:20px}#cards button{padding:15px;text-align:left;display:grid;grid-template-columns:38px 1fr;column-gap:12px}#cards .card-icon{grid-row:1/3;font-size:26px;margin:0;align-self:center}#cards b{font-size:13px}#cards p{margin:5px 0 0;font-size:10px}.stats{margin:15px 0}#result-score{font-size:54px}#toast{top:26%;font-size:12px}}
@media(max-height:620px) and (min-width:601px){.intro{top:15%}h1{font-size:55px;margin:14px 0}.subtitle{margin-bottom:12px}.rules{margin:13px 0}.instructions{margin-top:10px}}
@media(max-height:630px) and (max-width:600px){.intro{top:76px}.rules{margin-top:115px}.pitch{margin:9px 0}.instructions{margin-top:8px}}
/* 仕上げ：木に重なっても読める・手ほどきを目立たせる */
#hud .hud-top,#hud .greed{text-shadow:0 0 6px #fff,0 0 12px #fff}
#hud .greed{background:#f7faf5c9;border-radius:14px;padding:10px 14px}
#toast{top:22%;font-size:15px;font-weight:bold;letter-spacing:1px;color:#6b4318;text-shadow:0 0 8px #fff,0 0 14px #fff}
#hud .greed span{white-space:nowrap}
@media(max-width:600px){#hud .greed{width:200px;padding:8px 12px}}
@media(max-width:600px){h1{font-size:44px;letter-spacing:1px;white-space:nowrap}.rules{margin:140px 0 12px}.instructions{font-size:9px}}
.shade{z-index:7}
#hud .bottom-tip{text-shadow:0 0 5px #fff,0 0 10px #fff,0 0 14px #fff;font-weight:bold}
/* 横向きスマホ等の背の低い画面：結果・強化・一時停止の窓が画面外に出ないようスクロールさせる */
.shade{overflow-y:auto;align-items:safe center;padding:12px 0}.shade .panel{max-height:calc(100% - 24px);overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain}
@media(max-height:500px){.panel{padding:16px 22px}h2{font-size:19px;margin:6px 0}#result-score{font-size:38px;line-height:1.15}.score-label{margin-top:8px}.stats{padding:8px 0;margin:8px 0}.stats b{font-size:16px}.picked-label{margin:4px 0}.panel .primary{margin-top:10px;padding:11px 20px}.text-button{margin-top:8px}#cards{margin-top:12px}#cards button{padding:12px 10px}#cards .card-icon{margin-bottom:6px}}
@media(max-height:500px) and (orientation:landscape){#result .panel{display:grid;grid-auto-flow:column;grid-template-rows:repeat(5,auto);grid-template-columns:1fr 1fr;column-gap:26px;align-items:center;max-width:640px;margin-top:40px}#result .panel>*{margin-top:0;margin-bottom:0}#result .stats{margin:0}#result .panel .primary{margin-top:6px}}

.back{display:inline-block;margin-top:10px;padding-block:.35rem;font-size:13px;color:inherit;opacity:.75;text-decoration:none}.back:hover{opacity:1;text-decoration:underline}
/* スマホ横向き（高さが低い画面）のタイトル：2列に詰めて1画面に収める。収まらない端末でも指で縦に流せる */
.title{overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain}
@media(max-height:500px) and (orientation:landscape){
.title{pointer-events:auto;background:linear-gradient(90deg,#edf3f0f2 0%,#edf3f0e6 65%,#edf3f0c4 100%)}
.title button,.title a{touch-action:manipulation}
.intro{position:relative;left:auto;top:auto;margin:84px 0 16px 5%;max-width:calc(100% - 10%);display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,auto) 1fr;grid-auto-flow:column;column-gap:36px;align-items:start;text-align:left}
.intro .eyebrow{display:none}
.intro h1{font-size:40px;letter-spacing:3px;line-height:1.1;margin:6px 0 4px;white-space:nowrap}
.intro h1 br{display:none}
.intro .subtitle{font-size:10px;letter-spacing:2px;margin:0 0 6px}
.intro .pitch{font-size:11px;line-height:1.7;margin:0}
.intro .rules{font-size:11px;margin:8px 0 0}
.intro .rules p{margin:2px 0}
.intro .primary{padding:12px 20px;min-width:210px;margin-top:2px}
.intro .instructions{font-size:9px;line-height:1.6;margin-top:8px}
.intro .instructions p{margin:2px 0}
.intro .best{margin-top:6px}
.intro .back{margin-top:4px}
.scene-caption{display:none}
}
