/* ==========================================================================
   NEON HORIZON 2088 · Cyberpunk 3D Pinball Studio
   UI design system — glassmorphic HUD, neon typography, responsive layout
   ========================================================================== */

:root {
  --bg: #04060d;
  --bg-2: #070b18;
  --panel: rgba(7, 12, 26, 0.72);
  --panel-solid: #080d1b;
  --line: rgba(111, 236, 255, 0.18);
  --line-strong: rgba(111, 236, 255, 0.42);
  --cyan: #5ff6ff;
  --cyan-hot: #00e5ff;
  --cyan-deep: #0099bb;
  --magenta: #ff3bdc;
  --magenta-hot: #ff00c8;
  --violet: #a888ff;
  --amber: #ffb545;
  --danger: #ff4d6d;
  --text: #eaf7ff;
  --muted: #7d93b8;
  --muted-2: #4c5f80;
  --font-display: "Orbitron", "Arial Black", sans-serif;
  --font-body: "Rajdhani", "Segoe UI", sans-serif;
  --radius: 16px;
  --hud-pad: clamp(14px, 2vw, 28px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: rgba(255, 59, 220, 0.4);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Stage / 3D canvas
   -------------------------------------------------------------------------- */

#stage {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(19, 33, 68, 0.55) 0%, transparent 55%),
    radial-gradient(circle at 10% 80%, rgba(60, 12, 74, 0.34) 0%, transparent 45%),
    linear-gradient(180deg, #03050c 0%, #050915 55%, #02040a 100%);
  overflow: hidden;
}

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

.stage-glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.15;
  pointer-events: none;
}

.stage-glow--cyan {
  background: #00d5ff;
  top: -22vmax;
  left: -14vmax;
}

.stage-glow--magenta {
  background: #ff00b8;
  bottom: -26vmax;
  right: -16vmax;
  opacity: 0.1;
}

.stage-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(1, 3, 9, 0.55) 100%),
    linear-gradient(180deg, rgba(2, 4, 10, 0.35), transparent 18%, transparent 74%, rgba(2, 4, 10, 0.7));
}

/* --------------------------------------------------------------------------
   Boot sequence
   -------------------------------------------------------------------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at center, rgba(10, 25, 48, 0.9), rgba(2, 4, 10, 0.98) 65%);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(95, 246, 255, 0.2);
  border-top-color: var(--cyan);
  border-right-color: var(--magenta);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.25), inset 0 0 24px rgba(255, 0, 200, 0.12);
  animation: spin 1.1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.boot__eyebrow {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.34em;
  font-weight: 600;
}

.boot__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: 0.13em;
  color: var(--text);
  text-shadow: 0 0 20px rgba(95, 246, 255, 0.4);
}

.boot__bar {
  width: min(340px, 70vw);
  height: 2px;
  background: rgba(95, 246, 255, 0.12);
  overflow: hidden;
}

.boot__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 16px var(--cyan);
  transition: width 0.35s var(--ease);
}

.boot__hint {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   HUD shell
   -------------------------------------------------------------------------- */

.hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

.hud.is-live {
  opacity: 1;
}

.hud button,
.hud a,
.hud input,
.hud .panel {
  pointer-events: auto;
}

/* Top bar ---------------------------------------------------------------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(220px, 1fr);
  align-items: start;
  gap: 18px;
  padding: var(--hud-pad);
  padding-bottom: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.brand__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  white-space: nowrap;
}

.brand__kicker .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.brand__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.1vw, 31px);
  line-height: 0.95;
  letter-spacing: 0.045em;
  color: #f4fdff;
  text-shadow:
    0 0 1px #fff,
    0 0 12px rgba(95, 246, 255, 0.6),
    0 0 38px rgba(0, 229, 255, 0.24);
}

.brand__title span {
  color: var(--magenta);
  text-shadow:
    0 0 10px rgba(255, 59, 220, 0.7),
    0 0 34px rgba(255, 0, 200, 0.35);
}

.brand__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.brand__sub b {
  color: var(--muted-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid rgba(95, 246, 255, 0.24);
  background: rgba(95, 246, 255, 0.06);
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.18em;
  border-radius: 2px;
  white-space: nowrap;
}

.status-pill.is-live {
  border-color: rgba(255, 59, 220, 0.35);
  background: rgba(255, 59, 220, 0.08);
  color: var(--magenta);
}

/* Score cluster ---------------------------------------------------------- */

