/* Live play uses the whole viewport; explanatory UI lives in onboarding/pause. */
.active-run .mission-bar,.active-run .control-strip,.active-run .screen-bottom{display:none!important}
.active-run .hud-name b,.active-run .energy-label,.active-run .center-hud,.active-run .score-hud>span{display:none!important}
.active-run .hud-name{justify-content:flex-start}.active-run .player-hud{width:132px!important}
.active-run .health-track{height:8px!important}.active-run .energy-track{height:4px}.active-run .hud-name span{display:block!important;font-size:10px}
.active-run .hud{inset:12px 15px auto!important}.active-run .score-hud>b{font-size:14px!important}
.active-run .boss-hud{top:64px;left:35%;right:12%;max-width:290px;margin-left:auto}
.active-run .boss-hud>div:first-child span{display:none}.active-run #boss-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:9px}
.minimal-status{position:absolute;top:63px;left:15px;display:flex;gap:12px;color:#ffe28b;font:700 11px 'Roboto Mono',monospace;pointer-events:none;z-index:4}.minimal-status[hidden]{display:none}
.pause-options{display:flex;gap:10px;margin-top:12px}.pause-options[hidden]{display:none}.pause-options button{min-height:44px;border:1px solid #79929e;background:#182e3bcc;color:#dce8df;padding:8px 16px;font-size:12px}
.active-run[data-play-state=paused] .overlay-copy:empty{display:none}

body.game-focused .machine,.machine:fullscreen{display:block!important;background:#122231}
body.game-focused .screen,.machine:fullscreen .screen{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;min-height:0!important;aspect-ratio:auto!important;border:0}
body.game-focused canvas#game,.machine:fullscreen canvas#game{width:100%;height:100%;object-fit:fill}
body.game-focused .mobile-toolbar,.machine:fullscreen .mobile-toolbar{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:auto;min-height:0;padding:0;background:none;z-index:22;pointer-events:none}
body.game-focused .mobile-toolbar>*:not(.mobile-pause),.machine:fullscreen .mobile-toolbar>*:not(.mobile-pause){display:none!important}
body.game-focused .mobile-toolbar .mobile-pause,.machine:fullscreen .mobile-toolbar .mobile-pause{pointer-events:auto;width:44px;height:44px;min-width:44px;background:#142634a8;border:1px solid #d4e5dc50;border-radius:50%;font:20px sans-serif}
body.game-focused .hud,.machine:fullscreen .hud{top:max(12px,env(safe-area-inset-top))!important;left:max(14px,env(safe-area-inset-left))!important;right:65px!important}
body.game-focused .score-hud,.machine:fullscreen .score-hud{display:none}
body.game-focused .boss-hud,.machine:fullscreen .boss-hud{top:max(62px,calc(env(safe-area-inset-top) + 50px));left:43%;right:16px}
body.game-focused .minimal-status,.machine:fullscreen .minimal-status{top:max(60px,calc(env(safe-area-inset-top) + 48px));left:max(14px,env(safe-area-inset-left))}

/* Two aligned rows in a dedicated control deck below the playfield. */
.mobile-game .machine{
 --control-edge:max(12px,calc(env(safe-area-inset-left,0px) + 12px),calc(env(safe-area-inset-right,0px) + 12px));
 --control-bottom:calc(env(safe-area-inset-bottom,0px) + 8px);
 --pad-gap:8px;--pad-size:clamp(44px,calc(var(--game-height,100dvh)*.13),62px);
 --interact-size:calc(var(--pad-size)*2 + var(--pad-gap));
 --dock-height:calc(var(--interact-size) + var(--control-bottom) + 9px);
}
.mobile-game body.game-focused .screen,.mobile-game .machine:fullscreen .screen{
 inset:0 0 var(--dock-height)!important;height:calc(100% - var(--dock-height))!important;
}
.mobile-game body.game-focused .touch-controls,.mobile-game .machine:fullscreen .touch-controls{
 position:absolute!important;inset:auto 0 0!important;display:grid!important;
 grid-template-columns:calc(var(--pad-size)*3 + var(--pad-gap)*2) 1fr var(--interact-size) calc(var(--pad-size)*2 + var(--pad-gap));
 align-items:start!important;justify-content:stretch;width:100%;height:var(--dock-height);min-height:0!important;
 padding:8px var(--control-edge) var(--control-bottom)!important;gap:var(--pad-gap);
 background:linear-gradient(#182d3e,#10202e)!important;border:0;border-top:1px solid #77939845;
 box-sizing:border-box;pointer-events:none;z-index:12;
}
.mobile-game body.game-focused .touch-controls .touch-move,.mobile-game .machine:fullscreen .touch-controls .touch-move,
.mobile-game body.game-focused .touch-controls .touch-actions,.mobile-game .machine:fullscreen .touch-controls .touch-actions{
 position:static;display:grid;flex:0 0 auto;max-width:none;grid-template-rows:repeat(2,var(--pad-size));gap:var(--pad-gap);pointer-events:none;
}
.mobile-game body.game-focused .touch-controls .touch-move,.mobile-game .machine:fullscreen .touch-controls .touch-move{
 grid-column:1;width:calc(var(--pad-size)*3 + var(--pad-gap)*2);grid-template-columns:repeat(3,var(--pad-size));
}
.mobile-game body.game-focused .touch-controls .touch-actions,.mobile-game .machine:fullscreen .touch-controls .touch-actions{
 grid-column:4;width:calc(var(--pad-size)*2 + var(--pad-gap));grid-template-columns:repeat(2,var(--pad-size));
}
.mobile-game body.game-focused .touch-controls button,.mobile-game .machine:fullscreen .touch-controls button{
 -webkit-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;
 width:var(--pad-size)!important;height:var(--pad-size)!important;min-width:0;min-height:0!important;
 margin:0;padding:0!important;border:1.5px solid #c7ddd5a6!important;border-bottom-width:3px!important;
 background:#203c50!important;color:#f4f0df!important;border-radius:14px;box-shadow:0 3px 6px #07121b44;
 line-height:1;pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;
}
.mobile-game .touch-controls .touch-move [data-control=Space]{grid-column:2!important;grid-row:1;justify-self:center}
.mobile-game .touch-controls .touch-move [data-control=ArrowLeft]{grid-column:1;grid-row:2}
.mobile-game .touch-controls .touch-move [data-control=KeyS]{grid-column:2;grid-row:2}
.mobile-game .touch-controls .touch-move [data-control=ArrowRight]{grid-column:3;grid-row:2}
.mobile-game body.game-focused .touch-controls .touch-actions [data-control=KeyQ],.mobile-game .machine:fullscreen .touch-controls .touch-actions [data-control=KeyQ]{grid-column:1;grid-row:1;color:#ffe075!important}
.mobile-game .touch-controls .touch-actions [data-control=KeyR]{grid-column:1;grid-row:2}
.mobile-game .touch-controls .touch-actions [data-control=KeyF]{grid-column:2;grid-row:2}
.mobile-game .touch-controls .touch-interact{grid-column:3;position:static;left:auto;bottom:auto;transform:none;display:flex;align-items:stretch;pointer-events:none}
.mobile-game body.game-focused .touch-controls .touch-interact button,.mobile-game .machine:fullscreen .touch-controls .touch-interact button{
 width:var(--interact-size)!important;height:var(--interact-size)!important;border-radius:20px;border-width:2px!important;
}
.mobile-game body.game-focused .touch-controls .touch-primary,.mobile-game .machine:fullscreen .touch-controls .touch-primary{background:#ffcf35!important;border-color:#ffe285!important;color:#142634!important}
.touch-controls .touch-icon{display:flex!important;align-items:center;justify-content:center;width:56%;height:56%;pointer-events:none}
.touch-controls .touch-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.touch-controls .touch-interact .touch-icon{width:48%;height:48%}
.mobile-game body.game-focused .touch-controls .touch-label,.mobile-game .machine:fullscreen .touch-controls .touch-label{display:none!important}
.mobile-game body.game-focused .touch-controls button.is-held,.mobile-game .machine:fullscreen .touch-controls button.is-held{background:#fff0ac!important;color:#142634!important;box-shadow:inset 0 0 0 2px #fff8;transform:translateY(1px)}
.touch-controls .super-ready{box-shadow:0 0 0 2px #baffed,0 0 17px #9cffcd88!important}
/* Safari must not select HUD text or offer Share after a long press. */
body.game-focused .machine,.machine:fullscreen{-webkit-text-size-adjust:100%;text-size-adjust:100%;height:var(--game-height,100dvh);max-height:var(--game-height,100dvh);bottom:auto}
body.game-focused .screen,body.game-focused .screen *,body.game-focused .touch-controls,body.game-focused .touch-controls *,.machine:fullscreen .screen,.machine:fullscreen .touch-controls{
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.mobile-game body.game-focused[data-play-state=paused] .touch-controls,.mobile-game body.game-focused[data-play-state=won] .touch-controls,.mobile-game body.game-focused[data-play-state=gameover] .touch-controls,.mobile-game body.game-focused[data-play-state=stageclear] .touch-controls{visibility:hidden}
.mobile-game body.game-focused .overlay,.mobile-game .machine:fullscreen .overlay{padding:24px max(22px,env(safe-area-inset-left));justify-content:center;overflow:auto;background:#0b1728dc}
.mobile-game body.game-focused .overlay p{max-width:100%;font-size:13px;line-height:1.5}
.mobile-game body.game-focused .overlay .primary{margin-top:8px;flex:none;font-size:13px;min-height:48px}
.mobile-game body.game-focused .overlay h1{font-size:clamp(28px,7vw,42px)}

.tutorial{position:absolute;inset:0;z-index:15;pointer-events:none;display:flex;justify-content:center;align-items:flex-start;padding:65px 14px 0}.tutorial[hidden]{display:none}
.tutorial-card{width:min(330px,100%);background:#102634ed;border:1px solid #91b7b15c;border-radius:20px;text-align:center;padding:15px 18px;box-shadow:0 12px 42px #08151f66;pointer-events:auto}
.tutorial-card [data-tutorial-count]{display:block;font:700 11px 'Roboto Mono',monospace;color:#ffdc58;margin-bottom:8px}
.tutorial-card h2{font:22px/1.15 'Russo One',sans-serif;color:#f3efdc;margin:0}.tutorial-card p{font:13px/1.45 'Roboto Mono',monospace;color:#cbdbdb;margin:9px 0 0}
.tutorial-card button{display:block;min-height:44px;margin:10px auto 0;padding:8px 16px;border:0;border-radius:10px;background:#ffcf35;color:#162331;font-weight:700;font-size:13px}
.tutorial-card button[hidden]{display:none}.tutorial-card [data-tutorial-skip]{margin-top:3px;padding:7px 12px;background:none;color:#aabec9;font-size:11px}
.training .touch-controls button:not(.tutorial-target){opacity:.38}.training .touch-controls .tutorial-target{opacity:1!important;box-shadow:0 0 0 3px #fff4bf,0 0 26px #ffdc7977!important;animation:tutorial-pulse 1.25s ease-in-out infinite}
.training .touch-controls .tutorial-done{box-shadow:0 0 0 3px #aff9c7!important;animation:none}.training .hud,.training .minimal-status,.training .boss-hud{display:none!important}
.tutorial-paused [data-tutorial-hint]{visibility:hidden}.tutorial-paused .tutorial-card{border-color:#f1d178}
@keyframes tutorial-pulse{50%{filter:brightness(1.2);transform:scale(1.04)}}
@media(prefers-reduced-motion:reduce){.training .touch-controls .tutorial-target{animation:none}}
@media(max-height:450px){body.game-focused .tutorial,.machine:fullscreen .tutorial{padding-top:max(12px,env(safe-area-inset-top))}.tutorial-card{padding:10px 15px;width:290px}.tutorial-card h2{font-size:19px}.tutorial-card p{font-size:12px;margin-top:6px}.tutorial-card [data-tutorial-count]{margin-bottom:5px}.tutorial-card [data-tutorial-skip]{min-height:36px;margin-top:0}.mobile-game body.game-focused .overlay h1{font-size:26px}.mobile-game body.game-focused .overlay p{font-size:11px;margin:8px 0}.mobile-game body.game-focused .overlay{padding:16px 24px}.mobile-game body.game-focused .run-collection{max-width:70%}.mobile-game body.game-focused .run-collection span{font-size:8px}}
/* Keep the jumping hero visible while explaining controls in a short viewport. */
@media(max-height:450px){.landscape-game body.game-focused .tutorial{justify-content:flex-end;padding-right:max(70px,env(safe-area-inset-right))}.mobile-game body.game-focused .overlay,.mobile-game .machine:fullscreen .overlay{justify-content:flex-start!important}}
body.training[data-tutorial-step=special] .hud{display:block!important}
body.training[data-tutorial-step=special] .hud-name,body.training[data-tutorial-step=special] .health-track,body.training[data-tutorial-step=special] .score-hud{display:none!important}

.active-run[data-play-state=boarding] .touch-controls,.active-run[data-play-state=inspection] .touch-controls{visibility:hidden!important}#inspection{width:min(420px,90vw);max-height:85dvh;overflow:auto;background:#122735;color:#f0eedb;border:1px solid #d8be65;border-radius:18px;padding:25px}#inspection::backdrop{background:#081a29bb}#inspection h2{font-size:30px;margin:10px 0}#inspection p{font-size:13px;line-height:1.55}#inspection .wide{display:block;width:100%;min-height:48px;padding:10px;margin:9px 0;border:1px solid #91a8af;border-radius:10px;background:#243e4b;color:#eff3df;font-weight:700}#inspection #inspection-go{background:#ffcf35;color:#142636}#inspection button:disabled{opacity:.4}
.route-stops{grid-template-columns:repeat(4,1fr)}@media(max-width:700px){.route-stops{grid-template-columns:repeat(2,1fr)}}

.touch-controls .combo-ready{box-shadow:0 0 0 3px #ffe17a,0 0 24px #ffd63d99!important;filter:brightness(1.25)}

body.game-focused .mission-bar,body.game-focused .screen-bottom,.machine:fullscreen .mission-bar,.machine:fullscreen .screen-bottom{display:none!important}

/* Defeat freezes the scene in grey behind one centered, pre-rendered title. */
body[data-play-state=gameover] #game{filter:grayscale(1) brightness(.58);transition:filter .35s}
body[data-play-state=gameover] .hud,body[data-play-state=gameover] .mobile-toolbar{visibility:hidden}
body[data-play-state=gameover] .overlay{background:linear-gradient(transparent 20%,#0007 45%,#0007 55%,transparent 80%)!important;padding:0!important;display:block!important}
body[data-play-state=gameover] #overlay-tag,body[data-play-state=gameover] #overlay-hint{display:none!important}
body[data-play-state=gameover] #overlay-title.wasted-title{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(82vw,900px);height:auto;aspect-ratio:1408 / 242;margin:0!important;max-width:none;font-size:0!important;line-height:0;background:url('assets/wasted-ru.png?v=fish15') center/contain no-repeat;filter:drop-shadow(0 5px 0 #0007)}
body[data-play-state=gameover] #overlay-copy{position:absolute;left:0;right:0;top:calc(50% + min(7vw,82px));width:100%;max-width:100%;margin:12px 0 0;text-align:center;font-size:12px;line-height:1.5;color:#eee}
body[data-play-state=gameover] #start{position:absolute;left:50%;bottom:max(30px,env(safe-area-inset-bottom));transform:translateX(-50%);margin:0!important;min-width:210px;white-space:nowrap}
@media(max-height:400px){body[data-play-state=gameover] #overlay-title.wasted-title{width:min(66vw,650px)}body[data-play-state=gameover] #overlay-copy{top:calc(50% + 52px);font-size:10px}body[data-play-state=gameover] #start{bottom:15px;min-height:44px}}
@media(prefers-reduced-motion:reduce){body[data-play-state=gameover] #game{transition:none}}

#wanted-stars{color:#ffcf5c;font-size:clamp(19px,2.4vw,28px);letter-spacing:4px;text-shadow:0 2px 3px #000;}
#wanted-stars:empty{display:none;}
#wanted-stars.incoming{animation:wanted-arrival .7s steps(2,end) infinite;}
@keyframes wanted-arrival{50%{opacity:.4}}
@media(prefers-reduced-motion:reduce){#wanted-stars.incoming{animation:none;}}

/* Compact run inventory: spare tickets and remaining cat interceptions. */
.run-supplies{position:absolute;top:max(83px,calc(env(safe-area-inset-top) + 71px));left:max(15px,env(safe-area-inset-left));display:flex;align-items:center;gap:7px;z-index:4;pointer-events:none;font:700 10px 'Roboto Mono',monospace;color:#ffda53;max-width:210px;flex-wrap:wrap}
.run-supplies[hidden],.run-supplies [hidden]{display:none!important}#ticket-count,#cat-count{display:flex;align-items:center;gap:3px}.ticket-icon{display:block;width:18px;height:12px;border:2px solid #ffda53;background:#173140;box-sizing:border-box;border-left-style:dashed;border-right-style:dashed;transform:rotate(-8deg)}#cat-count img{width:21px;height:24px;object-fit:contain;image-rendering:pixelated}#go-held{background:#ffda53;color:#16202a;padding:3px}#go-held.ready{outline:1px solid #fff;outline-offset:2px}#fish-held{font-size:17px}

/* Keep the tutorial beside the closer mobile camera. */
@media(max-height:450px){.mobile-game.landscape-game .tutorial-card{width:min(290px,42vw)}}

/* The game is the entire document while playing, not an overlay on a long page. */
html.game-focused,html.game-focused body{
 width:100%!important;height:100%!important;min-height:0!important;margin:0!important;
 overflow:hidden!important;overscroll-behavior:none;scroll-behavior:auto!important;
}
html.game-focused body{position:fixed;inset:0}
html.game-focused body>.app{
 position:fixed;inset:0;width:100%!important;height:100%!important;max-width:none!important;
 margin:0!important;padding:0!important;overflow:hidden!important;
}
html.game-focused body>:not(.app),body.game-focused .app>:not(.machine){display:none!important}
body.game-focused .machine,body.game-focused .machine *{
 caret-color:transparent!important;-webkit-user-select:none!important;user-select:none!important;
 -webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;
}
body.game-focused .machine ::selection{background:transparent;color:inherit}
body.game-focused #game,body.game-focused .touch-controls{touch-action:none}
body.game-focused #game{cursor:none!important;outline:none!important;-webkit-user-drag:none}
.mobile-game body.game-focused .machine,.mobile-game body.game-focused .machine *{cursor:none!important}
body.game-focused dialog,body.game-focused .overlay{overscroll-behavior:contain;touch-action:pan-y}

/* Private snapshot viewer has no live controls or focus/fullscreen side effects. */
body.replay-mode,body.replay-mode .app,body.replay-mode .machine{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;max-width:none!important;overflow:hidden!important;background:#08131c}
body.replay-mode .app>:not(.machine),body.replay-mode .machine>:not(.screen),body.replay-mode .screen>:not(canvas){display:none!important}
body.replay-mode #game{width:100%!important;height:100%!important;object-fit:contain;pointer-events:none}
.recording-preference{display:flex;align-items:center;gap:10px}.recording-notice{font-size:12px!important;opacity:.7}
.recording-disclosure{font:10px/1.4 monospace;color:#bbc8c8;max-width:230px;margin-left:auto}
@media(max-width:600px){.recording-disclosure{font-size:8px;max-width:130px}}

body.replay-mode .screen{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;padding:0!important;aspect-ratio:auto!important}

.recording-disclosure{background:transparent;border:0;text-align:left;padding:4px;cursor:pointer}#recording-settings{max-width:440px;padding:28px;color:#e9efee;background:#182a37;border:1px solid #647981}#recording-close{float:right}

/* Feedback belongs to the fullscreen subtree; only its deliberate text field has a caret. */
#feedback{box-sizing:border-box;width:min(680px,calc(100% - 32px));max-width:680px;max-height:calc(100dvh - 24px);padding:24px 30px;background:#122737;color:#f1f1df;border:2px solid #ffd537;border-radius:4px;box-shadow:8px 8px 0 #050e19;overflow:auto;overscroll-behavior:contain}
#feedback::backdrop{background:#06101bdf}
#feedback .feedback-top,#feedback .feedback-bottom{display:flex;align-items:center;gap:12px;justify-content:space-between}
#feedback-progress{font:11px 'Roboto Mono',monospace;color:#ffdb49;letter-spacing:.09em}
#feedback button{min-height:44px;padding:10px 16px;background:#213c4d;border:1px solid #718b96;border-radius:4px;color:#edf1e6;font:700 15px 'Roboto Mono',monospace;cursor:pointer!important;touch-action:manipulation}
#feedback button:focus-visible,#feedback textarea:focus-visible{outline:3px solid #78dece;outline-offset:3px}
#feedback button:disabled{opacity:.4}
#feedback .feedback-track{height:3px;margin:12px 0 20px;background:#344d5d}
#feedback-meter{display:block;height:100%;background:#ffd537}
#feedback h2{font:700 clamp(24px,4vw,36px)/1.08 'Russo One',sans-serif;margin:0 0 10px;letter-spacing:-.02em}
#feedback-hint{font:13px/1.5 'Roboto Mono',monospace;margin:0 0 18px;color:#bacbd0}
#feedback .feedback-choices{display:flex;gap:12px;margin:10px 0 26px}
#feedback .feedback-choices button{flex:1;min-width:0;min-height:62px;font-size:22px}
#feedback .feedback-choices button[aria-pressed=true],#feedback #feedback-next{background:#ffd537;border-color:#ffe580;color:#12212b}
#feedback-status{font:12px/1.4 'Roboto Mono',monospace;color:#cfddd9;flex:1}
#feedback #feedback-next{margin-left:auto;white-space:nowrap}
#feedback textarea{box-sizing:border-box;width:100%;padding:12px;background:#0b1d2b;border:1px solid #708895;border-radius:4px;color:#f1f1df;resize:vertical;font:16px/1.4 sans-serif;min-height:65px;max-height:130px}
body.game-focused #feedback textarea{caret-color:#ffd537!important;cursor:text!important;-webkit-user-select:text!important;user-select:text!important;-webkit-touch-callout:default}
body.game-focused #feedback textarea::selection{background:#536576!important;color:#fff}
#feedback .feedback-note{font:11px/1.4 sans-serif;color:#a6bcc7;margin:8px 0 16px}
@media(max-height:450px){#feedback{padding:12px 22px;max-height:calc(100dvh - 16px)}#feedback h2{font-size:25px}#feedback .feedback-track{margin:8px 0 12px}#feedback-hint{margin-bottom:10px;font-size:12px}#feedback .feedback-choices{margin:8px 0 14px}#feedback .feedback-choices button{min-height:52px}#feedback .feedback-note{margin-bottom:8px}#feedback button{padding:8px 12px}}
@media(max-width:420px){#feedback{padding:18px}#feedback .feedback-choices{gap:6px}#feedback .feedback-choices button{padding:7px;font-size:18px}#feedback .feedback-bottom{flex-wrap:wrap}#feedback-status:empty{display:none}}

/* Equal, centered result actions. A dedicated grid prevents unrelated button styles from drifting. */
.overlay-actions{display:grid;gap:12px;width:min(100%,400px);flex:none}
.overlay-actions>*{box-sizing:border-box;width:100%;min-width:0;min-height:52px;margin:0!important;border:0;padding:14px 20px;display:flex;align-items:center;justify-content:center;gap:12px;text-align:center;font:700 13px/1.4 'Roboto Mono',monospace;letter-spacing:.4px;box-shadow:3px 3px 0 #705425}
.overlay-actions>*[hidden]{display:none}
.overlay-actions #start span{font-size:20px;line-height:1}
.overlay[data-kind=won]{align-items:center;text-align:center;padding:26px max(24px,env(safe-area-inset-left));overflow:auto;background:#0b1728d6}
.overlay[data-kind=won] h1{font-size:clamp(28px,4vw,50px)}
.overlay[data-kind=won] p{margin:14px 0;max-width:650px;line-height:1.5}
.overlay[data-kind=won] .run-collection{justify-content:center;max-width:680px}
.overlay[data-kind=won] .intro-tag{margin-bottom:14px}
.overlay[data-kind=won] .overlay-actions{align-self:center}
.overlay[data-kind=won] .overlay-hint{margin-top:16px}
body[data-play-state=gameover] .overlay-actions{display:contents}
@media(min-width:520px) and (max-height:680px){
 .overlay[data-kind=won],.mobile-game body.game-focused .overlay[data-kind=won]{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,min(340px,42vw));grid-template-rows:auto auto auto auto;column-gap:28px;row-gap:8px;align-content:center;justify-content:center!important;text-align:left;padding:18px max(26px,env(safe-area-inset-left));}
 .overlay[data-kind=won]>:not(.overlay-actions){grid-column:1}
 .overlay[data-kind=won] .intro-tag{margin:0;font-size:8px;display:block}
 .overlay[data-kind=won] h1{font-size:clamp(25px,4vw,38px)}
 .overlay[data-kind=won] p{margin:0;font-size:11px!important;line-height:1.5}
 .overlay[data-kind=won] .run-collection{justify-content:flex-start;max-width:100%!important;margin:0}
 .overlay[data-kind=won] .run-collection span{font-size:8px}
 .overlay[data-kind=won] .overlay-actions{grid-column:2;grid-row:1/5;width:100%;align-self:center}
 .mobile-game body.game-focused .overlay[data-kind=won] .primary{margin:0!important;min-height:52px}
 .overlay[data-kind=won] .overlay-hint{display:none}
}
/* Result screens use the space released by the touch dock. */
.mobile-game body.game-focused:is([data-play-state=won],[data-play-state=stageclear],[data-play-state=gameover]) .screen{inset:0!important;height:100%!important}
body:is([data-play-state=won],[data-play-state=stageclear],[data-play-state=gameover]) .touch-controls,
body:is([data-play-state=won],[data-play-state=stageclear]) .hud,
body:is([data-play-state=won],[data-play-state=stageclear]) .mobile-toolbar{display:none!important}
.overlay[data-kind=won] .overlay-actions>*{min-height:52px!important;margin:0!important}
.overlay[hidden]{display:none!important}
body[data-play-state=gameover] #start{width:min(400px,calc(100% - 48px))}
