/* ── Self-hosted webfonts (no third-party requests) ──────────── */
@font-face{font-family:'Chakra Petch';font-style:italic;font-weight:600;font-display:swap;src:url('./fonts/chakra-petch-600i.woff2') format('woff2');}
@font-face{font-family:'Chakra Petch';font-style:italic;font-weight:700;font-display:swap;src:url('./fonts/chakra-petch-700i.woff2') format('woff2');}
@font-face{font-family:'Chakra Petch';font-style:normal;font-weight:500;font-display:swap;src:url('./fonts/chakra-petch-500.woff2') format('woff2');}
@font-face{font-family:'Chakra Petch';font-style:normal;font-weight:600;font-display:swap;src:url('./fonts/chakra-petch-600.woff2') format('woff2');}
@font-face{font-family:'Chakra Petch';font-style:normal;font-weight:700;font-display:swap;src:url('./fonts/chakra-petch-700.woff2') format('woff2');}
@font-face{font-family:'Saira Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('./fonts/saira-condensed-600.woff2') format('woff2');}
@font-face{font-family:'Saira Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('./fonts/saira-condensed-700.woff2') format('woff2');}
@font-face{font-family:'Saira Condensed';font-style:normal;font-weight:800;font-display:swap;src:url('./fonts/saira-condensed-800.woff2') format('woff2');}

/* ── NEON DRIFT · design tokens ───────────────────────────────── */
:root {
  --ink: #05060d;
  --ink-2: #0a0b16;
  --panel: rgba(13, 15, 28, 0.72);
  --panel-solid: #0c0e1a;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f3f2fa;
  --muted: #8b89a6;
  --hot: #ff2e6e;
  --hot-2: #ff6c9c;
  --mint: #2ee6c8;
  --violet: #6d4bff;
  --amber: #ffb84d;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;

  --font-display: 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-ui: 'Chakra Petch', ui-monospace, monospace;

  --shadow-panel: 0 24px 70px rgba(0, 0, 0, 0.65), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  --ease: cubic-bezier(0.22, 0.9, 0.28, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
}

body {
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 120% 80% at 50% 118%, #2a0736 0%, #05060d 62%);
}

canvas#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.hidden { display: none !important; }

/* ── Film layers (grain · vignette · edge glow) ───────────────── */
.fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

.fx-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% 108%, rgba(255, 46, 110, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 35% at 50% -8%, rgba(109, 75, 255, 0.18), transparent 70%);
  mix-blend-mode: screen;
}

.fx-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 100% 72% at 50% 48%, transparent 42%, rgba(3, 4, 10, 0.62) 100%),
    linear-gradient(to bottom, rgba(3, 4, 10, 0.5) 0%, transparent 18%, transparent 74%, rgba(3, 4, 10, 0.78) 100%);
}

.fx-grain {
  position: absolute; inset: -50%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 6s steps(6) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ── HUD shell ────────────────────────────────────────────────── */
.hud {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  pointer-events: none;
  z-index: 6;
}

.hud-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
}

.score-chip {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 14px 7px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}
.score-chip::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--hot), transparent);
}
.chip-label {
  font-size: 8px; letter-spacing: 0.3em; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
}
.chip-val {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(255, 46, 110, 0.35);
}

.combo {
  justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  opacity: 0; transform: translateY(-8px) scale(0.92);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}
.combo.on { opacity: 1; transform: none; }
.combo b {
  font-family: var(--font-display); font-style: italic;
  font-size: 26px; font-weight: 800; line-height: 1;
  color: var(--mint);
  text-shadow: 0 0 22px rgba(46, 230, 200, 0.7);
  font-variant-numeric: tabular-nums;
}
.combo span {
  font-size: 7.5px; letter-spacing: 0.34em; font-weight: 600;
  color: var(--muted); margin-top: 3px;
}

/* ── Bottom dash ──────────────────────────────────────────────── */
.dash {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(18, 20, 38, 0.78), rgba(8, 9, 18, 0.86));
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-panel);
}