.score-cluster {
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(10, 18, 36, 0.78), rgba(6, 10, 22, 0.6));
  border: 1px solid var(--line);
  border-top-color: rgba(95, 246, 255, 0.42);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 34px rgba(0, 214, 255, 0.06);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
}

.score-cluster::before,
.score-cluster::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  top: 0;
}

.score-cluster::before { left: 14px; }
.score-cluster::after { right: 14px; background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }

.metric {
  min-width: 118px;
  padding: 11px 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  position: relative;
}

.metric + .metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(95, 246, 255, 0.25), transparent);
}

.metric--score { min-width: 170px; }

.metric__label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.metric__value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 16px rgba(95, 246, 255, 0.55);
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s var(--ease), color 0.18s;
}

.metric--score .metric__value {
  font-size: clamp(24px, 2.8vw, 38px);
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(95, 246, 255, 0.7), 0 0 42px rgba(0, 229, 255, 0.35);
}

.metric__value.is-bumped {
  transform: scale(1.08);
  color: #fff;
}

.metric__value--magenta {
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255, 59, 220, 0.6);
}

.metric__value--cyan {
  color: var(--cyan);
}

.metric__meta {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.metric__meta b {
  color: var(--muted);
  font-weight: 700;
}

/* Top actions ------------------------------------------------------------ */

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
}

.icon-btn {
  min-width: 52px;
  height: 46px;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(7, 13, 27, 0.72);
  backdrop-filter: blur(12px);
  color: var(--muted);
  transition: all 0.2s var(--ease);
}

.icon-btn__glyph {
  font-size: 16px;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 10px rgba(95, 246, 255, 0.7);
}

.icon-btn__label {
  font-size: 8px;
  letter-spacing: 0.18em;
  font-weight: 600;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(12, 22, 44, 0.85);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.12);
}

.icon-btn.is-muted .icon-btn__glyph {
  color: var(--muted-2);
  text-shadow: none;
}

.icon-btn--sm {
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
}

.icon-btn--scores {
  display: none;
}

/* Buttons ---------------------------------------------------------------- */

.neon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(95, 246, 255, 0.45);
  background: linear-gradient(180deg, rgba(11, 26, 48, 0.9), rgba(7, 14, 29, 0.9));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: all 0.2s var(--ease);
  overflow: hidden;
}

.neon-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.14) 48%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease);
}

.neon-btn:hover {
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.22), inset 0 0 18px rgba(0, 229, 255, 0.08);
}

.neon-btn:hover::after {
  transform: translateX(120%);
}

.neon-btn:active {
  transform: translateY(1px);
}

.neon-btn--small {
  height: 46px;
  padding: 0 16px;
  font-size: 10px;
}

.neon-btn--primary {
  border-color: rgba(255, 59, 220, 0.7);
  background: linear-gradient(120deg, rgba(255, 0, 200, 0.22), rgba(120, 40, 255, 0.22) 55%, rgba(0, 229, 255, 0.18));
  box-shadow: 0 0 32px rgba(255, 0, 200, 0.2), inset 0 0 26px rgba(255, 0, 200, 0.1);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.neon-btn--primary:hover {
  border-color: #ff7bea;
  box-shadow: 0 0 44px rgba(255, 0, 200, 0.35), inset 0 0 30px rgba(255, 0, 200, 0.15);
}

.neon-btn--danger {
  border-color: rgba(255, 77, 109, 0.6);
  color: #ffd7df;
}

.neon-btn--danger:hover {
  border-color: var(--danger);
  box-shadow: 0 0 28px rgba(255, 77, 109, 0.25);
}

.neon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Side panels
   -------------------------------------------------------------------------- */

.panel {
  position: absolute;
  top: 116px;
  width: 258px;
  padding: 18px 18px 16px;
  background:
    linear-gradient(160deg, rgba(11, 20, 40, 0.82), rgba(5, 9, 19, 0.72));
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.panel--left { left: var(--hud-pad); }
.panel--right { right: var(--hud-pad); }

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 42px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.panel--right::after {
  left: auto;
  right: 20px;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta);
}

.panel__corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 34px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(95, 246, 255, 0.32) 49%, rgba(95, 246, 255, 0.32) 51%, transparent 52%);
  pointer-events: none;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel__title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text);
}

