
#arcade{position:fixed;inset:0;z-index:30;background:#0c0d10;color:#eee8d2;display:flex;align-items:center;justify-content:center;padding:16px;font-family:Consolas,"Courier New",monospace}#arcade[hidden]{display:none!important}.arcade-panel{width:min(100%,440px);text-align:center;position:relative}.arcade-panel h1,.arcade-panel h2{font-weight:normal;letter-spacing:2px}.arcade-panel h1{font-size:26px;color:#f7dc3c;margin:10px 0 20px}.arcade-panel p{color:#85868b;font:12px/1.8 Consolas,monospace}.arcade-panel button{border:1px solid #67686d;border-radius:0;background:#17191e;color:#f4dc68;padding:14px 20px;cursor:pointer;font:14px Consolas,monospace}.arcade-panel button:hover,.arcade-panel button:focus-visible{border-color:#f7dc3c;background:#24262d}.arcade-panel .menu-choice{display:block;width:100%;margin:12px 0;padding:20px}.arcade-panel .subtle{border:0;background:none;color:#92949a;font-size:11px;padding:10px}.arcade-panel canvas{image-rendering:pixelated;display:block;margin:auto;width:100%;height:auto;max-height:68vh;object-fit:contain}.arcade-panel .attract{width:240px;height:170px;margin:24px auto}.arcade-panel .blink{animation:coinBlink 1.5s steps(2,end) infinite}.arcade-panel .movie-title{min-height:38px;font-size:18px;color:#f4e7b3;margin:8px 0}.arcade-panel .fragment-dots{color:#e4dcb3;letter-spacing:8px;font-size:22px;margin:24px}.arcade-panel .end-actions{margin-top:12px}.arcade-panel .end-actions .menu-choice{margin:8px 0}.flow-mode-story .stats>div:first-child>span{display:none!important}.flow-mode-story #remaining{font:18px Consolas,monospace!important;letter-spacing:6px;color:#e9e0b4}.flow-mode-story #resultStats{font:13px Consolas,monospace}.flow-mode-story #ownership{display:block}.flow-settings{background:#141519;color:#eee;border:1px solid #737579;max-width:340px;padding:24px;font:14px Consolas,monospace}.flow-settings::backdrop{background:#000b}.flow-settings h2{font:18px Consolas,monospace}.flow-settings label{display:flex;justify-content:space-between;gap:30px;margin:22px 0;align-items:center}.flow-settings button{border-radius:0;font:13px Consolas,monospace;padding:12px}.flow-settings p{font:12px/1.6 Consolas,monospace;color:#afb0b4}body[data-mode="challenge"] footer{justify-content:space-between}.flow-settings input{accent-color:#e9cf58}body #inventory{display:none!important}@keyframes coinBlink{50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.arcade-panel .blink{animation:none}}@media(max-height:650px){.arcade-panel h1{margin:5px 0 12px}.arcade-panel .attract{height:120px;margin:12px auto}.arcade-panel .menu-choice{padding:14px}.arcade-panel canvas{max-height:62vh}}

