/* MASSDEBAITER — "The Arena" visual system.
   Presentation-only redesign: every id/class contract from app.js is preserved.
   Dark theme only. All animations have prefers-reduced-motion variants (bottom). */

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

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

/* ---------- self-hosted fonts (latin subset, offline) ---------- */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700;
  font-display: swap; src: url("/static/fonts/spacegrotesk.woff2") format("woff2");
}
@font-face {
  font-family: "Syne"; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url("/static/fonts/syne.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/static/fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/jetbrainsmono.woff2") format("woff2");
}

:root {
  /* VANGUARD CINEMATIC — achromatic charcoal base (design.md palette) */
  --bg: #141313;            /* surface */
  --bg2: #1c1b1b;           /* surface-container-low */
  --bg3: #2a2a2a;           /* surface-container-high */
  --border: rgba(255, 255, 255, .10);  /* ghost border */
  --bg-glass: rgba(20, 19, 19, .72);
  /* ink */
  --text: #e5e2e1;          /* on-surface */
  --muted: #a9acad;         /* between outline and on-surface-variant */
  --text-bright: #ffffff;
  /* duality axis — functional side-coding, kept but calmed to sit inside an
     otherwise achromatic system */
  --pro: #2dd478;
  --pro-glow: rgba(45, 212, 120, .28);
  --con: #ff5470;
  --con-glow: rgba(255, 84, 112, .28);
  /* accents: primary is pure white */
  --accent: #ffffff;
  --accent-hover: #e2e2e2;
  --gold: #f5c542;
  --amber: #e8a33d;
  /* error (M3 dark pair from the design.md) */
  --error: #ffb4ab;
  --error-container: #93000a;
  --on-error-container: #ffdad6;
  /* gradients (hero + verdict only) — white-to-tint, no hue */
  --grad-arena: linear-gradient(135deg, #ffffff 0%, #c6c6c7 100%);
  --grad-versus: linear-gradient(90deg, var(--pro) 0%, transparent 45%, transparent 55%, var(--con) 100%);
  /* type: Syne for display, Inter for everything utilitarian */
  --font-display: "Syne", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --radius: 0px;            /* brutalist: sharp corners */
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.2px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient starfield canvas sits behind everything */
#arena-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; pointer-events: none; display: block;
}
/* very subtle base spotlight so the auditorium never reads flat */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, .06), transparent 55%);
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; color: var(--text-bright); }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 28px; border-bottom: 1px solid var(--border);
  background: var(--bg-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 50;
}
.brand {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; cursor: pointer;
  letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 2px;
}
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-btn {
  background: none; border: none; color: var(--muted); font-family: var(--font-body);
  font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer;
  position: relative; transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-btn:hover { color: var(--text); background: var(--bg3); }
/* animated underline for the active view */
.nav-btn::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease); opacity: 0;
}
.nav-btn.active { color: var(--text); }
.nav-btn.active::after { transform: scaleX(1); opacity: 1; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rating-chip {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 999px; font-weight: 600;
  font-feature-settings: "tnum";
}
.rating-chip b { color: var(--accent); }

/* profile dropdown (notifications / security question / sign out) */
.profile-wrap { position: relative; }
#btn-profile b { color: var(--accent); }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 230px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.profile-menu .menu-item {
  all: unset; box-sizing: border-box; cursor: pointer;
  width: 100%; padding: 9px 12px; border-radius: 8px;
  font: inherit; font-size: 14px; color: inherit; text-align: left;
  white-space: nowrap;
}
.profile-menu .menu-item:hover,
.profile-menu .menu-item:focus-visible { background: var(--bg3); }

main { max-width: 1080px; margin: 0 auto; padding: 32px 20px 80px; position: relative; }

/* ---------- shared ---------- */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn {
  background: var(--bg3); color: var(--text); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  transition: transform .15s var(--ease), filter .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.btn:hover { filter: brightness(1.18); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0a0e18; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 6px 22px rgba(255, 255, 255, .25); }
.btn.danger { background: #c22a44; border-color: #c22a44; color: #fff; }
.btn.ghost { background: none; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: 14px;
  margin: 6px 0; font-family: var(--font-body);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.error { color: var(--con); font-size: 13px; min-height: 18px; margin: 6px 0; }
.accent { color: var(--accent); }
.row-gap { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------- view transitions ---------- */
.view { animation: fadeUp .3s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* stagger the first cards/children of each entering view */
.view > .card, .view > .hero, .view > .play-cards, .view > .live-list,
.view > h1, .view > .filter-bar, .view > .motion, .view > .players {
  animation: fadeUp .3s var(--ease) both;
}
.view > *:nth-child(1) { animation-delay: 0ms; }
.view > *:nth-child(2) { animation-delay: 40ms; }
.view > *:nth-child(3) { animation-delay: 80ms; }
.view > *:nth-child(4) { animation-delay: 120ms; }
.view > *:nth-child(5) { animation-delay: 160ms; }
.view > *:nth-child(6) { animation-delay: 200ms; }
.view > *:nth-child(7) { animation-delay: 240ms; }
.view > *:nth-child(8) { animation-delay: 280ms; }

/* ---------- home ---------- */
.hero { text-align: center; margin: 40px 0 44px; position: relative; overflow: visible; }
.hero h1 {
  font-family: var(--font-display); font-size: 3rem; line-height: 1.05; font-weight: 700;
  letter-spacing: -.03em; position: relative; z-index: 1;
  text-shadow: 0 1px 0 var(--bg3), 0 2px 0 var(--bg3), 0 3px 0 rgba(21, 29, 49, .7), 0 4px 12px rgba(0, 0, 0, .5);
}
.hero .sub { color: var(--muted); max-width: 640px; margin: 16px auto 0; font-size: 16px; position: relative; z-index: 1; }
.hero .live-now {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; position: relative; z-index: 1;
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--bg-glass); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
}
.hero .live-now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pro); box-shadow: 0 0 10px var(--pro-glow); animation: livePulse 1.8s var(--ease) infinite; }
.hero .live-now b { color: var(--text); font-feature-settings: "tnum"; }
/* permanent SVG hero emblem (Tier-B Three.js skipped for size budget) */
.hero-mic { position: relative; z-index: 1; color: var(--accent); margin-bottom: 6px; display: flex; justify-content: center; filter: drop-shadow(0 6px 22px rgba(255, 255, 255, .30)); animation: micBob 5s var(--ease) infinite; }
@keyframes micBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.7); } }

