*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* The `hidden` attribute must always win over component display rules. Author
   rules like `.admin-nav { display: grid }` otherwise override the UA
   `[hidden] { display: none }` (equal specificity, author beats UA), leaving
   "hidden" elements visible. JS toggles visibility via the `hidden` attribute
   across the app (modal, role-aware nav cards, form controls), so enforce it. */
[hidden] { display: none !important; }

:root {
  /* Core identity — navy + gold, refined */
  --bg: #060b2e;
  --bg-2: #101a55;
  --tile-bg: rgba(30, 42, 120, 0.55);
  --tile-hover: rgba(52, 66, 168, 0.7);
  --tile-active: #e8b423;
  --tile-revealed: rgba(20, 26, 60, 0.45);
  --text: #fff;
  --gold: #e8b423;
  --gold-soft: #f6cf5a;
  --red: #e74c3c;
  --green: #2ecc71;
  --border: rgba(255, 255, 255, 0.10);
  --text-muted: #9aa3c7;
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-bg: linear-gradient(180deg, rgba(30, 42, 120, 0.6), rgba(14, 20, 56, 0.6));

  --glass-blur: 12px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 0 0 1px rgba(232, 180, 35, 0.35), 0 12px 34px -10px rgba(232, 180, 35, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --gold-grad: linear-gradient(135deg, #f6cf5a 0%, #e8b423 45%, #c98f12 100%);
}

body {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(1200px 700px at 50% -10%, var(--bg-2) 0%, transparent 60%),
    radial-gradient(900px 600px at 90% 110%, #1a2472 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  background-size: 40px 40px, auto, auto, auto;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
  padding: 1.25rem 1rem 1rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(232, 180, 35, 0.25));
}

h2 {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── Board ─────────────────────────────────────────── */

.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 14px;
  max-width: 1280px;
  margin: 0 auto;
}

.category-header {
  position: relative;
  background: linear-gradient(180deg, rgba(52, 66, 168, 0.7), rgba(26, 36, 114, 0.55));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.6rem;
  text-align: center;
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.category-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-grad);
  opacity: 0.8;
}

.category-header:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(64, 80, 196, 0.8), rgba(34, 46, 140, 0.6));
  box-shadow: var(--shadow);
}

.tile {
  position: relative;
  background: linear-gradient(180deg, rgba(40, 54, 140, 0.6), rgba(22, 30, 84, 0.5));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(232, 180, 35, 0.25);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
              background 0.28s var(--ease), opacity 0.28s var(--ease);
}

.tile:hover:not(.revealed):not(.active) {
  transform: translateY(-4px) scale(1.025);
  background: linear-gradient(180deg, rgba(64, 80, 196, 0.75), rgba(34, 46, 140, 0.6));
  box-shadow: var(--shadow-gold);
  color: var(--gold-soft);
}

.tile.active {
  background: var(--gold-grad);
  color: #1a1405;
  -webkit-text-fill-color: #1a1405;
  cursor: default;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4),
              inset 0 0 30px rgba(255, 255, 255, 0.25),
              0 16px 40px -10px rgba(232, 180, 35, 0.6);
  animation: tile-pop 0.35s var(--ease);
}

.tile.revealed {
  background: var(--tile-revealed);
  color: rgba(255, 255, 255, 0.28);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.28);
  text-shadow: none;
  cursor: default;
  opacity: 0.55;
}

@keyframes tile-pop {
  from { transform: scale(0.92); }
  to   { transform: scale(1); }
}

/* ── Active tile overlay (full-screen on display board) ── */

.active-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 26, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: overlay-in 0.3s var(--ease);
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.active-card {
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.85), rgba(14, 20, 56, 0.92));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(232, 180, 35, 0.5);
  padding: 3rem 2.75rem;
  max-width: 820px;
  width: 90%;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow), 0 0 60px -12px rgba(232, 180, 35, 0.4);
  animation: card-pop 0.38s var(--ease);
}

