:root {
  --bg: #0f1714;
  --panel: #17211d;
  --panel-strong: #203029;
  --road: #26302d;
  --road-light: #3d4945;
  --water: #bfe3ea;
  --land: #6ca85c;
  --land-dark: #244d35;
  --text: #fbfbf2;
  --muted: #aec0b2;
  --mint: #57dd92;
  --cyan: #69c9ec;
  --amber: #ffd45f;
  --coral: #ff6d52;
  --ink: #101513;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(145deg, rgba(87, 221, 146, 0.13), transparent 34%),
    linear-gradient(225deg, rgba(255, 212, 95, 0.11), transparent 32%),
    #0f1714;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand-block h1 {
  margin: 0;
  font-size: 3.2rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.eyebrow,
.mini-label,
.stat-label,
.modal-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill,
.level-meter,
.icon-button,
.track-panel,
.panel-section {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(23, 33, 29, 0.9);
  box-shadow: var(--shadow);
}

.stat-pill {
  display: grid;
  min-width: 92px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.stat-pill strong {
  font-size: 1.35rem;
  line-height: 1;
}

.level-meter {
  display: grid;
  width: 190px;
  min-height: 48px;
  gap: 7px;
  padding: 8px 12px 10px;
  border-radius: var(--radius);
}

.level-meter span {
  font-size: 0.9rem;
  font-weight: 900;
}

.level-track,
.speed-strip {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.level-track span,
.speed-strip span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  transition: width 180ms ease;
}

.level-track span {
  background: linear-gradient(90deg, var(--mint), var(--amber));
}

.icon-button,
.ghost-button,
.primary-button,
.mode-button,
.answer-button,
.skin-button {
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.icon-button {
  min-width: 56px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--panel-strong);
  font-weight: 900;
}

.icon-button[aria-pressed="false"] {
  color: var(--muted);
  background: rgba(23, 33, 29, 0.68);
}

.primary-button {
  min-height: 44px;
  border: 0;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--amber), var(--mint));
  color: #102018;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(255, 212, 95, 0.2);
}

.ghost-button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.icon-button:hover,
.ghost-button:hover,
.primary-button:hover,
.mode-button:hover,
.answer-button:hover,
.skin-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.mode-button:active,
.answer-button:active,
.skin-button:active,
.ghost-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(430px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.track-panel,
.panel-section {
  border-radius: var(--radius);
}

.track-panel {
  min-height: 680px;
  padding: 16px;
}

.race-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.race-meta > div {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.race-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  line-height: 1.1;
}

.track {
  min-height: 530px;
}

.map-stage {
  position: relative;
  overflow: hidden;
  min-height: 530px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(191, 227, 234, 0.74), rgba(197, 232, 224, 0.5)),
    url("./3dcf15eebf7995388197194a096ef699.jpg") center / cover;
  box-shadow: inset 0 0 0 999px rgba(26, 55, 40, 0.16);
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.46) 0 2px, transparent 3px 16px),
    repeating-radial-gradient(circle at 86% 28%, rgba(255, 255, 255, 0.38) 0 2px, transparent 3px 18px);
  opacity: 0.58;
  pointer-events: none;
}

.map-water {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 12% 14%, rgba(36, 77, 53, 0.92) 0 15%, transparent 16%),
    radial-gradient(ellipse at 70% 18%, rgba(56, 119, 72, 0.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 48% 62%, rgba(95, 155, 76, 0.88) 0 25%, transparent 26%),
    radial-gradient(ellipse at 82% 72%, rgba(34, 82, 64, 0.9) 0 18%, transparent 19%),
    rgba(191, 227, 234, 0.2);
  mix-blend-mode: multiply;
}