.dash-speed { display: flex; align-items: baseline; gap: 7px; }
.speed-val {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 40px;
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(175deg, #ffffff 15%, #ffc3d6 58%, var(--hot) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 46, 110, 0.45));
  min-width: 2.1ch;
}
.speed-meta { display: flex; flex-direction: column; gap: 3px; }
.speed-unit { font-size: 8px; letter-spacing: 0.24em; color: var(--muted); font-weight: 600; }
.gear {
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: 13px; line-height: 1;
  color: var(--mint);
  border: 1px solid rgba(46, 230, 200, 0.28);
  background: rgba(46, 230, 200, 0.08);
  border-radius: 5px;
  padding: 2px 0; width: 20px; text-align: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.gear.boost {
  color: #fff;
  border-color: rgba(255, 46, 110, 0.6);
  background: rgba(255, 46, 110, 0.22);
  box-shadow: 0 0 14px rgba(255, 46, 110, 0.5);
}

.dash-nitro { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dash-head {
  display: flex; align-items: center; gap: 5px;
  font-size: 7.5px; letter-spacing: 0.26em; font-weight: 600;
  color: var(--muted);
}
.dash-head svg { width: 10px; height: 10px; color: var(--mint); stroke-width: 2.4; }
.dash-head b {
  margin-left: auto; font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.02em; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.nitro-track {
  position: relative;
  height: 7px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.nitro-fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--mint) 72%, #b8fff2);
  box-shadow: 0 0 16px rgba(46, 230, 200, 0.75);
  transition: width 0.1s linear, background 0.3s;
}
.nitro-fill.ready {
  background: linear-gradient(90deg, var(--hot), #ffd2e2);
  box-shadow: 0 0 20px var(--hot);
  animation: nitroReady 1.4s ease-in-out infinite;
}
@keyframes nitroReady {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

.dash-shields { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.shields { display: flex; gap: 4px; }
.shield {
  width: 13px; height: 9px;
  border-radius: 3px;
  background: linear-gradient(160deg, #ff6c9c, var(--hot));
  box-shadow: 0 0 12px rgba(255, 46, 110, 0.65);
  transform: skewX(-14deg);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}
.shield.lost {
  opacity: 0.18; box-shadow: none;
  transform: skewX(-14deg) scaleY(0.55);
}

.icon-btn {
  pointer-events: auto;
  width: 42px; height: 42px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.2s, border-color 0.2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--line-2); background: rgba(30, 33, 56, 0.85); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 17px; height: 17px; stroke-width: 2.2; }

/* ── Touch controls ───────────────────────────────────────────── */
.controls {
  position: absolute; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  padding: 0 18px;
  display: flex; align-items: flex-end; justify-content: space-between;
  z-index: 7; pointer-events: none;
  transition: opacity 0.25s;
}
.steer, .actions { display: flex; align-items: flex-end; gap: 9px; }

.pad {
  pointer-events: auto;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 22%, rgba(50, 54, 88, 0.55), rgba(10, 11, 22, 0.72));
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.12s var(--ease), background 0.16s, border-color 0.16s, box-shadow 0.16s;
  -webkit-user-select: none; user-select: none;
  position: relative;
  overflow: hidden;
}
.pad svg { width: 24px; height: 24px; stroke-width: 2.1; }
.pad::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22), transparent 62%);
  opacity: 0; transition: opacity 0.16s;
}
.pad.active { border-color: var(--hot); transform: scale(0.93); box-shadow: 0 0 26px rgba(255, 46, 110, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.pad.active::after { opacity: 1; }
.pad.small { width: 46px; height: 46px; }
.pad.small svg { width: 18px; height: 18px; }

.nitro-btn {
  width: 70px; height: 70px;
  background: linear-gradient(155deg, rgba(255, 46, 110, 0.92), rgba(120, 16, 62, 0.92));
  border-color: rgba(255, 140, 180, 0.5);
  box-shadow: 0 10px 34px rgba(255, 46, 110, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
}
.nitro-btn svg { width: 28px; height: 28px; }
.nitro-btn.active { background: linear-gradient(155deg, #ff5c8d, #a3164f); box-shadow: 0 0 40px rgba(255, 46, 110, 0.85); }
.nitro-btn.ready { animation: nitroPulse 1.9s ease-in-out infinite; }
@keyframes nitroPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 46, 110, 0.34); }
  50% { box-shadow: 0 12px 46px rgba(255, 46, 110, 0.8); }
}

/* ── Impact flash + toast ─────────────────────────────────────── */
.flash {
  position: absolute; inset: 0; z-index: 8;
  background: radial-gradient(circle at 50% 72%, rgba(255, 46, 110, 0.6), rgba(255, 46, 110, 0.06) 55%, transparent 72%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.34s ease;
}
.flash.on { opacity: 1; transition: opacity 0.04s; }

.toast {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 178px);
  transform: translate(-50%, 12px);
  z-index: 12; pointer-events: none;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(10, 11, 22, 0.9);
  border: 1px solid rgba(46, 230, 200, 0.35);
  color: var(--mint);
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  box-shadow: 0 0 30px rgba(46, 230, 200, 0.25);
  opacity: 0; transition: opacity 0.24s, transform 0.24s var(--ease);
  white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── Overlay screens ──────────────────────────────────────────── */
#screens { position: absolute; inset: 0; z-index: 9; pointer-events: none; }

.screen {
  position: absolute; inset: 0;
  pointer-events: auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  text-align: center;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(109, 75, 255, 0.16), transparent 65%),
    radial-gradient(ellipse 90% 60% at 50% 108%, rgba(255, 46, 110, 0.16), transparent 65%),
    rgba(5, 6, 13, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  animation: screenIn 0.34s var(--ease) both;
}
@keyframes screenIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: none; }
}
.screen > * { animation: riseIn 0.5s var(--ease) both; }
.screen > *:nth-child(2) { animation-delay: 0.05s; }
.screen > *:nth-child(3) { animation-delay: 0.1s; }
.screen > *:nth-child(4) { animation-delay: 0.15s; }
.screen > *:nth-child(5) { animation-delay: 0.2s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* brand lockup */
.brand { display: flex; flex-direction: column; align-items: center; width: 100%; }
.brand .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 8.5px; font-weight: 600; letter-spacing: 0.42em;
  text-transform: uppercase; color: var(--mint);
  margin-bottom: 14px;
}
.brand .eyebrow::before, .brand .eyebrow::after {
  content: ''; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 230, 200, 0.8));
}
.brand .eyebrow::after { background: linear-gradient(90deg, rgba(46, 230, 200, 0.8), transparent); }

.brand h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(62px, 22vw, 104px);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(172deg, #ffffff 6%, #ffd9e4 34%, var(--hot) 72%, #8e0f3f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 30px rgba(255, 46, 110, 0.45));
}
.brand h1 span { display: block; }
.brand .tag {
  margin-top: 16px;
  font-size: 9px; letter-spacing: 0.3em; font-weight: 600;
  text-transform: uppercase; color: var(--muted);
}

/* stat cards */
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; width: 100%; max-width: 360px;
}
.stat {
  padding: 12px 6px 11px;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  backdrop-filter: blur(10px);
}
.stat b {
  font-family: var(--font-display); font-style: italic;
  font-size: 25px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 7.5px; letter-spacing: 0.22em; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
}
.stat.hero {
  border-color: rgba(255, 46, 110, 0.4);
  background: linear-gradient(180deg, rgba(255, 46, 110, 0.18), rgba(255, 46, 110, 0.04));
  box-shadow: 0 0 26px rgba(255, 46, 110, 0.18) inset;
}
.stat.hero b { color: #fff; text-shadow: 0 0 22px rgba(255, 46, 110, 0.6); }
.stat.hero span { color: var(--hot-2); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  pointer-events: auto;
  width: 100%; max-width: 360px;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 24px;
  border: none; border-radius: 14px;
  font-family: var(--font-ui); font-weight: 700;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #fff; cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.22s, background 0.22s, border-color 0.22s;
}
.btn svg { width: 17px; height: 17px; stroke-width: 2.4; }

.btn-primary {
  background: linear-gradient(102deg, var(--hot) 0%, #d0218f 48%, var(--violet) 100%);
  box-shadow: 0 16px 44px rgba(255, 46, 110, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen {
  0%, 62% { left: -60%; }
  100% { left: 130%; }
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(255, 46, 110, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.32); }
.btn-ghost:active { transform: scale(0.98); }
.btn-sm { max-width: 200px; padding: 12px 18px; font-size: 10px; letter-spacing: 0.18em; border-radius: 11px; }

.actions-col {
  display: flex; flex-direction: column; align-items: center;
  gap: 9px; width: 100%;
}

/* how-to strip */
.howto {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 7px 8px; max-width: 360px;
}
.howto div {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 8.5px; letter-spacing: 0.16em; font-weight: 600;
  text-transform: uppercase; color: var(--muted);
}
.howto svg { width: 12px; height: 12px; color: var(--hot-2); stroke-width: 2.4; }

/* ── Panels (settings / pause) ────────────────────────────────── */
.panel {
  width: 100%; max-width: 360px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 6px 16px;
  display: flex; flex-direction: column;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-panel);
}
.setting {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0; text-align: left;
}
.setting + .setting { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.setting label {
  display: flex; align-items: center; gap: 9px;
  font-size: 9.5px; letter-spacing: 0.2em; font-weight: 600;
  text-transform: uppercase; color: var(--muted);
}
.setting label svg { width: 14px; height: 14px; color: var(--mint); stroke-width: 2.2; }

.switch {
  width: 44px; height: 25px; border-radius: 99px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  position: relative; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.switch::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #cfcbe2;
  transition: transform 0.24s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.2s;
}
.switch.on { background: rgba(46, 230, 200, 0.28); border-color: rgba(46, 230, 200, 0.55); }
.switch.on::after { transform: translateX(19px); background: var(--mint); box-shadow: 0 0 12px rgba(46, 230, 200, 0.8); }

.seg {
  display: flex; gap: 2px; padding: 3px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--line);
}
.seg button {
  border: none; background: transparent; color: var(--muted);
  font-family: var(--font-ui); font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.12em; padding: 6px 8px; border-radius: 6px; cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.seg button.on { background: linear-gradient(120deg, var(--hot), var(--violet)); color: #fff; }

/* ── Screen type ──────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 8.5px; letter-spacing: 0.4em; font-weight: 600;
  text-transform: uppercase; color: var(--mint);
}
.eyebrow::before, .eyebrow::after {
  content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.5;
}
.panel-title {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(34px, 11vw, 46px);
  font-weight: 800; line-height: 0.9;
  letter-spacing: 0.01em; text-transform: uppercase;
}
.big-score {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(66px, 24vw, 104px);
  font-weight: 800; line-height: 0.82;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(175deg, #ffffff 14%, #ffd2e0 52%, var(--hot) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 28px rgba(255, 46, 110, 0.5));
}
.lead {
  max-width: 330px;
  font-size: 9.5px; line-height: 1.9; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 500;
}
.record-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border-radius: 99px;
  background: linear-gradient(100deg, rgba(255, 184, 77, 0.18), rgba(255, 46, 110, 0.18));
  border: 1px solid rgba(255, 184, 77, 0.45);
  color: var(--amber);
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: 0 0 26px rgba(255, 184, 77, 0.2);
}
.record-badge svg { width: 12px; height: 12px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 360px) {
  .pad { width: 52px; height: 52px; }
  .pad svg { width: 21px; height: 21px; }
  .pad.small { width: 42px; height: 42px; }
  .nitro-btn { width: 64px; height: 64px; }
  .speed-val { font-size: 34px; }
  .dash { gap: 10px; padding: 9px 11px; }
  .btn { padding: 16px 18px; font-size: 12px; }
  .howto div { padding: 6px 9px; font-size: 8px; }
}

@media (min-width: 640px) {
  .screen { gap: 24px; }
  .stat-grid, .howto, .panel, .btn { max-width: 400px; }
}

@media (orientation: landscape) and (max-height: 540px) {
  .screen {
    flex-direction: row; flex-wrap: wrap;
    justify-content: center; align-content: center;
    gap: 16px 34px;
  }
  .brand { width: auto; }
  .brand h1 { font-size: clamp(40px, 7.5vw, 64px); }
  .brand .tag { margin-top: 10px; }
  .lead, .howto { display: none; }
  .actions-col { width: auto; min-width: 250px; }
  .stat-grid { max-width: 250px; }
  .panel { max-width: 300px; padding: 2px 14px; }
  .setting { padding: 10px 0; }
  .controls { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
  .dash { padding: 8px 12px; }
  .speed-val { font-size: 32px; }
  .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 120px); }
  .hud { padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 10px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
