/* Gameplay is a viewport, not a scrolling article. Menus may scroll internally. */
button{min-height:44px}dialog{max-height:calc(100dvh - 20px);overflow:auto}[hidden]{display:none!important}
html:has(body.playing),html:has(body.legacy-game){height:100%;overflow:hidden;overscroll-behavior:none}
body.playing{height:100dvh!important;min-height:0!important;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)!important;overflow:hidden!important;overscroll-behavior:none;background:#142e31}
body.playing>header,body.playing>.site-footer,body.playing #mission,body.playing #tip,body.playing .record{display:none!important}
body.playing #play{height:100%;width:100%;max-width:1100px!important;min-width:0!important;margin:0 auto!important;padding:0!important;display:grid;grid-template-rows:46px 40px auto minmax(0,1fr) 100px;gap:0;color:#f1e9ce;background:#1a363a}
body.playing .play-top{position:static;height:auto;margin:0!important;display:flex;align-items:center;justify-content:space-between;padding:0 8px;gap:8px;background:#153039;min-width:0}body.playing .play-top>div{display:block;min-width:0;text-align:center}body.playing .play-top h1{font-size:14px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin:0!important}body.playing .play-top small{display:none}body.playing #home,body.playing #pause{position:static!important;flex:none;min-height:38px;max-width:82px;padding:6px!important;font-size:10px;border:1px solid #9ebdb755;border-radius:10px;background:#26464c;color:#e5ead7}
body.playing .hud{display:grid!important;grid-template-columns:1fr 1.4fr 1fr;align-items:center;gap:6px;padding:3px 12px!important;margin:0!important;min-height:0;background:#214147;border-radius:0;border:0;color:#f5e7c8}body.playing .hud>div{min-width:0}body.playing .hud small{font-size:8px;line-height:1.1;color:#b7c8b9;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.playing .hud strong{font-size:13px!important;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}body.playing .hud-center strong{font-size:11px!important}
body.playing #play-coach{position:static!important;margin:0!important;padding:7px 12px!important;min-height:0!important;background:#1b3638;border:0;border-radius:0;pointer-events:none;line-height:1.4;min-width:0}#coach-cue{font-size:12px!important;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#coach-detail{font-size:10px!important;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b8caba}#heat-panel{margin-top:5px!important}#heat-value{display:block!important;font-size:10px}body.playing .heat-track{height:9px}body.playing .progress-track{height:4px;margin-top:4px}
body.playing .stage,body.playing .stage:has(.overlay:not([hidden])){position:relative!important;inset:auto!important;transform:none!important;display:flex;align-items:center;justify-content:center;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;border:0!important;border-radius:0!important;margin:0!important;overflow:hidden;background:#12292f}body.playing .stage:before{content:'';position:absolute;inset:-25px;background:var(--scene) center/cover;filter:blur(16px) brightness(.5);pointer-events:none}body.playing[data-mode=flight]{--scene:url('/assets/orchard-flight.webp')}body.playing[data-mode=rhythm]{--scene:url('/assets/moon-house.webp')}body.playing[data-mode=weather]{--scene:url('/assets/summer-road.webp')}
body.playing .stage canvas{position:relative;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important;background:transparent;touch-action:none;z-index:1}
body.playing #controls{position:static!important;inset:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;height:auto!important;margin:0!important;padding:10px 16px!important;gap:12px!important;border:0!important;border-radius:0!important;background:linear-gradient(#214147,#153039)!important;pointer-events:auto!important;z-index:3}
body.playing #controls button{position:static!important;flex:1!important;max-width:200px;width:auto!important;min-width:0!important;height:76px!important;min-height:0!important;padding:8px!important;border-radius:22px!important;border:1px solid #9eb6a080!important;border-bottom:3px solid #081d27!important;font-size:16px!important;line-height:1.3;background:#35595d;color:#f0ead0;touch-action:none;box-shadow:inset 0 0 0 3px #cbddc811}body.playing #controls button span{display:block;font-size:10px!important;margin:5px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.playing #controls [data-action=sun],body.playing #controls [data-action=thrust]{background:#c88e54!important;color:#172e38!important;border-color:#efc77f!important}body.playing #controls button.held{filter:brightness(1.3);transform:scale(.96)}body.playing #controls button.recommended{outline:2px solid #dbc893;outline-offset:-2px}body.playing[data-mode=rhythm] #controls{gap:8px!important}body.playing[data-mode=rhythm] #controls button{border-radius:15px!important}
body.playing .overlay{position:fixed!important;inset:46px 0 0!important;z-index:15!important;display:grid;place-items:center;padding:10px;background:#09232dd9;overflow:hidden;backdrop-filter:blur(6px)}body.playing .overlay .modal{width:min(100%,520px);max-height:100%;overflow:auto;overscroll-behavior:contain;padding:20px;border:1px solid #c9bc8b88;border-radius:20px;background:#203e43;color:#ede5ca}body.playing .modal h2{font-size:25px;margin:10px 0}body.playing .modal p{font-size:12px;line-height:1.6;color:#bdd0c7}body.playing .modal fieldset{font-size:11px;margin:8px 0;border-color:#9bb5a255}body.playing .modal button{min-height:44px}body.playing #route-map{display:none!important}body.playing[data-phase=ready] #route-map{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:8px 0;overflow:visible;padding:0}body.playing #route-map button{min-width:0;min-height:32px;font-size:10px;padding:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(orientation:landscape) and (max-height:600px){body.playing #play{grid-template-rows:40px 0 auto minmax(0,1fr) 64px;max-width:100%!important}body.playing .hud{display:none!important}body.playing #play-coach{padding:3px 12px!important;display:flex;align-items:center;justify-content:center;gap:14px}body.playing #coach-detail{display:none}body.playing #heat-panel{display:flex;gap:8px;align-items:center;margin:0!important}body.playing #heat-value{font-size:9px;white-space:nowrap}body.playing .heat-track{width:100px}body.playing .progress-track{width:60px}body.playing #controls{padding:5px 14px!important;gap:16px!important}body.playing #controls button{height:54px!important;font-size:13px!important;max-width:180px}body.playing #controls button span{margin-top:2px;font-size:9px!important}body.playing .overlay{inset:40px 0 0!important}body.playing .overlay .modal{padding:12px 18px}body.playing .modal h2{font-size:21px;margin:5px}body.playing .modal p{margin:6px;font-size:11px}body.playing[data-phase=ready] #route-map{grid-template-columns:repeat(5,minmax(0,1fr))}}
/* Bonus games share the same fixed viewport; only setup/result cards can scroll. */
body.playing #route-map button{color:#23443d}body.playing #route-map button[aria-current=true]{color:#fff4cf}body.playing .modal fieldset legend{color:#b9cec0}
body.legacy-game{height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#17343b}
body.legacy-game .shell{height:100%;max-width:1100px;margin:0 auto;padding:0;display:grid;grid-template-rows:44px minmax(0,1fr)}body.legacy-game .masthead{height:44px;padding:0 10px;display:flex}body.legacy-game .masthead .brand{font-size:12px}body.legacy-game .brand-seal{display:none}body.legacy-game .icon-button{min-width:40px;min-height:36px;padding:5px;font-size:10px}body.legacy-game .episode-nav,body.legacy-game .title-row,body.legacy-game footer,body.legacy-game .dialogue,body.legacy-game .announcer{display:none}body.legacy-game .shell>main{min-height:0;margin:0;padding:0;height:100%}body.legacy-game .game-frame{height:100%;border:0;border-radius:0;display:grid;grid-template-rows:minmax(0,1fr) 145px;overflow:hidden}body.legacy-game .stage{height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto}body.legacy-game .controls{padding:8px 14px;gap:7px;grid-template-columns:1fr;margin:0;background:#eef0df}body.legacy-game .charge{min-height:60px;padding:8px;white-space:normal}body.legacy-game .charge span{font-size:18px}body.legacy-game .charge small{font-size:10px}body.legacy-game .meter-scale{display:none}body.legacy-game .meter-caption{font-size:10px;margin-bottom:4px}body.legacy-game .meter{height:12px}
body.legacy-game.duel .game-frame{grid-template-rows:54px minmax(0,1fr) 30px 118px}body.legacy-game .duel-scoreboard{height:54px;padding:4px 10px}body.legacy-game .duel-stage{height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto}body.legacy-game .timing-panel{min-height:0;font-size:10px;padding:5px 10px}body.legacy-game .duel-controls{display:grid;grid-template-columns:1fr 1fr 44px;grid-template-rows:24px 70px;gap:6px;padding:6px 10px;background:#eef0df}body.legacy-game .duel-controls .meter-wrap{grid-column:1/-1}body.legacy-game .burst-button{min-height:60px;padding:7px;font-size:16px}body.legacy-game .burst-button small{font-size:10px}body.legacy-game .hud-button{min-height:44px;min-width:44px}body.legacy-game .duel-overlay:not([hidden]),body.legacy-game .overlay:not([hidden]){position:fixed;inset:44px 0 0;z-index:30;padding:12px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#09232ddd;backdrop-filter:blur(5px)}body.legacy-game .duel-overlay>div,body.legacy-game .overlay>div{max-height:100%;overflow:auto;overscroll-behavior:contain}
@media(orientation:landscape) and (max-height:600px){body.legacy-game .game-frame{grid-template-rows:minmax(0,1fr) 76px}body.legacy-game .controls{grid-template-columns:1fr 200px;align-items:center}body.legacy-game.duel .game-frame{grid-template-rows:44px minmax(0,1fr) 24px 75px}body.legacy-game .duel-scoreboard{height:44px}body.legacy-game .duel-controls{grid-template-columns:1fr 140px 130px 44px;grid-template-rows:63px}body.legacy-game .duel-controls .meter-wrap{grid-column:auto}body.legacy-game .duel-overlay>div,body.legacy-game .overlay>div{padding:12px 22px}body.legacy-game .overlay h2,body.legacy-game .duel-overlay h2{font-size:23px;margin:7px}body.legacy-game .overlay p,body.legacy-game .duel-overlay p{font-size:11px;line-height:1.5;margin:7px}}
