/* ===== Why'd You Say That? - "Redacted Dossier" theme ===== */
:root {
  --ink: #0d0e10;
  --panel: #16181c;
  --panel-2: #1d2025;
  --raise: #23262c;
  --line: #34383f;
  --line-soft: #26292f;
  --paper: #e9e2d0;
  --crimson: #e5484d;
  --crimson-deep: #b3282d;
  --amber: #e0a43b;
  --text: #ece7dd;
  --muted: #9a978f;
  --good: #4bd6a0;
  --radius: 14px;
  --shadow: 0 22px 50px -20px rgba(0,0,0,0.8);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; min-height: 100vh; color: var(--text);
  font-family: "Instrument Sans", system-ui, sans-serif; background: #0b0d10; -webkit-font-smoothing: antialiased;
}
#ops-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: #0b0d10;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% 16%, rgba(255,224,170,0.16), transparent 58%),
    radial-gradient(700px 500px at 88% 64%, rgba(229,72,77,0.13), transparent 58%),
    linear-gradient(180deg, rgba(5,6,8,0.58), rgba(5,6,8,0.78) 48%, rgba(5,6,8,0.94)),
    url("assets/hq-room.jpg") center / cover no-repeat;
  filter: saturate(0.92) contrast(1.04);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
#app { position: relative; z-index: 2; max-width: 500px; margin: 0 auto; padding: 20px 18px 120px; min-height: 100vh; }
.connection-banner {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(460px, calc(100vw - 24px)); padding: 10px 14px; border-radius: 999px;
  background: rgba(13,14,16,0.94); border: 1px solid var(--amber); color: var(--paper);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4); text-align: center; font-size: 13px; font-weight: 800;
}
.connection-banner.bad { border-color: var(--crimson); color: #ffd7d8; }
.connection-banner.good { border-color: var(--good); color: #d8ffef; }
.screen { display: none; }
.screen.active { display: block; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1,h2,h3 { font-family: "Oswald", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.mono { font-family: "Special Elite", monospace; }

/* Home */
.brand { text-align: center; margin: 18px 0 10px; }
.stamp {
  display: inline-block; font-family: "Special Elite", monospace; color: var(--crimson);
  border: 3px solid var(--crimson); padding: 3px 12px; border-radius: 4px; transform: rotate(-6deg);
  letter-spacing: .2em; font-size: 15px; opacity: .85; margin-bottom: 14px;
}
.brand h1 { font-size: 52px; line-height: .95; margin: 0; font-weight: 700; color: var(--paper); letter-spacing: .06em; }
.tagline { color: var(--muted); margin: 12px 0 0; font-size: 16px; font-family: "Special Elite", monospace; }
.tagline b { color: var(--amber); font-weight: normal; }

.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: 7px; }
input[type="text"] { width: 100%; padding: 15px 16px; font-size: 17px; font-family: inherit; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,0.3); color: var(--text); outline: none; transition: border-color .15s; }
input[type="text"]:focus { border-color: var(--crimson); }
input::placeholder { color: #6a675f; }

.btn { width: 100%; padding: 15px 18px; font-size: 16px; font-weight: 700; font-family: inherit; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--text); cursor: pointer; transition: transform .08s, filter .15s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(120deg, var(--crimson-deep), var(--crimson)); color: #fff; border: none; box-shadow: 0 8px 22px -6px rgba(229,72,77,0.5); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; }
.divider { text-align: center; margin: 18px 0; position: relative; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; position: absolute; top: 50%; width: 36%; height: 1px; background: var(--line); }
.divider::before { left: 0; } .divider::after { right: 0; }
.join-row { display: flex; gap: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: 6px; font-weight: 800; text-align: center; flex: 1; }
.join-row .btn { width: auto; padding: 0 24px; }
.error { color: var(--crimson); font-size: 14px; margin: 12px 0 0; min-height: 18px; text-align: center; }
.footer-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }
.creator-proof {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border: 1px solid rgba(224,164,59,0.48);
  border-radius: 50%;
  color: var(--amber);
  background: rgba(224,164,59,0.08);
  font-size: 12px;
  font-weight: 900;
  font-family: "Instrument Sans", sans-serif;
  cursor: help;
  vertical-align: middle;
}
.creator-proof::after {
  content: "Yes, Dominic really made this.";
  position: absolute;
  right: -4px;
  bottom: calc(100% + 9px);
  width: min(260px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid rgba(224,164,59,0.35);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(12,13,15,0.96);
  box-shadow: 0 12px 34px rgba(0,0,0,0.45);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(5px);
  transition: opacity .16s ease, transform .16s ease;
}
.creator-proof:hover::after,
.creator-proof:focus::after {
  opacity: 1;
  transform: translateY(0);
}
.invite-banner { background: rgba(229,72,77,0.12); border: 1px solid var(--crimson-deep); color: #f0b0b2; border-radius: 10px; padding: 12px 14px; text-align: center; font-size: 15px; margin-bottom: 16px; }
.invite-banner strong { letter-spacing: 4px; }

.how { margin: 22px 0 0; display: grid; gap: 12px; }
.how-step { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: rgba(255,255,255,0.02); border: 1px solid var(--line-soft); border-radius: 12px; }
.how-step .num { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 22px; color: var(--crimson); width: 28px; text-align: center; flex-shrink: 0; }
.how-step .txt { font-size: 14px; } .how-step .txt b { color: var(--amber); }

/* Room chrome */
.room-bar { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 10px 12px; background: rgba(0,0,0,0.28); border: 1px solid var(--line-soft); border-radius: 12px; }
.room-bar .rb-code, .room-bar .rb-label { font-family: "Oswald", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.room-bar .rb-code b { color: var(--amber); }
.room-bar .rb-label { color: rgba(233,226,208,0.76); font-size: 12px; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--muted); font-family: inherit; padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; transition: color .15s, border-color .15s, background .15s; white-space: nowrap; }
.icon-btn:hover { color: var(--text); border-color: var(--crimson); }
.icon-btn.on { color: var(--paper); border-color: var(--amber); background: rgba(224,164,59,0.12); }
.host-tool { border-color: rgba(224,164,59,0.36); color: var(--amber); }
.gear-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
}
.gear-btn[aria-expanded="true"] {
  color: var(--amber);
  border-color: rgba(224,164,59,0.58);
  background: rgba(224,164,59,0.12);
}
.room-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 170px;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(224,164,59,0.24);
  border-radius: 12px;
  background: rgba(8,9,11,0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 44px rgba(0,0,0,0.58);
}
.room-menu .icon-btn {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  border-color: rgba(233,226,208,0.13);
  background: rgba(233,226,208,0.04);
}
.invite-nav {
  border-color: rgba(224,164,59,0.3);
  color: var(--amber);
  background: rgba(224,164,59,0.08);
}
.room-menu-code {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(233,226,208,0.1);
  color: var(--muted);
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.room-menu-code b {
  color: var(--amber);
  letter-spacing: .22em;
}
.room-menu .icon-btn.danger { color: #f0b0b2; }

.emote-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; gap: 6px; padding: 8px 10px; border-radius: 999px; background: rgba(12,13,15,0.9); border: 1px solid var(--line); backdrop-filter: blur(8px); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.emote-bar button { width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent; font-size: 23px; cursor: pointer; transition: transform .1s, background .15s; }
.emote-bar button:hover { background: rgba(229,72,77,0.15); transform: translateY(-3px) scale(1.1); }
.emote-toggle {
  color: var(--amber);
  border: 1px solid rgba(224,164,59,0.24) !important;
  background: rgba(224,164,59,0.08) !important;
  font-family: "Oswald", sans-serif;
  font-size: 20px !important;
}
.emote-bar.collapsed .emote-option { display: none; }
.reaction-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.reaction { position: absolute; font-size: 40px; transform: translate(-50%,-50%); animation: emoteFloat 1.8s ease-out forwards; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.reaction .rname { display: block; font-size: 11px; text-align: center; color: var(--amber); margin-top: -4px; text-shadow: 0 1px 3px #000; }
@keyframes emoteFloat { 0% { opacity: 0; transform: translate(-50%,10px) scale(.4); } 15% { opacity: 1; transform: translate(-50%,-6px) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-90px) scale(.9); } }

.nudge-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(0,0,0,0.58); }
.nudge-card { width: min(420px, 100%); background: linear-gradient(180deg,var(--panel-2),var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.nudge-card h3 { margin: 0 0 8px; color: var(--amber); font-size: 20px; }
.nudge-card p { margin: 0; color: var(--text); line-height: 1.45; }
.nudge-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.invite-card input { margin-top: 10px; font-size: 14px; }
.invite-code-big {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed rgba(224,164,59,0.48);
  border-radius: 10px;
  color: var(--amber);
  font-family: "Oswald", sans-serif;
  font-size: 32px;
  letter-spacing: .22em;
  text-align: center;
}
.hq-intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: #050607;
  opacity: 0;
}
.hq-intro.run { animation: hqIntroFade 7s ease forwards; pointer-events: auto; }
.hq-intro-room {
  position: absolute;
  width: min(980px, 120vw);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(224,164,59,0.18);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(255,225,170,0.28), transparent 34%),
    linear-gradient(180deg, rgba(5,6,8,0.1), rgba(5,6,8,0.74) 72%),
    url("assets/hq-room.jpg") center / cover no-repeat;
  box-shadow: 0 30px 90px rgba(0,0,0,0.7);
  transform: scale(.62);
}
.hq-intro.run .hq-intro-room { animation: hqZoom 7s cubic-bezier(.16, 1, .3, 1) forwards; }
.hq-intro-light {
  position: absolute;
  left: 36%;
  top: -8%;
  width: 28%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,226,164,0.65), rgba(224,164,59,0.16) 38%, transparent 70%);
}
.hq-intro-table {
  position: absolute;
  left: 30%;
  top: 42%;
  width: 40%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #5b3a25 0 39%, #151313 42%, transparent 64%);
  box-shadow: 0 30px 55px rgba(0,0,0,0.7), inset 0 0 0 2px rgba(224,164,59,0.25);
}
.hq-intro-copy {
  position: relative;
  z-index: 2;
  width: min(820px, calc(100vw - 42px));
  min-height: 180px;
  text-align: center;
  text-transform: uppercase;
  transform: translateY(120px);
}
.intro-panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(38px);
  transition: opacity .34s ease, transform .34s ease;
}
.hq-intro[data-step="topic"] .intro-topic,
.hq-intro[data-step="agenda"] .intro-agenda {
  opacity: 1;
  transform: translateX(0);
}
.hq-intro-copy span {
  color: var(--crimson);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
}
.hq-intro-copy b {
  color: var(--paper);
  font-family: "Special Elite", monospace;
  font-size: clamp(22px, 4.2vw, 48px);
  letter-spacing: .01em;
  line-height: 1.18;
  text-shadow: 0 0 36px rgba(224,164,59,0.35);
}
.hq-intro-next {
  position: relative;
  z-index: 3;
  width: auto;
  min-width: 132px;
  justify-self: center;
  align-self: end;
  margin-bottom: clamp(34px, 8vh, 80px);
  padding: 12px 24px;
  border-radius: 999px;
  border-color: rgba(224,164,59,0.42);
  background: rgba(8,9,11,0.76);
  color: var(--paper);
  backdrop-filter: blur(10px);
}
@keyframes hqIntroFade {
  0% { opacity: 0; }
  12%, 72% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes hqZoom {
  0% { transform: scale(.62); filter: blur(1px); }
  68% { transform: scale(1.04); filter: blur(0); }
  100% { transform: scale(1.12); filter: blur(2px); }
}

/* Avatars */
.avatar { --sz: 54px; width: var(--sz); height: var(--sz); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: calc(var(--sz)*0.52); line-height: 1; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(224,164,59,0.5), 0 6px 14px rgba(0,0,0,0.45); background: #333; }
.av-0 { background: linear-gradient(140deg,#ff6b9d,#c9245c); } .av-1 { background: linear-gradient(140deg,#5cc8ff,#2b6fd6); }
.av-2 { background: linear-gradient(140deg,#8be08b,#2f9e44); } .av-3 { background: linear-gradient(140deg,#ffd166,#e6a72e); }
.av-4 { background: linear-gradient(140deg,#c08bff,#7b3ff2); } .av-5 { background: linear-gradient(140deg,#ff9f6b,#e8622e); }
.av-6 { background: linear-gradient(140deg,#6be0d0,#22a2a2); } .av-7 { background: linear-gradient(140deg,#ff6bd0,#c9249c); }
.av-8 { background: linear-gradient(140deg,#a0b4ff,#4f5fd6); } .av-9 { background: linear-gradient(140deg,#e0d16b,#a2921f); }
.av-10 { background: linear-gradient(140deg,#6bffa0,#1f9e5a); } .av-11 { background: linear-gradient(140deg,#ff8b8b,#c92424); }

/* Lobby */
.share-hint { color: var(--amber); font-size: 13px; text-align: center; min-height: 16px; margin: 0 0 8px; }
h2 { font-size: 22px; margin: 6px 0 12px; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px,1fr)); gap: 12px; padding: 18px 14px; margin-bottom: 18px; border-radius: var(--radius); background: rgba(0,0,0,0.24); border: 1px solid var(--line-soft); }
.seat { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; animation: rise .35s ease; }
.seat .seat-name { font-size: 13px; font-weight: 700; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .seat-name .crown { color: var(--amber); }
.seat.you .seat-name { color: var(--amber); }
.seat.empty { opacity: .3; } .seat.empty .avatar { background: transparent; box-shadow: inset 0 0 0 2px var(--line); color: var(--line); }
.seat.dim { opacity: .4; }

.settings { background: rgba(0,0,0,0.22); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.settings h3 { margin: 0 0 12px; font-size: 15px; color: var(--amber); }
.settings.locked { opacity: .8; } .settings.locked .seg-btn { pointer-events: none; }
.debug-fill {
  margin-top: 10px;
  border-style: dashed;
  color: var(--amber);
}
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.setting-row:first-of-type { margin-top: 0; }
.setting-label { font-size: 15px; font-weight: 600; }
.seg { display: inline-flex; background: rgba(0,0,0,0.3); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg-wrap { flex-wrap: wrap; justify-content: flex-end; overflow: visible; border-radius: 10px; }
.seg-btn { border: none; background: transparent; color: var(--muted); padding: 8px 12px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }
.seg-btn.active { background: var(--crimson); color: #fff; }
.setting-field { display: block; margin-top: 12px; }
.setting-field span { display: block; color: var(--amber); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.3);
  color: var(--text);
  font: inherit;
  outline: none;
}
textarea { min-height: 72px; padding: 11px 12px; resize: vertical; }
select { padding: 12px; }
textarea:focus, select:focus { border-color: var(--crimson); }
textarea:disabled { opacity: .6; }

.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.timer { font-family: "Oswald", sans-serif; font-size: 15px; font-weight: 700; color: var(--amber); }
.timer.urgent { color: var(--crimson); }
h3.section { font-size: 14px; color: var(--muted); margin: 18px 0 10px; letter-spacing: .1em; }

/* Discuss */
.prompt-card { background: linear-gradient(180deg,var(--panel-2),var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-align: center; margin-bottom: 14px; box-shadow: var(--shadow); }
.prompt-text { font-family: "Special Elite", monospace; font-size: 22px; color: var(--paper); margin-top: 6px; }
.agenda-card { background: repeating-linear-gradient(45deg, rgba(229,72,77,0.08), rgba(229,72,77,0.08) 10px, rgba(229,72,77,0.03) 10px, rgba(229,72,77,0.03) 20px), #1a1012; border: 1px dashed var(--crimson); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.agenda-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--crimson); display: flex; justify-content: space-between; }
.agenda-text { font-family: "Special Elite", monospace; font-size: 19px; color: #ffd7d8; margin-top: 8px; }
.agenda-clue { margin-top: 10px; color: #f0b0b2; font-size: 13px; line-height: 1.35; }
.phase-help { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
/* Collapsed by default so the room is the hero, not the instructions. */
.round-brief { display: block; margin: -4px 0 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(0,0,0,0.22); }
.round-brief > summary {
  cursor: pointer; list-style: none; padding: 9px 12px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); font-weight: 700;
}
.round-brief > summary::-webkit-details-marker { display: none; }
.round-brief > summary::after { content: " ▾"; color: var(--muted); }
.round-brief[open] > summary::after { content: " ▴"; }
.round-brief > div { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 10px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(0,0,0,0.22); }
.round-brief b { color: var(--amber); white-space: nowrap; }
.round-brief span { color: var(--muted); font-size: 13px; line-height: 1.35; }

/* Drop-in room art: put a file at public/assets/hq-room.jpg and it becomes the
   room. If the file is absent the layer is simply empty and the CSS-drawn
   placeholder room shows through — no code change needed either way. */
.hq-art {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: url("assets/hq-room.jpg") center / cover no-repeat;
}
.hq-room > .hq-screen, .hq-room > .hq-bottom-dock { z-index: 2; }

.chat { margin: 8px 0 16px; }
.chat-list { list-style: none; padding: 12px; margin: 0 0 10px; min-height: 120px; max-height: 260px; overflow-y: auto; background: rgba(0,0,0,0.28); border: 1px solid var(--line-soft); border-radius: 12px; }
.chat-list li { font-size: 14px; margin-bottom: 6px; line-height: 1.45; }
.chat-list li .cname { font-weight: 800; color: var(--amber); }
.chat-list li.empty { color: var(--muted); }
.clue-input { display: flex; gap: 10px; }
.clue-input input { flex: 1; } .clue-input .btn { width: auto; padding: 0 22px; }
#btn-ready.armed { background: linear-gradient(120deg,var(--good),#23b98a); color: #04201a; }

body[data-screen="discuss"] #app { max-width: 940px; }
.discuss-layout { display: grid; gap: 14px; align-items: start; }
.ops-column, .chat-column { min-width: 0; }
.ops-map {
  position: relative;
  min-height: 430px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(79, 88, 99, 0.9);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 46%, rgba(224,164,59,0.18), transparent 25%),
    radial-gradient(circle at 85% 45%, rgba(229,72,77,0.16), transparent 24%),
    linear-gradient(180deg, #11161a 0%, #090b0e 68%, #050607 100%);
  box-shadow: var(--shadow), inset 0 0 80px rgba(0,0,0,0.45);
  perspective: 900px;
}
.ops-map::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(224,164,59,0.08);
  border-radius: 10px;
  pointer-events: none;
}
.map-title {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 5;
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  letter-spacing: .22em;
  color: rgba(233,226,208,0.72);
}
.hq-room { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hq-back-wall {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 3%;
  height: 58%;
  border-radius: 0 0 44% 44% / 0 0 14% 14%;
  background:
    linear-gradient(90deg, rgba(233,226,208,0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(233,226,208,0.05), transparent),
    #101316;
  background-size: 72px 100%, auto, auto;
  box-shadow: inset 0 -80px 120px rgba(0,0,0,0.72);
}
.hq-floor {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -16%;
  height: 72%;
  border-radius: 50% 50% 0 0 / 18% 18% 0 0;
  transform: rotateX(58deg);
  transform-origin: center bottom;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(224,164,59,0.18), transparent 33%),
    repeating-radial-gradient(ellipse at 50% 45%, rgba(224,164,59,0.14) 0 2px, transparent 2px 62px),
    linear-gradient(90deg, transparent 0 49%, rgba(233,226,208,0.08) 50%, transparent 51%),
    linear-gradient(180deg, #27201a, #0b0d10 62%);
  opacity: .92;
}
.hq-light {
  position: absolute;
  top: -4%;
  width: 16%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,229,170,0.58), rgba(224,164,59,0.13) 38%, transparent 70%);
  filter: blur(2px);
  opacity: .75;
  animation: hqLamp 4s ease-in-out infinite;
}
.light-left { left: 12%; animation-delay: .4s; }
.light-mid { left: 42%; width: 18%; opacity: .9; }
.light-right { right: 12%; animation-delay: .8s; }
@keyframes hqLamp { 0%, 100% { opacity: .65; } 50% { opacity: .92; } }
.hq-screen {
  position: absolute;
  left: 37%;
  top: 10%;
  width: 26%;
  min-height: 18%;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(224,164,59,0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16,18,20,0.96), rgba(5,6,8,0.92));
  box-shadow: 0 20px 55px rgba(0,0,0,0.58), 0 0 24px rgba(229,72,77,0.1);
  text-align: center;
}
.hq-screen span, .hq-screen em {
  color: var(--crimson);
  font-family: "Oswald", sans-serif;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-style: normal;
}
.hq-screen b {
  color: var(--paper);
  font-family: "Special Elite", monospace;
  font-size: clamp(12px, 1.5vw, 17px);
  line-height: 1.2;
  font-weight: normal;
}
.hq-table {
  position: absolute;
  left: 32%;
  top: 38%;
  width: 36%;
  height: 34%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(224,164,59,0.24) 0 10%, transparent 11%),
    radial-gradient(ellipse at 50% 43%, #4b3324 0 39%, #1b1715 42%, #0c0d0f 65%, transparent 66%);
  box-shadow: 0 34px 52px rgba(0,0,0,0.66), inset 0 0 0 2px rgba(224,164,59,0.24), inset 0 0 46px rgba(0,0,0,0.8);
}
.hq-table span {
  position: absolute;
  inset: 35%;
  border-radius: 50%;
  border: 1px solid rgba(224,164,59,0.36);
  box-shadow: 0 0 22px rgba(224,164,59,0.18);
}
.hq-evidence-prop, .hq-booth-prop, .hq-desk-prop, .hq-console-prop {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(224,164,59,0.12);
  background: rgba(0,0,0,0.34);
  box-shadow: inset 0 0 24px rgba(0,0,0,0.7), 0 12px 30px rgba(0,0,0,0.42);
}
.hq-evidence-prop {
  left: 7%; top: 12%; width: 18%; height: 27%;
  background:
    linear-gradient(90deg, rgba(229,72,77,0.35) 1px, transparent 1px),
    linear-gradient(180deg, rgba(233,226,208,0.22), rgba(93,62,36,0.28)),
    rgba(70,46,26,0.5);
  background-size: 28px 100%, auto, auto;
}
.hq-booth-prop {
  right: 8%; top: 17%; width: 11%; height: 32%;
  border-color: rgba(229,72,77,0.34);
  background: linear-gradient(90deg, rgba(229,72,77,0.18), rgba(0,0,0,0.62)), #18090b;
  box-shadow: inset 0 0 24px rgba(229,72,77,0.22), 0 0 28px rgba(229,72,77,0.15);
}
.hq-desk-prop { left: 11%; top: 48%; width: 18%; height: 13%; transform: skewX(-10deg); }
.hq-console-prop {
  right: 10%;
  top: 54%;
  width: 17%;
  height: 14%;
  transform: skewX(12deg);
  border-color: rgba(229,72,77,0.26);
}
.hq-bottom-dock {
  position: absolute;
  left: 31%;
  bottom: 8%;
  width: 38%;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(224,164,59,0.22);
  border-radius: 10px;
  background: rgba(0,0,0,0.62);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.hq-bottom-dock b, .hq-bottom-dock span {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 7px;
  background: rgba(233,226,208,0.06);
}
.hq-bottom-dock b { color: var(--paper); }
.map-trace {
  position: absolute;
  z-index: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(52, 62, 72, 0.72);
  box-shadow: 0 0 0 1px rgba(136,151,164,0.08), 0 0 22px rgba(224,164,59,0.08);
}
.trace-a { left: 18%; top: 51%; width: 64%; }
.trace-b { left: 23%; top: 36%; width: 36%; transform: rotate(-28deg); transform-origin: left center; }
.trace-c { left: 48%; top: 64%; width: 34%; transform: rotate(27deg); transform-origin: left center; }
.map-packet {
  position: absolute;
  z-index: 2;
  width: 36px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(224,164,59,0.7);
  opacity: .9;
}
.packet-a { left: 32%; top: 50%; animation: packetA 4.8s linear infinite; }
.packet-b { left: 60%; top: 28%; animation: packetB 5.6s linear infinite; }
.packet-c { left: 58%; top: 66%; animation: packetC 6.2s linear infinite; }
@keyframes packetA { 0% { transform: translateX(-70px); opacity: 0; } 12%, 88% { opacity: .95; } 100% { transform: translateX(430px); opacity: 0; } }
@keyframes packetB { 0% { transform: translate(-120px, 45px) rotate(-28deg); opacity: 0; } 15%, 85% { opacity: .9; } 100% { transform: translate(230px, -120px) rotate(-28deg); opacity: 0; } }
@keyframes packetC { 0% { transform: translate(-90px, -70px) rotate(27deg); opacity: 0; } 15%, 85% { opacity: .9; } 100% { transform: translate(230px, 95px) rotate(27deg); opacity: 0; } }
.map-zone {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  z-index: 4;
  width: clamp(92px, 10vw, 124px);
  min-height: 52px;
  transform: translate(-50%, -50%);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(196,151,73,0.34);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(224,164,59,0.12), transparent 64%),
    linear-gradient(180deg, rgba(19,18,16,0.68), rgba(5,6,8,0.54));
  backdrop-filter: blur(6px) saturate(0.9);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0,0,0,0.34), inset 0 1px 0 rgba(233,226,208,0.08);
  opacity: .88;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.map-zone:hover, .map-zone.current {
  opacity: 1;
  border-color: rgba(224,164,59,0.72);
  box-shadow: 0 18px 36px rgba(0,0,0,0.46), 0 0 22px rgba(224,164,59,0.18);
}
.map-zone.selected { outline: 1px solid rgba(224,164,59,0.46); outline-offset: 3px; }
.map-zone.used { opacity: .74; }
.map-zone:active { transform: translate(-50%, -50%) scale(.98); }
.zone-briefing { width: clamp(150px, 17vw, 190px); min-height: 78px; border-radius: 999px; }
.zone-corridor { width: clamp(126px, 16vw, 180px); min-height: 48px; }
.zone-sabotage { border-color: rgba(229,72,77,0.5); }
.zone-whisper, .zone-evidence { border-color: rgba(75,214,160,0.42); }
.zone-signal {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(233,226,208,0.45);
}
.zone-label {
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.1;
  text-align: center;
}
.zone-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(224,164,59,0.18);
  box-shadow: inset 0 0 0 1px rgba(224,164,59,0.18);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}
.map-marker-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.map-player, .hq-dossier {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 3px;
  transition: left .3s ease, top .3s ease, transform .3s ease;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.48));
}
.hq-dossier {
  width: 56px;
  padding: 5px 4px 4px;
  border: 1px solid rgba(196,151,73,0.3);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(42,35,27,0.7), rgba(7,7,8,0.6)),
    rgba(11,10,9,0.64);
  box-shadow: inset 0 1px 0 rgba(233,226,208,0.08);
  opacity: .93;
}
.hq-dossier::before {
  content: "";
  width: 18px;
  height: 3px;
  margin-bottom: 2px;
  border-radius: 999px;
  background: rgba(224,164,59,0.36);
}
.hq-dossier .avatar { --sz: 28px; }
.hq-dossier:not(.you) .avatar { box-shadow: 0 0 0 2px rgba(236,231,221,0.34), 0 6px 14px rgba(0,0,0,0.45); }
.hq-dossier.you .avatar { box-shadow: 0 0 0 3px var(--amber), 0 0 18px rgba(224,164,59,0.45); }
.hq-dossier > span:not(.avatar) {
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--paper);
  font-size: 9px;
  font-weight: 800;
}
.hq-dossier small {
  display: none;
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--amber);
  font-size: 8px;
  text-transform: uppercase;
}
.map-status {
  min-height: 18px;
  margin: 8px 2px 0;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.map-action-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0,0,0,0.24);
}
.map-action-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.map-action-head b { color: var(--paper); font-family: "Oswald", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.map-action-head span { color: var(--amber); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.map-action-panel p, .map-action-empty span { margin: 8px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.map-action-panel input, .map-action-panel select { margin-bottom: 9px; }
.map-action-panel .btn { padding: 12px 14px; }
.map-action-empty { color: var(--muted); font-size: 13px; line-height: 1.35; }
.map-action-empty b { display: block; color: var(--paper); margin-bottom: 4px; }
.map-action-quote { margin-bottom: 9px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(0,0,0,0.26); font-size: 13px; line-height: 1.35; }
.map-action-quote span { color: var(--amber); font-weight: 800; }

/* Guess */
.evidence-card { background: rgba(0,0,0,0.22); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; margin: 12px 0 16px; }
.evidence-card h3 { margin: 0 0 8px; color: var(--amber); font-size: 13px; }
.evidence-list { list-style: none; padding: 0; margin: 0; max-height: 150px; overflow-y: auto; }
.evidence-list li { font-size: 13px; line-height: 1.4; margin-bottom: 6px; color: var(--text); }
.evidence-list li .cname { color: var(--amber); font-weight: 800; }
.evidence-list li.map-evidence { color: #d8ffef; }
.etag, .agenda-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-right: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(75,214,160,0.16);
  color: var(--good);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.agenda-chip { background: rgba(224,164,59,0.14); color: var(--amber); vertical-align: middle; }
.evidence-list li.empty { color: var(--muted); }
.guess-list { display: grid; gap: 10px; margin-bottom: 16px; }
.guess-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: rgba(0,0,0,0.22); border: 1px solid var(--line); border-radius: 12px; }
.guess-head { display: flex; align-items: center; gap: 12px; }
.guess-row .avatar { --sz: 40px; }
.guess-row .g-name { font-weight: 700; }

/* Custom themed dropdown (replaces the ugly native <select>) */
.cselect { position: relative; width: 100%; }
.cselect-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: 10px; background: rgba(0,0,0,0.35); color: var(--text);
  border: 1px solid var(--line); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cselect-trigger .cselect-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-trigger.placeholder .cselect-label { color: var(--muted); font-family: "Special Elite", monospace; }
.cselect-trigger:hover, .cselect.open .cselect-trigger { border-color: var(--crimson); background: rgba(0,0,0,0.5); }
.cselect-arrow { color: var(--amber); transition: transform .18s; flex-shrink: 0; font-size: 12px; }
.cselect.open .cselect-arrow { transform: rotate(180deg); }
.cselect-panel {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: #14161a; border: 1px solid var(--line); border-radius: 12px; overflow-y: auto;
  max-height: 262px; box-shadow: 0 20px 44px rgba(0,0,0,0.65);
  animation: cselectIn .14s ease;
}
@keyframes cselectIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cselect.open .cselect-panel { display: block; }
.cselect-option {
  display: block; width: 100%; text-align: left; padding: 13px 14px; border: none; background: transparent;
  color: var(--text); font-family: inherit; font-size: 14px; line-height: 1.4; cursor: pointer;
  border-bottom: 1px solid var(--line-soft); transition: background .1s;
}
.cselect-option:last-child { border-bottom: none; }
.cselect-option:hover { background: rgba(229,72,77,0.18); }
.cselect-option.selected { background: rgba(224,164,59,0.16); color: var(--amber); font-weight: 600; }

/* Completion */
.completion-list { display: grid; gap: 10px; margin-bottom: 16px; }
.completion-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: rgba(0,0,0,0.22); border: 1px solid var(--line); border-radius: 12px; }
.completion-row .avatar { --sz: 40px; }
.completion-body { flex: 1; min-width: 0; }
.vote-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.vote-btn { border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,0.28); color: var(--muted); padding: 10px; font: inherit; font-weight: 800; cursor: pointer; }
.vote-btn.picked.yes { border-color: var(--good); color: #061f18; background: var(--good); }
.vote-btn.picked.no { border-color: var(--crimson); color: #fff; background: var(--crimson); }

/* Reveal */
.reveal-stage { margin-bottom: 12px; }
.reveal-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(29,32,37,0.94), rgba(13,14,16,0.94));
  box-shadow: var(--shadow);
}
.reveal-person { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.reveal-person .avatar { --sz: 48px; }
.reveal-agenda-text { font-size: 20px; line-height: 1.35; margin: 10px 0 14px; }
.agenda-reveal-clue { color: var(--muted); font-size: 13px; line-height: 1.35; margin: -4px 0 12px; }
.reveal-verdict { display: grid; gap: 8px; margin: 12px 0; }
.reveal-verdict span { display: inline-flex; width: fit-content; max-width: 100%; padding: 7px 9px; border-radius: 999px; background: rgba(0,0,0,0.26); font-size: 12px; font-weight: 800; }
.receipt-block { margin-top: 12px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(0,0,0,0.2); }
.receipt-block h3, .award-board h3 { margin: 0 0 8px; color: var(--amber); font-size: 13px; }
.detective-line { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.reveal-controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 10px 0 14px; }
.reveal-controls .icon-btn { width: 100%; }
.award-board { display: grid; gap: 8px; margin: 12px 0 16px; }
.round-recap {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(224,164,59,0.24);
  border-radius: 12px;
  background: rgba(224,164,59,0.07);
}
.round-recap h3 { margin: 0; color: var(--amber); font-size: 13px; }
.recap-grid { display: grid; gap: 8px; }
.recap-grid div { padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(0,0,0,0.18); }
.recap-grid b { display: block; color: var(--paper); font-size: 12px; margin-bottom: 3px; }
.recap-grid span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.award-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(224,164,59,0.26); border-radius: 10px; background: rgba(224,164,59,0.08); }
.award-item .avatar { --sz: 34px; }
.award-item b { display: block; color: var(--paper); font-size: 13px; }
.award-item span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.feedback-card {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(75,214,160,0.24);
  border-radius: 12px;
  background: rgba(75,214,160,0.06);
}
.feedback-card h3 { margin: 0; color: var(--good); font-size: 13px; }
.feedback-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feedback-summary span { padding: 8px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(0,0,0,0.18); color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.feedback-form { display: grid; gap: 9px; }
.feedback-form label span { display: block; margin-bottom: 5px; color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.feedback-form input, .feedback-form select { padding: 11px 12px; font-size: 14px; }
.feedback-form .btn { padding: 12px 14px; }
.feedback-done { padding: 10px 12px; border: 1px solid rgba(75,214,160,0.3); border-radius: 9px; color: #d8ffef; background: rgba(75,214,160,0.08); font-size: 13px; }
.moment-list { display: grid; gap: 7px; }
.moment-list div { padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(0,0,0,0.18); }
.moment-list b { display: block; color: var(--paper); font-size: 12px; margin-bottom: 2px; }
.moment-list span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.match-case-file {
  display: grid;
  gap: 14px;
  max-width: 920px;
  margin: 0 auto 14px;
  padding: 16px;
  border: 1px solid rgba(224,164,59,0.28);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 7px 100%,
    linear-gradient(180deg, rgba(31,34,39,0.95), rgba(11,12,14,0.96));
  box-shadow: 0 24px 70px rgba(0,0,0,0.62);
}
.match-winner {
  padding: 18px;
  border: 1px solid rgba(224,164,59,0.3);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 0%, rgba(224,164,59,0.2), rgba(0,0,0,0.18) 58%);
  text-align: center;
}
.match-winner span {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.match-winner h3 {
  margin: 0;
  color: var(--paper);
  font-family: "Oswald", sans-serif;
  font-size: clamp(34px, 7vw, 74px);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.match-winner p { margin: 8px 0 0; color: var(--muted); }
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.case-grid div {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
}
.case-grid b {
  display: block;
  margin-bottom: 5px;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.case-grid span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.reveal-agendas { list-style: none; padding: 0; margin: 0 0 8px; }
.reveal-agendas li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: rgba(0,0,0,0.22); border: 1px solid var(--line-soft); border-radius: 12px; margin-bottom: 8px; }
.reveal-agendas .avatar { --sz: 40px; }
.reveal-agendas .ra-body { flex: 1; }
.reveal-agendas .ra-name { font-weight: 800; color: var(--amber); }
.reveal-agendas .ra-text { font-family: "Special Elite", monospace; font-size: 15px; color: var(--paper); margin: 3px 0; }
.reveal-agendas .ra-detect { font-size: 12px; color: var(--muted); }
.reveal-agendas .ra-detect.hidden { color: var(--good); }
.reveal-agendas .ra-complete { font-size: 12px; font-weight: 800; margin-top: 6px; }
.reveal-agendas .ra-complete.done { color: var(--good); }
.reveal-agendas .ra-complete.failed { color: var(--crimson); }
.reveal-agendas .ra-complete.contested { color: var(--amber); }

/* Circuit background retired — the HQ art is the permanent look. */
#ops-bg { display: none !important; }
/* Leftover tech-line / data-packet decoration that sat ON TOP of the room art. */
.map-trace, .map-packet, .map-title { display: none !important; }

/* Simple mode: stations off -> hide the meaningless per-player zone label. */
body.no-stations .hq-dossier small { display: none; }

/* ===== How to play modal ===== */
.howto-modal { position: fixed; inset: 0; z-index: 96; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.62); backdrop-filter: blur(4px); }
.howto-card {
  position: relative; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.9);
}
.howto-card .stamp { margin-bottom: 10px; }
.howto-card h2 { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; color: var(--paper); }
.howto-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 10px; }
.howto-steps li { font-size: 14px; line-height: 1.45; color: var(--text); }
.howto-steps b { color: var(--amber); }
.howto-steps em { color: var(--paper); font-style: italic; }
.howto-stations { font-size: 13px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.howto-card .btn-primary { width: 100%; }

/* ===== Opened station view =====
   Full-screen close-up of a station. Backdrop is the generated art; all live
   controls render as DOM on top of it. */
.station-view { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 20px; }
.station-backdrop {
  position: absolute; inset: 0; background-position: center; background-size: cover;
  background-repeat: no-repeat; background-color: #0b0c0e;
}
.station-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(0,0,0,.66) 100%),
    linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 34%, rgba(0,0,0,.78) 100%);
}
.station-frame {
  position: relative; z-index: 2; width: min(560px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; gap: 12px;
}
.station-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.station-signal { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--crimson); font-weight: 700; }
.station-title { font-family: "Oswald", sans-serif; font-size: 26px; margin: 2px 0 0; color: var(--paper); text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.station-head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.station-timer { font-family: "Oswald", sans-serif; font-weight: 700; color: var(--amber); font-size: 15px; }
.station-close {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 15px;
  background: rgba(10,11,13,.72); border: 1px solid var(--line); color: var(--text);
  backdrop-filter: blur(8px); transition: border-color .15s, color .15s;
}
.station-close:hover { border-color: var(--crimson); color: #fff; }
.station-body { overflow-y: auto; }
.station-body .map-action-panel {
  background: rgba(10,11,13,.82); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: 0 26px 60px -18px rgba(0,0,0,.9);
}
body.station-open { overflow: hidden; }

/* ===== Spotlight Table broadcast ===== */
.spotlight-panel {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 58;
  width: min(560px, calc(100vw - 36px));
  pointer-events: none;
}
.spotlight-card {
  pointer-events: auto;
  border: 1px solid rgba(224,164,59,0.36);
  border-radius: 14px;
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(224,164,59,0.16), transparent 72%),
    linear-gradient(180deg, rgba(17,18,20,0.9), rgba(5,6,8,0.88));
  box-shadow: 0 24px 70px -24px rgba(0,0,0,0.96), inset 0 1px 0 rgba(233,226,208,0.08);
  backdrop-filter: blur(14px) saturate(1.05);
  overflow: hidden;
}
.spotlight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 8px;
  border-bottom: 1px solid rgba(233,226,208,0.08);
}
.spotlight-head span,
.spotlight-question span,
.spotlight-answer span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 900;
}
.spotlight-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--paper);
}
.spotlight-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.38);
  color: var(--muted);
  cursor: pointer;
}
.spotlight-close:hover { color: #fff; border-color: var(--amber); }
.spotlight-body { display: grid; gap: 12px; padding: 14px 16px 16px; }
.spotlight-question,
.spotlight-answer,
.spotlight-pending {
  border: 1px solid rgba(233,226,208,0.1);
  border-radius: 11px;
  background: rgba(0,0,0,0.23);
  padding: 12px;
}
.spotlight-question p,
.spotlight-answer p {
  margin: 0;
  color: var(--paper);
  font-family: "Special Elite", monospace;
  font-size: 17px;
  line-height: 1.35;
}
.spotlight-answer span { color: var(--good); }
.spotlight-pending {
  color: var(--muted);
  font-weight: 800;
}
.spotlight-answer-form {
  display: grid;
  gap: 10px;
}
.spotlight-answer-form textarea {
  min-height: 84px;
  resize: vertical;
  padding: 12px 13px;
  font-size: 15px;
  line-height: 1.35;
}
.sabotage-panel {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 57;
  width: min(520px, calc(100vw - 36px));
  gap: 5px;
  padding: 13px 16px;
  border: 1px solid rgba(229,72,77,0.48);
  border-radius: 13px;
  background:
    radial-gradient(360px 150px at 50% 0%, rgba(229,72,77,0.18), transparent 72%),
    linear-gradient(180deg, rgba(22,8,10,0.9), rgba(5,6,8,0.84));
  box-shadow: 0 22px 70px -24px rgba(229,72,77,0.7), inset 0 1px 0 rgba(233,226,208,0.08);
  backdrop-filter: blur(13px);
  text-align: center;
}
.sabotage-panel span,
.chat-tag {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--crimson);
  font-weight: 900;
}
.sabotage-panel b {
  color: var(--paper);
  font-family: "Special Elite", monospace;
  font-size: 16px;
  line-height: 1.25;
}
.sabotage-panel small { color: var(--muted); }
.chat-tag {
  display: inline-flex;
  margin-right: 7px;
  padding: 2px 6px;
  border: 1px solid rgba(229,72,77,0.28);
  border-radius: 999px;
  background: rgba(229,72,77,0.08);
}

/* ===== Reveal theatre: dark room + spotlight + classified dossier ===== */
#theatre-light {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  transition: opacity .9s ease;
  background:
    radial-gradient(560px 360px at 50% 18%, rgba(255,226,160,0.22), transparent 60%),
    radial-gradient(780px 520px at 50% 40%, rgba(224,164,59,0.14), transparent 64%),
    radial-gradient(circle at 50% 28%, transparent 24%, rgba(0,0,0,0.82) 78%);
}
body[data-screen="reveal"] #theatre-light { opacity: 1; }
body[data-screen="reveal"] #app { max-width: 980px; }
body[data-screen="reveal"] h2.center {
  color: var(--paper);
  text-shadow: 0 0 28px rgba(224,164,59,0.22);
}

/* The reveal card becomes a classified file */
.reveal-card { position: relative; overflow: hidden; }
body[data-screen="reveal"] .reveal-card {
  border: 1px solid #4a4335;
  background:
    radial-gradient(520px 240px at 52% 0%, rgba(224,164,59,0.09), transparent 70%),
    linear-gradient(180deg, rgba(233,226,208,0.05), rgba(0,0,0,0.25)),
    repeating-linear-gradient(90deg, rgba(233,226,208,0.02) 0 2px, transparent 2px 6px),
    #15161a;
  box-shadow: 0 26px 60px -22px rgba(0,0,0,.9), inset 0 1px 0 rgba(233,226,208,.06);
}
/* punched-file tab */
body[data-screen="reveal"] .reveal-card::before {
  content: "CLASSIFIED"; position: absolute; top: 0; left: 0;
  font-family: "Oswald", sans-serif; font-size: 10px; letter-spacing: .22em;
  color: #0d0e10; background: var(--amber); padding: 3px 10px 3px 12px;
  border-bottom-right-radius: 10px;
}
body[data-screen="reveal"] .reveal-person { margin-top: 16px; }
.dossier-file { padding: 18px; }
.dossier-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Oswald", sans-serif;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dossier-subject .avatar { --sz: 58px; }
.dossier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 14px;
  align-items: stretch;
}
.dossier-main {
  padding: 14px;
  border: 1px solid rgba(224,164,59,0.2);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(224,164,59,0.07), rgba(0,0,0,0.16)),
    rgba(0,0,0,0.18);
}
.file-label {
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.guess-ledger {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0,0,0,0.24);
}
.guess-ledger h3 { margin: 0 0 8px; color: var(--amber); font-size: 13px; }
.guess-ledger ul { list-style: none; display: grid; gap: 7px; padding: 0; margin: 0; }
.guess-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.guess-line .avatar { --sz: 24px; }
.guess-line span { min-width: 0; }
.guess-line b { color: var(--paper); }
.guess-line.correct { border-color: rgba(75,214,160,0.24); color: #d8ffef; }
.guess-line.wrong { border-color: rgba(229,72,77,0.2); }
.guess-line.empty { display: block; }
.receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.reveal-dossier-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}
.reveal-dossier-rail.locked {
  grid-template-columns: 1fr;
}
.shared-reveal-status {
  padding: 10px 12px;
  border: 1px dashed rgba(224,164,59,0.42);
  border-radius: 10px;
  background: rgba(224,164,59,0.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.dossier-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.dossier-tab:hover, .dossier-tab.active {
  border-color: rgba(224,164,59,0.62);
  color: var(--paper);
  background: rgba(224,164,59,0.1);
}
.dossier-tab.done.active { box-shadow: inset 0 -2px 0 var(--good); }
.dossier-tab.failed.active { box-shadow: inset 0 -2px 0 var(--crimson); }
.dossier-tab.contested.active { box-shadow: inset 0 -2px 0 var(--amber); }
.dossier-tab .avatar { --sz: 30px; }
.dossier-tab-body { min-width: 0; display: grid; gap: 2px; }
.dossier-tab-body b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--paper);
  font-size: 13px;
}
.dossier-tab-body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}

/* Redaction bar that wipes off the agenda text */
.redact-wrap { position: relative; display: block; }
.redact-bar {
  position: absolute; inset: -2px -4px; background: #0b0c0e;
  transform-origin: left center; border-radius: 3px; z-index: 2;
}
.redact-bar::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, #14161a 0 12px, #0b0c0e 12px 22px);
  opacity: .9; border-radius: 3px;
}
.cinematic-in { animation: dossierLift .48s cubic-bezier(.16, 1, .3, 1) both; }
.cinematic-in .reveal-person { animation: dossierSlide .34s ease-out .14s both; }
.cinematic-in .reveal-verdict > * { animation: dossierChip .28s ease-out .42s both; }
.cinematic-in .receipt-block li,
.cinematic-in .detective-line,
.cinematic-in .guess-line { animation: dossierSlide .26s ease-out .52s both; }
.cinematic-in .redact-bar { animation: redactReveal .58s ease-in-out .28s forwards; }
.cinematic-in .reveal-stamp { animation: stampSlam .42s cubic-bezier(.18, 1.7, .3, 1) .7s both; }
@keyframes dossierLift {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dossierSlide {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes dossierChip {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes redactReveal {
  to { transform: scaleX(0); }
}
@keyframes stampSlam {
  from { opacity: 0; transform: rotate(-34deg) scale(2.4); }
  to { opacity: .92; transform: rotate(-12deg) scale(1); }
}

/* Rubber stamp */
.reveal-stamp {
  position: absolute; top: 54px; right: 12px; z-index: 3; pointer-events: none;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .14em;
  padding: 6px 12px; border-radius: 6px; transform: rotate(-12deg);
  border: 3px solid currentColor; opacity: .92;
  text-transform: uppercase;
}
.reveal-stamp.done { color: var(--good); box-shadow: 0 0 22px rgba(75,214,160,.28); }
.reveal-stamp.failed { color: var(--crimson); box-shadow: 0 0 22px rgba(229,72,77,.28); }
.reveal-stamp.contested { color: var(--amber); box-shadow: 0 0 22px rgba(224,164,59,.28); }

@media (prefers-reduced-motion: reduce) {
  #theatre-light { transition: none; }
}

.player-list { list-style: none; padding: 0; margin: 0 0 16px; }
.player-list li { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.22); border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; font-size: 16px; }
.player-list li .avatar { --sz: 34px; } .player-list li .pl-name { flex: 1; }
.player-list li .score { font-family: "Oswald", sans-serif; font-weight: 700; color: var(--amber); }
.stack { display: grid; gap: 10px; }

@media (min-width: 780px) {
  .discuss-layout { grid-template-columns: minmax(0, 1.35fr) minmax(286px, .65fr); }
  .chat-list { max-height: 430px; }
}

/* ===== Desktop: fullscreen headquarters =====
   The stage keeps the artwork's own 3:2 ratio but is scaled to COVER the
   viewport, so the station hotspots (positioned in % of the stage) stay glued
   to the art with no JS. The viewport crops the overflow. UI becomes floating
   panels over the room instead of a scrolling column. */
@media (min-width: 900px) {
  body[data-screen="discuss"] { overflow: hidden; }
  body[data-screen="discuss"]::before {
    background:
      radial-gradient(740px 520px at 50% 22%, rgba(224,164,59,0.08), transparent 60%),
      radial-gradient(580px 460px at 88% 58%, rgba(229,72,77,0.08), transparent 60%),
      linear-gradient(180deg, #08090b 0%, #050607 58%, #020203 100%);
    filter: none;
  }
  /* No entrance transform here: a transformed ancestor becomes the containing
     block for position:fixed children and would break the whole stage layout. */
  body[data-screen="discuss"] #screen-discuss { animation: none; transform: none; }
  body[data-screen="discuss"] #app {
    max-width: none; padding: 0; min-height: 100vh;
  }
  body[data-screen="discuss"] .round-brief { display: none; }
  body[data-screen="discuss"] .discuss-layout { display: block; gap: 0; }

  body[data-screen="discuss"] .ops-map {
    position: fixed; top: 50%; left: 50%;
    /* CONTAIN, not cover: show the whole 3:2 artwork so nothing is cropped and
       every hotspot lines up. Any leftover edge reads as a cinematic bar. */
    width: min(100vw, 150vh);
    height: auto; aspect-ratio: 3 / 2;
    transform: translate(-50%, -50%);
    min-height: 0; border: none; border-radius: 0; box-shadow: none;
    z-index: 0;
  }
  body[data-screen="discuss"] .ops-map::before { display: none; }

  /* Floating chrome */
  body[data-screen="discuss"] .room-bar {
    position: fixed; top: 14px; right: 16px; left: auto; transform: none;
    width: auto; margin: 0; z-index: 24;
    flex-wrap: nowrap; gap: 10px; padding: 7px 8px 7px 13px;
    border-radius: 999px;
    background: rgba(10,11,13,.72); backdrop-filter: blur(10px);
  }
  body[data-screen="discuss"] .room-bar .rb-code {
    font-size: 12px;
    letter-spacing: .16em;
    white-space: nowrap;
  }
  body[data-screen="discuss"] .room-menu {
    top: calc(100% + 10px);
    right: 0;
  }
  body[data-screen="discuss"] .prompt-card {
    display: none;
  }
  body[data-screen="discuss"] .agenda-card {
    display: none;
  }
  /* SECURE COMMS */
  body[data-screen="discuss"] .chat-column {
    position: fixed;
    left: max(18px, calc((100vw - min(100vw, 150vh)) / 2 + 16px));
    bottom: 18px;
    width: min(330px, 28vw);
    z-index: 18;
  }
  body[data-screen="discuss"] .chat-column .chat {
    background:
      radial-gradient(circle at 22% 0%, rgba(224,164,59,0.09), transparent 42%),
      rgba(10,11,13,.76);
    backdrop-filter: blur(11px);
    border: 1px solid rgba(126,138,151,0.48);
    border-radius: 12px;
    padding: 10px;
    margin: 0 0 10px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.48), inset 0 1px 0 rgba(233,226,208,0.05);
  }
  body[data-screen="discuss"] .chat-list { min-height: 96px; max-height: 24vh; background: transparent; border: none; }
  body[data-screen="discuss"] .chat-column #btn-ready {
    border-radius: 12px;
    box-shadow: 0 14px 34px -14px rgba(229,72,77,0.8);
  }
  /* Station panel */
  body[data-screen="discuss"] .ops-column {
    position: fixed; right: 18px; bottom: 18px; width: min(340px, 30vw); z-index: 18;
  }
  body[data-screen="discuss"] .map-status {
    display: none;
  }
  body[data-screen="discuss"] .map-action-panel { max-height: 42vh; overflow-y: auto; }
  /* Park quick reactions in the right gutter so the table stays readable. */
  body[data-screen="discuss"] .emote-bar {
    left: auto;
    right: max(12px, calc((100vw - min(100vw, 150vh)) / 2 - 72px));
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    border-radius: 999px;
  }
  body[data-screen="discuss"] .hq-bottom-dock,
  body[data-screen="discuss"] .map-trace,
  body[data-screen="discuss"] .map-packet {
    display: none;
  }
  body[data-screen="discuss"] .hq-screen {
    left: 40.5%;
    top: 9.5%;
    width: 19%;
    min-height: 14.5%;
    padding: 10px 12px;
    border-color: rgba(75,214,160,0.18);
    background: linear-gradient(180deg, rgba(2,16,19,0.44), rgba(2,7,9,0.52));
    box-shadow: inset 0 0 20px rgba(75,214,160,0.08), 0 18px 48px rgba(0,0,0,0.3);
  }
  body[data-screen="discuss"] .hq-screen span,
  body[data-screen="discuss"] .hq-screen em {
    color: rgba(229,72,77,0.72);
  }
  body[data-screen="discuss"] .hq-screen b {
    font-size: clamp(10px, 1.12vw, 15px);
    line-height: 1.18;
    text-shadow: 0 0 12px rgba(75,214,160,0.12);
  }
}

@media (max-width: 820px) {
  /* Mobile browser chrome changes 100vh while scrolling. Keep the HQ art on a
     stable oversized canvas so rubber-band scroll never exposes a black gap. */
  #ops-bg,
  body::before,
  body::after {
    top: -10lvh;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100vw;
    height: 120lvh;
    min-height: 120lvh;
  }
  body::before {
    background-size: auto, auto, auto, cover;
    background-position: center;
  }
}

@media (max-width: 560px) {
  .setting-row { display: grid; align-items: start; }
  .seg { width: 100%; }
  .seg-wrap { justify-content: stretch; }
  .seg-btn { flex: 1; padding-left: 8px; padding-right: 8px; }
  .feedback-summary { grid-template-columns: 1fr; }
  body[data-screen="reveal"] #app { padding-left: 12px; padding-right: 12px; }
  .dossier-file { padding: 14px; }
  .dossier-topline { display: grid; gap: 4px; }
  .dossier-grid, .receipt-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .match-case-file { padding: 12px; }
  .match-winner h3 { font-size: 34px; }
  .reveal-dossier-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .dossier-tab {
    min-width: 180px;
    scroll-snap-align: start;
  }
  .reveal-stamp { top: 60px; right: 10px; font-size: 13px; }
  body[data-screen="discuss"] #app { padding-left: 12px; padding-right: 12px; }
  /* Compact the header stack so the stage is visible without scrolling. */
  .room-bar { padding: 6px 8px; gap: 5px; margin-bottom: 10px; flex-wrap: nowrap; }
  .room-bar > * { min-width: 0; flex: 0 1 auto; }
  .room-bar .icon-btn { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
  .room-bar .rb-code { font-size: 11px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prompt-card { padding: 10px 12px; margin-bottom: 10px; }
  .prompt-text { font-size: 15px; line-height: 1.25; margin-top: 3px; }
  .agenda-card { padding: 10px 12px; margin-bottom: 10px; }
  .agenda-label { font-size: 11px; }
  .agenda-text { font-size: 14px; line-height: 1.3; margin-top: 4px; }
  .agenda-clue { font-size: 11px; margin-top: 4px; }
  /* Letterboxed cinematic stage: keep the wide room aspect on portrait and let
     the surrounding UI stack beneath it, rather than squashing it into a tall box. */
  .ops-map { min-height: 0; aspect-ratio: 3 / 2; }
  /* Prompt already shows at the top of the page on mobile — drop the duplicate
     wall panel and the dead bottom dock so the room breathes. */
  .hq-screen { display: none !important; }
  .hq-bottom-dock { display: none !important; }
  .hq-table { left: 23%; top: 40%; width: 54%; height: 28%; }
  .hq-evidence-prop { left: 4%; top: 11%; width: 23%; height: 24%; }
  .hq-booth-prop { right: 5%; top: 17%; width: 15%; height: 27%; }
  .hq-desk-prop { left: 7%; top: 50%; width: 22%; }
  .hq-console-prop { right: 6%; top: 55%; width: 23%; }
  /* Chips shrink so seven stations + player dossiers fit the shorter stage
     without colliding (they overlapped badly at the old size). */
  .map-zone { width: 74px; min-height: 38px; padding: 4px 3px; border-radius: 8px; }
  .zone-briefing { width: 88px; min-height: 44px; }
  .zone-corridor { width: 80px; min-height: 34px; }
  .zone-signal { display: none; }
  .zone-label { font-size: 9.5px; line-height: 1.12; }
  .zone-count { font-size: 9px; }
  .hq-dossier { width: 38px; padding: 2px; font-size: 8px; }
  .hq-dossier small { display: none; }
  .hq-dossier .avatar { --sz: 22px; }
  .hq-dossier > span:not(.avatar) { max-width: 44px; font-size: 8px; }
  .map-zone { width: 64px; min-height: 32px; padding: 4px 3px; }
  .zone-briefing { width: 76px; min-height: 38px; }
  /* On the small stage, chips and player cards can't both fit without
     colliding. Stations on -> show chips (they're the interactive part).
     Simple mode (stations off) -> show player cards instead. */
  body:not(.no-stations) .hq-dossier { display: none; }
  /* Spread the centre-column chips so they don't stack on the table.
     (Positions are set inline via --y, so these need !important to win.) */
  .zone-vote { --y: 11 !important; }
  .zone-briefing { --y: 49 !important; }
  .zone-archive { --y: 85 !important; }
  .spotlight-panel {
    left: 12px;
    right: 12px;
    bottom: 76px;
    width: auto;
    transform: none;
  }
  .spotlight-head h3 { font-size: 14px; }
  .spotlight-question p,
  .spotlight-answer p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .map-packet, .hq-light, .hq-intro.run, .hq-intro.run .hq-intro-room { animation: none; }
  .map-player, .hq-dossier, .map-zone { transition: none; }
}