/* aurora mesh — 3 blurred blobs drifting behind the headline */
.aurora { position: absolute; inset: -40px -10% 0; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(90px); opacity: .55; }
.aurora span { position: absolute; display: block; width: 42%; padding-bottom: 42%; border-radius: 50%; }
.aurora span:nth-child(1) { left: 8%; top: -10%; background: var(--accent); animation: auroraA 24s var(--ease) infinite alternate; }
.aurora span:nth-child(2) { right: 6%; top: 0; background: #3a3939; animation: auroraB 30s var(--ease) infinite alternate; }
.aurora span:nth-child(3) { left: 40%; top: 20%; background: #8e9192; opacity: .35; animation: auroraC 18s var(--ease) infinite alternate; }
@keyframes auroraA { from { transform: translate(0, 0) scale(1); } to { transform: translate(14%, 10%) scale(1.15); } }
@keyframes auroraB { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-12%, 8%) scale(.9); } }
@keyframes auroraC { from { transform: translate(0, 0) scale(.9); } to { transform: translate(8%, -12%) scale(1.1); } }

.play-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.play-card { display: flex; flex-direction: column; gap: 10px; }
.play-card h2 { font-size: 1.4rem; }
.play-card p { color: var(--muted); font-size: 14px; flex: 1; }
.settings-card { margin-bottom: 18px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.settings-grid label { display: block; margin-bottom: 4px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-picker { display: flex; gap: 8px; margin-top: 6px; }
.side-btn {
  flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px;
  transition: transform .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.side-btn:hover { color: var(--text); transform: translateY(-1px); }
.side-btn.active { border-color: var(--accent); color: var(--text); background: var(--bg3); }
.side-btn[data-side="pro"].active { border-color: var(--pro); box-shadow: 0 0 0 1px var(--pro-glow); }
.side-btn[data-side="con"].active { border-color: var(--con); box-shadow: 0 0 0 1px var(--con-glow); }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }

.waiting-card { margin-top: 28px; }
.contact-card { max-width: 640px; display: flex; flex-direction: column; gap: 4px; }
.contact-card label { margin-top: 8px; }
.contact-card .btn { margin-top: 12px; align-self: flex-start; }
.how { margin-top: 28px; }
.how h2 { font-size: 1.4rem; }
.how ol { margin: 14px 0 0 22px; display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.how b { color: var(--text); }

/* tilt cards (JS sets --rx/--ry and highlight position; see arena.js) */
.tilt { transform-style: preserve-3d; will-change: transform; position: relative; }
.tilt.tilting { transition: transform .1s var(--ease); }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .2s var(--ease);
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .10), transparent 60%);
}
.tilt.tilting::after { opacity: 1; }

/* ---------- queue ---------- */
.center-box { text-align: center; padding: 48px 32px; max-width: 640px; margin: 40px auto; }
.center-box h2 { margin: 18px 0 8px; }
.center-box .btn { margin-top: 22px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto; border-radius: 50%;
  border: 4px solid var(--bg3); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- debate ("the stage") ---------- */
.motion { text-align: center; margin-bottom: 16px; }
.motion-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--amber);
  text-transform: uppercase;
}
.motion h2 { font-size: 1.5rem; margin-top: 6px; }
#view-debate { position: relative; }
/* stage vignette + versus top border */
#view-debate::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .45) 100%);
}
.players { display: grid; grid-template-columns: 1fr 220px 1fr; gap: 14px; align-items: stretch; margin-bottom: 14px; }
.player-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; position: relative; overflow: hidden;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.player-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.player-card.pro::before { background: var(--pro); box-shadow: 0 0 14px var(--pro-glow); }
.player-card.con::before { left: auto; right: 0; background: var(--con); box-shadow: 0 0 14px var(--con-glow); }
.player-card.active { box-shadow: 0 0 0 2px var(--accent); }
.player-card.pro.speaking { box-shadow: 0 0 0 2px var(--pro), 0 0 22px var(--pro-glow); }
.player-card.con.speaking { box-shadow: 0 0 0 2px var(--con), 0 0 22px var(--con-glow); }
.player-card .side-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; display: inline-block; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--border);
}
.player-card.pro .side-tag { color: var(--pro); border-color: var(--pro); box-shadow: 0 0 12px var(--pro-glow); }
.player-card.con .side-tag { color: var(--con); border-color: var(--con); box-shadow: 0 0 12px var(--con-glow); }
.p-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-top: 8px; }
.p-rating { font-feature-settings: "tnum"; }
.vs { display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: center; }
.phase-label { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.timer-wrap { height: 8px; background: var(--bg3); border-radius: 999px; overflow: hidden; }
.timer-bar { height: 100%; width: 100%; background: var(--accent); border-radius: 999px; transition: width 1s linear, background-color .6s var(--ease); }
.timer-bar.warn { background: var(--amber); }
.timer-bar.danger { background: var(--con); animation: timerPulse 1s var(--ease) infinite; }
@keyframes timerPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.timer-text { font-size: 12px; color: var(--muted); font-family: var(--font-mono); font-feature-settings: "tnum"; }

/* ---------- video debate ---------- */
.video-panel { margin-bottom: 12px; }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.video-box {
  position: relative; background: #000; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10;
  transition: box-shadow .2s var(--ease);
}
.video-box.speaking-pro { box-shadow: inset 0 0 0 2px var(--pro), 0 0 22px var(--pro-glow); }
.video-box.speaking-con { box-shadow: inset 0 0 0 2px var(--con), 0 0 22px var(--con-glow); }
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.video-label {
  position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 700;
  background: rgba(0, 0, 0, .55); padding: 3px 10px; border-radius: 999px;
}
.video-waiting {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; background: var(--bg2);
}
.video-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.caption {
  position: absolute; left: 8px; right: 8px; bottom: 34px; z-index: 2;
  font-size: 13px; line-height: 1.35; text-align: center; font-family: var(--font-mono);
  background: rgba(0, 0, 0, .62); color: #fff; padding: 4px 9px; border-radius: 8px;
  pointer-events: none; max-height: 40%; overflow: hidden;
  animation: capRise .15s var(--ease) both;
}
@keyframes capRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.caption[hidden] { display: none; }
@media (max-width: 760px) { .video-grid { grid-template-columns: 1fr; } }

.extend-dialog {
  position: fixed; bottom: 24px; right: 24px; z-index: 150;
  display: flex; flex-direction: column; gap: 10px; max-width: 320px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); border-color: var(--accent);
  animation: fadeUp .3s var(--ease) both;
}
.row-inline { display: flex; gap: 8px; }

