/* AIR RABBIT rough MVP - only what the shared sister UI (src/sister-ui.css) does not cover. Placeholder look. */
#world{touch-action:none}
.mvp-badge{position:absolute;top:calc(6px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:30;pointer-events:none;white-space:nowrap;padding:4px 11px;border-radius:12px;background:#153c64c2;color:#fff;font-size:11px;font-weight:700;letter-spacing:.04em}

/* Existing AIR RABBIT logo is used on the test home screen. */
.mvp-logo{line-height:1.1!important;font-size:clamp(40px,calc(12 * var(--layout-vw)),64px);font-weight:700;letter-spacing:.06em;text-align:center;color:#fff;-webkit-text-stroke:7px #1b78ad;paint-order:stroke fill;text-shadow:0 5px 12px #0d527466}
.mvp-logo small{display:block;margin-top:10px;font-size:.38em;letter-spacing:.3em;-webkit-text-stroke:5px #1b78ad}
.best-label,.best-unit{font-size:inherit}

/* HUD extras: course progress bar and elapsed time under the pause button. */
.hud-right{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.race-progress{width:min(180px,calc(42 * var(--layout-vw)));height:8px;margin-top:8px;border:1.5px solid #fff;border-radius:6px;background:#f5fcffb0;overflow:hidden}
.race-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#39c9e9,#0781bb)}
.race-time{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #fff}
.hud .eyebrow{white-space:nowrap}
.score-detail{margin-top:2px;font-size:14px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #fff}
.result-card .best-row{margin:10px 0}

/* Touch: the whole lower area is a relative drag strip (continuous left/right); a jump button on the right. */
.controls{display:flex;align-items:center;gap:10px}
.controls .keyboard-controls{flex:1;flex-wrap:wrap}
.controls .thumb-pad{flex:1}
.jump-button{display:none;flex:none;width:96px;height:96px;border-radius:50%;border:3px solid #fff;background:linear-gradient(#1089bf,#07639b);box-shadow:0 5px 0 #084c7b,0 8px 16px #0d527440;color:#fff;font-size:17px;font-weight:700;line-height:1.2;touch-action:none;user-select:none;-webkit-user-select:none}
.jump-button small{display:block;font-size:11px;font-weight:700;opacity:.9}
.jump-button.held{transform:translateY(3px);box-shadow:0 2px 0 #084c7b}
.jump-button span{display:block}
/* glider ON: the button turns the selected-yellow of the shared UI (#fff1a8) so the toggle state is visible */
.jump-button.glide-on{background:#fff1a8;color:#153c64;box-shadow:0 5px 0 #d8c46a,0 8px 16px #0d527440}
.glide-state{padding:4px 10px;border:2px solid #fff;border-radius:12px;background:#fff1a8;color:#153c64;font-size:14px;font-weight:700;white-space:nowrap}
@media(pointer:coarse){.jump-button{display:block}}
.keyboard-controls .space-key{width:auto;padding:0 12px;font-size:16px}
@media(max-width:700px){.keyboard-controls span{font-size:14px}}
/* The character-test build keeps touch controls usable in a narrow test window too. */
@media(max-width:700px){
 .controls .keyboard-controls{display:none}
 .controls .thumb-pad{display:flex}
 .jump-button{display:block;width:88px;height:88px}
 .mvp-badge{top:58px;white-space:normal;max-width:70%;text-align:center}
 #model-performance{bottom:118px!important;max-width:220px;font-size:10px!important}
}

/* Center the visible logo outline, including its asymmetric transparent margins. */
.home .hero{width:100%;align-self:center}
.home .hero h1{position:relative;left:-4.68359375%}

#attract-wake{position:absolute;inset:0;z-index:25;display:grid;place-items:center;background:transparent;color:white;font-size:clamp(25px,4vw,42px);font-weight:700;-webkit-text-stroke:3px #1b6590;paint-order:stroke fill;text-shadow:0 3px 5px #1238}

.audio-toggle{position:absolute;top:calc(12px + env(safe-area-inset-top));right:14px;z-index:40;min-width:58px;min-height:44px;border-radius:24px;padding:8px 12px;background:#ffffffed;border:1px solid white;color:#17628b;font-size:13px;font-weight:700;box-shadow:0 3px 8px #2453}
body:has(#home[hidden]) .audio-toggle{top:calc(72px + env(safe-area-inset-top))}

.audio-toggle{width:44px;min-width:44px;height:44px;padding:0;display:grid;place-items:center;border-radius:50%}
.audio-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.audio-toggle .bgm-off{display:none}
.audio-toggle[data-muted=true] .bgm-on{display:none}
.audio-toggle[data-muted=true] .bgm-off{display:block}

/* Reserve the upper-right HUD for pause, time and glide state. */
#notice{top:calc(164px + env(safe-area-inset-top));right:18px;max-width:calc(50% - 20px);white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:none}

.result-card .result-breakdown{margin:4px 0 24px;font-size:15px;font-weight:700;color:#496e88}.result-card .best-row{margin:20px 0 24px;padding:18px 0;font-size:14px}.result-card .best-row strong{font-size:22px}.result-card .result-distance{padding:20px 0 8px}.result-card .primary+.primary{margin-top:10px}

/* Goma baseline: centered 440px cards on PC, inset full-width cards on SP. */
.modal{place-items:center;padding:25px;background:#163c4550;backdrop-filter:blur(5px)}
.result-card{width:100%;max-width:440px;max-height:calc(100dvh - 50px);overflow-y:auto;padding:29px 25px 22px;border-radius:25px;background:#f4fbff}
.result-card h2{font-size:21px;margin:13px 0 5px}
.result-card .primary{min-height:52px;font-size:16px}
@media(min-width:861px){#notice{font-size:17px;padding:12px 18px;right:28px;top:calc(110px + env(safe-area-inset-top));max-width:440px}.result-card .eyebrow{font-size:12px}}
@media(max-width:860px){#notice{font-size:14px;right:18px;top:calc(130px + env(safe-area-inset-top));max-width:calc(50% - 20px)}}

/* Confirmed with the Goma thread: notice breakpoint is 1200px, cards share PC/SP dimensions. */
#notice{font-size:13px;padding:10px 13px;line-height:1.5;border-radius:30px;left:auto;right:18px;transform:none;top:calc(130px + env(safe-area-inset-top));max-width:calc(50% - 20px)}
@media(min-width:1200px){#notice{left:50%;right:auto;top:calc(38px + env(safe-area-inset-top));transform:translateX(-50%);max-width:360px;padding:14px 28px;font-size:clamp(18px,1.25vw,24px)}}
#pause-audio-toggle{display:flex;align-items:center;justify-content:center;width:max-content;min-width:150px;min-height:42px;margin:12px auto 2px;padding:9px 20px;border:2px solid #fff;border-radius:999px;background:#e4f5fc;color:#1c5c80;font-size:15px;font-weight:700;line-height:1.4;text-align:center;box-shadow:0 3px 0 #99cfe3}

/* Result: fixed-width display-only shuffle; score and records are already final. */
.result-card .result-breakdown{margin:8px 0 18px;text-align:left;font-size:15px}
.result-breakdown>div{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:9px 0}
.result-breakdown strong{color:#173f68;font-size:20px;white-space:nowrap}
.result-breakdown small{display:block;text-align:center;font-size:12px;font-weight:400;margin-top:8px}
.result-breakdown strong span,#result-score{display:inline-block;text-align:right;font-variant-numeric:tabular-nums}
[data-phase="shuffle"]{opacity:.65}
.result-card .best-row{margin-top:14px}

.result-card .best-row strong{display:inline-flex;align-items:baseline;justify-content:flex-end;gap:2px;white-space:nowrap}
.result-card .best-number{font-size:34px;line-height:1.1;font-variant-numeric:tabular-nums}
.result-card .best-unit{font-size:16px}
.result-card .best-update{font-size:14px}

.life{color:#e96a83;font-size:24px;letter-spacing:5px;line-height:1.5;text-shadow:0 1px 2px white}

.carrot-count{display:flex;align-items:center;gap:6px;width:max-content;margin-top:5px;font-size:21px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums;color:#173f68;text-shadow:0 1px 2px #fff}
.carrot-count svg{width:27px;height:27px;flex:none;filter:drop-shadow(0 1px 1px #fff)}

#score,#home-best-score{display:inline-grid;grid-auto-flow:column;grid-auto-columns:1ch;justify-items:center;vertical-align:baseline;letter-spacing:0;font-variant-numeric:tabular-nums}
#score .digit-slot,#home-best-score .digit-slot{display:block;width:1ch;text-align:center}
#score .digit-placeholder,#home-best-score .digit-placeholder{opacity:.22}

.carrot-count{position:relative}
.carrot-gain{position:absolute;left:calc(100% + 8px);top:1px;font-size:18px;color:#347b3c;opacity:0;pointer-events:none}

.carrot-flight{position:fixed;left:0;top:0;width:26px;height:26px;z-index:35;pointer-events:none;will-change:transform;filter:drop-shadow(0 2px 2px #ffffffa0)}

.brake-button{display:none;flex:none;width:62px;height:62px;padding:3px;border:2px solid #fff;border-radius:50%;background:linear-gradient(#e3f7ff,#b5dfec);box-shadow:0 4px 0 #86bacd;color:#205d7b;font:700 13px 'Zen Maru Gothic',sans-serif;line-height:1.1;touch-action:none;user-select:none;-webkit-user-select:none}
.brake-button span{display:block;font-size:24px;line-height:1.1}
.brake-button.held{transform:translateY(3px);box-shadow:0 1px 0 #86bacd;background:#fff1a8}
@media(pointer:coarse),(max-width:700px){.brake-button{display:block}.controls .thumb-pad{min-width:0}}

.hit-bubble{position:fixed;z-index:32;pointer-events:none;transform:translate(-50%,-100%);padding:6px 10px 9px;border:2px solid #fff;border-radius:16px;background:#fffdf4;color:#fb6586;font-family:'Zen Maru Gothic',sans-serif;font-size:27px;font-weight:700;line-height:1;text-align:center;box-shadow:0 3px 10px #16497726;filter:drop-shadow(0 1px 0 #bfdef0)}
.hit-bubble::after{content:'';position:absolute;left:calc(50% - 5px);bottom:-6px;width:10px;height:10px;background:#fffdf4;transform:rotate(45deg);border-right:2px solid #fff;border-bottom:2px solid #fff}
.hit-bubble[hidden]{display:none}
/* map118: a gentle color lift for the rendered world, preserving exposure and UI colors. */
#world{filter:saturate(1.10)}
/* Result placement follows Goma: inside the card, above retry, top 50 only. */
.result-card .ranking-placement{display:block;width:100%;padding:0;border:0;background:transparent;text-align:center;margin:0 0 18px;color:#147fac;font-size:18px;font-weight:700;line-height:1.5}
.result-card .ranking-placement[hidden]{display:none}
.ranking-place-number{font-size:32px;line-height:1}
.ranking-place-icon{width:25px;height:25px;margin-right:7px;vertical-align:-2px;fill:none;stroke:currentColor;stroke-width:1.8}
.result-links{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 15px;margin-top:20px}
.result-card .result-links .ranking-open-link{padding:6px 4px;border:0;border-radius:0;box-shadow:none;background:transparent;color:#226d95;font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:4px}
#ranking-submit-status{margin:8px 0 0;min-height:0;font-size:14px;color:#416b82}

/* Match Goma's full-frame loading message; visible before modules load. */
.load-message{position:absolute;inset:0;z-index:10;display:grid;place-items:center;padding:30px;background:#e5f5ff;color:#2b6b8e;text-align:center;font-size:14px;line-height:1.8}
.load-message[hidden]{display:none}

body.loading #audio-toggle{visibility:hidden;pointer-events:none}

/* Tablet touch prompt stays on one line; phones retain the compact two-line hint. */
@media(min-width:701px){.controls .thumb-pad span br{display:none}.controls .thumb-pad span{white-space:nowrap}}
