/* ═══════════════════════════════════════════════════════════════════
   Agent Debate Chat Theater — "late-night broadcast debate floor"
   House palette: pitch black #060606 · zinc borders · sky-400 chrome.
   Each agent carries a signature neon used for rails, rings & dots.
   Type: Big Shoulders Display (marquee) · IBM Plex Sans/Mono (floor).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #060606;
  --panel: #0d0d10;
  --panel-2: #121216;
  --border: #27272a;
  --border-soft: #1c1c20;
  --text: #f4f4f5;
  --dim: #a1a1aa;
  --faint: #63636b;
  --accent: #38bdf8;

  /* agent signature colors (assigned in JS via data-agent) */
  --claude: #e8825a;
  --codex: #34d399;
  --gemini: #818cf8;
  --antigravity: #e879f9;
  --opencode: #a3e635;

  /* per-debate spotlight hues, set from the two lead debaters */
  --spot-1: #38bdf8;
  --spot-2: #e879f9;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

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

[hidden] { display: none !important; }

html { scrollbar-color: #2e2e33 var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ─────────────────────────────── atmosphere ─────────────────────── */

.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 40;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.4s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.4%); }
  50% { transform: translate(1.6%, -1%); }
  75% { transform: translate(-1%, -1.8%); }
  100% { transform: translate(0, 0); }
}

.spotlights { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.spot {
  position: absolute; width: 65vw; height: 65vw;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .12;
  transition: background 1.2s ease;
}
.spot-1 { top: -32vw; left: -18vw; background: radial-gradient(circle, var(--spot-1), transparent 60%); }
.spot-2 { top: -30vw; right: -20vw; background: radial-gradient(circle, var(--spot-2), transparent 60%);
  animation: spot-drift 14s ease-in-out infinite alternate; }
@keyframes spot-drift { to { transform: translate(-4vw, 5vw) scale(1.12); } }

/* ══════════════════════════════ LOBBY ═════════════════════════════ */

.lobby { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 28px 60px; }

.marquee { padding: 64px 0 20px; text-align: center; }

.marquee-top {
  display: flex; justify-content: center; align-items: center; gap: 18px;
  margin-bottom: 26px;
}

.onair {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, .45);
  background: rgba(244, 63, 94, .07);
  border-radius: 999px; padding: 5px 14px 5px 11px;
}
.onair-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f43f5e; box-shadow: 0 0 8px #f43f5e;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; box-shadow: none; } }

.marquee-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  color: var(--faint);
}

.marquee-title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: .88;
  text-transform: uppercase;
  display: grid;
  justify-items: center;
}
.marquee-title .line-1 {
  font-size: clamp(44px, 8.4vw, 104px);
  letter-spacing: .015em;
  color: var(--text);
  animation: rise-in .7s cubic-bezier(.2, .8, .2, 1) both;
}
.marquee-title .line-2 {
  font-size: clamp(52px, 10.4vw, 132px);
  letter-spacing: .03em;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-shadow: 0 0 34px rgba(56, 189, 248, .35);
  animation: rise-in .7s .12s cubic-bezier(.2, .8, .2, 1) both, flicker 9s 2.2s infinite;
}
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes flicker {
  0%, 100% { opacity: 1; }
  91% { opacity: 1; } 92% { opacity: .55; } 93% { opacity: 1; }
  95% { opacity: .75; } 96% { opacity: 1; }
}

.marquee-sub {
  max-width: 560px; margin: 26px auto 0;
  color: var(--dim); font-size: 15px;
  animation: rise-in .7s .24s cubic-bezier(.2, .8, .2, 1) both;
}

.marquee-stats {
  display: flex; justify-content: center; gap: 34px;
  margin-top: 34px;
  animation: rise-in .7s .34s cubic-bezier(.2, .8, .2, 1) both;
}
.stat { text-align: center; }
.stat b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 30px; line-height: 1; color: var(--text);
}
.stat span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  color: var(--faint); text-transform: uppercase;
}