.map-island {
  position: absolute;
  border-radius: 46% 54% 48% 52%;
  background: linear-gradient(145deg, #7db263, #2f6a42 72%);
  box-shadow: inset 0 -18px 0 rgba(18, 56, 35, 0.28), 0 16px 30px rgba(17, 54, 38, 0.16);
}

.island-a {
  left: 5%;
  top: 9%;
  width: 24%;
  height: 22%;
}

.island-b {
  right: 8%;
  top: 8%;
  width: 32%;
  height: 24%;
}

.island-c {
  left: 18%;
  bottom: 6%;
  width: 58%;
  height: 34%;
}

.map-trees {
  position: absolute;
  inset: 10% 6% 8% 6%;
  background:
    conic-gradient(from 45deg, transparent 0 25%, #163c2b 0 50%, transparent 0) 10% 20% / 28px 28px,
    conic-gradient(from 45deg, transparent 0 25%, #1f5738 0 50%, transparent 0) 35% 65% / 24px 24px,
    conic-gradient(from 45deg, transparent 0 25%, #0f3428 0 50%, transparent 0) 76% 44% / 26px 26px;
  opacity: 0.55;
  pointer-events: none;
}

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-shadow,
.route-road,
.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-shadow {
  stroke: rgba(8, 18, 15, 0.35);
  stroke-width: 10;
  transform: translateY(1px);
}

.route-road {
  stroke: var(--road);
  stroke-width: 7.2;
}

.route-line {
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 0.9;
  stroke-dasharray: 2.2 2.8;
}

.landmark,
.finish-flag {
  position: absolute;
  z-index: 2;
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #173425;
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 8px 18px rgba(12, 44, 30, 0.18);
}

.landmark-a {
  left: 13%;
  top: 53%;
}

.landmark-b {
  left: 36%;
  top: 38%;
}

.landmark-c {
  right: 31%;
  top: 26%;
}

.landmark-d {
  right: 18%;
  top: 48%;
}

.finish-flag {
  right: 5%;
  top: 16%;
  background:
    linear-gradient(45deg, #fff 25%, #1e2b27 25% 50%, #fff 50% 75%, #1e2b27 75%);
  background-size: 12px 12px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.race-live {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 8;
  width: min(330px, calc(100% - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 20, 0.78);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.race-live span {
  display: block;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-live strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.12;
}

.race-live.has-callout {
  animation: callout-hit 520ms ease;
}

.race-live.is-perfect,
.race-live.is-fast,
.race-live.is-turbo,
.race-live.is-go {
  border-color: rgba(255, 212, 95, 0.5);
  background: rgba(37, 45, 24, 0.86);
}

.race-live.is-wrong,
.race-live.is-bump {
  border-color: rgba(255, 109, 82, 0.55);
  background: rgba(48, 26, 22, 0.86);
}

.race-countdown {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  color: #fff6cc;
  font-size: 7rem;
  font-weight: 950;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 26px rgba(255, 212, 95, 0.42);
  pointer-events: none;
  animation: countdown-pop 520ms ease infinite alternate;
}

.race-countdown[hidden] {
  display: none;
}

.checkpoint {
  position: absolute;
  z-index: 2;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(15, 23, 20, 0.72);
  color: #fff6cc;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.checkpoint-a {
  left: 25%;
  top: 63%;
}

.checkpoint-b {
  left: 57%;
  top: 37%;
}

.checkpoint-c {
  right: 13%;
  top: 34%;
}

.racer-token {
  --accent: var(--mint);
  --accent-2: var(--cyan);
  --car-angle: 0deg;
  --label-angle: 0deg;
  position: absolute;
  width: 84px;
  height: 48px;
  transform: translate(-50%, -50%) rotate(var(--car-angle));
  transition:
    left 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 180ms ease;
  z-index: 5;
}

.map-token strong {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%) rotate(var(--label-angle));
  min-width: 32px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 20, 0.86);
  color: var(--text);
  font-size: 0.75rem;
  text-align: center;
}

.racer-token.is-leading {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 56%, transparent));
}

.racer-token.is-perfect {
  filter: drop-shadow(0 0 20px rgba(255, 212, 95, 0.58));
}

.racer-token.is-turbo {
  z-index: 7;
}

.vehicle {
  position: absolute;
  inset: 6px 0 0;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px 18px 10px 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.18);
}

.vehicle::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 24px;
  width: 34px;
  height: 20px;
  border-radius: 12px 14px 4px 4px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset -9px -2px 0 rgba(37, 59, 66, 0.28);
}

.vehicle::after {
  content: "";
  position: absolute;
  top: 11px;
  right: -12px;
  width: 17px;
  height: 15px;
  border-radius: 2px 8px 8px 2px;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 212, 95, 0.5);
}

.wheel {
  position: absolute;
  bottom: -8px;
  width: 20px;
  height: 20px;
  border: 4px solid #f3f5ed;
  border-radius: 50%;
  background: #0b0c0d;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.wheel.front {
  right: 10px;
}

.wheel.back {
  left: 12px;
}

.boost-flame {
  position: absolute;
  top: 22px;
  left: -20px;
  width: 28px;
  height: 14px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, transparent, var(--amber), var(--coral));
  opacity: 0;
  transform-origin: right center;
}