.arcade-panel .arcade-sound{position:absolute;right:0;top:-4px;color:#d9d5bd;font-size:18px;z-index:2}

.reduced-motion .arcade-panel .blink{animation:none}

.arcade-panel .menu-choice{width:min(260px,100%);margin:14px auto;padding:16px 24px}.arcade-panel .menu-choice::before{content:'▸';margin-right:14px;color:#f7dc3c}.selection-art{opacity:.9}.pause-menu{text-align:center}.pause-menu>button{display:block;width:100%;margin:12px 0}.pause-menu #pause-warning p{color:#ddd2b3}.cinematic{padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important}.cinematic .arcade-panel{width:min(100%,440px)}.cinematic .arcade-sound{top:8px;right:8px;background:#0d1221b3;padding:8px;min-width:40px;min-height:40px}.cinematic #movie-canvas{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 110px);max-width:100%;width:auto;margin:auto}.cinematic .movie-title{font-size:14px;min-height:28px;margin:8px 0}body[data-mode="challenge"] main{padding: max(8px,env(safe-area-inset-top)) 10px max(6px,env(safe-area-inset-bottom));gap:5px;grid-template-rows:auto auto auto minmax(0,1fr) 18px 64px 34px!important}body[data-mode="challenge"] main>header,body[data-mode="challenge"] main>.stats,body[data-mode="challenge"] #ownership,body[data-mode="challenge"] main>footer{width:min(100%,var(--maze-width,100%));margin-inline:auto}body[data-mode="challenge"] header{padding-bottom:0}body[data-mode="challenge"] .stats{padding:2px 0 5px}body[data-mode="challenge"] h1{margin:3px 0 5px}body[data-mode="challenge"] nav{gap:10px}body[data-mode="challenge"] nav button{height:28px;width:46px}body[data-mode="challenge"] nav .stop{height:40px;width:40px}body[data-mode="challenge"] footer button{min-height:32px}.flow-mode-story #remaining{letter-spacing:3px!important;font-size:16px!important}.flow-mode-story .stats>div:first-child{gap:6px!important}.flow-mode-story .stats small{font-size:10px!important}

.arcade-panel #insert-coin{display:block;margin:18px auto 8px}.arcade-panel #cover-settings{display:block;margin:auto}.cinematic .arcade-panel{width:min(100%,440px,calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 110px)*.8))}.cinematic #movie-canvas{width:100%}

/* Portrait-first title and selection screens. */
#arcade{padding:max(16px,env(safe-area-inset-top)) 18px max(16px,env(safe-area-inset-bottom))}.cover-screen .arcade-panel{width:min(100%,380px);height:min(760px,calc(100dvh - 40px));display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:48px 0 20px}.cover-screen h1{margin:0 0 28px}.cover-screen .cover-maze{width:min(100%,300px);height:auto;margin:0 auto;max-height:none}.cover-screen #insert-coin{margin:auto auto 16px;min-width:220px}.cover-screen #cover-settings{margin:0 auto}.arcade-panel .arcade-sound{top:0;right:0;width:44px;height:44px;padding:8px;font-size:16px}.player-screen .arcade-panel{width:min(100%,340px);min-height:min(560px,calc(100dvh - 60px));display:flex;flex-direction:column;align-items:center;justify-content:center}.player-screen h1{margin-bottom:50px}.player-screen .player-token{width:80px;height:64px;margin:0 auto 24px}.player-options{width:100%;min-height:110px}.player-screen .menu-choice{border:0;background:transparent;width:240px;text-align:left;padding:14px 20px}.player-screen #menu-back{margin-top:36px}body[data-mode="challenge"] h1{color:#f7dc3c}body[data-mode="challenge"] #sound{width:44px;height:44px;border:0;background:transparent;border-radius:0;font-size:17px}body[data-mode="challenge"] #stop,body[data-mode="challenge"] #help{display:none!important}body[data-mode="challenge"] footer{justify-content:center}body[data-mode="challenge"] footer>button{font-size:12px;letter-spacing:2px;min-width:88px}#helpDialog{max-height:85dvh;overflow:auto}@media(max-height:650px){.cover-screen .arcade-panel{padding-top:24px}.cover-screen h1{margin-bottom:14px}.cover-screen .cover-maze{width:230px}.cover-screen #insert-coin{margin-bottom:8px}.player-screen h1{margin-bottom:24px}}

.cover-screen .arcade-panel{height:auto;min-height:min(700px,calc(100dvh - 40px));justify-content:center;padding:28px 0 16px}.cover-screen #insert-coin{margin:46px auto 12px}.cover-screen h1{margin-bottom:24px}.cover-credit{margin-top:22px;color:#8e92a0;font:10px/1.9 Consolas,monospace;letter-spacing:1px}.cover-credit span{font-size:9px;color:#626b7c}.player-screen .player-token{width:180px;height:64px}.player-screen .menu-choice{text-align:center}.player-screen .menu-choice::before{display:inline-block}body[data-mode="challenge"] nav{gap:10px}body[data-mode="challenge"] nav button{width:48px;height:40px;touch-action:none;user-select:none}body[data-mode="challenge"] main{grid-template-rows:auto auto auto minmax(0,1fr) 18px 88px 34px!important}@media(max-height:650px){.cover-screen #insert-coin{margin-top:24px}.cover-credit{margin-top:12px}.cover-screen .arcade-panel{padding-top:12px}.cover-screen .cover-maze{width:210px}}

.hud-star{display:inline-block;width:14px;height:14px;background-size:100% 100%;background-repeat:no-repeat;image-rendering:pixelated;margin-right:5px;vertical-align:middle}.star-fade{position:absolute;inset:0;background:#0d1221;opacity:0;z-index:10}#star-continue{margin-top:24px}

.award-score{display:flex;justify-content:space-around;max-width:280px;margin:0 auto 12px!important;font:14px Consolas,monospace!important}.award-score span:first-child{color:#f7dc3c}.award-score span:last-child{color:#b87883}.star-message{min-height:24px;color:#fff0b6;font:14px Consolas,monospace;margin:10px 0}#fragment-canvas{width:320px!important;max-width:100%;height:auto!important;max-height:44dvh!important}

.arcade-panel:has(#fragment-canvas){min-height:360px}.award-result-phase{position:absolute;left:0;right:0;top:42%;transform:translateY(-50%);pointer-events:none}.award-result-phase h2{color:#f7dc3c;font-size:24px}.award-result-phase[hidden]{display:none}.star-message{font-size:14px;color:#e4dcb3}#star-continue::before{display:none}

.award-result-phase h2.pixel-text .pixel-letter{width:18px;height:21px;background-size:15px 21px}.star-message.pixel-text .pixel-letter{width:12px;height:14px;background-size:10px 14px}

/* Fixed tiny music glyph; generous portrait control targets without extra decoration. */
.music-mark{display:block;width:14px;height:16px;margin:auto;pointer-events:none}body[data-mode="challenge"] nav button{height:44px}body[data-mode="challenge"] main{grid-template-rows:auto auto auto minmax(0,1fr) 18px 96px 34px!important}

/* Ending playback and its final menu share one frame and reserved action area. */
#arcade.ending-scene .arcade-panel{width:min(100%,440px,calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 210px)*.8))}
.ending-scene #movie-canvas,.ending-scene #ending-still{width:100%;height:auto;max-height:none;margin:auto}
.ending-scene .movie-title{font-size:14px;min-height:28px;margin:8px 0}
.ending-scene .ending-controls{height:128px;margin:12px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:16px}
.ending-controls #ending-back{display:block;margin:0;min-height:48px}
.ending-controls #replay-story{display:block;margin:0;min-height:40px;padding:10px 14px;background:transparent;border:0}
.ending-controls #replay-story:hover,.ending-controls #replay-story:focus-visible,.ending-controls #replay-story:active{background:transparent;color:#eee8d2}
.ending-controls #replay-story:focus-visible{outline:1px solid #f7dc3c;outline-offset:3px}
