@font-face{font-family:Manrope;src:url('/assets/home-20261017/manrope-800.woff');font-weight:800;font-display:swap}@font-face{font-family:Manrope;src:url('/assets/home-20261017/manrope-500.woff');font-weight:500;font-display:swap}
*{box-sizing:border-box}body{margin:0;background:linear-gradient(145deg,#fff7e9,#f5eefe 50%,#e5f7ff);color:#29243f;font:500 15px Manrope,system-ui;min-height:100svh}a{color:inherit}button,select,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #684d9e;outline-offset:3px}button{border:2px solid white;border-radius:22px;background:#fff8;color:#5d4b7b;min-height:44px;padding:9px 15px;font-weight:800;box-shadow:0 3px 8px #7d5c9820}button:disabled{opacity:.65;cursor:default}.primary{background:linear-gradient(#ff8bc4,#f74690);color:white;border:2px solid #fff;font-size:22px;box-shadow:0 4px 0 #d52b7040,0 7px 12px #b45f9b21;border-radius:50px;min-height:56px}.primary:hover{filter:brightness(1.04)}[hidden]{display:none!important}.game-top{max-width:460px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;padding:13px 12px;gap:8px}.game-top a{text-decoration:none;font-weight:800;font-size:14px}.game-top span{color:#dc4b94}.game-top button{font-size:12px;min-height:36px}.world{position:relative;aspect-ratio:4/7;width:min(100%,400px);margin:0 auto;overflow:hidden;border:4px solid white;border-radius:30px;box-shadow:0 12px 40px #8974af30;background:url('/assets/home-20261017/spring-scene.webp') center/cover}canvas{width:100%;height:100%;display:block;touch-action:none;outline-offset:-4px!important}#hud{position:absolute;inset:12px 10px auto;display:flex;gap:6px;align-items:center;pointer-events:none}#hud span{flex:1;text-align:center;background:#fffffff0;padding:12px 4px;border-radius:17px;font-size:12px;box-shadow:0 3px 5px #6999bb15;font-weight:800}#hud-c{color:#e85198}#pause{position:absolute;right:14px;top:68px;width:43px;height:43px;min-height:0;padding:0;border-radius:50%;background:#fff}#controls{position:absolute;bottom:12px;left:10px;right:10px;display:grid;justify-items:center;gap:7px}#swipe-tip{background:#fffc;border-radius:22px;padding:9px 18px;color:#6a6586;font-size:12px;pointer-events:none}#dpad{display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(2,42px);gap:4px}#dpad button{background:#fffffff0;padding:0;font-size:25px}#dpad button:first-child{grid-column:2}#dpad button:nth-child(2){grid-column:1}#tool-controls{background:#fffdf4ed;border-radius:20px;padding:9px;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;width:100%}#tool-controls [data-tool]{width:30%;font-size:12px;background:white;padding:7px;display:grid;gap:2px;border:2px solid #dccef1}#tool-controls .selected{border-color:#ef67ae;background:#fff0f7}#tool-controls small{font-size:10px;color:#a45f8b}#release{width:100%;min-height:36px;background:#fb76b5;color:white}#aim-controls{background:#fff7f4f5;border-radius:20px;padding:9px 12px;display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;width:100%;font-size:11px}#aim-controls label{display:grid;grid-template-columns:1fr 30px}#aim-controls input{grid-column:1/3;width:100%;accent-color:#f760a5}#aim-controls select{min-width:0;border:0;border-radius:12px;padding:7px;background:#fff}#throw{min-height:39px;background:#ff70ae;color:#fff}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;text-align:center}.start{justify-content:flex-end;background:linear-gradient(transparent 52%,#fff3f7f0)}#poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}.start .primary{width:94%;margin-top:auto}.start-nav{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:12px}.start-nav button{display:grid;gap:4px;align-content:center;font-size:11px;min-height:70px;background:#fffaf8ee;border-radius:18px;padding:6px}.start-nav button span{font-size:24px}.overlay h1,.overlay h2{font-size:38px;line-height:1;letter-spacing:-1.8px;margin:10px 0 22px}.pause-panel,.results{background:linear-gradient(#d8f3ffed,#fff2f8f0)}.pause-panel button{width:85%;margin:6px}.results h2{color:#bf3d87;font-size:43px;text-shadow:0 3px white}.result-stars{color:#ffc536;font-size:45px;letter-spacing:5px}.result-dogs{display:flex;width:230px;height:140px}.result-dogs i{background:url('/vibes/assets/sprites.webp') 0 50%/400% 300%;width:50%;height:100%;display:block}.result-dogs i+i{background-position:33.333% 50%}.score-card{background:#fffffff0;border:2px solid white;border-radius:26px;padding:16px;width:100%;box-shadow:0 8px 15px #c0b1c62b;margin:8px 0 15px}.score-card p{display:flex;justify-content:space-around;margin:0;gap:8px;font-size:11px;color:#83718e}.score-card strong{display:block;color:#29243f;font-size:32px;margin:5px 0}#result-detail{font-size:13px;color:#786783}.results button{width:94%;margin:5px 0}.results a{display:block;text-decoration:none;background:white;border:2px solid #d7c2f2;color:#8c65bd;padding:12px 24px;width:94%;border-radius:40px;margin-top:8px;font-weight:800}.game-footer{text-align:center;color:#8f8199;font-size:11px;padding:16px 8px}.game-footer a{padding:10px}dialog{border:2px solid white;border-radius:28px;max-width:min(92vw,440px);background:#fff9f4;color:#3d3253;padding:26px;box-shadow:0 20px 90px #5b3d7d44;line-height:1.65}dialog::backdrop{background:#44304b66}dialog h2{font-size:24px}dialog button{background:#f7dff0}dialog [data-close]{display:block;margin:20px auto 0;min-width:120px}#scores{padding:0;list-style:none;font-size:14px;line-height:2.5}.character-choices{display:flex;gap:10px}.character-choices button{flex:1;min-height:80px}#game-help{font-size:15px}@media(min-width:700px){.world{width:min(400px,calc((100svh - 110px)*4/7));min-width:300px}.game-top{max-width:430px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
.overlay{z-index:3;isolation:isolate}.start{background:linear-gradient(transparent 58%,#fff1f7f2)}#controls,#hud{z-index:1}#pause{z-index:2}

#poster{object-fit:contain;object-position:center top;background:linear-gradient(#bdeeff,#fce8f3)}

#turn-status{grid-column:1/3;margin:2px 0 0;text-align:center;font-size:11px;color:#82688d}
/* Persistent counters stay outside the moving scene, including after a fall. */
.run-status{width:min(100% - 20px,400px);margin:0 auto 10px;padding:10px 12px;border:2px solid white;border-radius:18px;background:#fffaf3;box-shadow:0 4px 14px #987ab51a;text-align:center;display:grid;gap:4px;min-height:65px}.run-status strong{font-size:17px;color:#a52f72;letter-spacing:.2px}.run-status>span{font-size:11px;font-weight:800;color:#504060;line-height:1.4}.difficulty-choice{position:absolute;left:16px;right:16px;top:15px;display:grid;grid-template-columns:1fr 1.45fr;align-items:center;gap:5px 12px;padding:10px 14px;border:2px solid white;border-radius:20px;background:#fffaf4f5;text-align:left;font-size:13px;font-weight:800;box-shadow:0 3px 12px #794c9020}.difficulty-choice select{width:100%;min-height:38px;border:1px solid #d9bce8;border-radius:13px;padding:5px 9px;background:white;color:#563274;font-weight:800}.difficulty-choice small{grid-column:1/3;font-size:10px;font-weight:500;line-height:1.35;color:#584366}.world #run-feedback{position:absolute;z-index:4;top:116px;left:15px;right:15px;padding:13px 10px;border-radius:18px;background:#fff0f6f5;border:2px solid #f18dbb;box-shadow:0 4px 20px #9e457826;color:#972259;font-size:16px;text-align:center;font-weight:800;pointer-events:none}#protect{width:100%;min-height:35px;padding:5px 9px;font-size:12px;background:#b3f0db;color:#245a4a}#tool-controls [data-tool]{min-height:40px}#tool-controls small{font-size:10px}.score-card #result-detail{line-height:1.6}.world{scroll-margin-top:10px}@media(min-width:700px){.world{width:min(400px,calc((100svh - 195px)*4/7));min-width:300px}}@media(max-width:360px){.run-status strong{font-size:15px}.run-status>span{font-size:10px}.game-top span{font-size:12px}.difficulty-choice{top:10px;padding:8px 10px}}
.start-settings{position:absolute;left:14px;right:14px;top:12px;display:grid;gap:7px}.start-settings .difficulty-choice{position:static;box-shadow:none;padding:7px 10px}.world-choice{display:grid;grid-template-columns:1fr 2fr;align-items:center;gap:10px;padding:8px 12px;border:2px solid white;border-radius:17px;background:#fffaf4f5;font-size:13px;font-weight:800;text-align:left}.world-choice select{min-height:36px;width:100%;padding:5px 8px;background:#fff;border:1px solid #d9bce8;border-radius:12px;font-size:12px;color:#563274;font-weight:800}#choose-world{min-height:38px;padding:8px 14px;font-size:13px;background:#fff9fc;width:94%}.run-status{min-height:75px}#run-goal{font-size:10px;line-height:1.5}@media(min-width:700px){.world{width:min(400px,calc((100svh - 205px)*4/7));min-width:300px}}@media(max-width:360px){.world-choice,.start-settings .difficulty-choice{font-size:12px}.start-settings{top:8px;left:10px;right:10px;gap:5px}}

#run-clock{font-variant-numeric:tabular-nums;font-weight:800;color:#775292}.ranking-entry{display:grid;gap:7px;width:100%;max-width:310px;background:#fff9;border-radius:18px;padding:12px;box-sizing:border-box}.ranking-entry label{font-weight:800;font-size:13px}.ranking-entry input{min-width:0;width:100%;box-sizing:border-box;border:1px solid #d5c1e5;background:#fff;border-radius:12px;padding:10px;color:#362b50;font:inherit}.ranking-entry small,.ranking-entry p{font-size:11px;line-height:1.4;margin:0}.ranking-entry button{padding:9px 12px}.results{overflow-y:auto;justify-content:flex-start;padding-top:22px!important;padding-bottom:24px!important}.results .result-dogs{display:none}.results h2{margin:5px 0}.results .score-card{margin:6px 0}.results .result-stars{font-size:28px}#scores{padding-left:26px}#scores li{padding:10px 5px;border-bottom:1px solid #e9dff1}#scores li span{display:block;font-size:12px;line-height:1.5;color:#695b7e}.ranking-rule{font-size:12px;color:#695b7e}#ranking-load{font-size:13px}dialog{max-height:85dvh;overflow-y:auto}.run-status{min-height:73px}

#scores{list-style:decimal;padding-left:26px;line-height:1.6}

#move-controls{width:100%;background:#fff8edf5;border:2px solid #fff;border-radius:20px;padding:12px;text-align:center}#move-controls p{font-size:12px;margin:5px 0 10px}#move-controls>div{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}#move-controls button{min-height:44px;font-size:12px;padding:7px;background:#f2ddfc}

#rescue-route-controls{display:flex;justify-content:center;gap:5px;width:100%;background:#fff9;border-radius:18px;padding:5px}#rescue-route-controls button{font-size:11px;min-height:38px;padding:6px 10px}

#rescue-route-controls button,#release,#throw,#protect,#tool-controls [data-tool],.game-top button{min-height:44px}
#aim-controls input{min-height:44px;margin:0}#dpad{grid-template-rows:repeat(2,46px)}
@media(max-width:700px){select,input:not([type=range]){font-size:16px!important;min-height:44px}.game-top a,.game-footer a{display:inline-flex;align-items:center;min-height:44px}.difficulty-choice select,.world-choice select{min-height:44px}.world-choice{grid-template-columns:1fr 2.6fr}#controls{bottom:max(8px,env(safe-area-inset-bottom));gap:5px}#aim-controls{padding:7px 10px;gap:4px 10px}#tool-controls{padding:6px;gap:4px}#tool-controls [data-tool]{padding:5px;font-size:11px}#rescue-route-controls{padding:3px}.game-footer{padding-bottom:max(16px,env(safe-area-inset-bottom))}}


.pause-panel>a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border-radius:22px}

/* One stable frame before and after Play: no native fullscreen, fixed body or scaling transition. */
#pause{width:48px;height:48px;min-height:48px}
@media(max-width:700px) and (min-height:501px){.world{width:min(calc(100% - 16px),400px,calc((100svh - 100px)*4/7));min-width:0}#rescue-route-controls button{padding:6px;font-size:10px}}
#practice{width:94%;margin-top:8px;min-height:44px;font-size:14px;background:#fff8fb}
.practice-panel{background:linear-gradient(155deg,#fff9ee,#edf7ff 55%,#fff0f7);justify-content:flex-start;gap:6px;padding:10px 12px;overflow-y:auto;overscroll-behavior:contain;text-align:center}
.practice-panel h2{font-size:24px;line-height:1.1;letter-spacing:-.6px;margin:0}.practice-panel p{margin:0}.practice-step{font-size:12px;color:#82638f}.practice-task{font-size:16px;line-height:1.3;font-weight:800;min-height:42px;max-width:340px}
.practice-picture{width:min(100%,220px);aspect-ratio:16/11;flex:none;background:#fff9;border:2px solid white;border-radius:22px;touch-action:none}.practice-picture>svg{display:block;width:100%;height:100%;pointer-events:none}
.practice-actions{display:flex;gap:6px;justify-content:center;align-items:center;flex-wrap:wrap;width:100%;min-height:44px}.practice-actions button{min-height:44px;min-width:44px;font-size:13px;padding:7px 10px;background:#eddefb}.practice-actions button[aria-pressed=true]{background:#c7edda;border-color:#579a74}.practice-actions label{display:grid;grid-template-columns:1fr auto;gap:0 6px;text-align:left;font-size:13px;flex:1;min-width:110px}.practice-actions input{grid-column:1/3;width:100%;min-height:44px;accent-color:#c64b8f}.practice-feedback{min-height:25px;font-size:14px;font-weight:800;color:#436f58}.practice-footer{display:flex;gap:6px;width:100%;margin-top:auto}.practice-footer button{flex:1;min-width:0;min-height:44px;font-size:13px;padding:7px 9px}.practice-footer #practice-next{background:#bfe9cf;color:#27573e}.practice-footer #practice-next:disabled{opacity:.5}.practice-safe{font-size:10px;color:#75637e;line-height:1.3}
@media(max-height:700px){.practice-picture{width:min(100%,180px)}.practice-panel{gap:5px}.practice-panel h2{font-size:22px}.practice-task{font-size:15px;min-height:39px}}

.pause-panel{overflow-y:auto;justify-content:flex-start}.pause-panel h2{font-size:30px;margin:12px 0}.pause-panel p{margin:8px 0 12px}.pause-panel button,.pause-panel>a{flex-shrink:0}
/* Compact touch controls keep the route and characters visible. */
#controls{bottom:8px;gap:4px}#aim-controls{padding:6px;display:flex;flex-direction:column;gap:4px}#aim-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:5px;width:100%}#aim-toolbar button{min-height:44px;font-size:12px;padding:7px}#weapon{min-width:0;min-height:44px;font-size:16px}#aim-adjustments{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}#aim-adjustments label{min-width:0;font-size:12px}#aim-adjustments input{min-height:44px;width:100%}#turn-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#move-controls{padding:6px}#move-controls strong{font-size:12px}#move-controls p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#move-controls>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}#move-controls button{min-height:44px;padding:5px 2px;font-size:10px}#tool-controls{padding:5px;display:flex;flex-direction:column;gap:4px}#rescue-build-bar{display:grid;grid-template-columns:1fr 1fr;gap:4px;width:100%}#rescue-build-bar button,#rescue-tool-shelf button{min-height:44px;padding:5px;font-size:12px}#rescue-tool-shelf{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;width:100%}#rescue-route-controls{padding:0;gap:4px}#rescue-route-controls button,#protect{min-height:44px;padding:5px;font-size:12px}#dpad{display:grid;grid-template-columns:repeat(4,46px);grid-template-rows:46px;gap:4px}#dpad button{grid-area:auto;min-height:46px}#dpad [aria-label="Move left"]{order:-1}#swipe-tip{padding:5px;font-size:11px}
/* Primary navigation precedes the optional Top 10 entry. */
.results{padding:12px;gap:5px}.results>*{flex-shrink:0}.results h2{font-size:30px;text-shadow:none}.results .result-stars{font-size:23px}.score-card{padding:9px 10px}.score-card strong{font-size:26px}#result-detail{font-size:11px;line-height:1.35;white-space:pre-line}.result-reason{font-size:11px;line-height:1.35;margin:2px 0}.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;width:100%}.result-actions button,.result-actions a{box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-height:44px;height:auto;margin:0;padding:8px;font-size:13px;line-height:1.25;white-space:normal;text-align:center}#next{grid-column:1/-1;min-height:48px;font-size:18px}#choose-world{grid-column:1/-1;font-size:12px}#challenge-friend{min-height:44px;height:auto;font-size:13px;padding:8px}.ranking-section{width:100%;margin-top:5px}.ranking-section summary{display:flex;align-items:center;min-height:44px;font-size:13px;cursor:pointer}.ranking-section .ranking-entry{width:100%;box-sizing:border-box;margin:0}
#rescue-tool-shelf [data-tool]{width:100%}.result-actions button,.result-actions a{width:100%}.results{padding-top:12px!important;padding-bottom:12px!important}#dpad button:first-child,#dpad button:nth-child(2){grid-column:auto;grid-row:auto}

/* Never place live controls or status panels over the canvas, in any game. */
#game-toolbar{width:min(calc(100% - 20px),400px);margin:0 auto 6px;display:flex;align-items:center;gap:6px}
#game-toolbar #hud{position:static;inset:auto;display:flex;flex:1;min-width:0;gap:4px;pointer-events:none;z-index:auto}
#game-toolbar #hud span{min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;padding:6px 3px;font-size:10px;line-height:1.2;overflow-wrap:anywhere}
#game-toolbar #pause{position:static;inset:auto;flex:0 0 48px;width:48px;height:48px;min-height:48px;z-index:auto}
#controls{position:static;inset:auto;width:min(calc(100% - 20px),400px);margin:8px auto 0;z-index:auto}
.run-status #run-feedback{position:static;inset:auto;margin:0;padding:4px 0;color:#972259;font-size:12px;line-height:1.3;font-weight:800;pointer-events:none}
.run-status{margin-bottom:6px;padding:6px 10px;gap:2px;min-height:0}.run-status strong{font-size:14px}.run-status>span{font-size:10px;line-height:1.25}
.world{width:min(calc(100% - 16px),400px,calc(max(300px,100svh - 250px)*4/7));min-width:0}
.start{overflow-y:auto;overscroll-behavior:contain}.start>button,.start>.start-nav,.start>.start-settings{flex-shrink:0}
@media(max-width:700px) and (min-height:501px){.world{width:min(calc(100% - 16px),400px,calc(max(300px,100svh - 250px)*4/7));min-width:0}}

#game-notices{width:min(calc(100% - 20px),400px);min-height:34px;margin:0 auto 4px;display:flex;align-items:center;justify-content:center}
#game-notices #run-feedback{position:static;inset:auto;margin:0;padding:3px 6px;color:#765078;font-size:11px;line-height:1.25;text-align:center;font-weight:800;pointer-events:none}
/* Small start screens scroll their choices instead of stacking them on top of each other. */
.start-settings{position:static;inset:auto;width:100%;margin:0 0 8px}.start{justify-content:flex-start}.start .primary{margin-top:auto}
body[data-playing="true"] .game-footer{display:none}

/* Results share the canvas frame; only their content scrolls on short phones. */
.world > .results {box-sizing:border-box;width:100%;max-width:100%;min-width:0;overflow-x:hidden;overscroll-behavior:contain;background:linear-gradient(160deg,#e2f4ff,#fff0f6 65%,#f0edff);color:#513b65;border-radius:inherit;scrollbar-width:thin}
.results > * {box-sizing:border-box;max-width:100%;min-width:0}
.results h2 {font-size:clamp(22px,6vw,30px);line-height:1.15;overflow-wrap:anywhere}
.results .score-card p {display:flex;justify-content:space-evenly;gap:8px;margin:0 0 6px}
.results .score-card p span {flex:1;min-width:0;font-size:10px;letter-spacing:.03em}
.results .score-card strong {display:block;overflow-wrap:anywhere}
.results .score-card #result-detail {line-height:1.35}
.result-actions a {text-decoration:none}
.results #challenge-friend {width:100%;margin:0}
/* Width comes from the device, never from its height. No fullscreen or zoom transform. */
body .world{width:min(calc(100% - 16px),440px);min-width:0;aspect-ratio:4/7}
body .game-top,body #game-toolbar,body #controls,body #game-notices,body .run-status{width:min(calc(100% - 16px),440px);max-width:440px}
.game-top{padding:6px 0}.game-top a,.game-top button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}.game-top span{font-size:13px}.game-top button{padding:7px 10px}
body .start{justify-content:flex-end;padding:14px;gap:8px;background:linear-gradient(transparent 55%,#fff2f7 88%)}
body .start .primary{width:100%;margin:0;min-height:60px;font-size:25px}
body #practice{width:100%;margin:0;min-height:48px}
#game-settings{width:100%;max-height:65%;overflow-y:auto;flex:none;border-radius:18px;background:#fff8fcf2;padding:0 8px}
#game-settings>summary,#result-more>summary{min-height:48px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:800;padding:8px;list-style:none}
#game-settings[open] summary::after,#result-more[open]>summary::after{content:' ▴'}
#game-settings:not([open]) summary::after,#result-more:not([open])>summary::after{content:' ▾'}
#game-settings .start-settings{margin:0;gap:6px}.start-settings label{position:static;inset:auto;grid-template-columns:1fr 1.8fr;font-size:13px}.start-settings select{min-width:0;min-height:48px;font-size:16px!important}
#game-settings .start-nav{margin:8px 0;gap:5px}#game-settings .start-nav button{min-height:52px;font-size:12px}#game-settings .start-nav span{font-size:19px}
.start #difficulty-note{font-size:12px;line-height:1.4}
body .results .result-actions #retry{grid-column:1/-1;min-height:56px;font-size:20px}
body .results .result-actions #next{min-height:48px;font-size:17px}
#result-more{width:100%;background:#fff9;border-radius:18px}#result-more>summary{font-size:14px}#result-more[open]{padding:0 8px 8px}
body[data-screen="result"] .run-status,body[data-screen="paused"] .run-status{display:none}
#boop-controls{display:flex;justify-content:center;gap:12px;width:100%}#boop-controls button{min-width:88px;min-height:52px;font-size:28px;background:#fff8fc;touch-action:none}
#dpad button{touch-action:none;min-width:48px;min-height:48px}#dpad{grid-template-columns:repeat(4,48px);grid-template-rows:48px;gap:6px}
#rescue-build-guide{width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px}#rescue-ready{font-size:12px;margin:0;text-align:left}#rescue-next{min-height:48px;font-size:12px;flex-shrink:0}
#rescue-route-controls button,#protect,#rescue-build-bar button,#rescue-tool-shelf button,#aim-toolbar button,#weapon{min-height:48px}
#move-controls:not([hidden]){border:3px solid #c78ad8;background:#fff3dc}#move-controls:not([hidden]) button{min-height:48px;border-color:#b47ac6;font-size:12px}
#game-notices{min-height:30px}#game-notices #run-feedback{font-size:12px}#game-toolbar #hud span{font-size:12px}.run-status{padding:4px 8px}.run-status #run-goal{font-size:12px}.run-status strong{font-size:17px}.run-status #run-clock{font-size:12px}
.practice-picture{width:min(100%,260px)}.practice-task{font-size:17px}.practice-panel{gap:9px;padding:16px 12px}.practice-actions button,.practice-footer button{min-height:48px;font-size:15px}.practice-hand{animation:teach-swipe 1.6s ease-in-out infinite}.practice-hand.hand-left{animation-direction:reverse}
@keyframes teach-swipe{0%,15%{transform:translateX(-25px);opacity:.6}75%,100%{transform:translateX(30px);opacity:1}}
@media(prefers-reduced-motion:reduce){.practice-hand{animation:none}}
@media(max-width:360px){.game-top span{font-size:11px}.game-top a,.game-top button{font-size:12px}body .start{padding:10px}.practice-panel{padding:12px 9px}.practice-task{font-size:16px}}
@media(max-height:500px) and (orientation:landscape){body .world{width:min(calc(100% - 16px),440px)}.game-top{margin-bottom:5px}}

.practice-hand.hand-up{animation-name:teach-up}@keyframes teach-up{0%,15%{transform:translateY(8px);opacity:.6}75%,100%{transform:translateY(-20px);opacity:1}}

/* One live counter rail replaces duplicated HUD rows; the pause menu holds navigation. */
body[data-playing="true"]>.game-top{display:none}
#game-toolbar #hud{display:none!important}
#game-toolbar #run-status{flex:1;min-width:0;width:auto;max-width:none;margin:0;padding:4px 8px;box-shadow:none}

/* Keep game gestures local: avoid long-press menus and double-tap button zoom.
   Pinch zoom and scrolling stay available outside the game gesture surfaces. */
canvas,.practice-picture,#controls button,.practice-panel button,#game-toolbar button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#controls button,#game-toolbar button,.practice-panel button,.pause-panel button,.results button,.start button{touch-action:manipulation}
#boop-controls button,#dpad button{touch-action:none}

/* The two planning games reserve visible space for their controls inside the
   dynamic viewport, including Safari's browser bars and the home indicator. */
body[data-playing="true"]:is([data-game="boom-buddies"],[data-game="little-rescue"]) main{height:100svh;height:100dvh;min-height:440px;padding:max(4px,env(safe-area-inset-top)) 0 max(10px,env(safe-area-inset-bottom));display:grid;grid-template-rows:auto auto minmax(180px,1fr) auto;gap:4px}
body[data-playing="true"]:is([data-game="boom-buddies"],[data-game="little-rescue"]) :is(#game-toolbar,#game-notices,#controls){margin:0 auto}
body[data-playing="true"]:is([data-game="boom-buddies"],[data-game="little-rescue"]) .world{height:100%;min-height:0;aspect-ratio:auto;border-radius:20px}
body[data-playing="true"]:is([data-game="boom-buddies"],[data-game="little-rescue"]) canvas{object-fit:contain}
body[data-game="boom-buddies"] #aim-adjustments label{grid-template-columns:1fr auto;line-height:1.2}
body[data-game="boom-buddies"] #aim-adjustments input{touch-action:none;min-height:44px}
body[data-game="boom-buddies"] #aim-toolbar:has(#weapon[hidden]){grid-template-columns:1fr 1fr}
body[data-game="little-rescue"] #rescue-route-controls{display:grid;grid-template-columns:44px 1fr 44px 1fr}
body[data-game="little-rescue"] #rescue-route-controls button{min-width:0;white-space:normal;line-height:1.2}
#route-overview{background:#e5d9fa}
#route-map-dialog{width:min(96vw,1100px);max-width:1100px;max-height:90svh;max-height:90dvh;padding:14px;overflow:auto}
#route-map-dialog h2{margin:0;font-size:24px}#route-map-dialog p{font-size:13px;line-height:1.4}
.route-map-actions{display:flex;gap:8px;flex-wrap:wrap;position:sticky;bottom:0;background:#fff9f4;padding:8px 0;z-index:1}.route-map-actions button{flex:1;min-height:48px}
.route-map-scroll{overflow:auto;touch-action:pan-x pan-y;border:2px solid #dccce8;border-radius:16px;background:#edf8f5}
.route-map-scroll svg{display:block;width:100%;min-height:100px;height:auto}
.route-map-scroll[data-zoom="true"] svg{width:max(100%,var(--route-map-width,1400px))}
body[data-playing="true"]:is([data-game="boom-buddies"],[data-game="little-rescue"]) .world{display:flex;align-items:center;justify-content:center}
body[data-playing="true"]:is([data-game="boom-buddies"],[data-game="little-rescue"]) canvas{width:auto;height:auto;max-width:100%;max-height:100%;aspect-ratio:4/5}

/* Four-direction controls follow the familiar keyboard arrow layout. */
#dpad{grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,48px);gap:6px}
#dpad button{order:0;width:48px;height:48px;min-width:48px;min-height:48px}
#dpad button[data-direction="0,-1"]{grid-column:2;grid-row:1}
#dpad button[data-direction="-1,0"]{grid-column:1;grid-row:2}
#dpad button[data-direction="0,1"]{grid-column:2;grid-row:2}
#dpad button[data-direction="1,0"]{grid-column:3;grid-row:2}

body[data-game="nom-nom"] .practice-actions{display:grid;grid-template-columns:repeat(3,minmax(48px,90px));grid-template-rows:repeat(2,minmax(48px,auto));gap:6px}
body[data-game="nom-nom"] .practice-actions button:nth-child(1){grid-column:1;grid-row:2}
body[data-game="nom-nom"] .practice-actions button:nth-child(2){grid-column:2;grid-row:1}
body[data-game="nom-nom"] .practice-actions button:nth-child(3){grid-column:3;grid-row:2}


/* Native touch controls share a predictable cancellation-safe input surface. */
canvas,#boop-controls button,#dpad button{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overscroll-behavior:contain}
