:root {
  color-scheme: dark;
  --ink: #fff6e4;
  --muted: #e0e7ea;
  --line: #bdd7e555;
  --control: #102731db;
  --accent: #ffd170;
  font-family: "Arial", system-ui, sans-serif;
  color: var(--ink);
  background: #102331;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, main, p, h1 { margin: 0; }
button, a { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid white; outline-offset: -4px; }
a { color: inherit; text-decoration: none; }
.game { position: relative; height: 100svh; min-height: 430px; overflow: hidden; isolation: isolate; }
.world, .shade { position: absolute; inset: 0; }
.world { z-index: -3; background: linear-gradient(#65869d, #f2a274 43%, #185a70 44%, #193240); }
#view { display: block; width: 100%; height: 100%; touch-action: none; }
.shade { z-index: -2; pointer-events: none; background: linear-gradient(#132832a8, transparent 24%); }
.game:not([data-phase=running]) .shade { background: linear-gradient(#132832ba, transparent 23%), linear-gradient(90deg, #061e2be8 0, #0b2533b0 23%, #0b23392e 55%, transparent 86%); }
header {
  position: absolute;
  inset: max(15px, env(safe-area-inset-top)) clamp(16px, 4vw, 66px) auto;
  height: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.back, .pill { width: max-content; font-size: .81rem; font-weight: 750; }
.back { padding: 11px 0; }
.back span { margin-right: 6px; color: var(--accent); font-size: 1.1em; }
.pill { justify-self: end; color: inherit; background: var(--control); border: 1px solid var(--line); border-radius: 99px; padding: 9px 13px; }
.pill:disabled { display: none; }
.game-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.game-actions #sound[aria-pressed="false"] { color: #a6b9c2; }
.live-label { display: flex; justify-content: center; align-items: center; white-space: nowrap; gap: 8px; font-size: .68rem; font-weight: 750; letter-spacing: .18em; }
.live-label span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.metrics { position: absolute; right: clamp(16px, 4vw, 66px); top: max(83px, calc(env(safe-area-inset-top) + 64px)); display: flex; gap: clamp(10px, 3vw, 42px); padding: 10px 14px; color: var(--ink); background: #122733d9; border: 1px solid var(--line); border-radius: 8px; pointer-events: none; }
.metrics div { display: grid; gap: 3px; }
.metrics div > span { font-size: .61rem; font-weight: 780; letter-spacing: .08em; white-space: nowrap; }
.metrics strong { font-size: clamp(1.08rem, 1.9vw, 1.6rem); line-height: .95; font-variant-numeric: tabular-nums; }
.metrics small { color: var(--muted); font-weight: 600; font-size: .58em; }
.multiplier strong { color: var(--accent); }
.route-meter {
  position: absolute; left: clamp(16px, 4vw, 66px); top: max(86px, calc(env(safe-area-inset-top) + 72px));
  display: grid; gap: 5px; width: 155px; font-size: .72rem; font-weight: 750; color: #fff1d9;
}
.route-meter progress { width: 100%; height: 5px; accent-color: var(--accent); }
#shield { justify-self: start; padding: 3px 7px; border-radius: 4px; background: #143c44e8; color: #a1f7e8; font-size: .65rem; }
.action-hint, .score-callout { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 7px 12px; width: max-content; text-align: center; pointer-events: none; border-radius: 5px; font-size: .79rem; font-weight: 800; }
.action-hint { top: max(83px, calc(env(safe-area-inset-top) + 70px)); background: #182b36e8; border: 1px solid #fbc9709c; color: var(--accent); }
.score-callout { bottom: max(91px, calc(env(safe-area-inset-bottom) + 73px)); color: #dcfff4; background: #14383fe8; border: 1px solid #6ad6c285; }
.takeoff { position: absolute; inset: 115px 0 64px; display: grid; align-content: center; padding-inline: clamp(20px, 6.5vw, 110px); pointer-events: none; }
.intro { max-width: 34rem; pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(.62rem, 1vw, .72rem); font-weight: 750; letter-spacing: .14em; color: #ffdb92; }
.eyebrow::before { content: ""; width: 21px; height: 1px; background: currentColor; }
h1 { font-size: clamp(4.45rem, 8.7vw, 9rem); letter-spacing: -.093em; line-height: .79; margin: 12px 0 17px; }
h1 span { color: var(--accent); }
#brief { color: var(--muted); font-size: clamp(.89rem, 1.3vw, 1.14rem); max-width: min(92%, 37ch); line-height: 1.45; }
#start { margin-top: 21px; padding: 13px 17px; min-width: 155px; border: 0; border-radius: 5px; background: var(--accent); color: #1e2915; font-weight: 820; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#start:hover { background: #ffe2a4; }
.key-guide { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); right: clamp(16px, 4vw, 66px); color: #faf5e7; background: #0c1f2ba1; padding: 7px 10px; border-radius: 4px; font-size: .73rem; pointer-events: none; }
.controls { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(21px, env(safe-area-inset-bottom)); display: flex; gap: 6px; }
.controls button { min-width: 62px; min-height: 48px; color: var(--ink); border-radius: 7px; border: 1px solid var(--line); background: var(--control); font: inherit; font-size: 1.32rem; font-weight: 820; }
.controls button:active { background: #274d64; }
.controls #jump, .controls #slide { padding-inline: 11px; display: flex; align-items: center; gap: 5px; }
.controls #jump span:last-child, .controls #slide span:last-child { font-size: .79rem; }
.feedback { position: absolute; bottom: max(85px, calc(env(safe-area-inset-bottom) + 68px)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 22px); padding: 6px 10px; border-radius: 5px; color: var(--ink); background: var(--control); font-size: .78rem; pointer-events: none; }
.game[data-phase=running] .feedback { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.feedback:empty { display: none; }
@media (max-width: 660px) {
  .game:not([data-phase=running]) .shade { background: linear-gradient(#102731ae, transparent 25%), linear-gradient(0deg,#061d2bf5 0%,#081f2bc4 27%,#081d2b12 60%); }
  .takeoff { inset: 130px 0 max(19px, env(safe-area-inset-bottom)); align-content: end; }
  h1 { margin: 9px 0 10px; font-size: clamp(3.7rem, 15vw, 6rem); letter-spacing: -.082em; }
  #start { margin-top: 12px; }
  .key-guide { display: none; }
  header { display: flex; justify-content: space-between; gap: 7px; }
  .live-label { letter-spacing: .07em; font-size: .61rem; gap: 5px; }
  .pill { padding-inline: 8px; font-size: .72rem; }
  .metrics { gap: 11px; padding: 8px 9px; }
  .metrics div > span { font-size: .54rem; letter-spacing: .04em; }
  .route-meter { width: clamp(70px, 27vw, 112px); }
  .action-hint { top: max(142px, calc(env(safe-area-inset-top) + 126px)); }
  .controls button { min-width: 51px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  h1 { font-size: clamp(3.3rem, 9vw, 5rem); }
  .takeoff { align-content: start; }
  .intro { max-width: 27rem; }
}
noscript { position: absolute; z-index: 1; bottom: 12px; left: 18px; padding: 10px; color: white; background: #091e2c; }
