:root {
  --bg: #0b1a2b;
  --bg-2: #122436;
  --ink: #f3f1ea;
  --muted: #b7c2cc;
  --accent: #f4e3a6;
  --line: rgba(243, 241, 234, 0.14);
  --danger: #e8b4b4;
  --ok: #bfe3c4;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}
body {
  font-size: 18px;
  line-height: 1.45;
}
button, input, select {
  font: inherit;
}
a { color: var(--accent); }

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}
.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--accent);
}
.satire {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 12px;
  font-weight: 700;
}
.lead { color: var(--muted); max-width: 42rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.card, .panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h2, .panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 0.9rem; }
input, select {
  width: 100%;
  background: #0b1a2b;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #071018;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.stage canvas { width: 100%; height: 100%; display: block; }

.timer {
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  color: var(--accent);
  margin: 8px 0;
}
.timer.warn { color: var(--danger); }

.choices {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.choices button {
  text-align: left;
  background: #0b1a2b;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.choices button.picked { border-color: var(--accent); color: var(--accent); }
.choices button.right { border-color: var(--ok); color: var(--ok); }
.choices button.wrong { border-color: var(--danger); color: var(--danger); }

.scoreboard { width: 100%; border-collapse: collapse; }
.scoreboard th, .scoreboard td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.scoreboard td:last-child, .scoreboard th:last-child { text-align: right; }

.qr {
  width: 220px;
  height: 220px;
  background: white;
  border-radius: 12px;
  padding: 8px;
}
.room-code {
  font-size: 2.6rem;
  letter-spacing: 0.18em;
  margin: 8px 0 0;
  font-weight: 800;
}
.phone {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.hidden { display: none !important; }
.note { color: var(--muted); font-size: 0.92rem; }
.flash { color: var(--accent); }
.status-ok { color: var(--ok); }
.status-miss { color: var(--danger); }