@keyframes card-pop {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.active-card .points {
  font-family: 'Oswald', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.active-card .answer    { font-size: 1.7rem; line-height: 1.5; margin-bottom: 1.5rem; font-weight: 500; }
.active-card .question  { font-size: 1.1rem; color: #8fd3ff; margin-bottom: 0.5rem; font-style: italic; }
.active-card .alt-answers { font-size: 0.9rem; color: #9aa3c7; margin-bottom: 0.5rem; }
.active-card .explanation {
  font-size: 0.92rem;
  color: #c7cde6;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  text-align: left;
  line-height: 1.6;
}

/* ── Missing / expired game notice ──────────────────── */
.notice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 26, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: overlay-in 0.3s var(--ease);
}

.notice-card {
  background: linear-gradient(180deg, rgba(30, 38, 86, 0.9), rgba(14, 20, 56, 0.94));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  padding: 2.5rem 2.5rem;
  max-width: 480px;
  width: 90%;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  animation: card-pop 0.38s var(--ease);
}

.notice-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
}

.notice-text {
  color: #c7cde6;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ── Final results / winner overlay ─────────────────── */
.winner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 26, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  animation: overlay-in 0.3s var(--ease);
}

.winner-card {
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.9), rgba(14, 20, 56, 0.94));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(232, 180, 35, 0.6);
  padding: 3rem 2.75rem;
  max-width: 720px;
  width: 90%;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow), 0 0 70px -10px rgba(232, 180, 35, 0.5);
  animation: card-pop 0.4s var(--ease);
}

.winner-heading {
  font-family: 'Oswald', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.75rem;
  line-height: 1.2;
}

.winner-standings {
  list-style: none;
  margin: 0;
  padding: 0;
}

.winner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.5rem;
  padding: 0.7rem 1rem;
  border-radius: calc(var(--radius) / 2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.winner-row.winner {
  background: rgba(232, 180, 35, 0.14);
  border: 1px solid rgba(232, 180, 35, 0.5);
  font-weight: 700;
}

.winner-row .winner-name  { text-align: left; }
.winner-row .winner-score { font-family: 'Oswald', sans-serif; font-weight: 600; }
.winner-row .winner-score.negative { color: #ff8a8a; }

/* ── Host: all-tiles-revealed nudge ─────────────────── */
.finish-nudge {
  margin-left: 0.75rem;
  font-size: 0.92rem;
  color: var(--gold, #e8b423);
  font-weight: 500;
}

/* ── Category description modal ─────────────────────── */

/* The `hidden` attribute must win over the unconditional `display: flex` below;
   an author rule otherwise overrides the UA `[hidden] { display: none }` rule. */
.modal-overlay[hidden] { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 26, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: overlay-in 0.25s var(--ease);
}

.modal-card {
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.85), rgba(14, 20, 56, 0.93));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(232, 180, 35, 0.45);
  padding: 2.25rem;
  max-width: 540px;
  width: 90%;
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 50px -14px rgba(232, 180, 35, 0.35);
  animation: card-pop 0.32s var(--ease);
}

.modal-card h2 {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.85rem;
  font-size: 1.5rem;
}
.modal-card p  { line-height: 1.7; color: #dfe3f4; }

/* ── Dashboard: role-aware navigation cards ──────────── */
.admin-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.admin-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.admin-card:hover,
.admin-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(232, 180, 35, 0.5);
  box-shadow: var(--shadow-gold);
  background: var(--tile-hover);
  outline: none;
}

.admin-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Team scores bar ─────────────────────────────────── */

.teams-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
  flex-wrap: wrap;
}

.team-score {
  background: linear-gradient(180deg, rgba(52, 66, 168, 0.55), rgba(26, 36, 114, 0.45));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 130px;
  box-shadow: var(--shadow);
  animation: chip-in 0.3s var(--ease);
}

@keyframes chip-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.team-score .name {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9aa3c7;
  margin-bottom: 0.15rem;
}
.team-score .score {
  font-family: 'Oswald', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: color 0.25s var(--ease);
}
.team-score .score.negative {
  background: none;
  -webkit-text-fill-color: var(--red);
  color: var(--red);
}