.racer-token.boosting .boost-flame {
  animation: flame 260ms infinite alternate;
  opacity: 1;
}

.map-scorecards {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--radius);
  background: rgba(15, 23, 20, 0.82);
  color: var(--muted);
  font-weight: 850;
}

.map-card strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-card.is-leading {
  border-color: rgba(255, 212, 95, 0.7);
  background: rgba(31, 42, 28, 0.9);
}

.speed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  font-weight: 900;
}

.speed-strip {
  height: 14px;
}

.speed-strip span {
  background: linear-gradient(90deg, var(--cyan), var(--mint), var(--amber));
}

.control-panel {
  display: grid;
  gap: 14px;
}

.panel-section {
  padding: 14px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1;
}

.section-header span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mode-button {
  min-height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.mode-button strong,
.mode-button span {
  display: block;
}

.mode-button strong {
  margin-bottom: 7px;
  font-size: 0.9rem;
  line-height: 1.08;
}

.mode-button span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.mode-button.is-selected {
  border-color: rgba(255, 212, 95, 0.72);
  background: rgba(255, 212, 95, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 212, 95, 0.16);
}

.problem-section {
  overflow: hidden;
}

.problem-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.problem-topline.compact {
  margin: 12px 0 8px;
  font-size: 0.74rem;
}

.duel-problems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-problem {
  --accent: var(--mint);
  --accent-2: var(--cyan);
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 54%),
    rgba(255, 255, 255, 0.04);
}

.player-problem.has-correct {
  box-shadow: inset 0 0 0 1px rgba(87, 221, 146, 0.32);
}

.player-problem.has-wrong {
  box-shadow: inset 0 0 0 1px rgba(255, 109, 82, 0.35);
}

.player-problem-head,
.player-mini-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-problem-head span,
.player-mini-stats span,
.strategy-hint span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.player-problem-head strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
}

.problem-text {
  display: grid;
  place-items: center;
  min-height: 96px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 1.85rem;
  font-weight: 950;
  line-height: 1.12;
  text-align: center;
}

.strategy-hint {
  min-height: 78px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 52%, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius);
  background: rgba(12, 20, 17, 0.38);
}

.strategy-hint strong {
  display: block;
  margin-top: 5px;
  color: #fff6cc;
  font-size: 0.9rem;
  line-height: 1.28;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.answer-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1.08;
}

.answer-button kbd {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--amber);
  font: inherit;
  font-size: 0.84rem;
}

.answer-button span {
  overflow-wrap: anywhere;
}

.answer-button:disabled,
.primary-button:disabled,
.mode-button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.answer-button.is-correct {
  border-color: rgba(87, 221, 146, 0.9);
  background: rgba(87, 221, 146, 0.17);
}

.answer-button.is-wrong {
  border-color: rgba(255, 109, 82, 0.9);
  background: rgba(255, 109, 82, 0.17);
}

.player-mini-stats {
  margin-top: 10px;
}

.strategy-deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.strategy-card {
  min-height: 98px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.strategy-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--amber);
}

.strategy-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.32;
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.skin-button {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.skin-swatch {
  width: 34px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px 13px 7px 6px;
  background: linear-gradient(135deg, var(--skin-a), var(--skin-b));
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.16);
}

.skin-button.is-selected {
  border-color: rgba(255, 212, 95, 0.78);
  background: rgba(255, 212, 95, 0.12);
}

.skin-button.is-locked {
  opacity: 0.42;
}