/* share bar (tool-share.js supplies its own internals) */
.marquee-share {
  display: flex; justify-content: center;
  margin-top: 26px;
  animation: rise-in .7s .4s cubic-bezier(.2, .8, .2, 1) both;
}
.theater-share { display: inline-flex; }

/* filters */
.filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  padding: 30px 0 26px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 34px;
}
.filter-chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  transition: all .2s ease;
}
.filter-chip:hover { color: var(--text); border-color: var(--faint); }
.filter-chip.active {
  color: #0b1220; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 18px rgba(56, 189, 248, .35);
}

/* card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.debate-card {
  position: relative;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  animation: card-in .5s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.debate-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-glow, var(--accent)) 55%, var(--border));
  box-shadow: 0 18px 44px -18px color-mix(in srgb, var(--card-glow, var(--accent)) 45%, transparent);
}

.card-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 4s ease;
  filter: saturate(.92);
}
.debate-card:hover .card-cover img { transform: scale(1.07); }
.card-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 6, 6, .92) 96%);
}
.card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text);
  background: rgba(6, 6, 6, .72);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  border-radius: 999px; padding: 4px 11px;
}
.card-no {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  color: rgba(244, 244, 245, .5);
}

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 13px; flex: 1; }
.card-title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 23px; line-height: 1.02; letter-spacing: .012em;
  color: var(--text);
}

.card-vs { display: flex; flex-direction: column; gap: 6px; }
.vs-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vs-row .persona-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vs-row .agent-tag {
  font-family: var(--font-mono); font-size: 10px; color: var(--faint);
  white-space: nowrap;
}
.vs-divider {
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
  letter-spacing: .3em; color: var(--faint);
  padding-left: 40px;
}

.card-meta {
  margin-top: auto;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  border-top: 1px solid var(--border-soft); padding-top: 12px;
}

.lobby-footer {
  margin-top: 56px; text-align: center;
  font-size: 12.5px; color: var(--faint);
}
.lobby-footer .mono { font-size: 11px; }

/* avatars (shared) */
.avatar {
  flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  color: var(--ac, var(--accent));
  background: color-mix(in srgb, var(--ac, var(--accent)) 12%, #0a0a0c);
  border: 1.5px solid color-mix(in srgb, var(--ac, var(--accent)) 65%, transparent);
  box-shadow: 0 0 10px -2px color-mix(in srgb, var(--ac, var(--accent)) 50%, transparent);
  text-transform: uppercase;
  user-select: none;
}

/* ══════════════════════════════ THEATER ═══════════════════════════ */

.theater {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
}

.theater-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(6, 6, 6, .82);
  backdrop-filter: blur(10px);
}

.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  color: var(--dim);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px 7px 8px;
  transition: all .2s ease;
}
.btn-back:hover { color: var(--text); border-color: var(--faint); }

.theater-heading { min-width: 0; flex: 1; }
.theater-kicker {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--faint);
}
.theater-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(17px, 2.5vw, 26px); line-height: 1.02; letter-spacing: .015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.theater-cast { display: flex; gap: 8px; }
.cast-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel);
  padding: 4px 13px 4px 5px;
  transition: all .2s ease;
}
.cast-chip:hover {
  border-color: color-mix(in srgb, var(--ac, var(--accent)) 60%, var(--border));
  box-shadow: 0 0 14px -4px var(--ac, var(--accent));
}
.cast-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.cast-chip .chip-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cast-chip .chip-agent { font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); white-space: nowrap; }

.btn-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em;
  color: var(--dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px;
  transition: all .2s ease;
}
.btn-chip:hover, .btn-chip.active { color: var(--accent); border-color: rgba(56, 189, 248, .5); }

/* floor-control bar */
.floor-bar {
  display: flex; height: 4px; background: var(--border-soft);
  overflow: hidden;
}
.floor-seg { height: 100%; transition: width .8s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 8px currentColor; }