.msg .bubble.speech { font-style: italic; }
.msg .meta .mic { color: var(--accent); font-style: normal; }

.transcript { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; min-height: 120px; }
/* Live debate transcript: fixed height + internal scroll so the compose bar
   and action buttons never get pushed down as the chat grows. The history
   detail view (#detail-transcript) keeps natural page flow. */
#transcript {
  /* cap at roughly the latest ~8 messages, then scroll internally so the
     compose bar and action buttons below never get pushed further down */
  max-height: min(42vh, 400px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
}
#transcript::-webkit-scrollbar { width: 8px; }
#transcript::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 999px; }
#transcript::-webkit-scrollbar-thumb:hover { background: var(--border); }
#transcript::-webkit-scrollbar-track { background: transparent; }
.msg { max-width: 78%; animation: fadeUp .3s var(--ease) both; }
.msg.pro { align-self: flex-start; }
.msg.con { align-self: flex-end; }
.msg .bubble {
  padding: 12px 16px; border-radius: var(--radius); background: var(--bg2);
  border: 1px solid var(--border); font-size: 14.5px; line-height: 1.55; white-space: pre-wrap;
  font-family: var(--font-mono);
}
.msg.pro .bubble { border-left: 3px solid var(--pro); background: linear-gradient(90deg, rgba(45, 212, 120, .06), var(--bg2) 30%); }
.msg.con .bubble { border-right: 3px solid var(--con); background: linear-gradient(270deg, rgba(255, 84, 112, .06), var(--bg2) 30%); }
.msg .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; font-family: var(--font-mono); }
.msg.system { align-self: center; color: var(--muted); font-size: 13px; font-style: italic; }

.factchecks { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.fc {
  font-size: 12.5px; border-radius: 8px; padding: 8px 10px; font-family: var(--font-mono);
  background: var(--bg3); border: 1px solid var(--border); line-height: 1.45;
  transform-origin: top center; animation: fcFlip .25s var(--ease) both;
}
@keyframes fcFlip { from { opacity: 0; transform: perspective(600px) rotateX(60deg); } to { opacity: 1; transform: perspective(600px) rotateX(0); } }
.fc .fc-verdict { font-weight: 700; letter-spacing: .04em; font-size: 11px; display: inline-block; animation: fcStamp .2s var(--ease) .05s both; }
@keyframes fcStamp { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: scale(1); } }
.fc.supported { border-color: rgba(45, 212, 120, .4); }
.fc.supported .fc-verdict { color: var(--pro); }
/* one-time green shimmer sweep for supported chips */
.fc.supported::after {
  content: ""; position: absolute; inset: 0; border-radius: 8px; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(45, 212, 120, .22) 50%, transparent 70%);
  transform: translateX(-100%); animation: fcShimmer 1.1s var(--ease) .3s 1;
}
.fc.supported { position: relative; overflow: hidden; }
@keyframes fcShimmer { to { transform: translateX(100%); } }
.fc.context .fc-verdict { color: var(--amber); }
.fc.unverified .fc-verdict { color: var(--muted); }
.fc a { color: var(--accent); text-decoration: none; }
.fc .fc-claim { color: var(--muted); font-style: italic; }
.fc-sources { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.fc-sources a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; max-width: 100%;
}
.fc-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--border); color: var(--muted);
}

.compose { position: relative; }
.compose textarea {
  width: 100%; min-height: 110px; resize: vertical;
  background: var(--bg-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 14px; font-size: 14.5px; font-family: var(--font-mono);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.compose textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .16); }
.compose textarea:disabled { opacity: .5; }
.compose-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.spectator-note { text-align: center; padding: 12px; }
#char-count { font-family: var(--font-mono); font-feature-settings: "tnum"; }