.panel__head .panel__title { margin-bottom: 12px; }

.panel__title span {
  color: var(--magenta);
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.chip {
  padding: 2px 7px;
  border: 1px solid rgba(255, 59, 220, 0.34);
  color: var(--magenta);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.divider {
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(90deg, rgba(95, 246, 255, 0.3), rgba(95, 246, 255, 0.05) 60%, transparent);
}

/* Controls --------------------------------------------------------------- */

.key-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-list li {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
}

.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border: 1px solid rgba(95, 246, 255, 0.28);
  border-bottom-color: rgba(95, 246, 255, 0.5);
  border-radius: 3px;
  background: rgba(95, 246, 255, 0.055);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(95, 246, 255, 0.05);
}

.keycap--wide {
  min-width: 58px;
  letter-spacing: 0.12em;
}

.key-desc {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brief {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.brief b {
  font-weight: 700;
}

.brief .cyan { color: var(--cyan); }
.brief .magenta { color: var(--magenta); }
.brief .violet { color: var(--violet); }

.telemetry {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.telemetry div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border: 1px solid rgba(95, 246, 255, 0.08);
  background: rgba(95, 246, 255, 0.025);
}

.telemetry span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.telemetry b {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.panel__footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(95, 246, 255, 0.09);
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.tick {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #38ffb0;
  box-shadow: 0 0 7px #38ffb0;
}

/* Leaderboard ------------------------------------------------------------ */

.leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 214px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 246, 255, 0.25) transparent;
}

.leaderboard::-webkit-scrollbar { width: 3px; }
.leaderboard::-webkit-scrollbar-thumb { background: rgba(95, 246, 255, 0.25); }

.leaderboard li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(95, 246, 255, 0.055);
  font-size: 11px;
}

.leaderboard li:last-child { border-bottom: 0; }

.leaderboard .rank {
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}

.leaderboard li:nth-child(1) .rank { color: var(--amber); text-shadow: 0 0 8px rgba(255, 181, 69, 0.6); }
.leaderboard li:nth-child(2) .rank { color: #b9d3e8; }
.leaderboard li:nth-child(3) .rank { color: #c88f6a; }

.leaderboard .who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.leaderboard li.is-current .who { color: var(--cyan); }
.leaderboard li.is-current .score { color: var(--cyan); }

.leaderboard .score {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.leaderboard__empty {
  display: block !important;
  padding: 16px 4px !important;
  color: var(--muted-2) !important;
  font-size: 11px !important;
  line-height: 1.7;
  text-align: center;
  border: 1px dashed rgba(95, 246, 255, 0.12) !important;
  letter-spacing: 0.04em;
}

/* Data operations -------------------------------------------------------- */

.data-ops {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.data-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(95, 246, 255, 0.16);
  background: rgba(95, 246, 255, 0.035);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  transition: all 0.18s var(--ease);
}

.data-btn span {
  font-size: 13px;
  filter: grayscale(0.2);
}

.data-btn:hover {
  border-color: rgba(255, 59, 220, 0.4);
  background: rgba(255, 59, 220, 0.07);
  color: var(--text);
}

.data-btn--rescue {
  border-color: rgba(255, 181, 69, 0.28);
  color: var(--amber);
}

.data-btn--rescue:hover {
  border-color: rgba(255, 181, 69, 0.62);
  background: rgba(255, 181, 69, 0.08);
  color: #ffe3b3;
}

.data-note {
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Bottom HUD
   -------------------------------------------------------------------------- */

.bottom-hud {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 20px;
  width: min(720px, calc(100vw - 40px));
  justify-content: center;
}

.launch-column {
  flex: 1;
  min-width: 0;
  padding-bottom: 3px;
}

.launch-hint {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.launch-hint b { color: var(--cyan); }

.launch-hint.is-urgent {
  color: var(--magenta);
  animation: hintPulse 1.4s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.charge-meter {
  position: relative;
  height: 12px;
  border: 1px solid rgba(95, 246, 255, 0.28);
  background: rgba(2, 6, 14, 0.8);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.charge-meter__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.65), rgba(168, 136, 255, 0.8) 62%, var(--magenta));
  box-shadow: 0 0 20px rgba(255, 59, 220, 0.6);
  transition: width 0.05s linear;
}

.charge-meter__ticks {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(0, 0, 0, 0.65) calc(10% - 1px), rgba(0, 0, 0, 0.65) 10%);
  pointer-events: none;
}

.charge-meter__label {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 1px 4px #000;
  font-variant-numeric: tabular-nums;
}

.launch-btn {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 1px solid rgba(255, 59, 220, 0.42);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 59, 220, 0.2), transparent 62%),
    rgba(6, 10, 22, 0.8);
  color: var(--text);
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 0 38px rgba(255, 0, 200, 0.12), inset 0 0 28px rgba(255, 0, 200, 0.08);
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.launch-btn__ring {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px dashed rgba(95, 246, 255, 0.24);
  animation: spin 18s linear infinite;
}

.launch-btn__core {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(95, 246, 255, 0.7);
}

.launch-btn__sub {
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.launch-btn:hover {
  border-color: var(--magenta);
  box-shadow: 0 0 54px rgba(255, 0, 200, 0.26), inset 0 0 34px rgba(255, 0, 200, 0.14);
}

.launch-btn.is-charging {
  transform: scale(0.95);
  border-color: var(--cyan);
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.34), inset 0 0 38px rgba(0, 229, 255, 0.2);
}

.launch-btn.is-charging .launch-btn__core { color: var(--magenta); }

.launch-btn.is-charging .launch-btn__ring {
  border-color: rgba(255, 59, 220, 0.6);
  animation-duration: 2.4s;
}

.bottom-actions {
  display: flex;
  gap: 6px;
  padding-bottom: 3px;
}

/* --------------------------------------------------------------------------
   Touch controls
   -------------------------------------------------------------------------- */

.touch-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: none;
  justify-content: space-between;
  pointer-events: none;
}

.flip-pad {
  pointer-events: auto;
  width: min(41vw, 178px);
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(95, 246, 255, 0.2);
  background: linear-gradient(180deg, rgba(9, 18, 36, 0.64), rgba(4, 8, 18, 0.82));
  backdrop-filter: blur(10px);
  color: var(--cyan);
  clip-path: polygon(0 12px, 12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: background 0.12s, box-shadow 0.12s;
}

.flip-pad span {
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 16px rgba(95, 246, 255, 0.8);
}

.flip-pad small {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.flip-pad.is-active {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.2), rgba(0, 90, 130, 0.3));
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.24), inset 0 0 24px rgba(0, 229, 255, 0.14);
}

.flip-pad--right { text-align: right; }

/* --------------------------------------------------------------------------
   Start overlay / hero
   -------------------------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}

.overlay[hidden] {
  display: none !important;
}

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(4, 8, 18, 0.28) 0%, rgba(2, 4, 10, 0.78) 62%, rgba(2, 4, 10, 0.94) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.6s var(--ease);
}

.overlay--start {
  z-index: 70;
  transition: opacity 0.65s var(--ease), visibility 0.65s;
}

.overlay--start.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero {
  position: relative;
  width: min(780px, 100%);
  padding: clamp(30px, 4.4vw, 58px) clamp(24px, 5vw, 64px) 26px;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(12, 22, 46, 0.82), rgba(4, 8, 18, 0.88));
  border: 1px solid rgba(95, 246, 255, 0.22);
  border-top-color: rgba(255, 59, 220, 0.42);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  box-shadow:
    0 40px 140px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(0, 229, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 32px 100%, 0 calc(100% - 32px));
  animation: heroIn 0.85s var(--ease) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(95, 246, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 246, 255, 0.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero__halo {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 460px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(255, 0, 200, 0.16), transparent 65%);
  pointer-events: none;
}

.hero__eyebrow {
  position: relative;
  margin: 0 0 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.32em;
}

.hero__eyebrow span {
  width: 22px;
  height: 1px;
  background: var(--magenta);
  box-shadow: 0 0 8px var(--magenta);
}

.hero__title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.82;
  letter-spacing: 0.02em;
}

.hero__title-top {
  display: block;
  font-size: clamp(38px, 8.6vw, 86px);
  font-weight: 400;
  letter-spacing: 0.38em;
  margin-left: 0.38em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(95, 246, 255, 0.72);
  text-shadow: 0 0 34px rgba(0, 229, 255, 0.18);
}

.hero__title-bottom {
  display: block;
  margin-top: 8px;
  font-size: clamp(38px, 8.6vw, 86px);
  font-weight: 900;
  color: #f4fdff;
  text-shadow:
    0 0 2px #fff,
    0 0 18px rgba(95, 246, 255, 0.45),
    0 0 60px rgba(0, 229, 255, 0.22);
}

.hero__title-bottom em {
  font-style: normal;
  margin-left: 0.18em;
  font-size: 0.34em;
  vertical-align: 0.55em;
  color: var(--magenta);
  letter-spacing: 0.12em;
  text-shadow: 0 0 18px rgba(255, 59, 220, 0.7);
}

.hero__tagline {
  margin: 18px 0 0;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
}

.hero__copy {
  max-width: 510px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.hero__features {
  display: flex;
  justify-content: center;
  gap: 1px;
  margin: 24px auto 26px;
  max-width: 470px;
}

.feature {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-top: 1px solid rgba(95, 246, 255, 0.16);
  border-bottom: 1px solid rgba(95, 246, 255, 0.16);
  background: linear-gradient(180deg, rgba(95, 246, 255, 0.04), transparent);
}

.feature + .feature {
  border-left: 1px solid rgba(95, 246, 255, 0.1);
}

.feature b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.06em;
}

.feature span {
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.5;
}

.hero__form {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.callsign {
  flex: 1;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}

.callsign__label {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.callsign__input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(95, 246, 255, 0.24);
  background: rgba(2, 6, 14, 0.68);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  outline: none;
  text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.callsign__input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.18), inset 0 0 18px rgba(0, 229, 255, 0.06);
}

.hero__form .neon-btn {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 26px;
}

.hero__foot {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 26px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.hero__foot b {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 8px;
}

.hero__credit {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(95, 246, 255, 0.09);
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.hero__credit a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted rgba(95, 246, 255, 0.25);
}

.hero__credit a:hover { color: var(--cyan); }

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */

.overlay--modal {
  z-index: 80;
}

.overlay--modal .overlay__backdrop {
  background: rgba(2, 4, 10, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(26px, 4vw, 44px);
  background:
    linear-gradient(155deg, rgba(12, 22, 46, 0.94), rgba(4, 8, 18, 0.96));
  border: 1px solid rgba(95, 246, 255, 0.24);
  border-top-color: rgba(255, 59, 220, 0.5);
  box-shadow: 0 48px 150px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  animation: modalIn 0.35s var(--ease) both;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal__eyebrow {
  margin: 0 0 8px;
  color: var(--magenta);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: #f4fdff;
  text-shadow: 0 0 24px rgba(95, 246, 255, 0.25);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(95, 246, 255, 0.2);
  background: rgba(95, 246, 255, 0.04);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  transition: all 0.18s;
}

.modal__close:hover { color: var(--text); border-color: var(--cyan); }

.modal__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  position: relative;
}

.modal__note {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
}

.confirm__copy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Game over -------------------------------------------------------------- */

.gameover { text-align: center; }

.gameover .modal__eyebrow { color: var(--danger); }

.gameover__score {
  margin: 24px auto 6px;
  padding: 20px 16px 18px;
  max-width: 420px;
  border-top: 1px solid rgba(95, 246, 255, 0.16);
  border-bottom: 1px solid rgba(95, 246, 255, 0.16);
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 229, 255, 0.07), transparent 70%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gameover__score span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.gameover__score strong {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.6), 0 0 70px rgba(0, 229, 255, 0.2);
  font-variant-numeric: tabular-nums;
}

.gameover__score em {
  align-self: center;
  margin-top: 4px;
  padding: 2px 10px;
  border: 1px solid rgba(255, 181, 69, 0.35);
  color: var(--amber);
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.gameover__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 460px;
  margin: 18px auto 0;
  background: rgba(95, 246, 255, 0.09);
}

.gameover__stats div {
  padding: 10px 4px;
  background: rgba(5, 10, 22, 0.92);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gameover__stats span {
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.gameover__stats b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Help ------------------------------------------------------------------- */

.help { width: min(760px, 100%); }

.help__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 24px;
  background: rgba(95, 246, 255, 0.1);
  border: 1px solid rgba(95, 246, 255, 0.1);
}

.help__grid article {
  padding: 18px;
  background: rgba(5, 10, 22, 0.94);
}

.help__grid h3 {
  margin: 0 0 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.help__grid h3 span {
  color: var(--magenta);
  font-size: 8px;
}

.help__grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.help__grid b { color: var(--text); }

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(460px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border: 1px solid rgba(95, 246, 255, 0.3);
  background: rgba(5, 12, 26, 0.92);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 0 22px rgba(0, 229, 255, 0.12);
  animation: toastIn 0.3s var(--ease) both;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.toast::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
  flex: 0 0 auto;
}

.toast--magenta { border-color: rgba(255, 59, 220, 0.34); }
.toast--magenta::before { background: var(--magenta); box-shadow: 0 0 9px var(--magenta); }
.toast--amber { border-color: rgba(255, 181, 69, 0.4); }
.toast--amber::before { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.toast--danger { border-color: rgba(255, 77, 109, 0.45); }
.toast--danger::before { background: var(--danger); box-shadow: 0 0 9px var(--danger); }

.toast.is-out {
  animation: toastOut 0.35s var(--ease) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-7px); }
}

/* --------------------------------------------------------------------------
   Utility / noscript
   -------------------------------------------------------------------------- */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #04060d;
  color: var(--text);
  font-family: var(--font-display);
  text-align: center;
  letter-spacing: 0.08em;
}

/* Screen-reader utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1380px) {
  .panel--left { display: none; }
  .topbar { grid-template-columns: minmax(200px, 1fr) auto minmax(180px, 1fr); }
}

@media (max-width: 1080px) {
  .panel--right {
    width: 232px;
    padding: 15px 15px 14px;
  }
  .metric { min-width: 98px; padding: 9px 14px 8px; }
  .metric--score { min-width: 130px; }
  .brand__sub { display: none; }
  .topbar { align-items: center; }
}

@media (max-width: 900px) {
  :root { --hud-pad: 14px; }

  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "score score";
    gap: 10px;
    padding-bottom: 0;
  }

  .brand { grid-area: brand; }
  .score-cluster { grid-area: score; justify-self: center; }
  .top-actions { grid-area: actions; }
  .brand__kicker { font-size: 8px; letter-spacing: 0.18em; }
  .brand__title { font-size: 21px; }
  .metric { min-width: 86px; padding: 7px 12px; }
  .metric--score { min-width: 120px; }
  .metric__value { font-size: 18px; }
  .metric__value--score, .metric--score .metric__value { font-size: 24px; }
  .metric__meta { display: none; }
  .metric__label { font-size: 7px; }

  .panel--right {
    top: 150px;
    right: 10px;
    transform: translateX(calc(100% + 30px));
    transition: transform 0.35s var(--ease), visibility 0.35s;
    z-index: 3;
    width: 240px;
    visibility: hidden;
    max-height: calc(100vh - 175px);
    overflow-y: auto;
  }

  .panel--right.is-open { transform: none; visibility: visible; }

  .top-actions .icon-btn { min-width: 40px; height: 40px; padding: 0 8px; }
  .top-actions .icon-btn__label { display: none; }
  .top-actions .icon-btn--scores { display: flex; }
  .top-actions .neon-btn--small { height: 40px; padding: 0 12px; font-size: 9px; }

  .bottom-hud {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 28px);
    gap: 12px;
  }

  .launch-btn { flex-basis: 82px; width: 82px; height: 82px; }
  .launch-btn__core { font-size: 10px; }
  .launch-hint { font-size: 8px; letter-spacing: 0.14em; text-align: left; }
  .bottom-actions { display: none; }

  .touch-controls { display: flex; }

  .toast-stack { top: 142px; }

  .overlay { padding: 14px; }
  .hero { padding: 28px 20px 22px; }
  .hero__title-top, .hero__title-bottom { font-size: clamp(30px, 9.6vw, 62px); }
  .hero__copy { font-size: 12px; }
  .hero__features { margin: 18px auto 20px; }
  .hero__form { flex-direction: column; align-items: stretch; gap: 9px; }
  .callsign { max-width: none; }
  .hero__form .neon-btn { width: 100%; }
  .hero__foot { gap: 6px 14px; font-size: 8px; }

  .help__grid { grid-template-columns: 1fr; }
  .gameover__stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .topbar { gap: 8px; }
  .brand__kicker { display: none; }
  .brand__title { font-size: 17px; letter-spacing: 0.02em; }
  .brand__sub { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .neon-btn--small { padding: 0 9px; font-size: 8px; letter-spacing: 0.08em; }
  .metric { min-width: 70px; padding: 6px 9px; }
  .metric--score { min-width: 104px; }
  .metric__value { font-size: 15px; }
  .metric--score .metric__value { font-size: 20px; }
  .metric__label { font-size: 6px; letter-spacing: 0.18em; }

  .bottom-hud { bottom: calc(91px + env(safe-area-inset-bottom, 0px)); }
  .launch-btn { flex-basis: 70px; width: 70px; height: 70px; }
  .launch-btn__ring { inset: 5px; }
  .launch-btn__sub { display: none; }
  .launch-hint { font-size: 7px; }
  .charge-meter { height: 10px; }

  .flip-pad { height: 64px; width: 43vw; }
  .touch-controls { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

  .hero { padding: 24px 16px 18px; }
  .hero__eyebrow { font-size: 7px; letter-spacing: 0.18em; gap: 7px; }
  .hero__eyebrow span { width: 12px; }
  .hero__title-top, .hero__title-bottom { font-size: clamp(27px, 9.4vw, 46px); }
  .hero__tagline { font-size: 8px; letter-spacing: 0.3em; }
  .hero__copy { font-size: 11px; line-height: 1.5; margin-top: 12px; }
  .hero__features { margin: 14px auto 16px; }
  .feature b { font-size: 17px; }
  .feature span { font-size: 6px; }
  .hero__foot { margin-top: 14px; }
  .hero__credit { font-size: 6.5px; letter-spacing: 0.1em; }

  .modal { padding: 24px 18px; }
  .modal__title { font-size: 23px; }
  .modal__actions { flex-direction: column; }
  .modal__actions .neon-btn { width: 100%; }
  .gameover__stats { grid-template-columns: repeat(2, 1fr); }
  .gameover__score { margin-top: 16px; padding: 14px 10px; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .panel { top: 98px; padding: 14px 16px 12px; }
  .leaderboard { max-height: 150px; }
  .divider { margin: 11px 0; }
  .brief { font-size: 11px; }
  .bottom-hud { bottom: 12px; }
  .launch-btn { width: 88px; height: 88px; flex-basis: 88px; }
  .hero { padding-top: 30px; padding-bottom: 20px; }
  .hero__copy { margin-top: 12px; }
  .hero__features { margin: 16px auto 18px; }
  .hero__foot { margin-top: 16px; }
  .hero__credit { margin-top: 12px; padding-top: 10px; }
}

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