/* ==========================================================================
   Cuckdle design system — "dark theatre"
   Cinema for chairs: deep charcoal stage, warm off-white type, electric-violet
   accent, gold scoreboard glints. Red is reserved for wrong-answer feedback. Photos are the show; everything else dims.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "InterVar";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #17181c;
  --bg-deep: #121316;
  --panel: #1f2127;
  --panel-2: #24262d;
  --line: #2e313a;
  --line-strong: #3c404a;
  --ink: #f2efe8;
  --muted: #a5a094;
  --soft: #7b776d;
  --image: #101114;

  --accent: #7c5cff;
  --accent-dark: #5b3fd6;
  --accent-soft: #a794ff;
  --gold: #f5b942;
  --gold-dark: #c98f1d;
  --green: #3ddc84;
  --green-dark: #27b167;
  --red: #ff5a4e;
  --red-dark: #e0342b;

  --display: "Bricolage Grotesque", "InterVar", ui-sans-serif, system-ui, sans-serif;
  --sans: "InterVar", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow: 0 16px 44px rgba(0, 0, 0, .42);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(124, 92, 255, .32);
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over display rules. */
[hidden] { display: none !important; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  letter-spacing: -0.005em;
  background-color: var(--bg);
  background-image:
    radial-gradient(110% 80% at 10% -10%, rgba(124, 92, 255, .10), transparent 55%),
    radial-gradient(100% 70% at 100% 0%, rgba(245, 185, 66, .06), transparent 55%),
    radial-gradient(90% 90% at 90% 100%, rgba(124, 92, 255, .06), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1.3' cy='1.3' r='1.3' fill='%23fff' fill-opacity='0.028'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed, fixed;
}

::selection { background: rgba(124, 92, 255, .5); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: #3c404a var(--bg); }

a { color: inherit; text-decoration-color: rgba(124, 92, 255, .55); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

h1, h2, h3, .brand, .display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 24, 28, .82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  font-size: 25px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--bg), 0 3px 0 var(--accent-dark);
  transform: rotate(-8deg);
}

.topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar nav a {
  text-decoration: none;
  color: #b6b1a5;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.topbar nav a:hover { background: rgba(124, 92, 255, .18); color: var(--accent-soft); }

.topbar form { margin: 0; }
.topbar nav button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  color: #b6b1a5;
  cursor: pointer;
  border-radius: 999px;
  min-height: 0;
  box-shadow: none;
}
.topbar nav button:hover { background: rgba(124, 92, 255, .18); color: var(--accent-soft); box-shadow: none; transform: none; }

/* ---- Buttons ---------------------------------------------------------- */
.button,
button {
  --btn-shadow: #0b0c0e;
  min-height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--btn-shadow);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.button:hover,
button:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--btn-shadow); background: #2a2d35; }
.button:active,
button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-shadow); }

.button.primary {
  --btn-shadow: #43299e;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button.primary:hover { background: #8d71ff; }

.button.hot {
  --btn-shadow: var(--gold-dark);
  background: var(--gold);
  border-color: var(--gold);
  color: #2c1f04;
}
.button.hot:hover { background: #ffc95c; }
.button.danger {
  --btn-shadow: #2c1113;
  background: #5a2527;
  color: #ffd8d4;
  border-color: rgba(255, 90, 78, .5);
}
.button.danger:hover { background: #713034; }

.button.big { min-height: 56px; font-size: 18px; padding: 14px 26px; }
.button.ghost { background: transparent; box-shadow: none; border-color: var(--line-strong); }
.button.ghost:hover { background: var(--panel-2); box-shadow: 0 3px 0 var(--btn-shadow); }

/* ---- Forms ------------------------------------------------------------ */
input, textarea, select {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font: inherit;
  background: #14151a;
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--soft); }

.eyebrow {
  color: var(--gold);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: .14em;
  margin: 0 0 12px;
}

/* ---- Page frames ------------------------------------------------------ */
.game,
.grid-page,
.admin-list,
.admin-results,
.form-page,
.form-page-wide,
.auth,
.message {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 34px 22px;
}

/* ==========================================================================
   Home / hero
   ========================================================================== */
.home {
  min-height: calc(100vh - 68px);
  display: grid;
  align-content: center;
  padding: 40px 22px 60px;
}

.hero {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .74fr);
  align-items: center;
  gap: 48px;
}

.hero-copy { min-width: 0; }

.tagline {
  display: inline-block;
  color: var(--gold);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .16em;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 185, 66, .12);
}