/* ---------- results ("the verdict ceremony") ---------- */
.scorecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; text-align: left; }
.scorecard { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.scorecard.winner { box-shadow: 0 0 0 2px var(--gold); }
/* gold border sweep for the winner card during the ceremony */
.scorecard.winner::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(245, 197, 66, .28) 50%, transparent 65%);
  transform: translateX(-120%);
}
#view-results.ceremony-run .scorecard.winner::before { animation: goldSweep 1s var(--ease) .2s 1; }
@keyframes goldSweep { to { transform: translateX(120%); } }
.scorecard h3 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-family: var(--font-display); }
.scorecard .total { font-size: 26px; font-weight: 800; color: var(--accent); font-family: var(--font-display); font-feature-settings: "tnum"; }
.scorecard.winner .total { color: var(--gold); }
.crit { margin-top: 12px; }
.crit .crit-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; font-feature-settings: "tnum"; }
.crit .bar { height: 6px; background: var(--bg); border-radius: 999px; margin-top: 5px; overflow: hidden; }
.crit .bar div { height: 100%; background: var(--accent); border-radius: 999px; transform-origin: left center; }
.crit .note { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.delta-up { color: var(--pro); font-weight: 700; font-feature-settings: "tnum"; }
.delta-down { color: var(--con); font-weight: 700; font-feature-settings: "tnum"; }

/* ---------- tables & lists ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-feature-settings: "tnum"; }
.table th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--border); text-transform: uppercase; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); }
.table tbody tr, .table tbody tr { transition: background .15s var(--ease); }
.table tbody tr:hover td { background: rgba(255, 255, 255, .04); }
.table tr:last-child td { border-bottom: none; }
.table .me { background: rgba(255, 255, 255, .08); }
.rank-1 { color: var(--gold); font-weight: 800; }
.rank-2 { color: #c8d0e0; font-weight: 800; }
.rank-3 { color: #cd7f32; font-weight: 800; }

.live-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.live-item { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.live-item .topic { font-weight: 600; }
.badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 3px 8px;
  border-radius: 999px; background: var(--bg3); border: 1px solid var(--border);
  font-family: var(--font-mono);
}
.badge.win { color: var(--pro); } .badge.loss { color: var(--con); } .badge.draw { color: var(--amber); }
.badge.rank { color: var(--amber); border-color: var(--amber); }
.rating-note {
  color: var(--amber); font-weight: 700; text-align: center;
  border-color: var(--amber); margin-bottom: 12px;
}

/* ---------- modal & toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3, 5, 10, .68); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: fadeIn .2s var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 360px; display: flex; flex-direction: column; gap: 8px; animation: modalPop .3s var(--ease) both; }
@keyframes modalPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab { flex: 1; background: none; border: none; color: var(--muted); padding: 10px; cursor: pointer; font-weight: 700; font-family: var(--font-body); border-bottom: 2px solid transparent; transition: color .15s var(--ease), border-color .15s var(--ease); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* auth modal sub-sections stack like the modal itself (direct-child gap) */
#auth-form, #auth-security, #recover-panel, #recover-step1, #recover-step2, #auth-google-group {
  display: flex; flex-direction: column; gap: 8px;
}
#auth-form[hidden], #auth-security[hidden], #recover-panel[hidden],
#recover-step1[hidden], #recover-step2[hidden], #auth-google-group[hidden] { display: none; }
.recover-title { margin: 0 0 2px; font-size: 16px; }
.forgot-link { align-self: flex-start; cursor: pointer; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
/* "— or —" divider between password auth and Google */
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 2px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-btn { text-align: center; text-decoration: none; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 200;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: toastIn .3s var(--ease) both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 760px) {
  .players { grid-template-columns: 1fr; }
  .msg { max-width: 100%; }
  .hero h1 { font-size: 2rem; }
}

/* ---------- daily banner ---------- */
.daily-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; border-color: var(--amber); position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(232, 163, 61, .12), var(--bg2));
}
/* slow-moving gradient border sheen */
.daily-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(245, 197, 66, .14) 50%, transparent 60%);
  transform: translateX(-100%); animation: bannerSheen 7s linear infinite;
}
@keyframes bannerSheen { to { transform: translateX(100%); } }
.daily-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--amber); }
.daily-topic { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 4px 0; position: relative; z-index: 1; }
.streak-chip {
  font-size: 11px; font-weight: 700; color: var(--amber);
  border: 1px solid var(--amber); border-radius: 999px; padding: 2px 8px; margin-left: 6px;
}

/* ---------- blind mode / belief picker ---------- */
.belief-picker { display: flex; gap: 8px; margin-top: 6px; }
.blind-toggle {
  display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; cursor: pointer;
}
.blind-toggle input { width: 16px; height: 16px; }
.blind-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px; color: var(--amber);
  border: 1px solid var(--amber); border-radius: 999px; padding: 1px 6px; margin-left: 4px;
}

/* ---------- challenge ---------- */
.challenge-url-row { display: flex; gap: 8px; margin: 12px 0; }
.challenge-url-row .input { margin: 0; }

/* ---------- audience bar (votes + reactions) ---------- */
.audience-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.vote-tally { flex: 1; min-width: 200px; }
.vote-track { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg3); border: 1px solid var(--border); }
.vote-track.big { height: 24px; margin: 10px 0; }
.vote-pro { background: var(--pro); transition: width .4s var(--ease); }
.vote-con { background: var(--con); transition: width .4s var(--ease); }
.vote-labels { display: flex; justify-content: space-between; font-size: 12px; margin-top: 5px; font-weight: 700; font-feature-settings: "tnum"; }
.pro-text { color: var(--pro); } .con-text { color: var(--con); }
.spectate-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.vote-btns, .reaction-btns { display: flex; gap: 6px; }
.reaction-btns { flex-wrap: wrap; justify-content: flex-end; }
.vote-btn.active { border-color: var(--accent); background: var(--bg3); color: var(--text); }
.react-btn { font-size: 16px; padding: 4px 9px; }
/* reactions are aimed at one debater: a labelled group per side */
.react-group {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px;
}
.react-group.pro { border-left: 3px solid var(--pro); }
.react-group.con { border-left: 3px solid var(--con); }
.react-target { font-size: 11px; font-weight: 700; letter-spacing: .04em; }

/* ---------- floating emoji reactions ---------- */
.emoji-layer { position: relative; height: 0; pointer-events: none; z-index: 40; }
.float-emoji {
  position: absolute; bottom: 0; font-size: 30px;
  animation: floatup 2s ease-out forwards;
}
/* targeted reactions glow in the colour of the debater they were given to */
.float-emoji.pro { filter: drop-shadow(0 0 9px var(--pro)); }
.float-emoji.con { filter: drop-shadow(0 0 9px var(--con)); }
@keyframes floatup {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-220px) scale(1.3); opacity: 0; }
}

/* ---------- results: two verdict panels ---------- */
.verdict-panel { margin-bottom: 16px; text-align: center; }
.verdict-title { font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; margin-bottom: 10px; color: var(--muted); text-transform: uppercase; }
#result-headline { font-family: var(--font-display); font-size: 2rem; }

