*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body,button,input{font-family:"Hiragino Mincho ProN","Yu Mincho","YuMincho","Noto Serif CJK JP",serif}body{color:#263d33;background:#f3efe4}button{border:0;cursor:pointer;font-size:16px;color:inherit;touch-action:manipulation}button,input{outline:0}button:focus-visible,input:focus-visible{outline:0;box-shadow:inset 0 0 0 2px #edc573}button:disabled{cursor:default}[hidden]{display:none!important}#game{position:relative;width:100%;height:100dvh;isolation:isolate}#world{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;z-index:0}#game:before,#game:after{position:absolute;left:0;right:0;z-index:1;content:"";pointer-events:none}#game:before{top:0;height:190px;background:linear-gradient(#122e28d9,transparent)}#game:after{bottom:0;height:340px;background:linear-gradient(transparent,#102b25e6)}.is-home #game:before,.is-home #game:after,.is-selecting #game:before,.is-selecting #game:after{display:none}
#loadingScreen{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:#f3efe4;color:#294b40}#loadingMessage{font-size:18px;letter-spacing:.12em;margin:0}.loadingMark{width:26px;height:26px;border:2px solid #294b4020;border-top-color:#294b40;border-radius:50%;animation:preparing 1.5s linear infinite}#loadingRetry{background:#2f6458;color:#fff;padding:12px 28px;border-radius:24px}.is-loading #game{display:none}@keyframes preparing{to{transform:rotate(360deg)}}
.home{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(#edf0e308,#edf0e318)}.home-content{width:100%;display:flex;flex-direction:column;align-items:center;gap:clamp(28px,5vh,44px)}.home .hero{width:100%;max-width:640px;text-align:center}.home-logo{margin:0;color:#fff;line-height:1.15;font-weight:500;letter-spacing:0;text-indent:0;text-shadow:none}.home-logo small{display:block;font-family:"Bodoni 72","Didot","Times New Roman",serif;font-size:clamp(40px,8vw,86px);font-weight:400;letter-spacing:.055em;text-indent:.055em;line-height:1.06;white-space:nowrap}.home-logo-jp{display:block;margin-top:15px;font-size:clamp(38px,6.4vw,66px);letter-spacing:.28em;text-indent:.28em;line-height:1.2}.home-menu{width:100%;max-width:300px}.primary{display:block;width:100%;min-height:56px;padding:16px 20px;color:#fffaf0;background:#2f6458;font-size:16px;font-weight:700;letter-spacing:.12em;border-radius:5px}.primary:disabled{opacity:.5}.home-version{display:block;width:max-content;max-width:100%;margin:14px auto 0;padding:5px 10px;font-size:13px;line-height:1.5;font-weight:600;letter-spacing:.06em;color:#263d33;background:#f7f2e5eb}
header{position:absolute;top:24px;right:24px;left:24px;z-index:8;display:flex;justify-content:flex-end;pointer-events:none}header button{pointer-events:auto}.title,footer,.compass{display:none}.quiet,.pauseButton{width:44px;height:44px;padding:11px;display:grid;place-items:center;border-radius:50%}.quiet{background:#f7f4e9eb;color:#466154}.quiet svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.quiet[aria-pressed=false] .soundWaves,.quiet[aria-pressed=true] .soundMuted{display:none}.pauseButton{color:#fff7e7;background:transparent;border:1px solid #fff8}.pauseButton svg{width:21px;height:21px;fill:currentColor;stroke:none}.stats{position:absolute;top:20px;left:20px;right:90px;z-index:3;display:grid;grid-template-columns:1fr 1fr 1fr;align-items:start;color:#fff;text-shadow:0 2px 6px #112d26}.stats>div:nth-child(2){text-align:center}.stats>div:last-child{text-align:right}.stats small{display:block;font-size:11px;letter-spacing:.15em;margin-bottom:6px}.stats strong{display:block;font-size:30px;line-height:1;font-weight:600}.stats em{font-size:15px;font-style:normal;font-weight:400}#notice{position:absolute;top:108px;left:50%;transform:translateX(-50%);width:min(90%,700px);z-index:3;text-align:center;font-size:14px;color:#fff;text-shadow:0 2px 5px #0b211b;font-weight:600;pointer-events:none}
.controls{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);z-index:4;width:min(500px,calc(100% - 32px));padding:12px 16px;color:#fff;text-align:center}.step{display:flex;align-items:baseline;justify-content:center;gap:18px;font-size:22px;line-height:1.5;font-weight:600}.step b{font-size:20px;white-space:nowrap}.directionDial{position:relative;max-width:280px;height:174px;margin:12px auto 0}.directionDial svg{display:block;width:100%;height:100%;overflow:visible}.directionDial text{font:13px "Yu Mincho",serif;fill:#fff;text-anchor:middle;dominant-baseline:middle}.directionDial #angle{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer;touch-action:none}#action{display:block;width:min(100%,290px);min-height:56px;padding:14px 22px;margin:12px auto 0;border-radius:28px;background:#f4efdf;color:#29483d;font-size:17px;font-weight:600;letter-spacing:.06em}#action:disabled{opacity:.6}#help{font-size:13px;line-height:1.5;margin:12px 0 0;color:inherit}.meter{height:20px;margin:25px 0 8px;border-radius:12px;overflow:hidden;position:relative;background:linear-gradient(90deg,#bf8b69,#c6b27c 25%,#f4dc96 46%,#fff2c2 50%,#f4dc96 54%,#c6b27c 75%,#bf8b69)}.sweet{position:absolute;left:46%;width:8%;height:100%;background:#fff4;border:2px solid #fff}#needle{position:absolute;top:0;bottom:0;left:0;width:4px;background:#fff;box-shadow:0 0 0 1px #375b4a}.meterLabels{display:flex;justify-content:space-between;font-size:11px}.meterLabels b{font-weight:600}
.canPicker.locked,.pickerLabel,.canOptions,.ratingHint{display:none}.is-selecting .controls{width:min(600px,calc(100% - 24px));bottom:30px;padding:15px 20px;color:#2c4b40}.is-selecting .step{display:block;text-align:center;margin:0 0 14px}.is-selecting .step b,.is-selecting #help{display:none}.is-selecting #action{background:#2f6458;color:#fffaf0;border-radius:4px;margin-top:22px;min-height:56px}.is-selecting #game:after{display:block;height:54%;background:linear-gradient(transparent,#f3efe4b0 30%,#f3efe4f0)}.is-selecting header,.is-selecting .stats,.is-selecting #notice{display:none}.fillChoices{display:flex;justify-content:center;align-items:start;gap:clamp(8px,3vw,24px);margin:4px auto 12px}.fillChoice{position:relative;min-width:60px;padding:4px 5px;background:transparent;color:#6e7d70;font-size:12px}.fillChoice span{display:block;margin-top:5px;white-space:nowrap}.fillCan{display:block;width:48px;height:72px;margin:auto}.fillChoice[aria-pressed=true]{color:#2f6458}.fillChoice[aria-pressed=true] .fillCan{filter:drop-shadow(0 0 7px #f3d677)}.fillChoice[aria-pressed=true]:after{content:"✓";position:absolute;top:0;right:7px;width:17px;height:17px;line-height:17px;border-radius:50%;background:#356b5d;color:#fff;font-family:serif;font-size:11px}.canRatings{display:grid;grid-template-columns:auto auto;gap:6px 16px;width:max-content;margin:12px auto 0;font-size:13px;text-align:left}.canRatings dt,.canRatings dd{margin:0}.canRatings dd{color:#bcae92;letter-spacing:.05em}.canRatings b{color:#a26f2d;font-weight:400}
.is-home .stats,.is-home .controls,.is-home #notice,.is-home #replayBanner,.is-home #dramaticReplay{display:none!important}.showing-result .controls,.showing-result .stats,.showing-result #notice{display:none!important}#result{position:absolute;inset:0;z-index:6;background:#152c2750;padding:24px;overflow:auto}.resultCard{position:absolute;right:48px;top:50%;transform:translateY(-50%);width:min(380px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:28px 28px 20px;background:#f7f2e9f5;color:#263d33;border-radius:6px;box-shadow:0 10px 50px #13221e30;text-align:center}.resultCard #resultEyebrow{font-size:12px;letter-spacing:.12em;color:#637163}.resultCard h1{font-size:25px;letter-spacing:.1em;margin:9px 0 20px;font-weight:600}.resultShowcase{display:flex;justify-content:center;align-items:center;gap:14px;margin:0 0 16px}.resultShowcase #resultCan{width:76px;height:100px;object-fit:contain}.resultShowcase>div{display:flex;align-items:baseline;gap:8px;min-width:0}.resultShowcase #finalScore{font-size:62px;line-height:1.2;font-weight:600;letter-spacing:0;font-variant-numeric:tabular-nums;color:#33695b;white-space:nowrap}.resultShowcase p{font-size:13px;margin:0;white-space:nowrap}#summary{font-size:14px;padding:0;margin:0 0 22px;line-height:1.5;text-align:left}.resultRow{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;border-bottom:1px solid #334d3220}.resultRow>span:first-child{font-size:clamp(12px,3vw,14px);white-space:nowrap}.resultRow strong{font-weight:600;font-size:20px;white-space:nowrap;flex-shrink:0;font-variant-numeric:tabular-nums}.resultRow small{font-size:11px;font-weight:400;margin-left:6px}.resultCard .resultNote{font-size:12px;color:#647262;line-height:1.6;margin:12px 0 0;text-align:center}.dramaticAwards{display:flex;flex-direction:column;gap:5px;margin:12px 0;font-size:12px;color:#506a5d}.dramaticAwards span{display:flex;justify-content:space-between;gap:10px}.dramaticAwards b{font-weight:500;color:#9a6a35;white-space:nowrap}.resultCard #again{display:block;width:100%;min-height:52px;font-size:16px;padding:13px;border-radius:28px;background:#2f6458;color:#fff9ec}.resultQuit{display:block;width:100%;background:transparent;color:#405948;font-size:14px;min-height:44px;margin-top:8px}#replayBanner{position:absolute;z-index:7;left:20px;top:104px;padding:10px 16px;background:#17362bc9;color:#fff;font-size:12px;letter-spacing:.15em;border-radius:2px}#replayBanner span{display:block;margin-top:4px;font-size:9px;letter-spacing:.04em}#dramaticReplay{position:absolute;left:30px;top:30%;z-index:7;color:#fff3c9;font-size:22px;font-weight:600;text-shadow:0 2px 8px #183c31,0 0 20px #183c31;pointer-events:none}
#pauseMenu{position:absolute;inset:0;z-index:20;display:grid;place-items:center;background:#132c26bd;backdrop-filter:blur(6px)}.pauseContent{width:min(360px,calc(100% - 48px));padding:30px;background:#f7f2e9;border-radius:6px;text-align:center}.pauseContent h2{margin:0 0 24px;font-size:26px;font-weight:600}.pauseAudio{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;font-size:14px}#resumeButton,#quitButton{display:block;width:100%;min-height:48px;padding:12px;border-radius:26px}#resumeButton{background:#2f6458;color:#fff}#quitButton{margin-top:10px;background:transparent;color:#405948}
@media(max-width:700px){header{top:20px;right:18px;left:18px}.stats{left:18px;right:78px}.stats strong{font-size:26px}.stats small{font-size:10px}.controls{bottom:18px;width:calc(100% - 24px)}.step{font-size:21px;gap:12px}.step b{font-size:18px}.resultCard{right:auto;left:50%;transform:translate(-50%,-50%)}#dramaticReplay{top:15%;left:50%;transform:translateX(-50%);font-size:17px;white-space:nowrap}.showing-result #replayBanner{top:auto;bottom:12px;left:12px;font-size:10px}.is-selecting .controls{bottom:22px;padding:12px}.fillChoice{min-width:52px}.fillChoices{gap:12px}}
@media(max-height:650px){.resultCard{padding:18px 24px 12px}.resultCard h1{font-size:21px;margin:5px 0 10px}.resultShowcase{margin-bottom:8px}.resultShowcase #resultCan{height:70px;width:60px}.resultShowcase #finalScore{font-size:48px}.resultRow{padding:6px 0}.resultRow strong{font-size:18px}#summary{margin-bottom:12px}.resultCard #again{min-height:44px;padding:10px}}
@media(max-height:560px){.home-content{gap:20px}.home-logo small{font-size:clamp(36px,7vw,62px)}.home-logo-jp{font-size:38px;margin-top:9px}.primary{min-height:46px;padding:12px}.controls{bottom:12px}.directionDial{height:118px;margin-top:6px}.step{font-size:19px}.step b{font-size:18px}#action{min-height:44px;padding:10px 20px;font-size:15px;margin-top:6px}#help{font-size:11px;margin-top:6px}.is-selecting .controls{right:18px;left:auto;transform:none;width:340px;bottom:12px}.is-selecting .fillCan{height:54px;width:38px}.is-selecting .step{font-size:19px;margin-bottom:6px}.is-selecting .canRatings{margin-top:6px;gap:3px 12px}.is-selecting #action{margin-top:10px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.loadingMark{animation:none}}

.home-version{color:#fff;background:transparent;padding:0;text-shadow:none;font-weight:500}

.home .hero{max-width:660px}.home-logo-image{display:block;width:100%;height:auto;filter:drop-shadow(0 2px 4px rgba(20,29,24,.28))}.home-logo-fallback{display:none}@media(max-height:560px){.home .hero{max-width:470px}}

.is-loading .home-logo{opacity:0}

#dramaticReplay .dramaticPoints{font-size:1.45em;font-weight:600;line-height:1.1;margin-left:.35em;white-space:nowrap;font-variant-numeric:tabular-nums}

.selectionBack{position:absolute;left:max(16px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:8;display:flex;align-items:center;gap:5px;min-height:44px;padding:7px 10px;font-size:12px;line-height:1.3;color:#2d4b40;background:#f7f2e9dd;border:1px solid #36554730;border-radius:4px}.selectionBack svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.selectionBack:hover{background:#f7f2e9}.selectionBack:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #356c5b}@media(max-width:700px){.is-selecting .controls{bottom:66px}}

.home-menu .primary small{display:block;font-size:11px;letter-spacing:.08em;font-weight:400;margin-top:4px;opacity:.8}.freeStart{margin-top:10px;background:#f7f2e9e6;color:#294e42;border:1px solid #ffffff60}.freeStart:hover{background:#fff8ed}#freeShotToast{position:absolute;top:110px;left:50%;transform:translateX(-50%);z-index:4;color:#fff8df;background:#17362bc4;padding:9px 18px;border-radius:4px;font-size:22px;font-weight:600;white-space:nowrap;pointer-events:none}@media(max-height:560px){.home-content{gap:16px}.home-menu .primary{min-height:42px;padding:8px}.freeStart{margin-top:6px}}

.stats{right:20px}.stats>div:last-child{padding-right:70px}.home-menu{display:flex;flex-direction:column;gap:24px}.home-menu .primary{margin:0}.home-menu .home-version{margin:0 auto}.home-menu .freeStart{background:#f7f2e9ed;color:#294e42}@media(max-width:700px){.stats{left:18px;right:18px}.stats>div:last-child{padding-right:60px}}@media(max-height:560px){.home-menu{gap:18px}}
#meterControls[data-stage="curve"] .meter{background:linear-gradient(90deg,#7bafbd,#d7e0c7 42%,#fff9df 50%,#d7e0c7 58%,#7bafbd)}

.canNavigation{display:none;position:absolute;top:38%;left:16px;right:16px;z-index:5;justify-content:space-between;pointer-events:none}.is-selecting .canNavigation{display:flex}.canNavigation button{pointer-events:auto;width:44px;height:44px;padding:12px;background:#f7f2e9df;border:1px solid #36554730;border-radius:50%;color:#2d4b40}.canNavigation svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Portrait replay keeps the moving scene visible above a compact score sheet. */
@media(max-width:700px){
 :is(.replay-active,.result-rest).showing-result #result{background:transparent;padding:0;pointer-events:none}
 :is(.replay-active,.result-rest) .resultCard{top:auto;bottom:max(12px,env(safe-area-inset-bottom));max-height:49dvh;transform:translateX(-50%);padding:14px 20px 10px;display:flex;flex-direction:column;pointer-events:auto;background:#f7f2e9f5}
 :is(.replay-active,.result-rest) .resultCard #resultEyebrow{font-size:10px;flex-shrink:0}
 :is(.replay-active,.result-rest) .resultCard h1{font-size:18px;margin:3px 0 6px;flex-shrink:0}
 :is(.replay-active,.result-rest) .resultShowcase{gap:10px;margin:0 0 5px;flex-shrink:0}
 :is(.replay-active,.result-rest) .resultShowcase #resultCan{width:44px;height:48px}
 :is(.replay-active,.result-rest) .resultShowcase #finalScore{font-size:38px}
 :is(.replay-active,.result-rest) #summary{min-height:0;overflow:auto;overscroll-behavior:contain;margin:0 0 8px;flex:1 1 auto}
 :is(.replay-active,.result-rest) .resultRow{padding:4px 0}:is(.replay-active,.result-rest) .resultRow strong{font-size:17px}
 :is(.replay-active,.result-rest) .resultCard .resultNote{font-size:10px;margin:6px 0}
 :is(.replay-active,.result-rest) .dramaticAwards{font-size:11px;margin:8px 0;gap:4px}
 :is(.replay-active,.result-rest) .resultCard #again{min-height:44px;padding:9px;font-size:14px;flex-shrink:0}
 :is(.replay-active,.result-rest) .resultQuit{min-height:36px;margin-top:4px;font-size:12px;flex-shrink:0}
 :is(.replay-active,.result-rest).showing-result #replayBanner{top:74px;bottom:auto;left:12px;font-size:10px;padding:8px 12px}
 :is(.replay-active,.result-rest) #dramaticReplay{top:24%;max-width:calc(100% - 32px);font-size:15px;white-space:normal;text-align:center}
}
/* Idle title: a single quiet line over the town. */
.home-content,body.is-home header{transition:opacity 1.3s ease}
body.home-idle .home-content,body.home-idle header{opacity:0;pointer-events:none}
.home-attract{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:24px;padding:28px 22px max(17vh,80px);border:0;border-radius:0;background:transparent;color:#fff9e9;cursor:pointer;font-family:"Hiragino Mincho ProN","Yu Mincho",YuMincho,serif;text-align:center;text-shadow:0 2px 7px #192c26cc;animation:attract-in 2s .5s both}
.home-attract[hidden]{display:none}.home-attract-line{font-size:clamp(18px,2.6vw,26px);letter-spacing:.12em;line-height:1.9;text-wrap:balance}.home-attract small{font-family:inherit;font-size:14px;font-weight:400;letter-spacing:.19em;opacity:.8}.home-attract:focus-visible{outline:none}.home-attract:focus-visible small{text-decoration:underline;text-underline-offset:5px}
@keyframes attract-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.home-content,body.is-home header{transition:none}.home-attract{animation:none}}
#resetTown{display:block;width:100%;min-height:48px;margin-top:14px;padding:12px 18px;border:1px solid #57776a;border-radius:26px;background:transparent;color:#2f6458;font:inherit;cursor:pointer}#resetTown[hidden]{display:none}#resetTown:hover{background:#e5ebe2}#resetTown:focus-visible{outline:2px solid #2f6458;outline-offset:3px}
.ranking-entry{display:flex;align-items:center;justify-content:center;gap:7px;background:transparent;color:#fff9e8;min-height:44px;padding:8px 18px;font-family:inherit;font-size:15px;text-shadow:0 1px 5px #17362b}.ranking-entry svg{width:21px;height:21px}.ranking-entry:hover{text-decoration:underline}.game-ranking{position:fixed;inset:0;margin:auto;border:0;border-radius:6px;background:#f3efe4;color:#263d33;padding:28px;width:min(480px,calc(100vw - 28px));max-width:none;height:min(740px,calc(100dvh - 36px));max-height:none;font-family:inherit}.game-ranking[open]{display:flex;flex-direction:column}.game-ranking::backdrop{background:#152c27a6}.ranking-close{position:absolute;right:10px;top:8px;width:44px;height:44px;background:transparent;color:inherit;font-size:28px}.ranking-kicker{text-align:center;color:#718276;font-size:11px;letter-spacing:.15em;margin:8px 0}.game-ranking h2{text-align:center;font-size:25px;margin:8px 0 12px}.ranking-subtitle{text-align:center;color:#64786b;font-size:12px;margin:0 0 20px}.ranking-columns,.ranking-list li{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:center}.ranking-columns{font-size:11px;color:#718276;padding:8px;border-bottom:1px solid #294c402b}.ranking-list{list-style:none;margin:0;padding:0;min-height:0;overflow:auto;flex:1;overscroll-behavior:contain}.ranking-list li{min-height:56px;padding:10px 8px;border-bottom:1px solid #294c401c;font-size:14px}.ranking-list .rank{font-size:19px;text-align:center}.ranking-list li:nth-child(-n+3) .rank{color:#ad7d36}.ranking-list .score{font-size:22px;font-variant-numeric:tabular-nums;white-space:nowrap}.ranking-foot{font-size:11px;color:#718276;line-height:1.7;text-align:center;margin:14px 0 0}@media(max-width:500px){.game-ranking{padding:24px 18px}.ranking-list .score{font-size:20px}}
/* TOP ranking follows the sister games' upper utility button. */
.is-home #rankingHome{position:absolute;top:20px;left:20px;z-index:5;border:1px solid #fff8;border-radius:24px;background:#f7f2e9ed;color:#2f6458;text-shadow:none;min-height:44px;padding:8px 15px}.is-home #rankingHome:hover{background:#fffaf0}.is-home .home-attract-active #rankingHome{visibility:hidden}@media(max-width:700px){.is-home #rankingHome{left:18px;font-size:13px;padding:8px 12px}}
/* Let the street establish itself before the film-like title. */
@keyframes townTitleReveal{0%{opacity:0;transform:translateY(8px);visibility:hidden}1%{visibility:visible}100%{opacity:1;transform:translateY(0);visibility:visible}}
@keyframes townMenuReveal{0%{opacity:0;transform:translateY(4px);visibility:hidden}1%{visibility:visible}100%{opacity:1;transform:translateY(0);visibility:visible}}
.is-home .home-logo{animation:townTitleReveal 1.5s cubic-bezier(.22,.61,.36,1) 1s both}.is-home .home-name,.is-home .home-menu .primary{animation:townMenuReveal .8s ease-out 2.3s both}.is-home .home-menu .freeStart{animation-delay:2.45s}.is-home #rankingHome{animation:townMenuReveal .8s ease-out 2.6s both}.is-home .home-version{animation:townMenuReveal .8s ease-out 2.6s both}@media(prefers-reduced-motion:reduce){.is-home .home-logo,.is-home .home-name,.is-home .home-menu .primary,.is-home #rankingHome,.is-home .home-version{animation:none}}

.loadingProgressGroup{width:min(300px,78vw);font-size:13px;letter-spacing:.05em}.loadingProgressGroup>div{display:flex;justify-content:space-between;gap:16px}.loadingProgressGroup strong{font-size:22px;font-variant-numeric:tabular-nums}#loadingProgress{width:100%;height:8px;accent-color:#2f6458;margin-top:12px}.loadingDiagnostic{max-width:min(420px,84vw);margin:0;font-size:12px;line-height:1.7;overflow-wrap:anywhere;opacity:.8}#loadingScreen{padding:24px;box-sizing:border-box;text-align:center}#loadingMessage{max-width:88vw;line-height:1.6}

body.game-scroll-locked{overscroll-behavior:none;touch-action:none}

.is-home #world{touch-action:pan-y}

@media(max-width:700px){.combo-word{display:none}}
@media(max-width:700px){.stats>div:nth-child(2){position:absolute;left:50%;transform:translateX(-50%);width:110px;text-align:center}.stats>div:last-child{grid-column:3}.stats #score{font-size:clamp(22px,6.6vw,26px);font-variant-numeric:tabular-nums}}
@media(max-width:700px){body.replay-active.showing-result #replayBanner{top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));bottom:auto;right:auto}}
@media(max-width:700px){.resultActions{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex-shrink:0}.resultActions #again,.resultActions #resultQuit{width:100%;margin:0;min-height:44px;font-size:12px;padding:8px 5px}.resultActions #resultQuit{border:1px solid #2f6458;color:#2f6458;background:transparent;border-radius:24px}#result>#rankingResult{position:absolute;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));width:auto;min-height:44px;margin:0;padding:9px 16px;border-radius:24px;background:#f7f2e9f5;color:#2f6458;border:1px solid #42685950;z-index:1}#summary{touch-action:pan-y}}
@media(max-width:700px){body.is-overall-result.result-rest .resultCard{max-height:calc(100dvh - 80px);overflow:visible;padding:14px 18px 12px}body.is-overall-result.result-rest #summary{flex:0 0 auto;overflow:visible;margin-bottom:12px}body.is-overall-result.result-rest .resultRow{padding:8px 0;font-size:14px}body.is-overall-result.result-rest .resultRow strong{font-size:18px}}
.canRatings .ratingPair{display:contents}.cameraZoom{position:absolute;right:max(12px,env(safe-area-inset-right));top:32%;height:180px;width:48px;padding:8px 10px;z-index:9;border-radius:24px;background:#f7f2e9e8;color:#2f6458;display:flex;flex-direction:column;align-items:center;touch-action:none;user-select:none}.zoomTrack{width:3px;flex:1;background:#2f64584d;position:relative}.zoomTrack i{position:absolute;width:20px;height:20px;left:50%;top:var(--zoom-position,55.5%);transform:translate(-50%,-50%);border-radius:50%;background:#2f6458;border:2px solid #f7f2e9}.cameraZoom span{font-size:18px;line-height:20px}
@media(pointer:coarse){.is-selecting .canNavigation{display:none!important}.canRatings{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;width:min(100%,360px);margin:8px auto}.canRatings .ratingPair{display:grid;grid-template-columns:auto auto;gap:5px;font-size:11px;align-items:center}.is-selecting .controls{padding:10px 14px}.is-selecting #action{margin-top:12px}.fillChoices{margin-bottom:6px}.fillCan{height:60px}}
.selectionHeading{position:absolute;z-index:4;top:max(20px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));text-align:center;color:#fff;text-shadow:0 1px 2px #10271ff2,0 2px 6px #10271fe6,0 0 12px #10271fcc;pointer-events:none}.selectionHeading h2{font-size:clamp(16px,5vw,20px);line-height:1.5;font-weight:600;margin:0}.selectionHeading p{font-size:12px;line-height:1.5;letter-spacing:.08em;margin:6px 0 0}
@media(pointer:coarse){.is-selecting .controls .step{display:none}}
@media(max-width:700px){.resultActions.single-action{grid-template-columns:1fr}}
.ranking-post{display:grid;grid-template-columns:1fr auto;gap:6px 10px;margin:12px 0;padding:12px;border:1px solid #2f64584d;border-radius:5px;font-size:13px;text-align:left}.ranking-post label{display:flex;align-items:center;gap:8px;min-width:0}.ranking-post input{min-width:0;width:100%;font:inherit;padding:8px;border:1px solid #2f645880;border-radius:3px;background:#fffdf7;color:#263d33}.ranking-post button{grid-column:2;grid-row:1;min-height:44px;padding:8px 12px;background:#2f6458;color:#fff;border-radius:5px;font-size:12px}.ranking-post button:disabled{opacity:.6}.ranking-post p{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5}.ranking-name-error{color:#894430}.ranking-post-status{color:#405948}
#result>#rankingResult{pointer-events:auto}
.ranking-post label{white-space:nowrap}

/* Shared PC/SP can-selection heading. */
.is-selecting .controls .step{display:none}

.is-selecting .canNavigation{display:none}


/* Shared game controls; layout, scene state and physics stay with the host UI. */
:root{
 --game-button-height:48px;
 --game-button-font:16px;
 --game-button-line:1.4;
 --game-button-pad:18px;
 --game-button-radius:6px;
 --game-button-green:#2f6458;
 --game-button-cream:#fff9ec;
 --game-button-focus:#edc573;
}
 :is(#game,#loadingScreen,.game-ranking) :is(#loadingRetry,#start,#startFree,#action,#again,#resumeButton,#resetTown,#quitButton,#selectionBack,#resultQuit,#rankingHome,#rankingResult,.ranking-post button,.ranking-retry){
 box-sizing:border-box;
 min-height:var(--game-button-height);
 padding:10px var(--game-button-pad);
 border:1px solid transparent;
 border-radius:var(--game-button-radius);
 font-family:inherit;
 font-size:var(--game-button-font);
 font-weight:600;
 line-height:var(--game-button-line);
 letter-spacing:.04em;
 text-align:center;
 text-decoration:none;
 display:flex;
 align-items:center;
 justify-content:center;
 gap:7px;
}
 :is(#game,#loadingScreen,.game-ranking) :is(#loadingRetry,#start,#again,#resumeButton,.ranking-post button,.ranking-retry){
 background:var(--game-button-green);
 color:var(--game-button-cream);
}
 :is(#game,#loadingScreen,.game-ranking) :is(#selectionBack,#resultQuit,#quitButton,#resetTown){
 border-color:var(--game-button-green);
 color:var(--game-button-green);
 background:#f7f2e9f5;
 text-shadow:none;
}
 :is(#game,#loadingScreen,.game-ranking) :is(#rankingHome,#rankingResult){
 min-height:44px;
 padding:8px 14px;
 border-color:#42685980;
 background:#f7f2e9f5;
 color:var(--game-button-green);
 text-shadow:none;
}
 :is(#game,#loadingScreen,.game-ranking) :is(#sound,#pauseButton,.ranking-close){
 box-sizing:border-box;
 display:grid;
 place-items:center;
 width:44px;
 height:44px;
 min-width:44px;
 min-height:44px;
 padding:10px;
 border-radius:50%;
 line-height:1;
}
 :is(#game,#loadingScreen,.game-ranking) :is(#loadingRetry,#start,#startFree,#action,#again,#resumeButton,#resetTown,#quitButton,#selectionBack,#resultQuit,#rankingHome,#rankingResult,#sound,#pauseButton,.ranking-close,.ranking-post button,.fillChoice):focus-visible{
 outline:2px solid var(--game-button-focus);
 outline-offset:3px;
 box-shadow:inset 0 0 0 1px #17362b;
}
 :is(#game,#loadingScreen,.game-ranking) :is(#loadingRetry,#start,#startFree,#action,#again,#resumeButton,#resetTown,#quitButton,#selectionBack,#resultQuit,#rankingHome,#rankingResult,#sound,#pauseButton,.ranking-close,.ranking-post button,.fillChoice):disabled{
 opacity:.5;
 cursor:default;
}
.ranking-post input{
 box-sizing:border-box;
 min-height:var(--game-button-height);
 padding:8px 10px;
 font:inherit;
 font-size:14px;
 line-height:1.4;
 border:1px solid #2f645880;
 border-radius:6px;
}
/* Text inputs use only their existing border; never add an outer focus ring. */
.game-ranking .ranking-post input:is(:focus,:focus-visible,:active){outline:none;box-shadow:none}
.game-ranking .ranking-post input:not([aria-invalid="true"]):not(.is-error):not(.error):not(:invalid):is(:focus,:active){border-color:var(--game-button-green)}
.game-ranking .ranking-post input[aria-invalid="true"]{border-color:#894430}
@media(max-width:700px){
 :root{--game-button-height:44px;--game-button-font:14px;--game-button-pad:12px}
 :is(#game) .resultActions :is(#again,#resultQuit){padding-inline:7px;letter-spacing:0}
 :is(#game,#loadingScreen,.game-ranking) :is(#rankingHome,#rankingResult){font-size:14px}
 #selectionBack{padding-inline:12px}
 .ranking-post button{font-size:14px;padding-inline:12px}
}

:is(#game) #startFree{border-color:#2f645880}
.game-ranking .ranking-post{grid-template-columns:minmax(0,1fr) auto}
@media(max-width:380px){.game-ranking .ranking-post{grid-template-columns:1fr}.game-ranking .ranking-post button{grid-column:1;grid-row:auto;width:100%}}

/* Result ranking is outside the score card at every viewport width. */
#result>#rankingResult{
 position:absolute;
 top:max(12px,env(safe-area-inset-top));
 left:max(12px,env(safe-area-inset-left));
 right:auto;
 width:auto;
 margin:0;
 min-height:44px;
 z-index:1;
 pointer-events:auto;
}

/* One shared-identity name editor on FV; result dialog only displays the frozen run name. */
.home-name{width:min(100%,340px);padding:10px 14px;border:1px solid #42685980;border-radius:6px;background:#f7f2e9f2;color:#294b40;pointer-events:auto}
.home-name label{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:3px 8px;font-size:13px;line-height:1.5}
.home-name label small{font-size:10px;color:#62796c;white-space:nowrap}
.home-name input{display:block;width:100%;height:44px;min-width:0;margin-top:6px;padding:8px 10px;border:1px solid #2f645880;border-radius:6px;background:#fffdf7;color:#263d33;font:inherit;font-size:16px;line-height:1.4}
.home-name input:is(:focus,:focus-visible,:active){outline:none;box-shadow:none}
.home-name input:not([aria-invalid=true]):is(:focus,:active){border-color:#2f6458}
.home-name input[aria-invalid=true]{border-color:#894430}
.home-name p{margin:0;font-size:12px;line-height:1.5;white-space:pre-line;color:#894430}
.home-name p:not(:empty){margin-top:6px}
.home-name input:disabled{opacity:.6}
.ranking-post .ranking-post-name{grid-column:1;grid-row:1;align-self:center;margin:0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.ranking-post-name strong{font-weight:600}
@media(max-width:380px){.ranking-post .ranking-post-name{grid-row:auto}}
.is-home .home-content{gap:clamp(16px,3vh,28px)}
@media(max-height:700px){.is-home .home-content{gap:14px}.home-name{padding:8px 12px}.is-home .home .hero{max-width:500px}.is-home .home-menu{gap:16px}}
@media(max-height:560px){.is-home .home{padding:60px 18px 16px;overflow:auto;align-items:flex-start}.is-home .home-content{gap:12px}.is-home .home .hero{max-width:340px}.is-home .home-menu{gap:12px}}

.is-home .home .hero{margin-bottom:6px}

/* Align the actual input width; retain its original 44px height. */
.home-name{width:min(100%,300px);padding:0;border:0;background:transparent}
.home-name label{color:#fff9ec;text-shadow:0 1px 4px #17362be6}
.home-name label small{color:inherit}
.home-name input{height:44px;text-shadow:none}
.home-name p:not(:empty){padding:4px 8px;border-radius:4px;background:#fffdf7f2;text-shadow:none}

.home-logo-image{filter:drop-shadow(0 2px 5px rgba(15,35,29,.4))}
.home-logo-fallback{text-shadow:0 2px 5px rgba(15,35,29,.4)}

/* Mobile replay awards sit above and slightly right of the can, right-aligned. */
@media(max-width:700px){
 body.replay-active.showing-result #dramaticReplay{
  top:max(72px,min(12dvh,104px));
  right:max(18px,env(safe-area-inset-right));
  left:auto;
  width:max-content;
  max-width:min(270px,calc(100% - 36px));
  transform:none;
  text-align:right;
  white-space:normal;
 }
}

/* All control state indicators stay on the existing edge. No outer rings. */
body :is(button,input,select,textarea,[role="button"],[role="slider"]):is(:focus,:focus-visible,:active,[aria-pressed="true"],[aria-selected="true"]){
 outline:none!important;
 outline-offset:0!important;
 box-shadow:none!important;
}
body button:is(:focus,:focus-visible,:active):not(:disabled){
 border-color:var(--game-button-focus,#edc573)!important;
}
/* Borderless controls use one inset stroke without changing their geometry. */
body :is(#sound,.ranking-close,.fillChoice,.canOption,[role="slider"]):is(:focus,:focus-visible,:active):not(:disabled){
 box-shadow:inset 0 0 0 1px var(--game-button-focus,#edc573)!important;
}
.fillChoice[aria-pressed="true"] .fillCan{filter:none!important}
/* Improve name-label contrast without changing its typography or position. */
.home-name label{
 text-shadow:0 1px 2px #10271ff2,0 2px 6px #10271fe6,0 0 10px #10271fb3;
}
/* Keep name entry and mode selection as separate groups. */
.is-home .home-name{margin-bottom:8px}

/* Final-run registration feedback: no extra actions or scrolling. */
.ranking-result-notice{position:absolute;left:16px;right:16px;top:76px;margin:0;text-align:right;font-size:12px;line-height:1.4;color:#fff;text-shadow:0 1px 4px #17362b;pointer-events:none}

@keyframes ranking-attention{0%,100%{opacity:1}50%{opacity:.65}}
.ranking-attention{animation:ranking-attention 1.8s ease-in-out infinite}
.game-ranking li[aria-current=true]{outline:none;background:#e9e1bf;box-shadow:inset 0 0 0 1px #446b5c}
@media(prefers-reduced-motion:reduce){.ranking-attention{animation:none;border-color:#b08b3d}}