.logo-wordmark { width: min(600px, 100%); margin: 0 0 18px; }
.logo-wordmark img { width: 100%; height: auto; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .5)); }

.hero-sub {
  max-width: 30ch;
  margin: 0 0 26px;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.32;
  color: #c9c4b8;
  font-weight: 500;
}
.hero-sub b { color: var(--ink); font-weight: 800; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.date-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.date-form input { width: 168px; }


/* Featured chair rail — playful tilted stack */
.hero-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.hero-chair {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hero-chair:nth-child(1) { transform: rotate(-1.4deg); }
.hero-chair:nth-child(2) { transform: rotate(1.4deg) translateY(26px); }
.hero-chair:nth-child(3) { transform: rotate(1.2deg); }
.hero-chair:nth-child(4) { transform: rotate(-1.6deg) translateY(26px); }
.hero-chair:hover { transform: rotate(0) translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg); border-color: var(--line-strong); z-index: 2; }
.hero-chair img { width: 100%; aspect-ratio: 1.18; object-fit: cover; background: var(--image); }
.hero-chair div { padding: 13px 14px; }
.hero-chair strong { display: block; font-size: 15px; line-height: 1.2; }
.hero-chair span { display: block; margin-top: 5px; color: var(--muted); font-weight: 650; font-size: 12.5px; }

/* ==========================================================================
   Game (daily + rate) — immersive play: photos fill the screen, captions
   ride on the images, chrome stays whisper-thin.
   ========================================================================== */
.game {
  width: 100%;
  max-width: none;
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  padding: 8px 12px 14px;
}

/* Screen-reader-only text (the game prompt lives here, not on screen) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* One slim bar: date label · progress pills · score. Nothing else. */
.game-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 4px 8px;
  min-height: 34px;
}
.game-bar .eyebrow { margin: 0; white-space: nowrap; }
.game-bar .hintline { margin: 0; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scoreboard chip — inline so "1 / 10" never wraps */
.score {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: #0c0d0f;
  border: 1px solid var(--line);
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(15px, 1.7vw, 19px);
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255,255,255,.04);
}
.score #score { color: var(--gold); }

/* Progress track — segmented pills, flexes to fill the bar */
.progress {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 5px;
}
.progress .dot {
  flex: 1 1 0;
  height: 7px;
  min-width: 6px;
  max-width: 52px;
  border-radius: 999px;
  border: 0;
  background: #33363e;
  transition: background .2s ease, transform .2s ease;
}
.progress .dot.good { background: var(--green); }
.progress .dot.bad { background: var(--red); }

/* The matchup: two full-bleed photos, a floating VS, nothing else. */
.matchup {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.chair-card { position: relative; margin: 0; min-width: 0; min-height: 0; }

.chair-card button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--image);
  border: 3px solid #2a2d35;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.chair-card button:hover {
  transform: none;
  border-color: var(--gold);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 0 34px rgba(245, 185, 66, .12);
  background: var(--image);
}
.chair-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  background: var(--image);
}

/* Captions ride on the photo, Scrandle-style */
.ov-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 22px;
  background: linear-gradient(rgba(8, 8, 10, .78), transparent);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .01em;
  text-align: left;
}
.ov-top .ov-flag {
  font-style: normal;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .24);
  backdrop-filter: blur(2px);
}
.ov-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 34px 16px 13px;
  background: linear-gradient(transparent, rgba(8, 8, 10, .85));
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 1.9vw, 25px);
  line-height: 1.12;
  text-align: left;
}

/* VS badge floats over the seam */
.versus {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 0 5px var(--bg), 0 10px 26px rgba(0, 0, 0, .5);
  z-index: 5;
  pointer-events: none;
}