/* LLM adjudicator: which tier decided + the judge's written reasoning */
.verdict-source-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 10px 0 4px; }
.judge-reasoning { text-align: left; background: var(--bg3); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px auto 4px; max-width: 720px; }
.judge-reasoning h3 { font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.judge-reasoning p { font-size: 15px; line-height: 1.55; color: var(--text); }

/* delayed-verdict waiting state */
.judging-block { display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 34px 18px; text-align: center; }
.judging-text { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
/* Delayed-verdict waiting state renders inside .scorecards (a 2-col grid). Its
   parts — the "transcribing…" note and the deliberating block — must span the
   full width so they stay centered, not split into side-by-side columns. */
.scorecards > .judging-block, .scorecards > p { grid-column: 1 / -1; text-align: center; }

.audience-verdict .verdict-line { font-size: 16px; margin-bottom: 6px; }
.audience-verdict { background: var(--bg2); opacity: .96; }
.disagree-line {
  margin-top: 12px; font-size: 14.5px; color: var(--amber); font-weight: 600;
  background: var(--bg3); border: 1px solid var(--amber); border-radius: 8px; padding: 10px;
}
.split-decision {
  display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-weight: 700;
  letter-spacing: .1em; color: var(--amber); border: 1px solid var(--amber);
  border-radius: 999px; padding: 3px 12px; font-size: 12px;
}
.badge.aud { color: var(--accent); }

/* verdict ceremony: progressive reveal driven by arena.js adding .ceremony-run
   then per-element .revealed. Base state is untouched so no-JS shows everything. */
#view-results.ceremony-run .verdict-panel,
#view-results.ceremony-run .center { opacity: 0; }
#view-results.ceremony-run .verdict-panel.revealed,
#view-results.ceremony-run .center.revealed { opacity: 1; transition: opacity .5s var(--ease), transform .5s var(--ease); }
#view-results.ceremony-run .scorecard { opacity: 0; transform: translateY(10px); }
#view-results.ceremony-run .scorecard.revealed { opacity: 1; transform: none; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.ceremony-type { font-family: var(--font-mono); }
.ceremony-caret::after { content: "▋"; color: var(--accent); animation: caretBlink 1s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* confetti canvas overlay (winner's screen only, self-removes) */
#confetti-canvas { position: fixed; inset: 0; z-index: 210; pointer-events: none; }

/* ---------- profile ---------- */
.profile-head { margin: 14px 0; }
.profile-id { display: flex; align-items: center; gap: 14px; }
.tier-badge { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 16px; }
.profile-stats .stat { display: flex; flex-direction: column; }
.profile-stats .stat b { font-size: 20px; font-family: var(--font-display); font-feature-settings: "tnum"; }
.profile-stats .stat .muted { font-size: 11px; }
#view-profile .card { margin-top: 16px; }
.rating-graph { width: 100%; }
.rgraph { width: 100%; height: auto; background: var(--bg); border-radius: 8px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.ach {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; text-align: center; transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.ach:hover { transform: translateY(-2px); border-color: var(--accent); }
.ach-emoji { font-size: 28px; }
.ach-title { font-weight: 700; margin-top: 6px; font-size: 14px; }
.ach-desc { font-size: 11px; margin-top: 4px; }
.cat-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.cat-row:last-child { border-bottom: none; }

/* ---------- trust & safety ---------- */
.small { font-size: 12px; }
.audio-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: var(--bg3); color: var(--muted); z-index: 1;
}
.audio-placeholder .ap-icon { font-size: 42px; }
.audio-placeholder .ap-text { font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.paste-mark { color: var(--amber); font-size: 11px; font-weight: 700; }
.fc-actions { margin-top: 6px; }
.fc-dispute { font-size: 11px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.fc-dispute:hover { color: var(--con); }
.fc-disputed {
  font-size: 10px; font-weight: 800; color: var(--con);
  border: 1px solid var(--con); border-radius: 999px; padding: 1px 6px; margin-left: 6px;
}
.site-footer {
  text-align: center; padding: 22px 16px 40px; margin-top: 30px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 13px;
}
.site-footer a { color: var(--accent); text-decoration: none; }
#report-reason { width: 100%; resize: vertical; font-family: inherit; margin: 6px 0; }
#view-admin .live-item { align-items: flex-start; }

/* ---------- language selector ---------- */
.lang-row { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.lang-row .input { max-width: 260px; }
.lang-note { margin-top: 2px; }

/* ---------- tournaments ---------- */
.badge.t-open { color: var(--accent); }
.badge.t-live { color: var(--pro); }
.badge.t-finished { color: var(--amber); }
.badge.t-cancelled { color: var(--muted); }
.badge.t-themed { color: var(--con); }
.badge.t-random { color: var(--accent); }

.rules-cols { display: flex; gap: 18px; flex-wrap: wrap; }
.rules-col { flex: 1 1 260px; }
.rules-col h3 { margin: 0 0 6px; font-size: 15px; }
.rules-col ul { margin: 0; padding-left: 18px; }
.rules-col li { margin: 3px 0; }

.t-motion {
  font-style: italic; color: var(--text); margin: 4px 0;
  padding-left: 10px; border-left: 3px solid var(--con);
}

.ct-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.ct-field { display: flex; flex-direction: column; gap: 3px; flex: 1 1 180px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  text-align: left; max-width: 100%; transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease);
}
.chip:hover { border-color: var(--accent); background: var(--bg2); transform: translateY(-1px); }

.standings-wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.standings { flex: 1 1 300px; }
.standings h3 { margin: 0 0 8px; font-size: 15px; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 14px; font-feature-settings: "tnum"; }
.standings-table th, .standings-table td {
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border);
}
.standings-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.standings-table tr.leader td { background: rgba(45, 212, 120, .08); }
.standings-table tr.leader td:first-child { color: var(--amber); font-weight: 800; }

.lg-rounds { display: flex; flex-direction: column; gap: 14px; }
.lg-round { display: flex; flex-direction: column; gap: 6px; }
.lg-match, .gf-match {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px;
}
.lg-for { color: var(--pro); font-weight: 600; }
.lg-con { color: var(--con); font-weight: 600; }
.lg-vs { color: var(--muted); font-size: 11px; letter-spacing: 1px; font-family: var(--font-mono); }
.lg-foot, .gf-foot { margin-left: auto; }
.lg-res { font-weight: 700; }
.gf-match { border-color: var(--gold); background: linear-gradient(90deg, rgba(245, 197, 66, .1), var(--bg3)); }
.gf-champ { color: var(--gold); font-weight: 800; }
.gf-locked {
  border: 1px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center;
}
.champion-banner {
  text-align: center; font-size: 18px; border-color: var(--gold); position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(245, 197, 66, .16), var(--bg2)); margin-top: 14px;
}
.champion-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(245, 197, 66, .2) 50%, transparent 60%);
  transform: translateX(-100%); animation: bannerSheen 8s linear infinite;
}
.champion-banner b { color: var(--gold); }

.bracket { display: flex; gap: 22px; overflow-x: auto; padding: 8px 2px 4px; align-items: flex-start; }
.bround { display: flex; flex-direction: column; gap: 16px; min-width: 190px; justify-content: space-around; }
.bround-title {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); text-align: center; margin-bottom: 2px;
}
.bmatch {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 3px;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.bmatch:hover { transform: translateY(-1px); border-color: var(--accent); }
.bmatch.live { border-color: var(--pro); }
.bmatch.done { border-color: var(--border); opacity: .95; }
.bmatch-side { font-size: 14px; font-weight: 600; padding: 3px 6px; border-radius: 6px; }
.bmatch-side.won { color: var(--pro); font-weight: 800; background: rgba(45, 212, 120, .1); }
.bmatch-vs { font-size: 10px; color: var(--muted); text-align: center; letter-spacing: 1px; font-family: var(--font-mono); }
.bmatch-foot { margin-top: 6px; text-align: center; }
.bmatch-replay { font-size: 12px; color: var(--accent); text-decoration: none; }
.bmatch-replay:hover { text-decoration: underline; }

/* pure-CSS tier "coin" medallion — flips on hover/first render */
.tier-emblem {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; position: relative; transform-style: preserve-3d;
  background: radial-gradient(circle at 32% 28%, #fff5cf, var(--gold) 45%, #8a6a12 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, .5), inset 0 -3px 6px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .4);
  transition: transform .6s var(--ease);
}
.tier-emblem:hover { transform: rotateY(180deg); }

/* ---------- forums & discovery filters ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px;
}
.filter-chip.active { border-color: var(--accent); color: var(--text); background: var(--bg3); }
.filter-select { width: auto; min-width: 160px; padding: 6px 10px; }
.badge.forum-badge { color: var(--accent); }
.take-line {
  font-size: 13px; font-style: italic; color: var(--muted); margin-top: 4px;
}
.p-take { font-size: 13px; font-style: italic; color: var(--muted); margin-top: 6px; }

.join-details { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.join-row { display: flex; gap: 8px; font-size: 14px; }
.join-row .jr-label { color: var(--muted); min-width: 96px; flex-shrink: 0; }
.join-row .jr-value { color: var(--text); }
.join-row .jr-value.italic { font-style: italic; }

.forum-card { margin-bottom: 14px; }
.forum-card .forum-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.forum-card .forum-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.forum-card .forum-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.forum-card .forum-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.forum-card .forum-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.subforum-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.subchip {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text); cursor: pointer;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.subchip.joined { border-color: var(--pro); color: var(--pro); }
.subchip:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- VS splash overlay (match found) ---------- */
.vs-splash {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(13, 18, 32, .92), rgba(7, 9, 15, .98));
  perspective: 900px; overflow: hidden;
}
.vs-splash.closing { animation: vsFade .3s var(--ease) forwards; }
@keyframes vsFade { to { opacity: 0; } }
.vs-stage { display: flex; align-items: center; gap: 4vw; transform-style: preserve-3d; }
.vs-name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 5vw, 3rem);
  max-width: 34vw; text-align: center; transform: translateZ(60px);
}
.vs-name .vs-side { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .2em; display: block; margin-bottom: 8px; }
.vs-name.pro { color: var(--pro); animation: vsInLeft .5s var(--ease) both; }
.vs-name.pro .vs-side { color: var(--pro); }
.vs-name.con { color: var(--con); animation: vsInRight .5s var(--ease) both; }
.vs-name.con .vs-side { color: var(--con); }
@keyframes vsInLeft { from { opacity: 0; transform: translateX(-60vw) translateZ(60px); } to { opacity: 1; transform: translateX(0) translateZ(60px); } }
@keyframes vsInRight { from { opacity: 0; transform: translateX(60vw) translateZ(60px); } to { opacity: 1; transform: translateX(0) translateZ(60px); } }
.vs-mono {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 8vw, 5rem);
  background: var(--grad-arena); -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateZ(120px); animation: vsPop .5s cubic-bezier(.2, 1.5, .4, 1) .25s both;
  text-shadow: 0 0 40px rgba(139, 91, 255, .5);
}
@keyframes vsPop { from { opacity: 0; transform: translateZ(120px) scale(0); } to { opacity: 1; transform: translateZ(120px) scale(1); } }

