:root {
  --bg: #0b0b0b;
  --panel: #161616;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --accent: #1ed760;
  --accent-text: #04140a;
  --danger: #ff5a5a;
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
button, input, textarea { font: inherit; }
.hidden { display: none !important; }

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 14px 40px;
}

.banner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  margin-bottom: 12px;
}
.banner button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #04140a;
  color: #fff;
  font-weight: 800;
}

.toast {
  position: sticky;
  top: 8px;
  z-index: 20;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #1ed760;
  color: #04140a;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.toast.toast-out {
  opacity: 0;
  transition: opacity .25s ease;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 4px 0 0;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.05;
}
.qpill {
  min-width: 72px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
}

.meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 14px 0;
}
.meta div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.meta span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 2px;
}
.meta strong { font-size: 22px; }

.prompt {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 800;
  margin: 18px 0 12px;
}

.listen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.listen a, .listen .listen-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #121212;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
}
.listen a.spotify { border-color: #1ed76066; }
.listen a.deezer { border-color: #a238ff66; }
.listen .listen-missing {
  opacity: .45;
  border-style: dashed;
}
.listen audio {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
}

.choices {
  display: grid;
  gap: 10px;
}
.choice {
  width: 100%;
  min-height: 64px;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #121212;
  color: var(--text);
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}
.choice.selected {
  border-color: var(--accent);
  background: #102418;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice.committed:not(.selected) {
  border-color: #3d3d3d;
}
.choice-e {
  border-style: dashed;
  color: #d8ffe6;
}

.owner-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.owner-prompt {
  margin-top: 0;
  font-size: clamp(20px, 5vw, 26px);
}

.submit {
  width: 100%;
  margin-top: 14px;
  min-height: 64px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 900;
  font-size: 22px;
}
.submit:disabled {
  opacity: .45;
}

.reveal {
  width: 100%;
  margin-top: 10px;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  background: #2a2a2a;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.answer-reveal {
  margin-top: 10px;
  background: #102418;
  border: 1px solid #1ed76055;
  border-radius: 16px;
  padding: 14px 16px;
}
.answer-reveal span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}
.answer-reveal strong {
  font-size: 22px;
  line-height: 1.3;
}
.artist-counts {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.artist-counts .score-row {
  margin-bottom: 0;
  font-size: 18px;
}

.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.nav button, .admin-row button, .secondary, .ghost, .primary {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
}
.secondary { background: #222; color: #fff; }
.primary { background: var(--accent); color: var(--accent-text); }
.ghost { background: #1a1a1a; color: #fff; }
.full { width: 100%; margin-top: 10px; }

.scoreboard { margin-top: 22px; }
.scoreboard h2 {
  margin: 0 0 8px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 20px;
}
.score-row.score-flash {
  border-color: var(--accent);
  background: #102418;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.queue-list {
  display: grid;
  gap: 8px;
}
.queue-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}
.queue-row strong { display: block; margin-bottom: 2px; }
.queue-row span { color: var(--muted); font-size: 13px; }
.admin code {
  color: #c8f5d4;
  font-size: 12px;
}
.wins-line {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.wins-line.score-flash {
  border-color: var(--accent);
  background: #102418;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.winner-line {
  color: var(--muted);
  margin: 8px 0 0;
}
.winner-line strong { color: var(--text); }

.admin {
  margin-top: 24px;
  background: #121212;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.admin summary {
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.admin label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.admin input, .admin textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #333;
  background: #0a0a0a;
  color: #fff;
  padding: 12px;
  min-height: 52px;
}
.admin textarea {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}
.admin-heading {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.game-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
}
.game-card strong {
  display: block;
  margin-bottom: 4px;
}
.game-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.game-card .admin-row {
  margin: 0;
}
.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.admin-row button {
  background: #242424;
  color: #fff;
}
.admin-row .primary { background: var(--accent); color: var(--accent-text); }
.preview {
  margin-top: 10px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  font-size: 12px;
  overflow: auto;
}
.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  min-height: 1.2em;
}
#adminMsg:not(:empty) {
  color: #b8f5c8;
  font-weight: 700;
  font-size: 15px;
}

@media (min-width: 560px) {
  .meta { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 360px) {
  .choice { font-size: 16px; min-height: 60px; }
  h1 { font-size: 30px; }
}