/* Reveal: a band sweeps across each photo with the crowd percentage */
.reveal-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 14px 12px;
  background: rgba(8, 8, 10, .74);
  backdrop-filter: blur(2px);
  color: #fff;
  text-align: center;
  transition: transform .22s ease;
}
.reveal-band b {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1;
}
.reveal-band i {
  font-style: normal;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(12px, 1.3vw, 15px);
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .95;
}
.matchup.revealed .reveal-band { transform: translateY(-50%) scaleY(1); }
.matchup.revealed .chair-card button { cursor: default; }
.matchup.revealed .chair-card.correct button { border-color: var(--green); box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 40px rgba(61, 220, 132, .16); }
.matchup.revealed .chair-card.correct .reveal-band b,
.matchup.revealed .chair-card.correct .reveal-band i { color: var(--green); }
.matchup.revealed .chair-card.incorrect button { border-color: rgba(255, 90, 78, .6); }
.matchup.revealed .chair-card.incorrect img { filter: saturate(.5) brightness(.7); }
.matchup.revealed .chair-card.incorrect .reveal-band b,
.matchup.revealed .chair-card.incorrect .reveal-band i { color: #ff9d8f; }
.matchup.revealed .chair-card.selected button { border-color: var(--gold); }
.matchup.revealed .chair-card.selected.correct button { border-color: var(--green); }

/* ---- Completion / recap ------------------------------------------------ */
.result-panel {
  width: min(860px, 100%);
  margin: 10px auto 26px;
  text-align: center;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  box-shadow: var(--shadow);
}
.result-panel h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 0 0 6px; }
.result-panel .button { margin: 14px 7px 0; }
.next-in { margin: 2px 0 0; color: var(--muted); font-weight: 700; }
.next-in b { font-family: var(--mono); color: var(--gold); }

.recap {
  list-style: none;
  margin: 22px 0 4px;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.recap li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.recap li.good { border-color: rgba(61, 220, 132, .4); }
.recap li.bad { border-color: rgba(255, 90, 78, .45); }
.rc-n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.rc-chair { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rc-chair img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; background: var(--image); flex: none; }
.rc-chair .rc-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: 13.5px; }
.rc-chair .rc-p { font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--muted); flex: none; margin-left: auto; }
.rc-chair.win .rc-p { color: var(--green); }
.rc-you {
  flex: none;
  font-style: normal;
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245, 185, 66, .18);
  padding: 3px 7px;
  border-radius: 999px;
}
.rc-chair.picked img { outline: 2.5px solid var(--gold); outline-offset: 1.5px; }
.rc-vs { text-align: center; font-family: var(--display); font-weight: 700; font-size: 11px; color: var(--soft); }
.rc-verdict { text-align: center; font-family: var(--display); font-weight: 800; font-size: 18px; }
.recap li.good .rc-verdict { color: var(--green); }
.recap li.bad .rc-verdict { color: var(--red); }

/* Countdown chip (home) */
.reset-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}
.reset-note b { font-family: var(--mono); color: var(--gold); }

.account-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
}
.account-note a { color: var(--accent-soft); font-weight: 700; }

