:root {
  color-scheme: dark;
  --bg: #0f1117;
  --bg-soft: #161924;
  --panel: rgba(22, 25, 36, 0.92);
  --panel-strong: rgba(18, 22, 33, 0.98);
  --text: #f6f7fb;
  --muted: #b9c0d3;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff8a3d;
  --accent-2: #ffd166;
  --good: #7ff0c9;
  --danger: #ff6b7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shell: min(1180px, calc(100vw - 32px));
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 138, 61, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(127, 240, 201, 0.14), transparent 30%),
    linear-gradient(180deg, #10131c 0%, #0b0d13 100%);
  color: var(--text);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
main { padding-bottom: 40px; }
.shell { width: var(--shell); margin: 0 auto; }
.section { padding: 28px 0 10px; }
.section.muted { padding-bottom: 24px; }
.hero { padding: 48px 0 20px; }
.hero-grid, .game-layout, .three-up, .footer-row, .hud-grid, .summary-grid { display: grid; gap: 18px; }
.hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr); align-items: start; }
.game-layout { grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.45fr) minmax(240px, 0.8fr); align-items: start; }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.hud-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(14px);
}
.hero-card, .info-card { position: sticky; top: 20px; }
.selector-card, .game-card { min-height: 100%; }
.game-card { padding: 20px; }
.eyebrow, .mini-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-2);
}
.mini-label { color: var(--good); }
.lead, .small-note, p, li { line-height: 1.65; }
.lead { color: var(--muted); max-width: 64ch; }
.small-note { color: var(--muted); font-size: 0.95rem; }
.no-top { margin-top: 0; }
.section-heading h2, h1, h2, h3, strong { letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 4vw, 4.4rem); line-height: 1.02; margin: 14px 0 16px; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.35rem); margin: 0 0 10px; }
h3 { font-size: 1.2rem; margin: 0 0 10px; }
p { margin: 0 0 16px; }
ul { margin: 0; padding-left: 20px; }
.bullet-list.compact { display: grid; gap: 10px; }

.cta-row, .play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.cta-row.left, .play-actions { justify-content: flex-start; }
.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #ffb347); color: #130d07; }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.08); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px dashed rgba(255,255,255,0.16); }

.round-deck { display: grid; gap: 12px; margin-top: 18px; }
.round-card, .lane-button {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}
.round-card {
  text-align: left;
  padding: 16px;
  border-radius: var(--radius-lg);
}
.round-card.is-active {
  border-color: rgba(255, 209, 102, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.18) inset;
}
.round-card p { margin: 8px 0; color: var(--muted); font-size: 0.95rem; }
.route-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.9rem; }

.screen { display: grid; gap: 20px; }
.screen[hidden] { display: none; }
.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.status-pill, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}
.status-pill { background: rgba(127, 240, 201, 0.12); color: var(--good); }
.status-pill.accent { background: rgba(255, 138, 61, 0.14); color: var(--accent-2); }
.status-copy { color: var(--muted); }
.hud-card, .summary-stat {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 14px 16px;
}
.hud-card span, .summary-stat span { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
.hud-card strong, .summary-stat strong { font-size: 1.12rem; }
.crate-card {
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(255,138,61,0.12), rgba(255,209,102,0.06)),
    rgba(255,255,255,0.03);
}
.crate-topline { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tag { background: rgba(255,255,255,0.08); color: var(--accent-2); }
.tag.ghost { color: var(--muted); }
#itemName { font-size: clamp(1.8rem, 2.6vw, 2.4rem); margin-bottom: 8px; }
#itemNote { color: var(--muted); margin-bottom: 0; }
.lane-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lane-button {
  padding: 18px;
  border-radius: 18px;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.lane-button:hover, .lane-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255,255,255,0.07);
}
.lane-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lane-button span:last-child { display: block; margin-top: 10px; color: var(--accent-2); font-size: 0.95rem; }
.lane-button small { color: var(--muted); display: block; line-height: 1.45; }
.summary-list { display: grid; gap: 10px; }
.summary-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}
.footer { padding: 18px 0 12px; }
.footer-row nav { display: flex; gap: 18px; justify-content: flex-end; }
.footer p, .footer a { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 1080px) {
  .game-layout { grid-template-columns: 1fr; }
  .hero-card, .info-card { position: static; }
}

@media (max-width: 880px) {
  .hero-grid, .three-up, .footer-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hud-grid, .summary-grid, .lane-grid { grid-template-columns: 1fr; }
  .card, .game-card { padding: 18px; }
  .hero { padding-top: 28px; }
  .footer-row nav { justify-content: flex-start; flex-wrap: wrap; }
}