.leaderboard-list {
  display: grid;
  gap: 7px;
  min-height: 142px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.leaderboard-list strong {
  color: var(--text);
}

.empty-board {
  display: grid;
  place-items: center;
  min-height: 112px;
  color: var(--muted);
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  min-width: 220px;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(16, 21, 19, 0.94);
  color: var(--text);
  text-align: center;
  font-weight: 950;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  animation: toast-in 900ms ease forwards;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 7, 0.68);
  backdrop-filter: blur(10px);
}

.result-modal[hidden] {
  display: none;
}

.modal-card {
  width: min(540px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #17211d;
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-card h2 {
  margin: 6px 0 16px;
  font-size: 2rem;
  line-height: 1;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.result-grid div {
  min-height: 66px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.correct-pulse .track-panel {
  animation: correct-flash 440ms ease;
}

.wrong-pulse .problem-section {
  animation: wrong-shake 330ms ease;
}

.wrong-pulse .track-panel {
  animation: wrong-flash 380ms ease;
}

@keyframes correct-flash {
  0%,
  100% {
    box-shadow: var(--shadow);
  }

  35% {
    box-shadow: 0 0 0 2px rgba(87, 221, 146, 0.55), 0 18px 60px rgba(87, 221, 146, 0.2);
  }
}

@keyframes wrong-flash {
  0%,
  100% {
    box-shadow: var(--shadow);
  }

  35% {
    box-shadow: 0 0 0 2px rgba(255, 109, 82, 0.58), 0 18px 60px rgba(255, 109, 82, 0.18);
  }
}

@keyframes wrong-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(7px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(3px);
  }
}

@keyframes flame {
  from {
    transform: scaleX(0.72);
  }

  to {
    transform: scaleX(1.08);
  }
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translate(-50%, 16px);
  }

  16%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}

@media (max-width: 1180px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .problem-section,
  .strategy-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 720px);
    padding-top: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-stats {
    display: grid;
    grid-template-columns: 1fr 1.3fr 56px;
    width: 100%;
  }

  .brand-block h1 {
    font-size: 2.4rem;
  }

  .race-meta,
  .mode-buttons,
  .control-panel,
  .duel-problems,
  .strategy-deck,
  .map-scorecards {
    grid-template-columns: 1fr;
  }

  .track-panel {
    min-height: auto;
  }

  .track,
  .map-stage {
    min-height: 430px;
  }

  .racer-token {
    width: 66px;
    height: 40px;
  }

  .wheel {
    width: 17px;
    height: 17px;
  }

  .problem-text {
    min-height: 86px;
  }

  .answer-button {
    min-height: 56px;
    font-size: 1.15rem;
  }

  .skin-grid {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}

/* Turbo Duel overrides: shared-question duel board and richer race effects. */
.brand-block h1 {
  font-size: 3.2rem;
}

.game-grid {
  grid-template-columns: minmax(0, 1.32fr) minmax(500px, 0.68fr);
}

.mode-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.duel-problems {
  display: block;
}

.duel-intro,
.duel-board {
  border-radius: var(--radius);
}

.duel-intro {
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 212, 95, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.045);
}

.duel-kicker {
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.duel-intro h2 {
  margin: 8px 0 8px;
  font-size: 1.55rem;
}

.duel-intro p {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tutorial-grid div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
}

.tutorial-grid strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--amber);
  color: #18231d;
}

.tutorial-grid span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.25;
}

.duel-board {
  display: grid;
  gap: 12px;
}

.duel-question {
  position: relative;
  overflow: hidden;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(105, 201, 236, 0.12), transparent 52%),
    rgba(255, 255, 255, 0.055);
}

.duel-question::after {
  content: "";
  position: absolute;
  inset: auto 18px 12px auto;
  width: 120px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  opacity: 0.55;
}

.duel-question-top,
.lane-head,
.lane-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.duel-question-top span,
.duel-question-top strong,
.lane-head span,
.lane-stats span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.duel-question h2 {
  margin: 10px 0 0;
  font-size: 2.85rem;
  line-height: 1.02;
  text-align: center;
}

.duel-race-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.duel-race-state > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timing-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.timing-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--mint));
  transition: width 120ms linear;
}

.duel-board.is-countdown .timing-bar span {
  animation: timing-ready 420ms ease infinite alternate;
}