/* ============================================================
   REDUCED MOTION — every animation degrades to fade-only/none
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .view, .msg, .fc, .caption, .modal, .toast, .extend-dialog { animation: none !important; }
  .aurora, .daily-banner::after, .champion-banner::after, .fc.supported::after,
  .scorecard.winner::before, .hero .live-now .dot, .hero-mic { animation: none !important; }
  .spinner { animation: spin 1s linear infinite !important; } /* keep loading feedback */
  .tilt { transform: none !important; }
  .tilt::after { opacity: 0 !important; }
  .vs-name, .vs-mono { animation: none !important; opacity: 1 !important; transform: none !important; }
  .timer-bar.danger { animation: none !important; }
}

/* =====================================================================
   MODERN SURFACE REFRESH (de-card layer)
   Presentation-only overrides — appended last so equal-specificity rules
   win. No markup or JS-bound id/class is changed. See
   futurescope/uiux-skill/ for the philosophy. Moves the UI off "everything
   in a chunky bordered box" onto hairline surfaces, divider-row lists, a
   bento home, segmented controls and quieter chrome.
   ===================================================================== */
:root {
  /* Vanguard: ghost borders (white/10, white/30 on hover) over shadows,
     tonal-stacked surfaces, hard 0-radius structure with 4px only on small
     utility inputs (the design's one permitted softness). */
  --hairline: rgba(255, 255, 255, .10);
  --hairline-strong: rgba(255, 255, 255, .30);
  --surface: rgba(255, 255, 255, .03);
  --surface-hover: rgba(255, 255, 255, .06);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-pop: none;
  --r-lg: 0px;
  --r-md: 0px;
  --r-pill: 0px;
  --radius: 0px;
}