/* stage */
.stage-wrap { position: relative; flex: 1; min-height: 0; }
.stage {
  height: 100%; overflow-y: auto;
  padding: 30px 24px 40px;
  scroll-behavior: smooth;
}
.stage-inner-width, .msg, .kickoff, .endcard, .typing-row { max-width: 860px; margin-left: auto; margin-right: auto; }

/* kickoff / motion card */
.kickoff {
  text-align: center;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-radius: 14px;
  padding: 22px 26px 18px;
  margin-bottom: 30px;
  animation: rise-in .5s ease both;
}
.kickoff-kicker {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .26em;
  color: var(--accent); text-transform: uppercase;
}
.kickoff-topic {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(22px, 3.4vw, 34px); line-height: 1.04; letter-spacing: .01em;
  margin: 10px 0 8px;
}
.kickoff-brief { color: var(--dim); font-size: 14px; max-width: 640px; margin: 0 auto; }
.kickoff-meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
}

/* messages */
.msg {
  display: flex; gap: 13px;
  margin-bottom: 22px;
  animation: msg-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.msg.side-right { flex-direction: row-reverse; }

.msg .avatar { width: 38px; height: 38px; font-size: 15px; margin-top: 2px; }

.msg-block { min-width: 0; max-width: 78%; }
.msg-head {
  display: flex; align-items: baseline; gap: 9px;
  margin-bottom: 5px; padding: 0 4px;
}
.msg.side-right .msg-head { flex-direction: row-reverse; }
.msg-name { font-weight: 700; font-size: 13.5px; color: var(--ac, var(--text)); }
.msg-agent { font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
.msg-time { font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
.msg-signal {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em;
  color: #fbbf24; border: 1px solid rgba(251, 191, 36, .4);
  border-radius: 999px; padding: 1px 8px;
}

.msg-bubble {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--ac, var(--accent));
  border-radius: 4px 14px 14px 14px;
  padding: 13px 18px;
  font-size: 14.5px;
  overflow-wrap: break-word;
}
.msg.side-right .msg-bubble {
  border-left: 1px solid var(--border-soft);
  border-right: 3px solid var(--ac, var(--accent));
  border-radius: 14px 4px 14px 14px;
}
.msg-bubble p { margin-bottom: .85em; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble strong { color: color-mix(in srgb, var(--ac, var(--accent)) 60%, var(--text)); }
.msg-bubble blockquote {
  border-left: 2px solid var(--border);
  padding-left: 12px; margin: .7em 0;
  color: var(--dim); font-style: italic;
}
.msg-bubble ul, .msg-bubble ol { padding-left: 22px; margin-bottom: .85em; }
.msg-bubble li { margin-bottom: .3em; }
.msg-bubble code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: 4px; padding: .08em .4em;
}
.msg-bubble pre {
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: .8em 0;
}
.msg-bubble pre code { background: none; border: none; padding: 0; }
.msg-bubble h3, .msg-bubble h4, .msg-bubble h5 { margin: .9em 0 .4em; font-size: 1em; }
.msg-bubble hr { border: none; border-top: 1px solid var(--border-soft); margin: 1em 0; }

.msg-foot {
  display: flex; gap: 10px; margin-top: 4px; padding: 0 4px;
  font-family: var(--font-mono); font-size: 9.5px; color: var(--faint);
}
.msg.side-right .msg-foot { justify-content: flex-end; }

.msg.speaking .msg-bubble {
  border-color: color-mix(in srgb, var(--ac, var(--accent)) 45%, var(--border-soft));
  box-shadow: 0 0 22px -8px var(--ac, var(--accent));
}

/* typing indicator */
.typing-row { display: flex; gap: 13px; margin-bottom: 22px; animation: msg-in .3s ease both; }
.typing-row.side-right { flex-direction: row-reverse; }
.typing-row .avatar { width: 38px; height: 38px; font-size: 15px; }
.typing-meta { padding: 0 4px; margin-bottom: 5px; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.typing-row.side-right .typing-meta { text-align: right; }
.typing-bubble {
  display: inline-flex; gap: 5px; align-items: center;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--ac, var(--accent));
  border-radius: 4px 14px 14px 14px;
  padding: 14px 18px;
}
.typing-row.side-right .typing-bubble {
  border-left: 1px solid var(--border-soft);
  border-right: 3px solid var(--ac, var(--accent));
  border-radius: 14px 4px 14px 14px;
}
.tdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ac, var(--accent));
  animation: tdot 1.1s ease-in-out infinite;
}
.tdot:nth-child(2) { animation-delay: .18s; }
.tdot:nth-child(3) { animation-delay: .36s; }
@keyframes tdot { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

/* end card */
.endcard {
  text-align: center;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-radius: 14px;
  padding: 26px 26px 24px;
  margin-top: 34px;
  animation: rise-in .5s ease both;
}
.endcard-kicker {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .26em;
  color: #fbbf24; text-transform: uppercase;
}
.endcard h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 30px; margin: 8px 0 4px;
}
.endcard-reason { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.endcard-grid {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin: 20px 0 4px;
}
.endstat {
  min-width: 150px;
  border: 1px solid var(--border-soft); border-radius: 10px;
  border-top: 2px solid var(--ac, var(--accent));
  background: var(--panel);
  padding: 12px 16px;
}
.endstat .who { font-weight: 700; font-size: 13px; color: var(--ac, var(--text)); }
.endstat .nums { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin-top: 4px; line-height: 1.7; }
.endcard .btn-chip { margin-top: 14px; }

/* jump-to-live */
.jump-live {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: #0b1220; background: var(--accent);
  border-radius: 999px; padding: 8px 16px;
  box-shadow: 0 6px 22px -6px rgba(56, 189, 248, .6);
  animation: rise-in .25s ease both;
  z-index: 5;
}

/* drawers */
.metrics, .dossier {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(400px, 92vw);
  background: rgba(10, 10, 13, .96);
  backdrop-filter: blur(14px);
  border-left: 1px solid var(--border);
  z-index: 10;
  display: flex; flex-direction: column;
  animation: drawer-in .3s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.drawer-head h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 21px; letter-spacing: .02em;
}
.btn-close { font-size: 26px; line-height: 1; color: var(--faint); padding: 0 4px; }
.btn-close:hover { color: var(--text); }

.metrics-body, .dossier-body { overflow-y: auto; padding: 18px 20px 30px; }

.mt-section { margin-bottom: 26px; }
.mt-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--faint);
  margin-bottom: 10px;
}
.mt-speaker {
  border: 1px solid var(--border-soft); border-left: 3px solid var(--ac, var(--accent));
  border-radius: 8px; background: var(--panel);
  padding: 10px 14px; margin-bottom: 10px;
}
.mt-speaker .who { font-weight: 700; font-size: 13px; color: var(--ac, var(--text)); }
.mt-speaker .agent { font-family: var(--font-mono); font-size: 10px; color: var(--faint); margin-left: 6px; }
.mt-speaker .nums {
  display: flex; gap: 14px; margin-top: 5px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--dim);
}
.mt-speaker .nums b { color: var(--text); font-weight: 600; }