.boss-pressure {
  width: max-content;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 109, 82, 0.16);
  color: #ffd3c9;
  font-size: 0.82rem;
  font-weight: 950;
}

.feedback-ribbon,
.hint-panel {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(15, 23, 20, 0.78);
}

.feedback-ribbon {
  border: 1px solid rgba(255, 212, 95, 0.38);
}

.feedback-ribbon span,
.hint-panel strong {
  display: block;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.feedback-ribbon strong {
  display: block;
  margin-top: 3px;
  font-size: 1.35rem;
}

.feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.feedback-chips em {
  display: block;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 212, 95, 0.14);
  color: #fff6cc;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.feedback-ribbon p,
.hint-panel span {
  display: block;
  margin: 5px 0 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.34;
}

.hint-panel {
  border: 1px dashed rgba(105, 201, 236, 0.48);
}

.answer-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.answer-lane {
  --accent: var(--mint);
  --accent-2: var(--cyan);
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, rgba(255, 255, 255, 0.13));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.04);
}

.answer-lane.is-first {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent);
}

.answer-lane.is-correct {
  animation: correct-card 620ms ease;
}

.answer-lane.is-wrong {
  animation: wrong-shake 330ms ease;
}

.answer-lane.is-sabotaged .answer-button {
  border-style: dashed;
}

.lane-head strong {
  display: block;
  margin-top: 2px;
  font-size: 1.08rem;
}

.lane-scorebox {
  text-align: right;
}

.lane-badge {
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.lane-badge.is-correct,
.lane-badge.is-combo,
.lane-badge.is-lead {
  background: color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.06));
  color: var(--text);
}

.lane-badge.is-wrong {
  background: rgba(255, 109, 82, 0.16);
  color: #ffd3c9;
}

.answer-lane .answer-grid {
  margin-top: 11px;
}

.combo-meter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.combo-meter span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.combo-meter span.is-active {
  background: linear-gradient(90deg, var(--accent), var(--amber));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}

.power-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.power-button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text);
  cursor: pointer;
}

.power-button strong,
.power-button small,
.power-button span {
  display: block;
}

.power-button strong {
  font-size: 0.74rem;
  line-height: 1;
}

.power-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
}

.power-button span {
  margin-top: 4px;
  color: var(--amber);
  font-weight: 950;
}

.power-button:disabled {
  cursor: default;
  opacity: 0.44;
}

.power-button.has-charge {
  border-color: rgba(255, 212, 95, 0.56);
  background: rgba(255, 212, 95, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 212, 95, 0.12);
}

.lane-stats {
  margin-top: 10px;
}

.speed-lines {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(115deg, transparent 0 45%, rgba(255, 255, 255, 0.26) 46%, transparent 48%) 0 0 / 180px 100%,
    linear-gradient(115deg, transparent 0 60%, rgba(255, 212, 95, 0.18) 61%, transparent 63%) 0 0 / 240px 100%;
  opacity: 0;
  pointer-events: none;
}

.map-stage.is-racing .speed-lines {
  animation: speed-lines 900ms linear infinite;
  opacity: calc(0.12 + var(--race-speed, 0) * 0.24);
}

.map-stage.is-hot .speed-lines {
  animation-duration: 560ms;
}

.dust {
  position: absolute;
  left: -7px;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  opacity: 0;
}

.dust-b {
  left: 2px;
  bottom: -4px;
}

.racer-token.boosting .dust {
  animation: dust-pop 420ms infinite;
}

.racer-token.boosting .dust-b {
  animation-delay: 120ms;
}

.racer-token.is-bursting .vehicle {
  animation: car-pop 520ms ease;
}

.racer-token.is-bumped .vehicle {
  animation: bump-car 420ms ease;
}

.racer-token.is-perfect .vehicle {
  animation: perfect-snap 520ms ease;
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.18), 0 0 22px rgba(255, 212, 95, 0.52);
}

.racer-token.is-turbo .vehicle {
  animation: turbo-surge 420ms ease infinite alternate;
}

.skid-mark {
  position: absolute;
  left: -18px;
  top: 31px;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(18, 24, 22, 0.5);
  opacity: 0;
}