/* Brief gold pop + glow when a score actually changes */
@keyframes score-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); filter: drop-shadow(0 0 16px rgba(232, 180, 35, 0.75)); }
  100% { transform: scale(1); }
}
.team-score .score.score-bump { animation: score-bump 1.55s var(--ease); }

/* Public display: larger team tiles so scores read across a room */
body.display .teams-bar {
  gap: 1.75rem;
  padding: 2rem 1.25rem;
}
body.display .team-score {
  padding: 1.4rem 2.75rem;
  min-width: 240px;
  border-radius: var(--radius);
}
body.display .team-score .name {
  font-size: 1.15rem;
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}
body.display .team-score .score {
  font-size: 3.4rem;
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  padding: 0.65rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}

.btn:hover    { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active   { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(232, 180, 35, 0.5); }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
  box-shadow: none;
}
.btn:disabled:hover { transform: none; filter: grayscale(0.5); }

.btn-correct   { background: linear-gradient(180deg, #34d77f, #1f9d57); color: #fff; box-shadow: 0 8px 22px -10px rgba(46, 204, 113, 0.7); }
.btn-incorrect { background: linear-gradient(180deg, #f15a4a, #d63a2c); color: #fff; box-shadow: 0 8px 22px -10px rgba(231, 76, 60, 0.7); }
.btn-neutral   { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: var(--border); }
.btn-gold      { background: var(--gold-grad); color: #1a1405; box-shadow: 0 8px 24px -10px rgba(232, 180, 35, 0.7); }

.btn-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ── Forms (create game page) ────────────────────────── */

.form-wrap {
  max-width: 480px;
  margin: 2.5rem auto;
  padding: 2.25rem;
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.6), rgba(14, 20, 56, 0.6));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: card-pop 0.4s var(--ease);
}

.form-wrap label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: #9aa3c7;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.form-wrap input,
.form-wrap select,
.modal-card input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1.25rem;
  background: rgba(6, 11, 46, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.form-wrap input:focus,
.form-wrap select:focus,
.modal-card input:focus {
  outline: none;
  border-color: rgba(232, 180, 35, 0.6);
  box-shadow: 0 0 0 3px rgba(232, 180, 35, 0.2);
  background: rgba(6, 11, 46, 0.85);
}

.form-wrap .btn { width: 100%; padding: 0.9rem; font-size: 1.05rem; margin-top: 0.5rem; }

/* ── Host score controls ─────────────────────────────── */

.score-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  justify-content: center;
}

.score-controls .btn { padding: 0.25rem 0.7rem; font-size: 0.82rem; }

/* ── Info bar (host page) ────────────────────────────── */

.info-bar {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: #6b73a0;
  letter-spacing: 0.5px;
}

/* ── Result links (after game creation) ─────────────── */

.result-box {
  max-width: 600px;
  margin: 2.5rem auto;
  padding: 2.25rem;
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.6), rgba(14, 20, 56, 0.6));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: card-pop 0.4s var(--ease);
}

.result-box .link-row { margin: 1.1rem 0; }
.result-box .link-row label {
  display: block;
  font-size: 0.78rem;
  color: #9aa3c7;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.result-box .link-row input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: rgba(6, 11, 46, 0.6);
  border: 1px solid var(--border);
  color: #8fd3ff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.result-box .link-row input:focus {
  outline: none;
  border-color: rgba(232, 180, 35, 0.6);
  box-shadow: 0 0 0 3px rgba(232, 180, 35, 0.2);
}

/* ── Host view: tiles show a small answer preview ────── */

body.host .tile {
  flex-direction: column;
  gap: 0.35rem;
  font-size: 1.05rem;
}
body.host .tile .answer-preview {
  font-size: 0.72rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #8fd3ff;
  -webkit-text-fill-color: #8fd3ff;
  font-style: italic;
  text-shadow: none;
}

/* ── Utility ─────────────────────────────────────────── */

.hidden { display: none !important; }

/* ── Create page: enable-buzzers checkbox ────────────── */

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  margin: 0.25rem 0 1rem;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--text) !important;
  font-size: 0.95rem !important;
  cursor: pointer;
}
.checkbox-row input { width: auto; margin: 0; }

/* ── Host: buzzer control panel ──────────────────────── */

