:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6978;
  --line: #d8dee6;
  --paper: #f6f7f9;
  --brand: #0f766e;
  --accent: #c026d3;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.brand {
  font-weight: 800;
  font-size: 24px;
  text-decoration: none;
}
nav {
  display: flex;
  gap: 14px;
}
nav a { text-decoration: none; color: var(--muted); }
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.hero {
  min-height: 430px;
  display: grid;
  align-items: center;
  color: white;
  padding: 56px;
  background:
    linear-gradient(90deg, rgba(10,23,28,.92), rgba(10,23,28,.52)),
    url("https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
}
.hero p { max-width: 620px; font-size: 20px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}
.actions, .toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.center { justify-content: center; }
.button, button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.danger {
  border-color: var(--danger);
  color: var(--danger);
}
.danger:hover {
  background: var(--danger);
  color: white;
}
.band, .panel, .policy, .game {
  margin-top: 24px;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
form {
  display: grid;
  gap: 14px;
}
form.inline {
  display: inline;
}
.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.split > :first-child {
  min-width: 0;
}
.split .actions {
  align-content: flex-start;
  flex: 0 0 auto;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}
label.row {
  display: flex;
  align-items: center;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 96px; }
.price {
  font-size: 26px;
  font-weight: 800;
}
.game {
  min-height: 420px;
  text-align: center;
  display: grid;
  place-content: center;
  background: #111827;
  color: white;
}
.live-game {
  place-content: stretch;
  text-align: left;
  gap: 22px;
}
.live-game h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.08;
}
.game-header {
  display: grid;
  grid-template-columns: minmax(180px, 320px) 1fr;
  gap: 20px;
  align-items: end;
}
.game-stage {
  display: grid;
  gap: 18px;
}
.host-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 18px;
}
.host-grid section {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.option-grid, .answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.option-grid div, .answer-grid button {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: white;
  font-size: 20px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.answer-grid button {
  cursor: pointer;
}
.answer-grid button:disabled {
  opacity: .58;
  cursor: default;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.stats span {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
}
.leaderboard {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}
.leaderboard li {
  padding: 8px 0;
}
.leaderboard li::marker {
  font-weight: 800;
  color: #facc15;
}
.leaderboard span {
  display: inline-block;
  max-width: 70%;
  overflow-wrap: anywhere;
}
.leaderboard strong {
  float: right;
}
.join-panel {
  width: min(100%, 460px);
  margin: 0 auto;
}
.question-image {
  width: min(100%, 560px);
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
}
.game h1 {
  font-size: clamp(44px, 10vw, 120px);
  margin: 0;
}
.pulse {
  color: #facc15;
  font-size: 24px;
  animation: pulse 1s infinite alternate;
}
footer {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
pre {
  overflow: auto;
  padding: 14px;
  background: #111827;
  color: white;
  border-radius: 8px;
}
@keyframes pulse {
  from { transform: scale(1); opacity: .78; }
  to { transform: scale(1.04); opacity: 1; }
}
@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }
  .account { margin-left: 0; }
  .hero { padding: 30px; }
  .split {
    flex-direction: column;
  }
  .game { padding: 20px; }
  .game-header, .host-grid, .option-grid, .answer-grid {
    grid-template-columns: 1fr;
  }
}