/* thin, unobtrusive scrollbars everywhere */
* { scrollbar-width: thin; scrollbar-color: var(--bg3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }
::-webkit-scrollbar-track { background: transparent; }

/* ---- surfaces: depth from shadow + hairline, not a hard outline ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm), var(--shadow-md);
  padding: 24px 26px;
}
/* structural sections aren't surfaces — group them with space, not a box */
.how, .waiting-card {
  background: transparent; border: none; box-shadow: none;
  padding-left: 0; padding-right: 0;
}

/* ---- buttons: one loud primary, everything else quiet ---- */
.btn {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); color: var(--text);
}
.btn:hover { background: var(--surface-hover); border-color: var(--hairline-strong); filter: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: #08101f; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: #c22a44; border-color: transparent; color: #fff; }
.btn.danger:hover { background: #d8324f; }

/* ---- inputs / selects ---- */
.input {
  background: rgba(0, 0, 0, .28); border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.input:focus { border-color: var(--accent); }

/* ---- nav: filled-pill active state (drop the underline tab) ---- */
.nav-btn { border-radius: var(--r-pill); }
.nav-btn.active { background: var(--surface-hover); color: var(--text-bright); }
.nav-btn.active::after { display: none; }
.rating-chip { background: var(--surface); border-color: var(--hairline); }

/* ---- home: bento — wide primary action + a 3-up rail of quiet options ---- */
.play-cards { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.play-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  padding: 20px 22px;
  transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.play-card:hover { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: var(--shadow-pop); }
.play-card:first-child {
  grid-column: 1 / -1; align-items: center; text-align: center; padding: 30px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), var(--surface));
  border-color: rgba(255, 255, 255, .30);
}
.play-card:first-child:hover { box-shadow: var(--shadow-pop), 0 0 0 1px rgba(255, 255, 255, .30); }
.play-card:first-child p { max-width: 560px; }
.play-card:first-child .btn { min-width: 240px; margin-top: 4px; }
@media (max-width: 760px) { .play-cards { grid-template-columns: 1fr; } }

/* ---- lists: ONE rounded container with divider rows (not stacked cards) ---- */
.live-list {
  gap: 0; margin-top: 16px;
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface);
}
.live-list > * {
  border: none !important; border-radius: 0 !important; box-shadow: none !important;
  background: transparent; border-bottom: 1px solid var(--hairline) !important;
  padding: 16px 20px; transition: background .14s var(--ease);
}
.live-list > *:last-child { border-bottom: none !important; }
.live-list > *:hover { background: var(--surface-hover); }
/* a list already inside a card shouldn't double-box */
.card > .live-list { border: none; border-radius: 0; background: transparent; margin-top: 12px; }

/* ---- table: hairline dividers, hover rows, own-row tint (no heavy grid) ---- */
.table th { border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); letter-spacing: .1em; }
.table td { border-bottom: 1px solid var(--hairline); }
.table tbody tr:hover td { background: var(--surface-hover); }
.table .me { background: rgba(255, 255, 255, .09); }

/* ---- segmented controls (side / belief picker) ---- */
.side-picker, .belief-picker {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-pill); padding: 4px; gap: 4px;
}
.side-btn {
  border: none; background: transparent; border-radius: calc(var(--r-pill) - 4px);
  color: var(--muted);
}
.side-btn:hover { background: var(--surface); transform: none; color: var(--text); }
.side-btn.active { background: var(--surface-hover); color: var(--text-bright); box-shadow: none; }
.side-btn[data-side="pro"].active { color: var(--pro); background: rgba(45, 212, 120, .15); box-shadow: none; }
.side-btn[data-side="con"].active { color: var(--con); background: rgba(255, 84, 112, .15); box-shadow: none; }

/* ---- chips & badges: soft translucent pills ---- */
.badge { background: var(--surface); border-color: var(--hairline); }
.chip { background: var(--surface); border-color: var(--hairline); border-radius: var(--r-pill); }
.chip:hover { background: var(--surface-hover); border-color: var(--hairline-strong); }
.filter-chip.active { background: var(--surface-hover); border-color: var(--hairline-strong); color: var(--text-bright); }

/* ---- dialogs / modals: floating glass, no hard edge ---- */
.modal, .extend-dialog { border: 1px solid var(--hairline-strong); box-shadow: var(--shadow-pop); border-radius: var(--r-lg); }
/* never let a fixed-width modal exceed the viewport on any device */
.modal { max-width: calc(100vw - 28px); }

/* =====================================================================
   RESPONSIVE LAYER — tablet & mobile. Presentation-only; appended last so
   these win where they apply. The viewport meta tag ships in index.html.
   ===================================================================== */