.racer-token.is-skidding .skid-mark {
  animation: skid-streak 520ms ease;
}

.shield-ring {
  position: absolute;
  inset: -9px -7px -7px;
  border: 2px solid rgba(105, 201, 236, 0.72);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
}

.racer-token.has-shield .shield-ring {
  opacity: 1;
  animation: shield-pulse 1200ms ease infinite;
}

.confetti-bit,
.spark-bit {
  position: absolute;
  z-index: 9;
  pointer-events: none;
}

.confetti-bit {
  width: 7px;
  height: 12px;
  border-radius: 2px;
  animation: confetti-fly 820ms ease-out forwards;
}

.spark-bit {
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 0 10px rgba(255, 109, 82, 0.55);
  animation: spark-fly 520ms ease-out forwards;
}

.map-stage.finish-pop {
  animation: finish-glow 1200ms ease;
}

.garage-card {
  grid-template-rows: auto auto auto;
  gap: 5px;
  min-height: 86px;
  padding: 8px 6px;
}

.garage-card strong {
  font-size: 0.72rem;
  line-height: 1.08;
}

.garage-card span:last-child {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.08;
}

@keyframes correct-card {
  0%,
  100% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px rgba(87, 221, 146, 0.65), 0 14px 26px rgba(87, 221, 146, 0.12);
  }
}

@keyframes speed-lines {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 180px 0, 240px 0;
  }
}

@keyframes dust-pop {
  0% {
    opacity: 0.8;
    transform: translate(0, 0) scale(0.6);
  }

  100% {
    opacity: 0;
    transform: translate(-22px, 8px) scale(1.5);
  }
}

@keyframes car-pop {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }

  38% {
    transform: translateX(8px) scale(1.05);
  }
}

@keyframes perfect-snap {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }

  42% {
    transform: translateX(10px) scale(1.08);
  }
}

@keyframes turbo-surge {
  from {
    transform: translateX(0) scale(1);
  }

  to {
    transform: translateX(7px) scale(1.04);
  }
}

@keyframes bump-car {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  25% {
    transform: translateX(-6px) rotate(-3deg);
  }

  50% {
    transform: translateX(5px) rotate(3deg);
  }
}

@keyframes skid-streak {
  0% {
    opacity: 0.85;
    transform: translateX(12px) scaleX(0.5);
  }

  100% {
    opacity: 0;
    transform: translateX(-22px) scaleX(1.55);
  }
}

@keyframes shield-pulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.42;
  }

  50% {
    transform: scale(1.06);
    opacity: 0.9;
  }
}

@keyframes confetti-fly {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--spin));
  }
}

@keyframes spark-fly {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scaleX(0.45);
  }
}

@keyframes callout-hit {
  0%,
  100% {
    transform: translateY(0);
  }

  38% {
    transform: translateY(-3px);
  }
}