.mt-chart { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-top: 6px; }
.mt-bar {
  flex: 1; min-width: 4px;
  background: color-mix(in srgb, var(--bc, var(--accent)) 75%, transparent);
  border-radius: 2px 2px 0 0;
  opacity: .28;
  transition: opacity .3s ease, height .3s ease;
  cursor: pointer;
}
.mt-bar.revealed { opacity: 1; box-shadow: 0 0 8px -2px var(--bc, var(--accent)); }
.mt-bar:hover { opacity: .75; }
.mt-chart-caption {
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; color: var(--faint);
}

/* dossier card body (rendered persona markdown) */
.dossier-body { font-size: 13.5px; color: #d4d4d8; }
.dossier-sub {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  margin-bottom: 14px;
}
.dossier-body h3, .dossier-body h4, .dossier-body h5 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 16px; letter-spacing: .04em;
  color: var(--ac, var(--accent));
  margin: 20px 0 8px;
}
.dossier-body h3:first-child { margin-top: 0; }
.dossier-body p { margin-bottom: .8em; }
.dossier-body ul, .dossier-body ol { padding-left: 20px; margin-bottom: .9em; }
.dossier-body li { margin-bottom: .45em; }
.dossier-body strong { color: var(--text); }
.dossier-body hr { border: none; border-top: 1px solid var(--border-soft); margin: 16px 0; }
.dossier-body code { font-family: var(--font-mono); font-size: .85em; color: var(--accent); }
.dossier-body table { display: none; } /* meta table is rendered as chips instead */

