:root {
  --bg: #0b1220;
  --surface: #111a2c;
  --surface-soft: #17233a;
  --line: rgba(181, 196, 228, 0.16);
  --text: #edf2ff;
  --muted: #a8b5d4;
  --accent: #67e8f9;
  --accent-2: #60a5fa;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.12), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(96, 165, 250, 0.12), transparent 22%),
    linear-gradient(180deg, #050a14 0%, var(--bg) 100%);
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 20px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow);
}

.hero {
  padding: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.lede {
  max-width: 42rem;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.75;
}

.hero-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.game-card {
  margin-top: 16px;
  padding: 18px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.toolbar-group {
  display: grid;
  gap: 8px;
}

.toolbar-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-line {
  font-size: 1.08rem;
  font-weight: 800;
}

.support-line,
.info-panel li {
  color: var(--muted);
  line-height: 1.6;
}

.support-line {
  margin-top: 4px;
}

.primary-btn {
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  color: #08111d;
  background: linear-gradient(180deg, #c7fbff 0%, #67e8f9 100%);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.board-frame,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.board-frame {
  padding: 14px;
}

#raceCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(103, 232, 249, 0.04), transparent 26%),
    linear-gradient(180deg, #0a1322 0%, #08101c 100%);
  touch-action: none;
}

.info-panel {
  padding: 16px;
}

.info-panel h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.info-panel ul {
  margin: 0 0 14px 18px;
  padding: 0;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.pad-btn {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  min-height: 52px;
}

.pad-center {
  font-size: 0.96rem;
  color: var(--accent);
}

@media (max-width: 860px) {
  .hero-top {
    display: grid;
  }

  .hero-meta {
    justify-items: start;
  }

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

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

@media (max-width: 560px) {
  .shell {
    width: min(100% - 14px, 1120px);
    padding: 12px 0 24px;
  }

  .hero,
  .game-card {
    padding: 16px;
    border-radius: 20px;
  }

  .board-frame {
    padding: 12px;
  }

  .pad {
    gap: 8px;
  }

  .pad-btn {
    border-radius: 14px;
    min-height: 48px;
  }
}