@keyframes countdown-pop {
  from {
    transform: scale(0.92);
    opacity: 0.72;
  }

  to {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes timing-ready {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

@keyframes finish-glow {
  0%,
  100% {
    box-shadow: inset 0 0 0 999px rgba(26, 55, 40, 0.16);
  }

  40% {
    box-shadow: inset 0 0 0 999px rgba(255, 212, 95, 0.2), 0 0 0 2px rgba(255, 212, 95, 0.55);
  }
}

@media (max-width: 1180px) {
  .game-grid,
  .answer-lanes {
    grid-template-columns: 1fr;
  }

  .brand-block h1 {
    font-size: 2.85rem;
  }

  .duel-question h2 {
    font-size: 2.35rem;
  }
}

@media (max-width: 760px) {
  .tutorial-grid,
  .power-row,
  .duel-race-state {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-block h1 {
    font-size: 2.25rem;
  }

  .duel-question h2 {
    font-size: 2rem;
  }

  .problem-text {
    font-size: 1.45rem;
  }

  .race-countdown {
    font-size: 4.2rem;
  }
}

/* Split-screen classroom playfield: two students, one shared race. */
body {
  background:
    radial-gradient(circle at 16px 16px, rgba(255, 212, 95, 0.12) 0 2px, transparent 3px 22px),
    linear-gradient(145deg, rgba(87, 221, 146, 0.14), transparent 34%),
    linear-gradient(225deg, rgba(255, 212, 95, 0.16), transparent 32%),
    #0f1714;
}

.app-shell {
  width: min(1760px, calc(100% - 28px));
  padding-top: 18px;
}

.topbar {
  margin-bottom: 12px;
}

.brand-block h1 {
  font-size: 2.7rem;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.92fr) minmax(560px, 1.16fr) minmax(310px, 0.92fr);
  grid-template-areas:
    "modes modes modes"
    "player1 track player2"
    "strategy garage leaderboard";
  gap: 14px;
  align-items: stretch;
}

.track-panel {
  grid-area: track;
  min-height: 640px;
  padding: 12px;
}

.track,
.map-stage {
  min-height: 505px;
}

.control-panel,
.problem-section,
.duel-problems,
.duel-board,
.answer-lanes {
  display: contents;
}

.mode-section {
  grid-area: modes;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.mode-section .section-header {
  margin: 0;
}

.mode-section .section-header h2 {
  display: none;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mode-button {
  min-height: 48px;
  padding: 8px 10px;
}

.mode-button strong {
  margin-bottom: 3px;
}

.problem-topline,
.duel-question {
  display: none;
}

.answer-lane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 640px;
  padding: 14px;
  border-width: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 64%),
    rgba(18, 29, 24, 0.94);
}

.answer-lane[data-player-panel="player1"] {
  grid-area: player1;
}

.answer-lane[data-player-panel="player2"] {
  grid-area: player2;
}

.lane-head {
  min-height: 48px;
}

.lane-head span,
.lane-stats span {
  font-size: 0.74rem;
}

.lane-head strong {
  font-size: 1.18rem;
}

.controller-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #ffe16d, #ff8c5a);
  color: #17211d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.controller-card span {
  display: block;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.controller-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1.02rem;
  line-height: 1.05;
}

.controller-pad {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 6px;
  padding: 7px;
  border-radius: 8px;
  background: rgba(18, 29, 24, 0.82);
}

.controller-pad kbd {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: #fff9d7;
  color: #17211d;
  font: inherit;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.player-math-card {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 62%),
    rgba(0, 0, 0, 0.18);
  text-align: center;
}

.player-math-card span {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-math-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 2.15rem;
  line-height: 1.05;
}

.answer-lane .answer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

.answer-button {
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 8px 10px;
  border-width: 2px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.45rem;
}

.answer-button kbd {
  width: 36px;
  height: 36px;
  border: 0;
  background: color-mix(in srgb, var(--accent) 32%, #fff8d1);
  color: #122019;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.26);
}

.feedback-ribbon {
  margin-top: 0;
  background: rgba(15, 23, 20, 0.88);
}

.power-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.power-button {
  min-height: 52px;
}

.strategy-section {
  grid-area: strategy;
}

.garage-section {
  grid-area: garage;
}

.leaderboard-section {
  grid-area: leaderboard;
}

.strategy-section,
.garage-section,
.leaderboard-section {
  min-height: 0;
  box-shadow: none;
}

.split-intro {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.2fr) minmax(260px, 1fr);
  gap: 12px;
}

.intro-player-card,
.intro-center-card {
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.intro-center-card {
  background:
    linear-gradient(145deg, rgba(255, 212, 95, 0.14), transparent 58%),
    rgba(255, 255, 255, 0.055);
}

.intro-center-card h2 {
  margin: 7px 0;
  font-size: 1.7rem;
}

.intro-center-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 850;
}

@media (max-width: 1280px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "modes modes"
      "track track"
      "player1 player2"
      "strategy garage"
      "leaderboard leaderboard";
  }

  .track-panel,
  .answer-lane {
    min-height: auto;
  }

  .answer-lane .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .game-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "modes"
      "track"
      "player1"
      "player2"
      "strategy"
      "garage"
      "leaderboard";
  }

  .mode-section,
  .split-intro {
    grid-template-columns: 1fr;
  }

  .mode-buttons,
  .answer-lane .answer-grid {
    grid-template-columns: 1fr;
  }

  .player-math-card strong {
    font-size: 1.65rem;
  }
}