.buzz-panel { margin: 1rem 0 0.25rem; }
.buzz-mode {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.buzz-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #dfe3f4;
}
.buzz-item {
  background: rgba(6, 11, 46, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
}
.buzz-item.current {
  border-color: rgba(232, 180, 35, 0.7);
  box-shadow: 0 0 0 2px rgba(232, 180, 35, 0.25);
  color: var(--gold-soft);
  font-weight: 600;
}
.buzz-item.elim { opacity: 0.5; text-decoration: line-through; }

/* ── Display: buzzer status in the active overlay ────── */

.buzz-display { margin-top: 1.25rem; }
.buzz-display-status {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.buzz-display-status.armed  { color: var(--green); }
.buzz-display-status.locked { color: #9aa3c7; }
.buzz-display-status.arming {
  color: var(--gold);
  animation: pulse 0.8s var(--ease) infinite alternate;
}
@keyframes pulse { from { opacity: 0.55; } to { opacity: 1; } }
.buzz-current {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}
.buzz-order { font-size: 1rem; color: #c7cde6; letter-spacing: 0.5px; }
.answer.masked-clue {
  font-family: 'Oswald', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-soft);
}

/* ── Buzzer player device page ───────────────────────── */

body.buzzer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  transition: background 0.3s var(--ease);
}
.buzzer-wrap {
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.buzzer-team {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1.75rem;
  min-height: 1.4em;
}
.buzz-button {
  width: min(70vw, 320px);
  height: min(70vw, 320px);
  border-radius: 50%;
  border: none;
  font-family: 'Oswald', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #1a1405;
  background: var(--gold-grad);
  box-shadow: 0 18px 50px -12px rgba(232, 180, 35, 0.7),
              inset 0 0 30px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.buzz-button:not(:disabled):active {
  transform: scale(0.94);
  box-shadow: 0 8px 24px -10px rgba(232, 180, 35, 0.7);
}
.buzz-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
  box-shadow: none;
}
.buzzer-status {
  margin-top: 1.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #dfe3f4;
  min-height: 1.5em;
}
/* State accents */
body.buzzer.s-armed  { background: radial-gradient(900px 600px at 50% 0%, rgba(46,204,113,0.18), transparent 60%), var(--bg); }
body.buzzer.s-turn   { background: radial-gradient(900px 600px at 50% 50%, rgba(232,180,35,0.28), transparent 60%), var(--bg); }
body.buzzer.s-turn   .buzzer-status { color: var(--gold-soft); font-size: 1.5rem; }
body.buzzer.s-buzzed .buzzer-status { color: var(--gold); }
body.buzzer.s-out    .buzzer-status,
body.buzzer.s-error  .buzzer-status { color: var(--red); }
body.buzzer.s-locked .buzzer-status,
body.buzzer.s-wait   .buzzer-status { color: #9aa3c7; }
body.buzzer.s-over   { background: radial-gradient(900px 600px at 50% 0%, rgba(232,180,35,0.12), transparent 60%), var(--bg); }
body.buzzer.s-over   .buzzer-status { color: var(--gold-soft); font-size: 1.3rem; }

/* ── Reduced motion ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .tile:hover:not(.revealed):not(.active),
  .category-header:hover,
  .btn:hover { transform: none; }
}

/* ── Monospace utility ───────────────────────────────── */

.mono {
  font-family: 'JetBrains Mono', 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  font-size: 0.88em;
  letter-spacing: 0;
}

/* ── Particle canvas (display board idle animation) ──── */

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ── Site header (landing + host pages) ─────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.site-header-brand {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Brand rendered as a home link (e.g. account page) — keep the gradient text
   clean with no underline. */
a.site-header-brand { text-decoration: none; }

.site-header-game {
  font-size: 0.78rem;
  color: #6b73a0;
}

body.landing .site-header {
  background: rgba(6, 11, 46, 0.7);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  position: sticky;
  top: 0;
  z-index: 50;
}

body.host .site-header {
  background: rgba(6, 11, 46, 0.35);
  padding: 0.6rem 1.5rem;
}

/* ── Button size variants ────────────────────────────── */

.btn.btn-sm { padding: 0.4rem 1rem;  font-size: 0.85rem; }
.btn.btn-lg { padding: 0.9rem 2rem;  font-size: 1.1rem; }

/* ── Landing: hero ───────────────────────────────────── */

.hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 5rem;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
  min-width: 280px;
}

.hero-content h1 {
  text-align: left;
  padding: 0 0 0.5rem;
  letter-spacing: 2px;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 600;
  margin: 1rem 0 0.75rem;
  line-height: 1.4;
  color: #dfe3f4;
}

.hero-sub {
  color: #9aa3c7;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
}

/* ── Landing: mini board decoration ─────────────────── */

.hero-board {
  flex: 1;
  min-width: 260px;
  max-width: 440px;
}

.mini-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.mini-cat {
  position: relative;
  background: linear-gradient(180deg, rgba(52, 66, 168, 0.7), rgba(26, 36, 114, 0.55));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.3rem;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mini-cat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-grad);
  opacity: 0.8;
}

.mini-tile {
  background: linear-gradient(180deg, rgba(40, 54, 140, 0.6), rgba(22, 30, 84, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}

.mini-tile.active {
  background: var(--gold-grad);
  color: #1a1405;
  animation: shimmer 2.5s ease-in-out infinite;
}

.mini-tile.revealed {
  background: var(--tile-revealed);
  color: rgba(255, 255, 255, 0.28);
  opacity: 0.55;
}

@keyframes shimmer {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.18); }
}

/* ── Landing: how it works ───────────────────────────── */

.how-it-works {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.how-it-works h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  margin-bottom: 3rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.steps {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  flex: 1;
  min-width: 190px;
  max-width: 255px;
  text-align: center;
}

.step-num {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #1a1405;
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: #dfe3f4;
}

.step p {
  font-size: 0.88rem;
  color: #9aa3c7;
  line-height: 1.6;
}

/* ── Landing: features grid ──────────────────────────── */

.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: linear-gradient(180deg, rgba(30, 42, 120, 0.6), rgba(14, 20, 56, 0.6));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
}

.feature-card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-soft);
  margin-bottom: 0.55rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: #9aa3c7;
  line-height: 1.6;
}

/* ── Landing: use cases ──────────────────────────────── */

.use-cases {
  text-align: center;
  padding: 0.5rem 2rem 4rem;
  color: #9aa3c7;
  font-size: 0.92rem;
}

.use-cases strong { color: #dfe3f4; }

/* ── Site footer ─────────────────────────────────────── */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  background: rgba(6, 11, 46, 0.5);
  font-size: 0.85rem;
  color: #6b73a0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.footer-links a {
  color: #6b73a0;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-links a:hover { color: var(--gold-soft); }

/* ── Create page: back link ──────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #9aa3c7;
  text-decoration: none;
  padding: 0.75rem 1.5rem 0;
  transition: color 0.18s var(--ease);
}

.back-link:hover { color: var(--gold-soft); }

/* ── Create page: subtitle ───────────────────────────── */

.page-subtitle {
  text-align: center;
  color: #9aa3c7;
  font-size: 0.9rem;
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

/* ── Create page: details / buzzer options ───────────── */

.form-wrap details {
  margin-bottom: 1.25rem;
}

.form-wrap details summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: #9aa3c7;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  padding: 0.35rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}

.form-wrap details summary::-webkit-details-marker { display: none; }

.form-wrap details summary::before {
  content: '▶';
  font-size: 0.55rem;
  transition: transform 0.18s;
  display: inline-block;
}

.form-wrap details[open] summary::before {
  transform: rotate(90deg);
}

.form-wrap details .checkbox-row {
  margin-top: 0.75rem;
}

/* ── Buzzer: brand context label ─────────────────────── */

.buzzer-brand {
  font-size: 0.75rem;
  color: #6b73a0;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

/* ── Stage 2: CSP-compliant utility & component classes ──────────────────────
   Replaces inline style="" attributes removed for a strict style-src 'self'. */

/* Shared utilities */
.text-muted        { color: var(--text-muted); }
.fw-600            { font-weight: 600; }
.fw-500            { font-weight: 500; }
.flex-1            { flex: 1; }
.btn-block         { width: 100%; }
.btn-block-lg      { width: 100%; font-size: 1rem; }
.mt-2              { margin-top: 2rem; }
.btn-soft-disabled { opacity: 0.5; cursor: not-allowed; }
.link-gold         { color: var(--gold); }

/* create.html */
.pro-hint        { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }
.pro-panel       { margin-top: 1.5rem; }
.pro-panel-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 600; }
.pro-details     { opacity: 0.5; }
.pro-summary     { font-weight: 600; color: var(--text-muted); user-select: none; cursor: default; }
.pro-feature-box { margin-top: 0.75rem; padding: 1rem; border: 1px solid var(--glass-border); border-radius: var(--radius-xs); font-size: 0.85rem; color: var(--text-muted); }
.pro-feature-list { margin: 0; padding-left: 1.25rem; line-height: 1.9; }
.result-title    { color: var(--gold); margin-bottom: 1rem; }

/* login.html */
.auth-card     { max-width: 400px; margin-top: 4rem; }
.auth-title    { font-size: 1.75rem; margin-bottom: 0.5rem; }
.auth-subtitle { margin-bottom: 2rem; }
.auth-note     { margin-top: 1.5rem; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* account.html */
.account-card    { max-width: 480px; margin-top: 4rem; }
.account-divider { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--glass-border); }
.account-help    { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.field-label     { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.plan-badge      { font-size: 0.85rem; padding: 0.2rem 0.6rem; border-radius: var(--radius-xs); }
.row-between     { display: flex; justify-content: space-between; align-items: center; }
.row-gap         { display: flex; gap: 0.5rem; align-items: stretch; }
/* In an input+button row, the button must hug its label (not the .form-wrap
   width:100%) so the flex:1 input can fill the remaining space. */
.row-gap .btn    { width: auto; margin-top: 0; flex: 0 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.form-error      { color: #f87171; font-size: 0.8rem; margin-top: 0.5rem; display: none; }

/* index.html — header nav + pricing */
.site-nav           { display: flex; gap: 0.75rem; align-items: center; }
.nav-link           { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; }
/* Auth-state link visibility. Default = signed out (safe if JS is disabled);
   auth-state.js adds html.is-authed synchronously to avoid a flash. */
.auth-only          { display: none; }
html.is-authed .anon-only { display: none; }
html.is-authed .auth-only { display: inline; }
.plans              { padding-top: 0; }
.plans-heading      { text-align: center; margin-bottom: 2rem; }
.plans-grid         { gap: 1rem; align-items: stretch; }
.plan-card          { display: flex; flex-direction: column; gap: 0.75rem; }
.plan-card-featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.plan-popular       { font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); }
.plan-name          { font-size: 1.1rem; font-weight: 700; }
.plan-price         { font-size: 2rem; font-weight: 700; color: var(--gold); }
.plan-price-unit    { font-size: 1rem; color: var(--text-muted); }
.plan-sub           { font-size: 0.8rem; color: var(--text-muted); }
.plan-features      { margin: 0; padding-left: 1.25rem; font-size: 0.875rem; line-height: 2; flex: 1; }
.plan-cta           { text-align: center; margin-top: auto; }

/* ── Account hub ─────────────────────────────────────────────────────────── */

.account-hub {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  max-width: 920px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  align-items: start;
}

.account-nav {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.account-nav-link:hover { color: var(--text); background: var(--glass-border); }

.account-nav-link.is-active {
  color: var(--gold-soft);
  background: var(--glass-border);
  border-left-color: var(--gold);
}

.account-nav-link.is-disabled { opacity: 0.45; cursor: default; }
.account-nav-link.is-disabled:hover { background: none; color: var(--text-muted); }

.account-nav-sep { height: 1px; background: var(--glass-border); margin: 0.5rem 0.25rem; }

.account-nav-signout {
  text-align: left;
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.account-nav-signout:hover { color: var(--red); background: var(--glass-border); }

.account-nav-link:focus-visible,
.account-nav-signout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 180, 35, 0.5);
}

.soon-pill {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--glass-border);
  color: var(--text-muted);
}

.account-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  max-width: 640px;
}

.account-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  scroll-margin-top: 1.5rem;
}

.account-section-title {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
  color: var(--text);
}

.profile-row { display: flex; align-items: center; gap: 1rem; }

.account-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #1a1405;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.profile-meta { min-width: 0; }
.profile-email-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.profile-since { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.35rem; }

.verified-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1a1405;
  background: var(--gold);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-badge--free { background: var(--glass-border); color: var(--text-muted); }
.plan-badge--pro  { background: var(--gold); color: #1a1405; }

.account-perks {
  list-style: none;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.account-perks li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.account-perks li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.75rem; }
.warn-text { color: var(--gold-soft); }
.error-text { color: #f87171; }

.form-error.show { display: block; }

@media (max-width: 720px) {
  .account-hub {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
  }
  .account-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
    padding: 0.5rem 0;
    background: rgba(6, 11, 46, 0.85);
    backdrop-filter: blur(8px);
  }
  .account-nav-sep { display: none; }
  .account-nav-link {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .account-nav-link.is-active {
    border-left: none;
    border-bottom-color: var(--gold);
  }
  .account-nav-signout { white-space: nowrap; }
}

/* ── Admin content management (Phase 2: questions & categories) ───────────── */

/* Wider than the narrow auth/form card — this is a management surface. */
.content-wrap { max-width: 760px; }

/* Match text inputs so multi-line clue/answer/description fields look native. */
.form-wrap textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1.25rem;
  background: rgba(6, 11, 46, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.form-wrap textarea:focus {
  outline: none;
  border-color: rgba(232, 180, 35, 0.6);
  box-shadow: 0 0 0 3px rgba(232, 180, 35, 0.2);
  background: rgba(6, 11, 46, 0.85);
}

/* Subtle, low-emphasis button (also used by the Phase-1 dashboard header). */
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.content-section-title {
  margin: 1.5rem 0 0.85rem;
  font-size: 1.25rem;
  color: var(--gold-soft);
}

.content-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.75rem; }

.content-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(6, 11, 46, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.content-row-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.content-row-title { font-weight: 600; }
.content-row-sub { font-size: 0.85rem; color: var(--text-muted); }
.content-row-actions { display: flex; gap: 0.45rem; flex-shrink: 0; }

/* Action buttons hug their labels — override the full-width .form-wrap .btn. */
.content-row-actions .btn,
.content-form-actions .btn {
  width: auto;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  margin-top: 0;
}

.content-form {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}
.content-form h3 { margin-bottom: 1rem; font-size: 1.05rem; }
.content-form-actions { display: flex; gap: 0.6rem; }

@media (max-width: 560px) {
  .content-row { flex-direction: column; align-items: stretch; }
  .content-row-actions { flex-wrap: wrap; }
}

/* ── Users & accounts (Phase 3) ─────────────────────────────────────────── */
.user-search { margin-bottom: 1.25rem; }
.user-search-row { display: flex; gap: 0.6rem; align-items: stretch; }
.user-search-row input { flex: 1 1 auto; min-width: 0; }
/* Undo the full-width `.form-wrap .btn` submit styling for inline row buttons,
   so the button hugs its label and the flex:1 input fills the rest of the row. */
.user-search-row .btn {
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
}

.user-row-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
}
.user-status--active   { background: rgba(52, 215, 127, 0.18); color: #6ee7a8; }
.user-status--disabled { background: rgba(241, 90, 74, 0.18);  color: #f3a79b; }
.user-status--deleted  { background: rgba(154, 163, 199, 0.18); color: var(--text-muted); }

.user-pager { display: flex; justify-content: center; margin-top: 0.5rem; }

/* ── Game statistics (Phase 4: read-only stat cards) ──────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.15rem;
  background: rgba(6, 11, 46, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-soft);
  line-height: 1.1;
}
.stat-sub { font-size: 0.78rem; color: var(--text-muted); }

.stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.stat-footer .btn { width: auto; margin-top: 0; padding: 0.45rem 1rem; font-size: 0.85rem; }