/* ---- Home date picker -------------------------------------------------- */
.datepick { position: relative; margin-top: 12px; }
.dp-badge {
  margin-left: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(245, 185, 66, .18);
  color: var(--gold);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
}
.calendar {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  width: 322px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
}
.calendar button { min-height: 0; box-shadow: none; border: 0; background: transparent; padding: 0; cursor: pointer; }
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cal-head b { font-family: var(--display); font-weight: 700; font-size: 15px; }
.cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}
.cal-nav:hover { background: rgba(124, 92, 255, .18); color: var(--accent-soft); transform: none; box-shadow: none; }
.cal-nav:disabled { opacity: .3; cursor: default; background: transparent; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow {
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--soft);
  padding-bottom: 2px;
}
.cal-day {
  position: relative;
  height: 38px;
  border-radius: 8px;
  font-weight: 650;
  font-size: 13.5px;
  color: var(--ink);
  border: 1.5px solid transparent;
}
.cal-day:hover:not(:disabled) { background: rgba(124, 92, 255, .2); transform: none; box-shadow: none; }
.cal-day:disabled { color: #4c4e58; cursor: default; }
.cal-day.today { border-color: var(--accent); }
.cal-day.done { color: var(--gold); }
.cal-day.done::after {
  content: "\2713";
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  font-size: 9px;
  line-height: 1;
}
.cal-legend { margin: 10px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.cal-key.done { color: var(--gold); font-weight: 800; }

/* ==========================================================================
   Panels / rankings / admin shared
   ========================================================================== */
.grid-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start; /* panels size to their own content, no stretched gaps */
}
.panel {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel h1, .panel h2 { margin-top: 0; }
.rankings-wide { grid-column: 1 / -1; }

/* Chair of the Week — rosette ribbon */
.feature-chair { position: relative; padding: 0; box-shadow: none; border: 0; background: transparent; }
.feature-chair img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  background: var(--image);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.feature-chair h1 { margin: 18px 0 8px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.04; }
.feature-chair p { color: var(--muted); font-weight: 700; margin: 0; }
.feature-chair::before {
  content: "★ Chair of the Week";
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--gold);
  color: #2c1f04;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

.list { padding: 0; margin: 14px 0 0; list-style: none; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list span { min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 9px; }
.list strong { white-space: nowrap; font-family: var(--mono); font-weight: 700; }

/* Ranked lists get numbered chips + podium colors for the top three */
.list.ranked { counter-reset: rank; }
.list.ranked li { counter-increment: rank; padding-top: 10px; padding-bottom: 10px; }
.list.ranked li > span::before {
  content: counter(rank);
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #2c2f36;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}
.list.ranked li:nth-child(1) > span::before { background: var(--gold); color: #2c1f04; }
.list.ranked li:nth-child(2) > span::before { background: #c9cdd4; color: #232a33; }
.list.ranked li:nth-child(3) > span::before { background: #d99a66; color: #3a2008; }

.streak { font-style: normal; font-weight: 800; color: var(--gold); font-family: var(--mono); }

.country-chip {
  display: inline-flex;
  align-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-2);
  color: #b6b1a5;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 10px;
  font-weight: 600;
}

/* ---- Auth / message / forms ------------------------------------------ */
.auth, .message {
  width: min(500px, 100%);
  margin: 54px auto;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-page, .form-page-wide {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.form-page { width: min(640px, 100%); margin: 34px auto; padding: 32px; }
.form-page-wide { width: min(1100px, 100%); margin: 28px auto; padding: 30px; }
.auth h1, .message h1, .form-page h1, .panel h1, .panel h2 { margin-top: 0; }
.auth p, .message p { color: #c9c4b8; }
.auth form, .form-page form { display: grid; gap: 15px; }
.auth label, .form-page label { display: grid; gap: 6px; color: #d4cfc3; font-weight: 700; }
.auth > a, .message > a { display: inline-flex; margin-top: 16px; }
.message { text-align: center; }
.message .button { margin-top: 8px; }

.welcome { width: min(560px, 100%); }
.welcome-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0 6px; }
.hint-block {
  margin-top: 20px;
  padding: 13px 15px;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.hint-block b { color: var(--ink); }
.hint-block p { margin: 0 0 13px; }

/* Account page */
.topbar nav a.nav-account { color: var(--gold); }
.account-facts { margin: 14px 0 18px; }
.ok-chip, .warn-chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
}
.ok-chip { background: rgba(61, 220, 132, .16); color: var(--green); }
.warn-chip { background: rgba(245, 185, 66, .16); color: var(--gold); }
.resend-form { margin-top: 12px; }
.verified-cta { color: var(--muted); font-weight: 600; }
.account h2 { margin: 28px 0 12px; font-size: 19px; }
.logout-form { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Verification code entry */
.code-input {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .35em;
  text-align: center;
  text-transform: uppercase;
  color: var(--gold);
  padding: 14px 10px 14px 22px;
}
.code-input::placeholder { color: #4c4e58; letter-spacing: .35em; }

/* Passkeys */
.account-sub { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.passkey-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.passkey-list li { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
.pk-icon { font-size: 20px; }
.pk-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pk-meta small { color: var(--muted); font-size: 12px; }
.pk-remove { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.pk-status { color: var(--muted); font-weight: 600; font-size: 13.5px; margin: 10px 0 0; min-height: 1em; }
.pk-status.error { color: var(--accent-soft); }
.empty-note { color: var(--soft); font-weight: 600; }
.pk-signin { width: 100%; margin-bottom: 6px; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--soft); font-weight: 700; font-size: 13px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Avatars */
.avatar-manage { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); background: var(--panel-2); flex: 0 0 auto; }
.avatar-controls { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }
.avatar-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-label { display: inline-flex; align-items: center; gap: 8px; }
.file-label > span { display: inline-block; padding: 9px 14px; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; }
.file-label input[type=file] { max-width: 168px; font-size: 12.5px; color: var(--muted); }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel-2); border: 1.5px solid var(--line); flex: 0 0 auto; vertical-align: middle; }
.rank-who { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.verify .hint { margin-top: 16px; }
.verify .hint a { color: var(--accent-soft); }
.resend-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Terms / long-form prose */
.terms h2 { margin: 28px 0 10px; font-size: 19px; }
.terms p, .terms li { color: #c9c4b8; font-size: 14.5px; line-height: 1.6; }
.terms b { color: var(--ink); }
.terms ul { margin: 10px 0; padding-left: 22px; }
.terms li { margin-bottom: 6px; }
.terms a { color: var(--accent-soft); }
.terms-updated { color: var(--soft); font-size: 13px; font-weight: 600; margin-top: -6px; }

.consent { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.5; margin: 2px 0; }
.consent a { color: var(--accent-soft); }

/* Honeypot: off-screen (not display:none — some bots skip hidden fields). */
.hp-wrap { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Admin portal shell — same design language, unmistakably a different room:
   gold accent stripe, ADMIN badges, gold brand chip, no player navigation.
   ========================================================================== */
.admin-body {
  background-image:
    radial-gradient(110% 80% at 10% -10%, rgba(245, 185, 66, .07), transparent 55%),
    radial-gradient(100% 70% at 100% 0%, rgba(124, 92, 255, .05), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1.3' cy='1.3' r='1.3' fill='%23fff' fill-opacity='0.028'/%3E%3C/svg%3E");
}
.admin-topbar { box-shadow: inset 0 3px 0 var(--gold); }
.admin-brand { color: var(--ink); }
.admin-brand::before { background: var(--gold); box-shadow: inset 0 0 0 4px var(--bg), 0 3px 0 var(--gold-dark); }
.admin-badge {
  display: inline-block;
  margin-left: 9px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gold);
  color: #2c1f04;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  vertical-align: 4px;
}
.admin-topbar nav a.ext { color: var(--soft); }
.admin-topbar nav a.ext:hover { background: rgba(245, 185, 66, .14); color: var(--gold); }
.admin-topbar nav a:hover { background: rgba(245, 185, 66, .14); color: var(--gold); }
.admin-topbar nav button:hover { background: rgba(255, 90, 78, .14); color: var(--red); }
.admin-footer .inner { justify-content: space-between; }
.admin-footer .fnote { color: var(--soft); font-size: 12.5px; font-weight: 600; }
.admin-footer .ftag .admin-badge { vertical-align: 2px; }
.admin-login { margin-top: 70px; }
.admin-login .eyebrow { color: var(--gold); }
.admin-login-note { color: var(--muted); font-size: 14px; line-height: 1.55; }
.admin-form { margin: 0; width: auto; }

.error { color: #ff9d8f; font-weight: 700; background: rgba(255, 90, 78, .12); padding: 10px 12px; border-radius: var(--radius-sm); }
.notice { color: var(--green); font-weight: 700; background: rgba(61, 220, 132, .12); padding: 10px 12px; border-radius: var(--radius-sm); }
.hint { display: block; margin-top: 4px; color: var(--muted); font-weight: 600; font-size: 12px; }

.field-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-list { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-results { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head span { color: var(--muted); font-weight: 700; }

.cards { display: grid; gap: 12px; }
.admin-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.admin-card img { width: 100px; height: 100px; object-fit: contain; background: var(--image); border-radius: var(--radius-sm); }
.admin-card-body { min-width: 0; }
.admin-card strong { display: block; overflow-wrap: anywhere; line-height: 1.16; font-family: var(--display); }
.admin-card p { margin: 6px 0 10px; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.admin-card form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-card select { width: min(150px, 100%); }
.admin-card button { min-height: 40px; padding: 8px 13px; }
.admin-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-card-actions .button { min-height: 40px; padding: 8px 13px; }

.admin-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) auto auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 16px;
}
.admin-filter label { margin: 0; }
.admin-filter .button, .admin-filter button { min-height: 44px; }

.stats { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; }
.stats dt { color: var(--muted); font-weight: 650; }
.stats dd { margin: 0; font-weight: 800; font-family: var(--mono); }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.inline-form input { max-width: 120px; }

.subnav { display: flex; gap: 14px; margin: 0 0 18px; flex-wrap: wrap; }
.subnav a { text-decoration: none; font-weight: 700; color: var(--muted); padding: 5px 2px; border-bottom: 2px solid transparent; }
.subnav a.active { color: var(--ink); border-color: var(--accent); }
.subnav .queue-link { margin-left: auto; color: var(--gold); }

.pager {
  min-height: 44px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.pager.bottom { margin: 16px 0 0; }
.pager span { text-align: center; color: var(--muted); font-weight: 750; }
.pager .button { min-height: 40px; padding: 8px 12px; }

.submission-card { grid-template-columns: 150px minmax(0, 1fr); }
.submission-card img { width: 150px; height: 150px; }
.submitter { font-size: 13px; }
.desc { color: var(--ink) !important; font-weight: 500 !important; }
.mod-note { color: #ff9d8f !important; font-weight: 700 !important; }
.review-form { display: grid; gap: 10px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.review-page {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
}
.review-head p { margin: 5px 0 0; color: var(--muted); font-weight: 750; }
.review-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.review-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 22px;
  align-items: start;
}
.review-image {
  min-height: 72vh;
  display: grid;
  place-items: center;
  background: var(--image);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.review-image img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}
.review-editor {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 13px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.review-editor textarea { min-height: 96px; }
.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.review-meta a { color: var(--gold); text-decoration: none; overflow-wrap: anywhere; }
.sticky-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}
.sticky-actions .button, .sticky-actions button { width: 100%; }
.empty-review { margin: 30px auto; width: min(720px, 100%); }

.audit { width: 100%; border-collapse: collapse; font-size: 14px; }
.audit th, .audit td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
.audit th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.audit .mono { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}
.site-footer .inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer .ftag { font-family: var(--display); font-weight: 700; color: var(--ink); }
.site-footer .fnav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--accent-soft); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { text-align: center; }
  .logo-wordmark { margin-left: auto; margin-right: auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  /* Once the hero stacks, the chair rail would sit below the fold — drop it
     and let the copy + actions own the screen. */
  .hero-rail { display: none; }
  .admin-list { grid-template-columns: 1fr; }
  .review-workbench { grid-template-columns: 1fr; }
  .review-editor { position: static; }
}

@media (max-width: 780px) {
  .topbar { min-height: 62px; padding: 10px 16px; }
  .brand { font-size: 22px; }
  .topbar nav { gap: 4px; }
  .topbar nav a, .topbar nav button { padding: 7px 9px; font-size: 14px; }
  .home { padding: 26px 16px 44px; align-content: start; }
  .hero-sub { font-size: 18px; }
  .date-form, .date-form input, .date-form button { width: 100%; }
  .datepick > .button { width: 100%; }
  .calendar { left: 50%; transform: translateX(-50%); }
  .actions { flex-direction: column; align-items: stretch; }
  .actions > .button { width: 100%; }
  .grid-page, .admin-list, .form-page, .form-page-wide, .auth, .message { padding: 24px 14px; }
  .review-page { padding: 20px 14px; }
  .review-head { align-items: flex-start; flex-direction: column; }
  .review-head-actions { width: 100%; justify-content: stretch; }
  .review-head-actions .button { flex: 1; }
  .review-image { min-height: 48vh; }
  .review-image img { max-height: 62vh; }
  .sticky-actions { grid-template-columns: 1fr; }
  .admin-filter { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager span { order: -1; }
  .pager .button { width: 100%; }
  .subnav .queue-link { margin-left: 0; }
  /* On mobile the two photos stack and split the viewport, Scrandle-style. */
  .game { padding: 8px 8px 10px; }
  .game-bar { gap: 10px; margin: 0 2px 6px; min-height: 28px; }
  .game-bar .eyebrow { font-size: 10.5px; letter-spacing: .1em; }
  .game-bar .hintline { display: none; }
  .score { font-size: 14px; padding: 4px 9px; }
  .progress .dot { height: 6px; }
  .matchup { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
  .chair-card button { border-width: 2.5px; }
  .ov-cap { font-size: 17px; padding: 26px 13px 11px; }
  .ov-top { font-size: 12.5px; padding: 8px 12px 18px; }
  /* The stacked seam reads as "versus" by itself; the badge would sit on the caption. */
  .versus { display: none; }
  .recap li { grid-template-columns: 20px minmax(0, 1fr) 22px minmax(0, 1fr) 30px; gap: 7px; padding: 7px 9px; }
  .rc-chair img { width: 34px; height: 34px; }
  .rc-chair .rc-t { font-size: 12px; }
  .rc-chair .rc-p { font-size: 12.5px; }
  .grid-page { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .admin-card { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .admin-card img { width: 84px; height: 84px; }
  .submission-card { grid-template-columns: 110px minmax(0, 1fr); }
  .submission-card img { width: 110px; height: 110px; }
  .feature-chair img { height: 260px; }
  .site-footer .inner { justify-content: center; text-align: center; }
}

@media (max-width: 440px) {
  .topbar nav a, .topbar nav button { padding: 6px 7px; }
  .admin-card { grid-template-columns: 72px minmax(0, 1fr); }
  .admin-card img { width: 72px; height: 72px; }
}


/* Admin stat cards */
.statcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.statcard { background: var(--panel-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.statcard.hot { border-color: var(--gold-dark); background: rgba(245,185,66,.07); }
.sc-n { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--ink); }
.statcard.hot .sc-n { color: var(--gold); }
.sc-l { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.sc-l small { font-weight: 600; color: var(--soft); font-size: 11.5px; }


/* Stats source table */
.src-table { width: 100%; border-collapse: collapse; margin-top: 12px; max-width: 420px; }
.src-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.src-table tr:last-child td { border-bottom: 0; }
.src-table .src-n { text-align: right; font-family: var(--mono); color: var(--accent-soft); }


/* Stats: two-column + time-series chart */
.stats-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; }
.src-table th { text-align: left; padding: 6px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); border-bottom: 1.5px solid var(--line-strong); }
.src-table th.src-n, .src-table td.src-n { text-align: right; }
.tschart { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin: 16px 0 6px; padding-top: 18px; }
.tsday { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; height: 100%; position: relative; }
.tsbars { flex: 1; display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; }
.tsbar { width: 32%; border-radius: 3px 3px 0 0; min-height: 0; }
.tsbar.sess { background: var(--accent); }
.tsbar.act { background: var(--gold); }
.tslabel { font-size: 10px; color: var(--soft); margin-top: 5px; white-space: nowrap; }
.tssignup { position: absolute; top: -16px; font-size: 11px; font-weight: 800; color: var(--green); }
.legend { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; }
.legend.sess { background: var(--accent); }
.legend.act { background: var(--gold); }
@media (max-width: 720px) { .stats-two { grid-template-columns: 1fr; } }