/* ---- tablet ---- */
@media (max-width: 900px) {
  main { padding: 24px 16px 72px; }
  .nav { padding: 12px 18px; gap: 12px; }
  .hero h1 { font-size: 2.4rem; }
  .play-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ---- phones ---- */
@media (max-width: 640px) {
  main { padding: 18px 12px 64px; }

  /* nav: brand + user on the top row, then ALL view buttons wrap onto their
     own full-width row(s) so every page (My debates, Admin…) stays visible */
  .nav { padding: 10px 12px; gap: 8px 10px; flex-wrap: wrap; }
  .brand { font-size: 17px; }
  .nav-user { order: 1; margin-left: auto; gap: 6px; }
  .nav-links { order: 2; flex: 1 0 100%; flex-wrap: wrap; gap: 4px; overflow: visible; }
  .nav-btn { white-space: nowrap; padding: 7px 11px; font-size: 13px; }
  .rating-chip { padding: 4px 9px; font-size: 12px; }

  .hero { margin: 22px 0 28px; }
  .hero h1 { font-size: 1.95rem; }
  .hero .sub { font-size: 14.5px; }

  .card { padding: 18px 16px; }
  .play-cards { grid-template-columns: 1fr; }
  .play-card:first-child { padding: 22px 18px; }
  .play-card:first-child .btn { min-width: 0; width: 100%; }

  /* debate stage */
  .players { gap: 10px; }
  .motion h2 { font-size: 1.2rem; }

  /* compose: let the action buttons wrap instead of pushing off-screen */
  .compose-row { flex-wrap: wrap; gap: 8px; }
  .compose-row > span { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .compose-row > span .btn { flex: 1 1 auto; }

  /* extension / rematch dialogs span the width on phones */
  .extend-dialog { left: 12px; right: 12px; bottom: 12px; max-width: none; }

  /* daily banner + list rows stack cleanly */
  .daily-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .daily-banner .btn { width: 100%; }
  .live-item { flex-wrap: wrap; }
  .live-item > .btn { flex-shrink: 0; }

  /* wide tables scroll horizontally instead of overflowing the layout */
  .table, .standings-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .standings { flex: 1 1 100%; }
  .scorecards { grid-template-columns: 1fr; }

  /* input rows / chip rows / centered button groups wrap */
  .challenge-url-row, .filter-bar, .lang-row, .row-gap, .chip-row { flex-wrap: wrap; }
  .modal { width: calc(100vw - 28px); }
}

/* ---- small phones ---- */
@media (max-width: 400px) {
  .hero h1 { font-size: 1.65rem; }
  .nav-btn { padding: 6px 8px; }
  .card { padding: 16px 13px; }
  .btn { padding: 9px 14px; }
}

/* =====================================================================
   VANGUARD CINEMATIC LAYER
   Presentation-only overrides from DESIGN_landingpage.md /
   DESIGN_debatepage.md — appended last so equal-specificity rules win.
   Modern Brutalism x Cinematic Minimalism: achromatic charcoal + white,
   Syne display type with expanded tracking, Inter labels in uppercase
   micro-tracking, sharp corners, ghost borders instead of shadows.
   Every id/class contract from app.js is untouched.
   ===================================================================== */

/* ---- structural shapes: hard 90-degree corners everywhere ---- */
.card, .btn, .modal, .extend-dialog, .profile-menu, .menu-item, .msg .bubble,
.badge, .toast, .video-panel, .video-box, video, .scorecard, .fc, .tab,
.play-card, .live-list, .table, .take, .p-take, .vote-track, .filter-chip,
.audience-bar, .react-group, .timer-wrap { border-radius: 0 !important; }
/* the design's single permitted softness: small utility inputs */
.input, input, select, textarea, .compose textarea { border-radius: 4px !important; }
/* pills die hard: chips flatten to square tags */
.rating-chip, .nav-btn, .live-now, .filter-chip { border-radius: 0 !important; }

/* ---- typography: High-Low strategy ---- */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: .03em; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; line-height: 1.0; font-size: clamp(2.4rem, 6vw, 4.6rem);
  text-shadow: none;
}
.hero .sub { font-family: var(--font-body); letter-spacing: .01em; line-height: 1.65; }
.brand {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em;
}
.brand span { color: var(--text-bright); opacity: .55; }
h2 { font-weight: 700; letter-spacing: .03em; }

/* technical blueprint labels: uppercase + heavy tracking */
.nav-btn, .side-tag, .motion-label, .badge, .filter-chip, .react-target,
.video-label, .phase-label, .vote-labels span {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: .14em; font-size: 11px; font-weight: 600;
}
.nav-btn { font-size: 12px; letter-spacing: .12em; padding: 9px 13px; }

/* ---- buttons (Vanguard spec) ---- */
.btn {
  background: transparent; border: 1px solid var(--hairline-strong);
  color: var(--text-bright); font-weight: 600;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: var(--text-bright); color: #141313; border-color: var(--text-bright); }
.btn.primary { background: var(--text-bright); border-color: var(--text-bright); color: #141313; }
.btn.primary:hover { background: #e2e2e2; border-color: #e2e2e2; color: #141313; box-shadow: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-hover); color: var(--text-bright); }
.btn.danger { background: var(--error-container); border-color: var(--error-container); color: var(--on-error-container); }
.btn.danger:hover { background: #b0000c; border-color: #b0000c; color: var(--on-error-container); }
.btn:disabled { opacity: .4; }

/* ---- nav: fixed glass bar, thin bottom hairline ---- */
.nav {
  background: rgba(20, 19, 19, .6); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline);
}
.nav-btn.active { background: transparent; color: var(--text-bright); }
.nav-btn.active::after {
  display: block; transform: scaleX(1); opacity: 1;
  background: var(--text-bright); height: 1px; bottom: 4px; border-radius: 0;
}
.rating-chip { border: 1px solid var(--hairline-strong); background: transparent; }
.rating-chip b, #btn-profile b, .brand span, .profile-menu .menu-item:hover { color: var(--text-bright); }

/* ---- surfaces: tonal stacking, ghost borders, zero shadows ---- */
.card, .play-card, .modal, .extend-dialog, .profile-menu {
  box-shadow: none; background: rgba(42, 42, 42, .5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
}
.play-card:first-child {
  background: rgba(53, 52, 52, .5); border-color: var(--hairline-strong);
}
.play-card:hover { box-shadow: none; border-color: var(--hairline-strong); transform: translateY(-2px); }
.play-card:first-child:hover { box-shadow: none; }
.live-list { background: rgba(28, 27, 27, .5); }

/* ---- stats look: big numbers over thin top borders ---- */
.stat, .metric { border-top: 1px solid var(--hairline); }

/* ---- inputs ---- */
.input, .compose textarea { background: rgba(14, 14, 14, .6); border-color: var(--hairline); }
.input:focus, .compose textarea:focus {
  border-color: var(--text-bright); box-shadow: none; outline: 1px solid rgba(255, 255, 255, .35);
}

/* ---- side-coding survives, glow retired ---- */
.hero .live-now { border-radius: 0; border-color: var(--hairline-strong); background: transparent; }
.hero-mic { filter: none; color: var(--text-bright); }
.timer-bar { border-radius: 0 !important; }
.spinner { border-radius: 50% !important; } /* a spinner must stay round */
.float-emoji.pro, .float-emoji.con { filter: none; }
.dot { border-radius: 50% !important; }

/* scrollbars square off too */
::-webkit-scrollbar-thumb { border-radius: 0; }

/* ---- breathing room: the de-card layer stripped side padding from these
   sections back when they were transparent; the Vanguard layer boxes them
   again, so they need real padding or the content hugs the border ---- */
.how, .waiting-card { padding: clamp(20px, 3vw, 32px) clamp(18px, 3vw, 34px); }
.how h2, .waiting-card h2 { margin-bottom: 14px; }
.how ol { padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.waiting-card .filter-bar { margin: 12px 0 4px; }