/* ─────────────────────────── control deck ───────────────────────── */

.deck {
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 10, .92);
  backdrop-filter: blur(14px);
  padding: 0 18px 12px;
}

.deck-progress {
  display: flex; gap: 3px; align-items: stretch;
  height: 14px; padding: 5px 0 4px;
  cursor: pointer;
}
.pip {
  flex: 1; border-radius: 2px;
  background: color-mix(in srgb, var(--pc, var(--accent)) 60%, transparent);
  opacity: .18;
  transition: opacity .25s ease, transform .15s ease;
}
.pip.done { opacity: .95; }
.pip.current { opacity: 1; box-shadow: 0 0 10px -1px var(--pc, var(--accent)); transform: scaleY(1.35); }
.pip:hover { opacity: .7; }

.deck-row { display: flex; align-items: center; gap: 16px; }
.deck-left { display: flex; align-items: center; gap: 8px; }

.deck-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--dim);
  border: 1px solid var(--border);
  transition: all .2s ease;
}
.deck-btn:hover { color: var(--text); border-color: var(--faint); }

.deck-play {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  color: #0b1220; background: var(--accent);
  box-shadow: 0 0 24px -4px rgba(56, 189, 248, .55);
  transition: transform .15s ease, box-shadow .2s ease;
}
.deck-play:hover { transform: scale(1.06); box-shadow: 0 0 30px -2px rgba(56, 189, 248, .7); }
.deck-play svg { fill: currentColor; margin-left: 2px; }
.deck-play svg[id="ic-pause"] { margin-left: 0; }

.deck-readout { flex: 1; text-align: center; font-size: 11px; letter-spacing: .18em; color: var(--faint); }

.deck-right { display: flex; align-items: center; gap: 8px; }
.deck-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px;
  transition: all .2s ease;
  white-space: nowrap;
}
.deck-chip:hover { color: var(--text); border-color: var(--faint); }
.deck-chip.active {
  color: var(--accent); border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 0 12px -4px var(--accent);
}

/* ───────────────────────────── responsive ───────────────────────── */

@media (max-width: 860px) {
  .theater-bar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .theater-heading { order: 5; flex-basis: 100%; }
  .theater-kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .theater-title { white-space: normal; font-size: 17px; }
  .theater-cast { margin-left: auto; }
  .theater-cast .chip-name, .theater-cast .chip-agent { display: none; }
  .cast-chip { padding: 4px; }
  .btn-chip .chip-text { display: none; }
  .msg-block { max-width: 88%; }
  .deck-readout { display: none; }
}

@media (max-width: 560px) {
  .lobby { padding: 0 16px 40px; }
  .marquee { padding-top: 40px; }
  .marquee-stats { gap: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .stage { padding: 20px 12px 30px; }
  .msg .avatar, .typing-row .avatar { width: 30px; height: 30px; font-size: 12px; }
  .deck { padding: 0 10px 10px; }
  .deck-row { gap: 8px; }
  .deck-chip { padding: 6px 10px; font-size: 10.5px; }
  .deck-btn { width: 32px; height: 32px; }
  .deck-play { width: 42px; height: 42px; }
  .btn-back { padding: 6px 9px 6px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
}
