/* ====================================================================
   v27 — Brutalist Editorial Poster
   ─────────────────────────────────────────────────────────────────────
   Стилистика по референсам пользователя (Behance:
   AMPAROO, Defwise WINNERS, KES, Estral, Six Invitational):
   — Pure black + off-white + single crimson accent
   — MASSIVE uppercase display typography (заполняет полэкрана)
   — Halftone/grunge texture, не gradient murk
   — Sticker-tape diagonal stamps на углах
   — Heavy black borders, zero soft shadows
   — Mugshot-style portraits с height markers
   — Numbered chapter labels (01, 02, 03)
   ==================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

/* ────────────────────────────────────────────────────────────────
   CRITICAL: the [hidden] attribute MUST always win over any
   display rule. Many components (.night-frame, .night-zero-frame,
   role panels) declare display:flex which otherwise overrides the
   UA [hidden]{display:none}, leaking secret role content to every
   player. This single rule enforces role isolation globally.
   ──────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

:root {
  /* ━━━━━ Palette: black + bone + crimson ━━━━━ */
  --black:         #000000;
  --black-2:       #0A0A0A;
  --black-3:       #141414;
  --ink:           #1A1A1A;
  --ink-2:         #232323;
  --ink-3:         #2C2C2C;
  --ink-4:         #3A3A3A;

  --bone:          #F5F0EB;
  --bone-2:        #E8E2D8;
  --bone-3:        #C9C2B6;
  --bone-mute:     #8B847B;
  --bone-faint:    #5C5852;
  --bone-ghost:    #353330;

  /* SINGLE ACCENT — crimson */
  --crimson:       #E63946;
  --crimson-bright:#FF4756;
  --crimson-deep:  #B82530;
  --crimson-tint:  rgba(230, 57, 70, 0.10);
  --crimson-tint-2:rgba(230, 57, 70, 0.20);
  --crimson-edge:  rgba(230, 57, 70, 0.50);

  --warn:          #E8A33E;
  --warn-tint:     rgba(232, 163, 62, 0.12);
  /* "success/city" semantic — NO green per design. Use cool bone/slate. */
  --success:       #C9C2B6;
  --success-tint:  rgba(201, 194, 182, 0.12);
  --dead:          #4A4A4A;

  --hairline:      rgba(245, 240, 235, 0.06);
  --hairline-mid:  rgba(245, 240, 235, 0.16);
  --hairline-bold: rgba(245, 240, 235, 0.40);

  /* Backwards-compat aliases */
  --canvas:        var(--black);
  --surface:       var(--black-2);
  --surface-2:     var(--ink);
  --surface-3:     var(--ink-2);
  --surface-4:     var(--ink-3);
  --text-bright:   var(--bone);
  --text-base:     var(--bone-2);
  --text-mute:     var(--bone-mute);
  --text-faint:    var(--bone-faint);
  --text-ghost:    var(--bone-ghost);
  --accent:        var(--crimson);
  --accent-bright: var(--crimson-bright);
  --accent-soft:   var(--crimson-deep);
  --accent-deep:   var(--crimson-deep);
  --accent-tint:   var(--crimson-tint);
  --accent-tint-2: var(--crimson-tint-2);
  --accent-edge:   var(--crimson-edge);
  --accent-glow:   rgba(230, 57, 70, 0.40);
  --danger:        var(--crimson);
  --danger-bright: var(--crimson-bright);
  --danger-tint:   var(--crimson-tint);
  --danger-edge:   var(--crimson-edge);
  --brass:         var(--bone-3);
  --brass-bright:  var(--bone);
  --brass-deep:    var(--bone-mute);
  --brass-tint:    rgba(201, 194, 182, 0.10);
  --brass-edge:    rgba(201, 194, 182, 0.40);
  --wood-edge:     var(--hairline-mid);

  /* Typography */
  --font-display:  'gg sans', 'gg sans Normal', system-ui, -apple-system, sans-serif;
  --font-medium:   'gg sans Medium', 'gg sans', system-ui, sans-serif;
  --font-semi:     'gg sans SemiBold', 'gg sans', system-ui, sans-serif;
  --font-bold:     'gg sans', system-ui, sans-serif;
  --font-extra:    'Chakra Petch', 'gg sans ExtraBold', 'gg sans', system-ui, sans-serif;
  --font-headline: 'Chakra Petch', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono Variable', 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --font-num:      'Chakra Petch', 'JetBrains Mono Variable', 'JetBrains Mono', monospace;

  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --rail-w:        440px;
  --chat-w:        440px;
  --drawer-w:      460px;

  /* Stage geometry */
  --table-radius:  clamp(280px, 32vmin, 360px);
  --seat-w:        118px;
  --seat-h:        152px;
  --avatar-seat:   42px;
  --showcase-w:    min(320px, 34vmin);
  --stage-shift:   calc((var(--chat-w) - var(--rail-w)) / 2);
}

body {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--bone-2);
  background: var(--black);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ━━━━━ DEV switcher — positioned via .dev-hud container below ━━━━━ */

/* ━━━━━ STAGE BG — black with halftone dots ━━━━━ */
.phase-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--black);
  background-image: url('./assets/bg/bg_day.jpg');
  background-size: cover;
  background-position: center;
  pointer-events: none;
  filter: grayscale(1) brightness(0.30) contrast(1.4);
  opacity: 0.55;
}
/* Ceremonial phases — bg image clearly visible (cinematic, no grayscale) */
body[data-scn="lobby"] .phase-bg,
body[data-scn="starting"] .phase-bg,
body[data-scn="role-deal"] .phase-bg,
body[data-scn="finished"] .phase-bg,
body[data-scn="last-word"] .phase-bg,
body[data-scn="best-move"] .phase-bg {
  filter: saturate(1.0) brightness(0.72) contrast(1.05);
  opacity: 1;
}
/* Halftone dots overlay — newspaper print feel */
.phase-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, 0.08) 0.6px,
      transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
}
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%,
      transparent 0%,
      rgba(0, 0, 0, 0.60) 70%,
      rgba(0, 0, 0, 0.95) 100%),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.85) 0%,
      transparent 18%,
      transparent 82%,
      rgba(0, 0, 0, 0.95) 100%);
}
/* Subtle vertical scan lines — print/zine feel */
.atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.018) 0px,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ━━━━━ Backdrop decorative motifs (barely visible, atmospheric) ━━━━━ */
.stage-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.stage-decor svg {
  position: absolute;
  fill: none;
  stroke: rgba(245, 240, 235, 0.06);
  stroke-width: 1;
}
/* Top-left corner: aviation-chart compass rose */
.stage-decor-compass {
  top: 60px;
  left: 30px;
  width: 120px;
  height: 120px;
}
/* Top-right corner: classified stamp marker */
.stage-decor-stamp {
  top: 70px;
  right: 30px;
  width: 80px;
  height: 80px;
  transform: rotate(-8deg);
}
/* Bottom-left: coordinate grid */
.stage-decor-grid {
  bottom: 60px;
  left: 30px;
  width: 140px;
  height: 90px;
}
/* Bottom-right: serial code */
.stage-decor-serial {
  bottom: 60px;
  right: 30px;
  width: 110px;
  height: 50px;
}
/* Side mid: vertical "RECORD //" caption */
.stage-decor-side {
  position: absolute;
  bottom: 50%;
  left: 16px;
  transform: rotate(-90deg) translate(50%, 0);
  transform-origin: left bottom;
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(245, 240, 235, 0.10);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ━━━━━ APP GRID ━━━━━ */
.app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr var(--chat-w);
  height: 100dvh;
  gap: 0;
}

/* ====================================================================
   LEFT: PROFILE RAIL — vertical mugshot column
   Ruler markings on left edge (как 5'2", 5'6" в AMPAROO)
   Большие numbered chapter headers
   ==================================================================== */
.profile-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--black);
  overflow-y: auto;
  z-index: 5;
  border-right: 1px solid var(--bone-3);
}
/* Ruler ticks on left edge — height markers like AMPAROO */
.profile-rail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 24px;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 23px,
    var(--bone-faint) 23px,
    var(--bone-faint) 24px,
    transparent 24px,
    transparent 47px,
    var(--bone-faint) 47px,
    var(--bone-faint) 48px,
    transparent 48px,
    transparent 95px,
    var(--bone-3) 95px,
    var(--bone-3) 96px
  );
  z-index: 1;
}
/* Vertical "PROFILE" text inscribed on left edge */
.profile-rail::after {
  content: 'PROFILE / №04 / SUBJECT_AT_TABLE';
  position: absolute;
  top: 50%;
  left: -100px;
  width: 220px;
  text-align: center;
  font-family: var(--font-extra);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--bone-mute);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  transform: rotate(-90deg);
  transform-origin: center;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
}
.profile-rail::-webkit-scrollbar { width: 4px; }
.profile-rail::-webkit-scrollbar-track { background: transparent; }
.profile-rail::-webkit-scrollbar-thumb {
  background: var(--ink-3);
}
/* Host panel: no profile ruler/inscription decoration (control surface, not dossier) */
body[data-role="host"] .profile-rail::before,
body[data-role="host"] .profile-rail::after { display: none; }
body[data-role="host"] .profile-rail-header { padding-left: 18px; }
body[data-role="host"] .profile-rail-header::before { left: 18px; }

/* Top banner — минималистичный header */
.profile-rail-header {
  position: relative;
  padding: 18px 18px 16px 32px;
  border-bottom: 1px solid var(--bone-3);
  background: var(--black);
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 3;
}
.profile-rail-header::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 32px;
  width: 56px;
  height: 1px;
  background: var(--crimson);
}
.profile-rail-header-left {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--bone);
}
.profile-rail-header-right {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--bone-mute);
}
.profile-rail-header::after {
  display: none;
}

/* PROFILE CARD — flat, hard-edged, no rounded */
.profile-card {
  position: relative;
  padding: 18px 18px 16px 32px;
  border-bottom: 1px solid var(--ink-3);
  background: var(--black);
  z-index: 2;
}
.profile-card:hover { background: var(--black-3); }

/* Crosshair corner markers on TL + BR of each card */
.profile-card:not(.profile-hero)::before,
.profile-card:not(.profile-hero)::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
  z-index: 1;
}
.profile-card:not(.profile-hero)::before {
  top: 8px;
  left: 38px;
  border-top: 1px solid var(--bone-faint);
  border-left: 1px solid var(--bone-faint);
}
.profile-card:not(.profile-hero)::after {
  bottom: 8px;
  right: 8px;
  border-bottom: 1px solid var(--bone-faint);
  border-right: 1px solid var(--bone-faint);
}

/* Numbered chapter label — top of each card "01" "02" etc */
.profile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bone-3);
}
.profile-card-head::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--crimson);
}
.profile-card-label {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--bone);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.profile-card-label::before {
  content: counter(card-num, decimal-leading-zero);
  counter-increment: card-num;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.profile-rail { counter-reset: card-num 0; }
.profile-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

/* HERO — full-width portrait + name */
.profile-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 18px 20px 32px;
  background: var(--black);
  border-bottom: 2px solid var(--bone);
  position: relative;
}
.profile-hero::before {
  display: none;
}

/* Profile alive/dead state strip */
.profile-hero-state {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--bone-faint);
}
.profile-hero-state-text {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.profile-hero-state[data-state="dead"] { border-left-color: var(--crimson); }
.profile-hero-state[data-state="dead"] .profile-hero-state-text { color: var(--crimson-bright); }

/* Mil-spec data readout strip below hero */
.profile-hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--bone-3);
  margin-top: 2px;
}
.profile-hero-metric {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--bone-3);
}
.profile-hero-metric:last-child { border-right: none; }
.profile-hero-metric-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
  line-height: 1.2;
}
.profile-hero-metric-value {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.profile-hero-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}
.profile-hero-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  background: var(--ink);
  display: grid;
  place-items: center;
  border: 2px solid var(--bone);
  border-radius: 50%;
  /* Halftone dot pattern overlay simulating B&W mugshot */
  background-image:
    radial-gradient(circle at 30% 30%, rgba(230, 57, 70, 0.20) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(245, 240, 235, 0.06) 1px, transparent 1.5px);
  background-size: auto, 3px 3px;
}
.profile-hero-letter {
  font-family: var(--font-extra);
  font-size: 32px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 1;
}
.profile-hero-slot {
  position: absolute;
  bottom: -8px;
  left: -8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  background: var(--black);
  padding: 3px 7px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--bone);
  min-width: 32px;
  text-align: center;
}

.profile-hero-meta { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.profile-hero-name {
  font-family: var(--font-headline);
  font-size: clamp(17px, 2.0vw, 23px);
  font-weight: 700;
  color: var(--bone);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  /* Discord nicknames up to 32 chars — wrap to max 2 lines, then ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.profile-hero-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.profile-hero-role {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--bone-2);
  font-family: var(--font-headline);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.role-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
}
.role-dot[data-role="mafia"] { background: var(--crimson); }
.role-dot[data-role="don"] { background: var(--crimson-bright); }
.role-dot[data-role="commissar"] { background: var(--bone); }
.role-dot[data-role="doctor"] { background: var(--success); }
.role-name { font-weight: 800; color: var(--bone); }

/* RATING — gauge dial */
.rating-display {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
}
.rating-gauge {
  position: relative;
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
}
.rating-gauge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from -135deg,
    var(--crimson) 0%,
    var(--crimson-bright) calc(var(--gauge-p, 65) * 0.75 * 1%),
    var(--ink) calc(var(--gauge-p, 65) * 0.75 * 1%),
    var(--ink) 75%,
    transparent 75%
  );
  -webkit-mask: radial-gradient(circle, transparent 34px, #000 34px, #000 46px, transparent 46px);
  mask: radial-gradient(circle, transparent 34px, #000 34px, #000 46px, transparent 46px);
}
.rating-gauge-num {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 2;
}
.rating-gauge-tier {
  position: absolute;
  bottom: 6px;
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.20em;
  text-transform: uppercase;
  z-index: 2;
}
.rating-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rating-rank {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.rating-rank-hash {
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.rating-rank-of {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bone-mute);
  font-variant-numeric: tabular-nums;
}
.rating-priority {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.rating-priority-dot {
  width: 8px;
  height: 8px;
  background: var(--bone-mute);
}
.rating-priority-dot[data-level="3"] { background: var(--bone); }
.rating-priority-dot[data-level="4"] { background: var(--crimson-bright); }
.rating-priority-dot[data-level="5"] { background: var(--crimson); }

/* Hide deprecated rating-num styles - replaced by gauge */
.rating-num, .rating-tier { display: none; }

/* WINRATE BAR — rectangular, hard edge */
.winrate-bar {
  display: flex;
  height: 4px;
  background: var(--ink-2);
  margin-bottom: 10px;
}
.winrate-fill { height: 100%; }
.winrate-fill-w { background: var(--crimson); width: var(--p, 0); }
.winrate-fill-l { background: var(--bone-ghost); width: var(--p, 0); }
.winrate-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  font-size: 12px;
  align-items: baseline;
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.winrate-w {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.winrate-w small {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  margin-left: 4px;
  letter-spacing: 0.18em;
}
.winrate-pct {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.winrate-l {
  font-family: var(--font-num);
  font-weight: 500;
  color: var(--bone-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.winrate-l small {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-faint);
  margin-left: 4px;
  letter-spacing: 0.18em;
}

/* HISTORY — stamp-row layout */
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--ink-2);
  transition: background 120ms var(--ease-out);
}
.history-row:hover { background: var(--ink); }
.history-result {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.history-row[data-result="W"] .history-result {
  color: var(--bone);
  background: var(--crimson);
}
.history-row[data-result="L"] .history-result {
  color: var(--bone-mute);
  border: 1px solid var(--ink-3);
}
.history-row-mvp .history-result {
  color: var(--crimson-bright);
  background: var(--bone);
}

.history-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-role {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-2);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.history-mvp-tag {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--black);
  background: var(--bone);
  padding: 2px 5px;
}
.history-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.history-delta {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.history-delta-up { color: var(--crimson-bright); }
.history-delta-down { color: var(--bone-mute); }

/* CURRENT — compact stamps row */
.current-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.current-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
  background: var(--ink);
  text-align: center;
  border: 1px solid var(--ink-3);
}
.current-num {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.current-icon {
  font-size: 22px;
  line-height: 1;
  color: var(--bone-mute);
}
.current-icon[data-state="on"] { color: var(--crimson-bright); }
.current-label {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* EVENTS */
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-2);
  font-size: 13px;
}
.event-tag {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
  background: var(--ink-3);
  padding: 3px 8px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.event-text {
  color: var(--bone-2);
  font-family: var(--font-medium);
  font-size: 13px;
  font-weight: 500;
}
.event-info .event-tag { color: var(--bone); background: var(--ink-4); }
.event-wink .event-tag { color: var(--bone); background: var(--crimson); }
.event-foul .event-tag { color: var(--black); background: var(--warn); }


/* ====================================================================
   STAGE — black canvas with massive title type + table
   ==================================================================== */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 3;
  overflow: hidden;
}

/* Stage-head — newspaper-banner style */
.stage-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 2px solid var(--bone);
  background: var(--black);
  z-index: 4;
}
.stage-head-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.stage-head-right {
  display: flex;
  align-items: center;
}

.phase-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.phase-badge-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 6px 10px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.phase-badge-name {
  font-family: var(--font-extra);
  font-size: 13px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.phase-divider { display: none; }
.phase-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--bone-3);
}
.phase-meta-label {
  font-family: var(--font-extra);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--bone-mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.phase-meta-num {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.round-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--bone-3);
  color: var(--bone-mute);
}
.round-clock-icon { width: 14px; height: 14px; flex-shrink: 0; }
.round-clock-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--bone-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

/* ━━━━━ ROSTER — table with massive title typography ━━━━━ */
.roster {
  position: relative;
  flex: 1;
  display: block;
  padding: 8px 24px 100px;
  z-index: 2;
}

.roster-ring {
  position: absolute;
  left: calc(50% + var(--stage-shift));
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--table-radius) * 2 + var(--seat-w) * 1.4);
  height: calc(var(--table-radius) * 2 + var(--seat-h) * 1.2);
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 2;
}

.roster-ring > li {
  --angle: calc(-90deg + (var(--i) - 1) * (360deg / var(--n, 10)));
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--seat-w);
  height: var(--seat-h);
  margin: calc(var(--seat-h) / -2) 0 0 calc(var(--seat-w) / -2);
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--table-radius)));
  display: grid;
  place-items: center;
  z-index: 10;
}

.roster-ring > li:nth-child(1)  { z-index: 20; }
.roster-ring > li:nth-child(2)  { z-index: 19; }
.roster-ring > li:nth-child(3)  { z-index: 18; }
.roster-ring > li:nth-child(4)  { z-index: 17; }
.roster-ring > li:nth-child(5)  { z-index: 16; }
.roster-ring > li:nth-child(6)  { z-index: 17; }
.roster-ring > li:nth-child(7)  { z-index: 18; }
.roster-ring > li:nth-child(8)  { z-index: 19; }
.roster-ring > li:nth-child(9)  { z-index: 20; }
.roster-ring > li:nth-child(10) { z-index: 21; }

.roster-ring > li > .seat,
.roster-ring > li > .seat-name {
  transform: rotate(calc(-1 * var(--angle)));
}

/* SEAT — BIG SLOT JERSEY card (Six Invitational scoreboard style)
   Slot number is the dominant visual element — not avatar */
.seat {
  position: relative;
  width: var(--seat-w);
  height: var(--seat-h);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
  font-family: var(--font-display);
  border: 1.5px solid var(--bone-3);
  overflow: visible;
  /* Photographic frame inset */
  box-shadow:
    inset 0 0 0 3px var(--ink),
    inset 0 0 0 4px var(--bone-faint);
}
.seat:hover {
  border-color: var(--bone);
  background: var(--ink-2);
}
/* Catalog tag — 4px crimson on top edge */
.seat::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 22px;
  height: 4px;
  background: var(--crimson);
  z-index: 11;
}

/* Hide eyebrow strip — slot number alone is the header */
.seat-eyebrow { display: none; }

/* HUGE jersey-style slot number FILLS top of card */
.seat-num {
  position: relative;
  top: 0;
  right: auto;
  width: 100%;
  font-family: var(--font-headline);
  font-size: 44px;
  font-weight: 700;
  color: var(--bone);
  background: transparent;
  padding: 18px 0 4px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  border: none;
  text-align: center;
  z-index: 2;
  transform: none;
  border-radius: 0;
  line-height: 1;
}

/* Avatar — small circular accent */
.seat-avatar {
  width: 38px;
  height: 38px;
  background: var(--ink-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-extra);
  font-size: 14px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 4px 0 8px;
  border: 1.5px solid var(--bone-3);
  position: relative;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(245, 240, 235, 0.10) 1px, transparent 1.5px);
  background-size: 4px 4px;
  z-index: 2;
}

/* NAME — accommodates Discord max 32 chars via ellipsis */
.seat-name {
  font-family: var(--font-headline);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bone);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  position: static;
  margin: 0 0 8px;
  padding: 0 6px;
  max-width: 100%;
}
/* Bottom side-bar — broadcast scoreboard style */
.seat::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ink-3);
  z-index: 1;
}

/* Speaking — keeps row alignment, BIG crimson side-bar bottom */
.roster-ring > li[data-state="speaking"] .seat {
  border-color: var(--crimson);
  background: var(--ink);
  box-shadow:
    inset 0 0 0 3px var(--ink),
    inset 0 0 0 4px var(--crimson),
    0 0 0 3px var(--crimson),
    4px 4px 0 var(--black);
  animation: seat-speaking-pulse 2.4s var(--ease-out) infinite;
}
@keyframes seat-speaking-pulse {
  0%, 100% { transform: scale(1.06); }
  50% { transform: scale(1.10); }
}
.roster-ring > li[data-state="speaking"] {
  z-index: 25;
}
.roster-ring > li[data-state="speaking"] .seat::before {
  background: var(--bone);
  width: 100%;
  height: 6px;
  left: 0;
  top: 0;
}
.roster-ring > li[data-state="speaking"] .seat-num {
  color: var(--crimson-bright);
}
.roster-ring > li[data-state="speaking"] .seat-avatar {
  border-color: var(--crimson);
  background: var(--crimson-deep);
}
.roster-ring > li[data-state="speaking"] .seat-name {
  color: var(--crimson-bright);
}
.roster-ring > li[data-state="speaking"] .seat::after {
  background: var(--crimson);
  height: 5px;
}

/* Nominated — danger frame */
.roster-ring > li[data-state="nominated"] .seat {
  border-color: var(--crimson);
  border-style: solid;
  box-shadow:
    inset 0 0 0 3px var(--ink),
    inset 0 0 0 4px var(--crimson-edge);
}
.roster-ring > li[data-state="nominated"] .seat::before {
  background: var(--crimson);
  width: 100%;
  height: 4px;
  left: 0;
  top: 0;
}
.roster-ring > li[data-state="nominated"] .seat-num {
  color: var(--crimson-bright);
}
.roster-ring > li[data-state="nominated"] .seat-name {
  color: var(--crimson-bright);
}
.roster-ring > li[data-state="nominated"] .seat::after {
  background: var(--crimson);
}

/* Dead */
.roster-ring > li[data-state="dead"] .seat {
  border-color: var(--ink-3);
  opacity: 0.40;
  filter: grayscale(1);
  box-shadow:
    inset 0 0 0 3px var(--ink),
    inset 0 0 0 4px var(--ink-3);
}
.roster-ring > li[data-state="dead"] .seat::before {
  background: var(--ink-3);
}
.roster-ring > li[data-state="dead"] .seat-num {
  color: var(--bone-faint);
}
.roster-ring > li[data-state="dead"] .seat-avatar {
  color: var(--bone-faint);
  border-color: var(--ink-3);
}
.roster-ring > li[data-state="dead"] .seat-name {
  color: var(--bone-faint);
  text-decoration: line-through;
}
.roster-ring > li[data-state="dead"] .seat::after {
  background: var(--ink-3);
}

/* ━━━━━ SHOWCASE — minimalist stopwatch dial ━━━━━
   Editorial slim watch face: outer hairline + 4 cardinal ticks + 60-progress arc.
   Big numeral in center. Name plate below. */
.speech-showcase {
  position: absolute;
  left: calc(50% + var(--stage-shift));
  top: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  display: grid;
  place-items: center;
  z-index: 5;
  pointer-events: none;
}
.speech-showcase::before, .speech-showcase::after { display: none; }

/* Single hairline outer circle — no bezel */
.showcase-bezel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--bone-3);
  box-shadow: none;
  z-index: 1;
}

/* 4 cardinal tickmarks (12, 3, 6, 9) — minimal */
.showcase-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.showcase-ticks::before,
.showcase-ticks::after,
.showcase-ticks-major::before,
.showcase-ticks-major::after {
  content: '';
  position: absolute;
  background: var(--bone);
}
.showcase-ticks::before { top: 0;    left: 50%; width: 1px; height: 12px; transform: translateX(-50%); background: var(--crimson); }
.showcase-ticks::after  { bottom: 0; left: 50%; width: 1px; height: 12px; transform: translateX(-50%); }
.showcase-ticks-major {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: none;
  -webkit-mask: none;
  mask: none;
}
.showcase-ticks-major::before { top: 50%; left: 0;     width: 12px; height: 1px; transform: translateY(-50%); }
.showcase-ticks-major::after  { top: 50%; right: 0;    width: 12px; height: 1px; transform: translateY(-50%); }

/* Sweep hand removed */
.showcase-hand { display: none; }

/* Center pin removed */
.showcase-pin { display: none; }

/* Top eyebrow — minimal, sits at top inside dial */
.showcase-tag {
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  white-space: nowrap;
  z-index: 8;
  pointer-events: auto;
  border: none;
  box-shadow: none;
}
.showcase-tag-num {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  color: var(--crimson);
  letter-spacing: 0.10em;
  font-variant-numeric: tabular-nums;
}
.showcase-tag-divider {
  width: 14px;
  height: 1px;
  background: var(--bone-faint);
}
.showcase-tag-text {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 600;
  color: var(--bone-mute);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* Inner dial face — empty container, just for centering */
.showcase-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 4;
  pointer-events: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.showcase-orb::before { display: none; }

/* THE TIMER — gigantic, ultra-minimal centered digit */
.showcase-timer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 0;
}
.showcase-timer-num {
  font-family: var(--font-headline);
  font-size: 96px;
  font-weight: 600;
  color: var(--bone);
  letter-spacing: -0.06em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}
.showcase-timer-unit {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.showcase-timer[data-state="urgent"] .showcase-timer-num {
  color: var(--crimson-bright);
}

/* Bottom name plate — text only, no box */
.showcase-identity {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  min-width: 140px;
  max-width: 200px;
}
.showcase-slot-line { display: none; }
.showcase-name {
  margin: 0 0 4px;
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.showcase-name-meta { display: none; }

/* Slim progress arc — 0-100% on outer ring, only crimson */
.showcase-progress {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--crimson) 0%,
    var(--crimson) calc(var(--p, 78) * 1%),
    transparent calc(var(--p, 78) * 1%),
    transparent 100%);
  -webkit-mask:
    radial-gradient(circle, transparent 158px, #000 158px, #000 160px, transparent 160px);
  mask:
    radial-gradient(circle, transparent 158px, #000 158px, #000 160px, transparent 160px);
  pointer-events: none;
  z-index: 3;
}
.showcase-progress-bar { display: none; }
.showcase-progress-mark { display: none; }

/* Crosshair corner brackets — minimal, smaller */
.speech-showcase > .showcase-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 6;
}
.speech-showcase > .showcase-corner-tl { top: -2px;    left: -2px;    border-top: 1px solid var(--bone-mute); border-left: 1px solid var(--bone-mute); }
.speech-showcase > .showcase-corner-tr { top: -2px;    right: -2px;   border-top: 1px solid var(--bone-mute); border-right: 1px solid var(--bone-mute); }
.speech-showcase > .showcase-corner-bl { bottom: -2px; left: -2px;    border-bottom: 1px solid var(--bone-mute); border-left: 1px solid var(--bone-mute); }
.speech-showcase > .showcase-corner-br { bottom: -2px; right: -2px;   border-bottom: 1px solid var(--bone-mute); border-right: 1px solid var(--bone-mute); }

.showcase-wave { display: none; }

/* ━━━━━ STAGE TOOLBAR — paper-tape strip ━━━━━ */
.stage-toolbar {
  position: absolute;
  bottom: 22px;
  left: calc(50% + var(--stage-shift));
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  padding: 0;
  background: var(--bone);
  border: 1.5px solid var(--black);
  z-index: 8;
  box-shadow: 4px 4px 0 var(--crimson);
}
.toolbar-btn {
  font-family: var(--font-extra);
  font-size: 11px;
  font-weight: 800;
  color: var(--black);
  background: var(--bone);
  border: none;
  border-right: 1.5px solid var(--black);
  padding: 11px 18px;
  cursor: pointer;
  transition: all 100ms var(--ease-out);
  white-space: nowrap;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.toolbar-btn:last-child { border-right: none; }
.toolbar-btn:hover {
  background: var(--ink);
  color: var(--bone);
}
.toolbar-btn-primary {
  background: var(--crimson);
  color: var(--bone);
}
.toolbar-btn-primary:hover {
  background: var(--black);
  color: var(--bone);
}
.toolbar-btn-pause {
  background: var(--bone);
  color: var(--black);
}


/* ====================================================================
   CHAT — newspaper column with ruled hairlines
   ==================================================================== */
.chat-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--black);
  z-index: 5;
  overflow: hidden;
  border-left: 1px solid var(--bone-3);
}

.chat-head {
  padding: 16px 18px 0;
  border-bottom: 2px solid var(--bone);
  background: var(--black);
}
.chat-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 12px;
  font-family: var(--font-extra);
  font-size: 14px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chat-title::before {
  content: '03 / ' counter(card-num) '';
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.04em;
}
.chat-hash { display: none; }
.chat-title-text { color: var(--bone); letter-spacing: 0.20em; }
.chat-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -2px;
  flex-wrap: wrap;
}
.chat-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 10px;
  font-family: var(--font-extra);
  font-size: 10px;
  font-weight: 800;
  color: var(--bone-mute);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 120ms var(--ease-out);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chat-tab:hover { color: var(--bone-2); }
.chat-tab.active {
  color: var(--bone);
  border-bottom-color: var(--crimson);
}
.chat-tab-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--bone-faint);
  font-variant-numeric: tabular-nums;
  background: var(--ink-2);
  padding: 1px 5px;
  letter-spacing: 0.04em;
}
.chat-tab.active .chat-tab-count {
  color: var(--bone);
  background: var(--crimson);
}
.chat-tab-dot {
  width: 7px;
  height: 7px;
  background: var(--crimson);
}

.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
  display: flex;
  flex-direction: column;
}
.chat-stream::-webkit-scrollbar { width: 4px; }
.chat-stream::-webkit-scrollbar-track { background: transparent; }
.chat-stream::-webkit-scrollbar-thumb { background: var(--ink-3); }

/* SYSTEM divider — chapter break */
.chat-system {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0;
  align-items: center;
  margin: 18px 18px 10px;
}
.chat-system-line { height: 1px; background: var(--bone); }
.chat-system-text {
  font-family: var(--font-extra);
  font-size: 10px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0 12px;
  background: var(--black);
}

/* MESSAGE — clean newspaper rows */
.chat-msg {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 6px 18px;
  position: relative;
  transition: background 80ms var(--ease-out);
}
.chat-msg:hover { background: var(--black-3); }
.chat-msg-first { margin-top: 12px; }
.chat-msg-first:first-child { margin-top: 4px; }
.chat-msg-followup { margin-top: 0; }

.chat-msg-avatar {
  width: 42px;
  height: 42px;
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-extra);
  font-size: 16px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: -0.02em;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(245, 240, 235, 0.08) 1px, transparent 1.5px);
  background-size: 3px 3px;
}
.chat-msg-avatar-host {
  background: var(--crimson);
  border-color: var(--bone);
  color: var(--bone);
  font-size: 14px;
}

.chat-msg-spacer {
  position: relative;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-msg-hover-time {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--bone-faint);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 80ms var(--ease-out);
}
.chat-msg-followup:hover .chat-msg-hover-time { opacity: 1; }

.chat-msg-body { min-width: 0; }
.chat-msg-followup .chat-msg-text { padding-top: 1px; }

.chat-msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 1px;
  flex-wrap: wrap;
}
.chat-msg-name {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chat-msg-slot {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  background: var(--ink-2);
  padding: 1px 6px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.chat-msg-time {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--bone-faint);
  letter-spacing: 0.06em;
}
.chat-msg-active-tag {
  font-family: var(--font-extra);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--bone);
  background: var(--crimson);
  padding: 1px 5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chat-msg-host-tag {
  font-family: var(--font-extra);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--bone);
  background: var(--crimson);
  padding: 1px 5px;
  letter-spacing: 0.16em;
}

.chat-msg-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--bone-2);
  line-height: 1.50;
  letter-spacing: -0.005em;
  word-wrap: break-word;
}

.chat-msg-host { background: var(--crimson-tint); }
.chat-msg-host:hover { background: var(--crimson-tint-2); }
.chat-msg-host .chat-msg-name { color: var(--crimson-bright); }

.chat-msg-active {
  border-left: 2px solid var(--crimson);
}

/* WINK — sticker-stamp style */
.chat-msg-wink {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  margin: 8px 18px;
  padding: 8px 12px;
  background: var(--bone);
  border: 1.5px solid var(--black);
  box-shadow: 3px 3px 0 var(--crimson);
}
.chat-msg-wink-icon {
  width: 36px;
  height: 36px;
  background: var(--crimson);
  border: 1.5px solid var(--black);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--bone);
}
.chat-msg-wink-body {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.chat-msg-wink-text {
  flex: 1;
  font-family: var(--font-extra);
  font-size: 12px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.chat-msg-wink-text b {
  font-family: var(--font-mono);
  color: var(--crimson);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chat-arrow {
  color: var(--crimson);
  font-family: var(--font-mono);
}

/* COMPOSE */
.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  padding: 12px 18px;
  border-top: 2px solid var(--bone);
  background: var(--black);
}
.chat-input {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--bone);
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  border-right: none;
  padding: 10px 14px;
  outline: none;
  transition: border-color 140ms var(--ease-out);
  letter-spacing: -0.005em;
}
.chat-input::placeholder { color: var(--bone-faint); }
.chat-input:focus { border-color: var(--bone); }
.chat-send {
  width: 44px;
  height: 44px;
  background: var(--crimson);
  border: 1.5px solid var(--bone-3);
  border-left: 1.5px solid var(--crimson);
  color: var(--bone);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 120ms var(--ease-out);
}
.chat-send:hover {
  background: var(--bone);
  color: var(--black);
}


/* ====================================================================
   DRAWER — newspaper-section host panel
   ==================================================================== */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--drawer-w);
  z-index: 30;
  background: var(--black);
  border-left: 2px solid var(--bone);
  overflow-y: auto;
  display: none;
  flex-direction: column;
}
.drawer:not([hidden]) { display: flex; }
.drawer[hidden] { display: none !important; }

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: var(--black);
  border-bottom: 2px solid var(--bone);
}
.drawer-title {
  margin: 0;
  font-family: var(--font-extra);
  font-size: 13px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.drawer-tabs {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--bone-3);
}
.drawer-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: var(--font-extra);
  font-size: 11px;
  font-weight: 800;
  color: var(--bone-mute);
  background: var(--black);
  border: none;
  border-right: 1.5px solid var(--bone-3);
  cursor: pointer;
  transition: all 120ms var(--ease-out);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.drawer-tab:last-child { border-right: none; }
.drawer-tab:hover { color: var(--bone); }
.drawer-tab.active {
  color: var(--bone);
  background: var(--crimson);
}
.drawer-tab-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-faint);
  font-variant-numeric: tabular-nums;
}
.drawer-tab.active .drawer-tab-num { color: var(--bone); }
.drawer-close {
  width: 32px;
  height: 32px;
  background: var(--black);
  border: 1.5px solid var(--bone-3);
  color: var(--bone-mute);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 140ms var(--ease-out);
}
.drawer-close:hover {
  color: var(--crimson);
  border-color: var(--crimson);
}

.drawer-body {
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer-body[hidden] { display: none; }

.phase-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--crimson);
  border: 1.5px solid var(--black);
  box-shadow: 3px 3px 0 var(--bone);
}
.phase-status-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.phase-status-tag {
  font-family: var(--font-extra);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.phase-status-name {
  font-family: var(--font-extra);
  font-size: 14px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.phase-status-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bone-3);
  font-family: var(--font-extra);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone);
}
.drawer-section-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 1px 6px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.btn {
  font-family: var(--font-extra);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
}
.btn:hover {
  background: var(--bone);
  color: var(--black);
  border-color: var(--bone);
}
.btn-primary {
  background: var(--crimson);
  color: var(--bone);
  border-color: var(--crimson);
}
.btn-primary:hover { background: var(--bone); color: var(--crimson); border-color: var(--bone); }
.btn-danger {
  color: var(--crimson);
  border-color: var(--crimson);
}
.btn-danger:hover { background: var(--crimson); color: var(--bone); }
.btn-block { width: 100%; }
.btn-icon {
  width: 38px;
  padding: 10px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
}
.btn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.speech-bar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
}
.speech-bar-tag {
  font-family: var(--font-extra);
  font-size: 9px;
  font-weight: 800;
  color: var(--bone-mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.speech-bar-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
}
.speech-bar-name {
  font-family: var(--font-extra);
  font-size: 13px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}
.select {
  font-family: var(--font-semi);
  font-size: 12px;
  font-weight: 600;
  color: var(--bone-2);
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  border-right: none;
  padding: 10px 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  letter-spacing: 0.06em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 5l3 3 3-3' stroke='%23F5F0EB' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  text-transform: uppercase;
}
.select:focus { border-color: var(--bone); }
.select-row .btn { border-left: 1.5px solid var(--bone-3); }

.nom-list { display: flex; flex-direction: column; gap: 0; }
.nom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  border-bottom: none;
}
.nom-row:last-child { border-bottom: 1.5px solid var(--bone-3); }
.nom-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nom-from { color: var(--bone-mute); }
.nom-arrow { color: var(--bone-faint); }
.nom-to { color: var(--crimson-bright); }
.nom-remove {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  color: var(--bone-faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 120ms var(--ease-out);
}
.nom-remove:hover { color: var(--crimson-bright); }

/* PLAYER ROWS */
.player-row {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  border-left-width: 3px;
}
.player-row:hover { border-color: var(--bone-3); border-left-color: var(--bone-3); }
.player-row[data-active="true"] {
  border-left-color: var(--crimson);
  background: var(--crimson-tint);
}
.player-row[data-warn="true"] { border-left-color: var(--warn); }
.player-row[data-nominated="true"] { border-left-color: var(--crimson); }

.player-row-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.player-row-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-mute);
  font-variant-numeric: tabular-nums;
}
.player-row-name {
  font-family: var(--font-extra);
  font-size: 12px;
  font-weight: 800;
  color: var(--bone);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  flex: 1;
}
.player-row-marker {
  font-family: var(--font-extra);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 7px;
}
.player-row-marker-active { color: var(--bone); background: var(--crimson); }
.player-row-marker-foul { color: var(--black); background: var(--warn); }
.player-row-marker-nom { color: var(--bone); background: var(--crimson); }

.player-row-actions { display: flex; gap: 0; flex-wrap: wrap; }

.chip {
  font-family: var(--font-extra);
  font-size: 10px;
  font-weight: 800;
  color: var(--bone-mute);
  background: var(--ink-3);
  border: 1px solid var(--bone-3);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-right: none;
}
.chip:last-child { border-right: 1px solid var(--bone-3); }
.chip:hover {
  color: var(--black);
  background: var(--bone);
}
.chip-danger {
  color: var(--crimson-bright);
  border-color: var(--crimson-edge);
}
.chip-danger:hover { background: var(--crimson); color: var(--bone); }
.chip-warn {
  color: var(--warn);
  border-color: rgba(232, 163, 62, 0.42);
}
.chip-warn:hover { background: var(--warn); color: var(--black); }
.chip-end {
  color: var(--bone);
  background: var(--crimson);
  border-color: var(--crimson);
  margin-left: auto;
  border-right: 1px solid var(--crimson);
}
.chip-end:hover { background: var(--bone); color: var(--crimson); border-color: var(--bone); }
.chip-revive {
  color: var(--success);
  background: var(--success-tint);
  border-color: rgba(201, 194, 182, 0.42);
}

.dead-row { display: flex; flex-direction: column; gap: 0; }

@media (max-width: 1280px) {
  :root {
    --rail-w: 280px;
    --chat-w: 360px;
    --table-radius: clamp(220px, 26vmin, 300px);
  }
  .speech-showcase { width: 220px; height: 220px; }
  .speech-showcase::after { width: 192px; height: 192px; }
  .showcase-orb { width: 172px; height: 172px; padding: 22px 16px 26px; }
  .showcase-progress { width: 220px; height: 220px; }
  .showcase-timer-num { font-size: 48px; }
  .showcase-name { font-size: 18px; }
  .roster::before { font-size: clamp(60px, 12vmin, 130px); bottom: 80px; }
}
@media (max-width: 1100px) {
  :root {
    --rail-w: 260px;
    --chat-w: 320px;
  }
}


/* ====================================================================
   PHASE-SPECIFIC SCREENS — все остальные фазы прода
   ==================================================================== */

/* Common phase-screen container — fills stage minus stage-head */
.phase-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  padding: 24px 32px 80px;
  align-items: center;
}

/* Show/hide based on data-phase-block via JS */
.phase-screen[hidden] { display: none !important; }

/* In-game full-stage phases (night, voting) — fit viewport, scroll internals */
body[data-scn="night"] .phase-screen,
body[data-scn="night-zero"] .phase-screen,
body[data-scn="voting"] .phase-screen {
  overflow: hidden;
  padding: 0;
  align-items: stretch;
}

/* Day phase keeps existing roster + showcase, no extra padding */
.phase-day {
  padding: 0;
  align-items: stretch;
}

/* Ceremonial phases — fit inside the fixed 720px Discord canvas.
   No page scroll: hero is compact, the long roster/reveal area flexes
   and scrolls internally, primary actions stay pinned in view. */
body[data-scn="lobby"] .phase-screen,
body[data-scn="starting"] .phase-screen,
body[data-scn="role-deal"] .phase-screen,
body[data-scn="finished"] .phase-screen,
body[data-scn="last-word"] .phase-screen,
body[data-scn="best-move"] .phase-screen {
  justify-content: flex-start;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 28px 40px 24px;
  gap: 16px;
}
/* last-word / best-move are short — keep them centered */
body[data-scn="last-word"] .phase-screen,
body[data-scn="best-move"] .phase-screen {
  justify-content: center;
}
/* role-deal player card centers vertically */
body[data-scn="role-deal"][data-role="don"] .phase-screen,
body[data-scn="role-deal"][data-role="mafia"] .phase-screen,
body[data-scn="role-deal"][data-role="commissar"] .phase-screen,
body[data-scn="role-deal"][data-role="doctor"] .phase-screen,
body[data-scn="role-deal"][data-role="citizen"] .phase-screen {
  justify-content: center;
}

/* Common screen title */
.screen-title {
  margin: 0 0 18px;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  text-align: center;
}

/* ━━━━━ DEV HUD (top scene + role switcher) ━━━━━ */
.dev-hud {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--bone-3);
  opacity: 0.65;
  transition: opacity 200ms var(--ease-out);
}
.dev-hud:hover { opacity: 1; }
.dev-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dev-row-label {
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  width: 36px;
}
.scn-switcher,
.scn-switcher,
.role-switcher,
.win-switcher {
  position: static;
  display: flex;
  gap: 0;
  background: var(--black);
  border: 1px solid var(--bone-3);
}
.scn-switcher a,
.role-switcher a,
.win-switcher a {
  padding: 5px 9px;
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  text-decoration: none;
  transition: all 120ms var(--ease-out);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-right: 1px solid var(--bone-3);
}
.scn-switcher a:last-child,
.role-switcher a:last-child,
.win-switcher a:last-child { border-right: none; }
.scn-switcher a:hover,
.role-switcher a:hover,
.win-switcher a:hover { color: var(--bone); background: var(--ink); }
.scn-switcher a[aria-current="true"],
.role-switcher a[aria-current="true"],
.win-switcher a[aria-current="true"] {
  color: var(--bone);
  background: var(--crimson);
}

/* Stage-head role pill (shows current role for player view) */
.stage-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--bone-3);
  background: var(--ink);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stage-role-pill[hidden] { display: none; }
.stage-role-pill-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
}
.stage-role-pill-slot {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: 0.04em;
}

/* ━━━━━ LOBBY screen ━━━━━ */
.phase-lobby {
  align-items: center;
  justify-content: flex-start;
  padding-top: 36px;
  padding-bottom: 60px;
}
.lobby-hero {
  text-align: center;
  margin-bottom: 24px;
}
.lobby-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.lobby-eyebrow-line {
  height: 1px;
  width: 50px;
  background: linear-gradient(90deg, transparent, var(--bone-3));
}
.lobby-eyebrow-text {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.lobby-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 96px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}
.lobby-subtitle {
  margin-top: 10px;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.starting-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 56px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.lobby-counter {
  margin: 0 0 24px;
  padding: 18px 32px;
  background: var(--black);
  border: 1px solid var(--bone-3);
  text-align: center;
  position: relative;
}
.lobby-counter::before,
.lobby-counter::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--crimson);
}
.lobby-counter::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}
.lobby-counter::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}
.lobby-counter-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.lobby-counter-now {
  font-family: var(--font-headline);
  font-size: 64px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lobby-counter-sep {
  font-family: var(--font-headline);
  font-size: 38px;
  font-weight: 400;
  color: var(--bone-faint);
}
.lobby-counter-total {
  font-family: var(--font-headline);
  font-size: 38px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.lobby-counter-label {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.lobby-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 540px;
  margin-bottom: 28px;
}
.lobby-slot {
  display: grid;
  grid-template-columns: 8px 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  font-family: var(--font-headline);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lobby-slot:not([data-on="true"]) {
  opacity: 0.40;
}
.lobby-slot-dot {
  width: 8px;
  height: 8px;
  background: var(--ink-3);
  border-radius: 50%;
}
.lobby-slot[data-on="true"] .lobby-slot-dot {
  background: var(--success);
}
.lobby-slot-num {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
  background: var(--black);
  padding: 3px 8px;
}
.lobby-slot-name {
  font-family: var(--font-medium);
  color: var(--bone);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lobby-slot-status {
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.10em;
}
.lobby-slot[data-on="true"] .lobby-slot-status {
  color: var(--success);
}
.starting-slot {
  grid-template-columns: 36px 1fr;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lobby-wait {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.btn-large {
  font-size: 13px;
  padding: 14px 32px;
  letter-spacing: 0.18em;
}
.btn-large:disabled {
  opacity: 0.40;
  cursor: not-allowed;
}

/* ━━━━━ ROLE_DEAL screen ━━━━━ */
.phase-role-deal {
  align-items: center;
  padding-top: 40px;
}

.role-card-frame {
  position: relative;
  width: min(420px, 90vw);
  background: var(--black);
  border: 2px solid var(--bone);
  padding: 32px 32px 28px;
  text-align: center;
  box-shadow:
    0 0 0 4px var(--black),
    0 0 0 5px var(--bone-faint),
    8px 8px 0 var(--crimson);
}
.role-card-eyebrow {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.role-card-slot-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
}
.role-card-slot-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.role-card-slot-num {
  font-family: var(--font-headline);
  font-size: 88px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.role-card-divider {
  height: 1px;
  background: var(--bone-3);
  margin: 0 -16px 18px;
}
.role-card-role-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.role-card-role-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.role-card-role-name {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
}
.role-card-desc {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--bone-2);
  line-height: 1.5;
  margin: 0 0 22px;
}
.role-card-actions { display: flex; justify-content: center; }

.role-deal-host {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.role-deal-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.role-deal-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
}
.role-deal-row[data-confirmed="true"] {
  border-color: rgba(201, 194, 182, 0.40);
}
.rd-slot {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.rd-name {
  font-family: var(--font-medium);
  font-size: 13px;
  font-weight: 500;
  color: var(--bone);
}
.rd-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  background: var(--ink-3);
  padding: 2px 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rd-role[data-role="DON"],
.rd-role[data-role="MAFIA"] { background: var(--crimson-tint); color: var(--crimson-bright); }
.rd-role[data-role="COMMISSAR"],
.rd-role[data-role="DOCTOR"] { background: rgba(201, 194, 182, 0.12); color: var(--success); }
.rd-status {
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--bone-faint);
}
.role-deal-row[data-confirmed="true"] .rd-status {
  color: var(--success);
}
.chip-action {
  background: var(--crimson-tint);
  color: var(--crimson-bright);
  border-color: var(--crimson-edge);
}

/* ━━━━━ NIGHT shared ━━━━━ */
.night-banner {
  text-align: center;
  margin-bottom: 24px;
}
.night-banner-eyebrow {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.40em;
  text-transform: uppercase;
}
.night-banner-title {
  margin: 6px 0 8px;
  font-family: var(--font-headline);
  font-size: 56px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.night-banner-sub {
  margin: 0;
  font-family: var(--font-medium);
  font-size: 13px;
  font-weight: 500;
  color: var(--bone-mute);
}

.night-action-bar {
  width: min(600px, 92vw);
  background: linear-gradient(180deg, rgba(245,240,235,0.03), var(--black-2));
  border: 1px solid var(--bone-3);
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.8);
}
.night-bar-mafia {
  border-color: var(--crimson-edge);
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.07) 0%, var(--black-2) 70%);
}
.night-bar-commissar,
.night-bar-doctor {
  border-color: var(--hairline-bold);
  background: linear-gradient(180deg, rgba(245,240,235,0.05) 0%, var(--black-2) 70%);
}
.night-bar-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline-mid);
}
/* Role emblem: masked silhouette of the actual role icon, brand-colored */
.night-bar-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--bone-3);
  background-color: var(--bone);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 26px 26px; mask-size: 26px 26px;
  display: grid; place-items: center;
}
.night-bar-icon[data-role-icon="DON"],
.night-bar-icon[data-role-icon="MAFIA"] {
  background-color: var(--crimson-bright);
  border-color: var(--crimson-edge);
}
.night-bar-icon[data-role-icon="COMMISSAR"],
.night-bar-icon[data-role-icon="DOCTOR"] {
  background-color: var(--bone);
  border-color: var(--hairline-bold);
}
/* fallback when no mask image set (keeps a visible disc) */
.night-bar-icon:not([style*="mask"]) { -webkit-mask-image: none; mask-image: none; }
.night-bar-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 19px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.night-bar-desc {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bone-2);
  line-height: 1.5;
}
.night-bar-desc b {
  color: var(--crimson-bright);
  font-family: var(--font-headline);
  font-weight: 700;
}
.night-bar-sleep {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.night-mafia-team {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.night-mafia-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
}
.nm-slot {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.nm-name {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--bone);
}
.nm-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.night-mafia-pending {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
  margin-top: 10px;
}
.night-mafia-pending-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.night-mafia-pending-value {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone);
}

.night-action-section {
  margin-bottom: 14px;
}
.night-action-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.night-action-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.action-target {
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 700;
  color: var(--bone-2);
  background: var(--ink);
  border: 1px solid var(--bone-3);
  padding: 10px 15px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.action-target:hover:not(:disabled) {
  background: var(--ink-2);
  border-color: var(--bone);
  color: var(--bone);
}
.action-target.selected,
.action-target[data-selected="true"] {
  background: var(--crimson);
  color: var(--bone);
  border-color: var(--crimson);
}
.action-target:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.action-target-self {
  font-style: italic;
}
.btn-block { width: 100%; }

/* Night confirm button (prod action-confirm) */
.action-confirm {
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  color: var(--bone-2);
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.action-confirm:hover:not(:disabled) { background: var(--ink-2); color: var(--bone); }
.action-confirm:disabled { opacity: 0.4; cursor: not-allowed; }
.action-confirm-don[data-ready="true"],
.action-confirm-comm[data-ready="true"],
.action-confirm-doc[data-ready="true"] {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--bone);
}
.action-confirm-comm[data-ready="true"],
.action-confirm-doc[data-ready="true"] {
  background: var(--success);
  border-color: var(--success);
  color: var(--black);
}

/* Night host progress bar */
.night-host-count {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.night-host-hint {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--bone-mute);
  line-height: 1.45;
}
.night-bar-host { border-color: var(--bone-3); }

/* Night-zero team intro rows */
.night-bar-sleep-sub {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--bone-mute);
  text-align: center;
}
.nz-team-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.nz-mate {
  display: grid;
  grid-template-columns: 28px 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
}
.nz-mate[data-role="COMMISSAR"],
.nz-mate[data-role="DOCTOR"],
.nz-mate[data-role="CITIZEN"] { border-left-color: var(--success); }
.nz-mate-icon { width: 30px; height: 30px; object-fit: contain; }
.nz-mate-icon.icon-masked { background-color: var(--bone); }
.nz-mate[data-role="DON"] .nz-mate-icon.icon-masked,
.nz-mate[data-role="MAFIA"] .nz-mate-icon.icon-masked {
  background-color: var(--crimson-bright);
}
.nz-mate-num {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.nz-mate[data-role="COMMISSAR"] .nz-mate-num,
.nz-mate[data-role="DOCTOR"] .nz-mate-num { color: var(--success); }
.nz-mate-name {
  font-family: var(--font-bold);
  font-size: 15px;
  font-weight: 700;
  color: var(--bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nz-mate-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nz-host-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}
.nz-host-col { display: flex; flex-direction: column; gap: 6px; }
.nz-host-col-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Host night view */
.night-host-deck {
  width: min(540px, 90vw);
  background: var(--black);
  border: 1px solid var(--bone-3);
  padding: 22px 24px;
}
.deck-title {
  margin: 0 0 4px;
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.deck-sub {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--bone-mute);
}
.night-pending-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.night-pending-row {
  display: grid;
  grid-template-columns: 12px 36px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--bone-3);
}
.night-pending-row[data-role="DON"],
.night-pending-row[data-role="MAFIA"] { border-left-color: var(--crimson); }
.night-pending-row[data-role="COMMISSAR"],
.night-pending-row[data-role="DOCTOR"] { border-left-color: var(--success); }
.np-icon {
  width: 8px;
  height: 8px;
  background: var(--bone-mute);
  border-radius: 50%;
}
.np-slot {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.np-name {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--bone);
}
.np-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.np-state {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone-faint);
}

.night-summary {
  margin-top: 16px;
  background: var(--ink);
  border: 1px solid var(--crimson-edge);
  padding: 14px 16px;
}
.ns-title {
  margin: 0 0 10px;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.ns-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ns-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--bone-2);
}
.ns-row b {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--bone);
}
.ns-icon {
  width: 22px;
  height: 22px;
  background: var(--ink-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
}
.ns-kill .ns-icon { background: var(--crimson); }
.ns-saved .ns-icon { background: var(--success); }
.ns-don .ns-icon { background: var(--crimson-tint); color: var(--crimson-bright); }
.ns-comm .ns-icon { background: rgba(201, 194, 182, 0.20); color: var(--success); }

/* ━━━━━ BEST_MOVE screen ━━━━━ */
.best-move-frame {
  width: min(580px, 92vw);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  background: var(--black);
  border: 2px solid var(--bone);
  padding: 28px 32px;
  position: relative;
  box-shadow:
    0 0 0 4px var(--black),
    0 0 0 5px var(--bone-faint),
    8px 8px 0 var(--crimson);
}
.bm-eyebrow {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 24px;
}
.bm-victim {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--bone-3);
}
.bm-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.bm-timer-num {
  font-family: var(--font-num);
  font-size: 38px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}
.bm-timer-num.bm-timer-urgent { color: var(--crimson); animation: hd-pulse 0.8s ease-in-out infinite; }
.bm-timer-unit {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.bm-victim-avatar {
  width: 80px;
  height: 80px;
  background: var(--ink);
  border: 2px solid var(--crimson);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: -0.04em;
}
.bm-victim-tag {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 2px 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bm-victim-name {
  margin: 0 0 4px;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
}
.bm-victim-sub {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--bone-mute);
}
.bm-picker-instr {
  margin: 0 0 12px;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.bm-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}
.bm-targets .action-target {
  font-size: 16px;
  padding: 12px 16px;
  min-width: 56px;
}
.bm-wait,
.bm-host-text {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--bone-mute);
  text-align: center;
}

/* ━━━━━ LAST_WORD screen ━━━━━ */
.last-word-frame {
  width: min(440px, 90vw);
  background: var(--black);
  border: 2px solid var(--bone);
  padding: 28px 32px 24px;
  text-align: center;
  box-shadow:
    0 0 0 4px var(--black),
    0 0 0 5px var(--bone-faint),
    8px 8px 0 var(--crimson);
}
.lw-eyebrow {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.lw-speaker {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  text-align: left;
}
.lw-speaker-avatar {
  width: 80px;
  height: 80px;
  background: var(--ink);
  border: 2px solid var(--bone);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--bone);
}
.lw-speaker-tag {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone);
  background: var(--ink-3);
  padding: 2px 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.lw-speaker-name {
  margin: 0 0 4px;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--bone);
  text-transform: uppercase;
}
.lw-speaker-sub {
  margin: 0;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--bone-mute);
}
.lw-timer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.lw-timer-num {
  font-family: var(--font-headline);
  font-size: 88px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lw-timer-unit {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

/* ━━━━━ VOTING screen ━━━━━ */
.voting-frame {
  width: min(540px, 92vw);
  background: var(--black);
  border: 2px solid var(--bone);
  padding: 28px 28px 24px;
  box-shadow:
    0 0 0 4px var(--black),
    0 0 0 5px var(--bone-faint),
    8px 8px 0 var(--crimson);
}
.voting-eyebrow {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 22px;
}
.voting-candidate {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--bone-3);
}
.voting-cand-avatar {
  width: 80px;
  height: 80px;
  background: var(--ink);
  border: 2px solid var(--crimson);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--crimson-bright);
}
.voting-cand-label,
.voting-cand-by {
  display: block;
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.voting-cand-by { margin-top: 4px; }
.voting-cand-name {
  margin: 4px 0;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.voting-cand-tally {
  text-align: right;
}
.voting-tally-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.voting-tally-num {
  font-family: var(--font-headline);
  font-size: 56px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.voting-progress {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--ink-2);
  margin-bottom: 14px;
}
.voting-progress-bar {
  position: absolute;
  inset: 0;
  background: var(--crimson);
  width: var(--p, 50%);
}
.voting-voters {
  margin-bottom: 16px;
}
.voting-voters-label,
.voting-lb-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.voting-voters-list,
.voting-lb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.voter {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson-bright);
  background: var(--crimson-tint);
  border: 1px solid var(--crimson-edge);
  padding: 3px 8px;
  letter-spacing: 0.04em;
}
.voting-action {
  margin-bottom: 16px;
}
.voting-host {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.voting-host .btn-large { flex: 1; }
.voting-leaderboard { padding-top: 16px; border-top: 1px solid var(--bone-3); }
.voting-lb-list { flex-direction: column; }
.voting-lb-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--bone-3);
  margin-bottom: 4px;
}
.voting-lb-row[data-current="true"] {
  border-left-color: var(--crimson);
  background: var(--crimson-tint);
}
.lb-slot {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.lb-name {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--bone);
}
.lb-votes {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
}

/* ━━━━━ FINISHED screen ━━━━━ */
.result-frame {
  width: min(560px, 92vw);
  text-align: center;
}
.result-eyebrow {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.result-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 96px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: uppercase;
}
.result-title[data-winner="MAFIA"] { color: var(--crimson-bright); }
.result-sub {
  margin: 8px 0 26px;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.result-roles {
  text-align: left;
  margin-bottom: 28px;
}
.result-roles-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.result-roles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.result-role-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--bone-3);
}
.result-role-row[data-role="DON"],
.result-role-row[data-role="MAFIA"] { border-left-color: var(--crimson); }
.result-role-row[data-role="COMMISSAR"],
.result-role-row[data-role="DOCTOR"] { border-left-color: var(--success); }
.result-role-row[data-alive="false"] { opacity: 0.50; }
.rr-slot {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-mute);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.rr-name {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--bone);
}
.rr-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink-3);
  padding: 2px 8px;
}
.rr-state {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone-mute);
}
.result-host-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.result-mvp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}
.result-mvp-grid .chip {
  font-size: 11px;
  text-transform: uppercase;
}

/* ━━━━━ Wink action panel (DAY) ━━━━━ */
.wink-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
}
.wink-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  background: var(--black);
  border: 1px solid var(--crimson);
  cursor: pointer;
  transition: all 140ms var(--ease-out);
}
.wink-trigger:hover {
  background: var(--crimson-tint);
}
.wink-icon {
  width: 32px;
  height: 32px;
  background: var(--crimson);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--bone);
  flex-shrink: 0;
}
.wink-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.wink-text b {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.wink-text span {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--bone-mute);
}
.wink-cta {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 4px 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 8px;
}

/* Drawer details (collapsible end-game) */
.drawer-details summary {
  display: block;
  cursor: pointer;
  list-style: none;
}
.drawer-details summary::-webkit-details-marker { display: none; }
.drawer-details-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  background: var(--ink);
  border: 1px solid var(--crimson-edge);
}

/* Hide chat for ceremonial phases (lobby/role-deal/finished) per project-context rule.
   Also hide rail entirely — these phases are full-stage cinematic. */
body[data-scn="lobby"] .chat-rail,
body[data-scn="starting"] .chat-rail,
body[data-scn="role-deal"] .chat-rail,
body[data-scn="finished"] .chat-rail,
body[data-scn="lobby"] .profile-rail,
body[data-scn="starting"] .profile-rail,
body[data-scn="role-deal"] .profile-rail,
body[data-scn="finished"] .profile-rail {
  display: none;
}
body[data-scn="lobby"] .app,
body[data-scn="starting"] .app,
body[data-scn="role-deal"] .app,
body[data-scn="finished"] .app {
  grid-template-columns: 1fr;
}

/* Hide stage-head on ceremonial / no-chrome phases (different layout) */
body[data-scn="lobby"] .stage-head,
body[data-scn="starting"] .stage-head,
body[data-scn="role-deal"] .stage-head,
body[data-scn="finished"] .stage-head { display: none; }

/* Phase-tag and phase-name auto-update via JS could go here, but we keep them hardcoded for prototype */


/* ====================================================================
   RAIL — pre-game ROSTER variant (browse all players with profiles)
   ==================================================================== */
.rail-roster-head {
  padding: 16px 18px 14px 32px;
}
.rail-roster-hint {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 600;
  color: var(--bone-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rail-roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink-3);
}
.rail-roster-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 32px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
  border-bottom: 1px solid var(--ink-2);
  position: relative;
}
.rail-roster-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 120ms var(--ease-out);
}
.rail-roster-row:hover {
  background: var(--black-3);
}
.rail-roster-row[data-active="true"] {
  background: var(--crimson-tint);
}
.rail-roster-row[data-active="true"]::before {
  background: var(--crimson);
}
.rail-roster-row[data-pending="true"] {
  opacity: 0.50;
}
.rrr-slot {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: 0.04em;
}
.rrr-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rrr-name {
  font-family: var(--font-bold);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}
.rrr-handle {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--bone-mute);
  letter-spacing: 0.04em;
}
.rrr-prio {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--bone-3);
}
.rrr-prio[data-level="2"] { color: var(--bone-faint); border-color: var(--ink-3); }
.rrr-prio[data-level="3"] { color: var(--bone-mute); border-color: var(--bone-3); }
.rrr-prio[data-level="4"] { color: var(--crimson-bright); border-color: var(--crimson-edge); }
.rrr-prio[data-level="5"] { color: var(--bone); border-color: var(--crimson); background: var(--crimson-tint); }

.rail-roster-active {
  margin-top: 10px;
  padding-bottom: 14px;
}
.rail-roster-active-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.rrr-active-avatar {
  width: 56px;
  height: 56px;
  background: var(--ink);
  border: 2px solid var(--bone);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  color: var(--bone);
}
.rrr-active-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rrr-active-name {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rrr-active-handle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
}
.rrr-active-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--bone-3);
}
.rrr-active-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border-right: 1px solid var(--bone-3);
}
.rrr-active-stat:last-child { border-right: none; }
.rrr-active-stat-num {
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rrr-active-stat-lbl {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ====================================================================
   RAIL — HOST DECK (replaces profile when role=host)
   ==================================================================== */
.host-deck-card {
  padding: 18px 18px 16px 32px;
}
.host-deck-hero {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.host-deck-avatar {
  width: 60px;
  height: 60px;
  background: var(--crimson);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-headline);
  font-size: 28px;
  color: var(--bone);
  border: 2px solid var(--bone);
}
.host-deck-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.host-deck-name {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.host-deck-handle {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
}
.host-deck-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
}
.host-deck-status-dot {
  width: 8px;
  height: 8px;
  background: var(--crimson);
  border-radius: 50%;
  animation: hd-pulse 1.6s ease-in-out infinite;
}
@keyframes hd-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.host-deck-status-text {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.20em;
  text-transform: uppercase;
  flex: 1;
}

.host-deck-summary {
  padding: 16px 18px 14px 32px;
}
.host-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.host-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  align-items: center;
  text-align: center;
}
.host-summary-num {
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.host-summary-lbl {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.host-deck-quick {
  padding: 16px 18px 14px 32px;
}
.host-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
}
.host-quick-grid .btn {
  padding: 9px 8px;
  font-size: 10px;
  letter-spacing: 0.10em;
}

.host-deck-roster {
  padding: 14px 18px 14px 32px;
}
.host-mini-roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.hm-row {
  display: grid;
  grid-template-columns: 32px 1fr 28px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--ink-2);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 100ms var(--ease-out);
}
.hm-row:hover { background: var(--ink); }
.hm-row[data-state="dead"] {
  opacity: 0.40;
  text-decoration: line-through;
}
.hm-row[data-state="speaking"] {
  background: var(--crimson-tint);
  border-left: 3px solid var(--crimson);
  padding-left: 5px;
}
.hm-row[data-state="nominated"] {
  border-left: 3px solid var(--crimson);
  padding-left: 5px;
}
.hm-row[data-warn="true"] {
  border-left: 3px solid var(--warn);
  padding-left: 5px;
}
.hm-slot {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: center;
}
.hm-name {
  font-family: var(--font-medium);
  font-weight: 500;
  color: var(--bone);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-state {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--bone-mute);
  text-align: center;
  font-size: 10px;
}
.hm-row[data-state="speaking"] .hm-state { color: var(--crimson-bright); }
.hm-row[data-state="nominated"] .hm-state { color: var(--crimson); }
.hm-row[data-warn="true"] .hm-state { color: var(--warn); }
.hm-row[data-state="dead"] .hm-state { color: var(--bone-faint); }


/* ====================================================================
   FULL HOST PANEL (replaces profile when role=host) — in rail
   ==================================================================== */
.host-deck-card {
  padding: 16px 18px 14px 18px;
}
.host-deck-status {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
}
.host-deck-status-dot {
  width: 8px;
  height: 8px;
  background: var(--crimson);
  border-radius: 50%;
  animation: hd-pulse 1.6s ease-in-out infinite;
}
@keyframes hd-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.host-deck-status-text {
  font-family: var(--font-headline);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.host-deck-status-time {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* Tabs */
.host-tabs-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--bone-3);
  border-bottom: 1px solid var(--bone-3);
}
.host-tab {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  background: var(--black);
  border: none;
  border-right: 1px solid var(--bone-3);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.host-tab:last-child { border-right: none; }
.host-tab:hover { color: var(--bone); background: var(--ink); }
.host-tab.active {
  color: var(--bone);
  background: var(--crimson);
}
.host-tab-num {
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-faint);
  background: var(--ink-3);
  padding: 1px 5px;
  margin-left: 4px;
  letter-spacing: 0.04em;
}
.host-tab.active .host-tab-num {
  color: var(--bone);
  background: rgba(0, 0, 0, 0.30);
}

/* Body */
.host-panel-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.host-panel-body[hidden] { display: none; }

/* Host buttons — bigger, clearer, less tracked than global .btn (usability first) */
.host-panel-body .btn,
.host-deck-card + .host-tabs-wrap + .host-panel-body .btn {
  font-family: var(--font-semi);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 12px 16px;
}
.host-panel-body .btn-block { margin-top: 2px; }
.host-section .btn-row { gap: 6px; }

/* Sections */
.host-section {
  padding: 14px 18px 14px 18px;
  border-bottom: 1px solid var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.host-section:last-child { border-bottom: none; }
.host-section-title {
  margin: 0 0 6px;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.host-section-num {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 1px 5px;
  letter-spacing: 0.04em;
}
.host-section-desc {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--bone-mute);
  line-height: 1.45;
}
.host-section-desc b {
  color: var(--bone);
  font-family: var(--font-headline);
  font-weight: 700;
}

/* End-game collapsible */
.host-end-game summary {
  display: block;
  cursor: pointer;
  list-style: none;
}
.host-end-game summary::-webkit-details-marker { display: none; }
.host-end-game-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  background: var(--ink);
  border: 1px solid var(--crimson-edge);
}

/* Speech bar inside host */
.host-speech-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ink);
  border-left: 3px solid var(--crimson);
}
.hsb-tag {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.hsb-num {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
}
.hsb-name {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  text-transform: uppercase;
}

/* Select rows */
.host-select-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}
.host-select {
  font-family: var(--font-medium);
  font-size: 12px;
  font-weight: 500;
  color: var(--bone-2);
  background: var(--ink);
  border: 1px solid var(--bone-3);
  border-right: none;
  padding: 9px 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  letter-spacing: 0.04em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 5l3 3 3-3' stroke='%23F5F0EB' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.host-select:focus { border-color: var(--bone); }

/* Nominations list inside host */
.host-nom-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
}
.hn-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hn-from { color: var(--bone-mute); }
.hn-arrow { color: var(--bone-faint); }
.hn-to { color: var(--crimson-bright); }
.hn-remove {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  color: var(--bone-faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.hn-remove:hover { color: var(--crimson-bright); }

/* Confirm list (role-deal) */
.host-confirm-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hcf-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--ink);
  border-left: 2px solid var(--bone-3);
}
.hcf-row[data-confirmed="true"] {
  border-left-color: var(--success);
}
.hcf-slot {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-mute);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.hcf-name {
  font-family: var(--font-medium);
  font-size: 12.5px;
  color: var(--bone);
}
.hcf-status {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.06em;
}

/* Night pending list */
.host-night-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hn-pending {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--ink);
  border-left: 2px solid var(--bone-3);
}
.hn-pending[data-done="true"] {
  border-left-color: var(--success);
}
.hnp-slot {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.hnp-name {
  font-family: var(--font-medium);
  font-size: 12.5px;
  color: var(--bone);
}
.hnp-role {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hnp-state {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-faint);
}
.hn-pending[data-done="true"] .hnp-state {
  color: var(--success);
}

/* MVP grid (finished) */
.host-mvp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.host-mvp-grid .chip {
  font-size: 11px;
  text-transform: uppercase;
}

/* Player rows */
.host-pl-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  background: var(--ink);
  border-left: 2px solid var(--bone-3);
  margin-bottom: 4px;
}
.host-pl-row[data-active="true"] { border-left-color: var(--crimson); background: var(--crimson-tint); }
.host-pl-row[data-warn="true"] { border-left-color: var(--warn); }
.host-pl-row[data-nominated="true"] { border-left-color: var(--crimson); }

.hpr-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.hpr-num {
  font-family: var(--font-num);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bone-mute);
  font-variant-numeric: tabular-nums;
}
.hpr-name {
  font-family: var(--font-medium);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hpr-marker {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 6px;
}
.hpr-marker-active { color: var(--bone); background: var(--crimson); }
.hpr-marker-foul { color: var(--black); background: var(--warn); }
.hpr-marker-nom { color: var(--bone); background: var(--crimson); }

.hpr-actions {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.hpr-actions .chip {
  font-size: 10px;
  padding: 4px 8px;
}

.host-dead-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* ====================================================================
   LOBBY screen — editorial broadcast cover
   ==================================================================== */
.phase-lobby {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 !important;
  min-height: 0;
  flex: 1;
}

.lobby-hero-frame {
  text-align: center;
  position: relative;
  padding: 22px 0 18px;
}
.lobby-hero-compact { padding: 8px 0 14px; flex-shrink: 0; }
.lobby-hero-compact .lobby-hero-title { font-size: clamp(40px, 6vw, 64px); }
.lobby-hero-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: var(--crimson);
}
.lobby-hero-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: var(--crimson);
}
.lobby-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  background: var(--bone);
  margin-bottom: 16px;
}
.lobby-mark-num {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.06em;
}
.lobby-mark-divider {
  width: 1px;
  height: 11px;
  background: var(--black);
}
.lobby-mark-text {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.lobby-hero-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 0 0 60px rgba(230, 57, 70, 0.18);
}
.lobby-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.lobby-hero-tag {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.lobby-hero-tag-sep {
  width: 4px;
  height: 4px;
  background: var(--crimson);
  border-radius: 50%;
}

/* Stat strip */
.lobby-stat-strip {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--bone-3);
}
.lobby-stat-cell {
  padding: 16px 18px;
  border-right: 1px solid var(--bone-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--ink);
}
.lobby-stat-cell:last-child { border-right: none; }
.lobby-stat-label {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.lobby-stat-bar {
  height: 4px;
  background: var(--ink-2);
  position: relative;
}
.lobby-stat-bar-fill {
  position: absolute;
  inset: 0;
  width: var(--p, 0);
  background: var(--crimson);
}
.lobby-stat-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.lobby-stat-now {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lobby-stat-sep {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 400;
  color: var(--bone-faint);
}
.lobby-stat-total {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  color: var(--bone-mute);
  font-variant-numeric: tabular-nums;
}
.lobby-stat-num {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lobby-stat-sub {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.lobby-mode-toggle {
  display: flex;
  border: 1px solid var(--bone-3);
}
.lobby-mode-btn {
  flex: 1;
  padding: 8px 10px;
  font-family: var(--font-headline);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--bone-mute);
  background: var(--black);
  border: none;
  border-right: 1px solid var(--bone-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
}
.lobby-mode-btn:last-child { border-right: none; }
.lobby-mode-btn:hover { color: var(--bone); background: var(--ink); }
.lobby-mode-btn.active { color: var(--bone); background: var(--crimson); }

/* Roster — flexes to fill remaining height, scrolls internally if needed */
.lobby-roster {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bone-3);
  flex: 1;
  min-height: 0;
  background: var(--black-2);
}
.lobby-roster-head {
  display: grid;
  grid-template-columns: 52px 1fr 96px 150px 96px;
  gap: 16px;
  padding: 10px 22px;
  background: var(--ink);
  border-bottom: 1px solid var(--bone-3);
  flex-shrink: 0;
}
.lobby-roster-head-label {
  font-family: var(--font-headline);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.lobby-roster-grid {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}
.lobby-pl {
  display: grid;
  grid-template-columns: 52px 1fr 96px 150px 96px;
  gap: 16px;
  align-items: center;
  padding: 0 22px;
  min-height: 0;
  flex: 1;
  background: var(--black);
  border-bottom: 1px solid var(--ink-2);
}
.lobby-pl:last-child { border-bottom: none; }
.lobby-pl:not([data-on="true"]) {
  opacity: 0.45;
}
.lpl-num {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: 0.02em;
}
.lpl-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.lpl-name {
  font-family: var(--font-bold);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lpl-handle {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--bone-mute);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lpl-rating {
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.lpl-prio {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  text-align: center;
  padding: 4px 8px;
  border: 1px solid var(--bone-3);
  color: var(--bone-faint);
  white-space: nowrap;
}
.lpl-prio[data-level="1"] { color: var(--bone-faint); border-color: var(--ink-3); }
.lpl-prio[data-level="2"] { color: var(--bone-faint); border-color: var(--ink-3); }
.lpl-prio[data-level="3"] { color: var(--bone-mute); border-color: var(--bone-3); }
.lpl-prio[data-level="4"] { color: var(--crimson-bright); border-color: var(--crimson-edge); }
.lpl-prio[data-level="5"] { color: var(--bone); border-color: var(--crimson); background: var(--crimson-tint); }
.lpl-state {
  font-family: var(--font-headline);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}
.lpl-state-on {
  color: var(--success);
}

/* CTA action button */
.lobby-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.btn-cta-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  opacity: 0.7;
}
.lobby-wait {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.lobby-wait-dot {
  width: 8px;
  height: 8px;
  background: var(--crimson);
  border-radius: 50%;
  animation: hd-pulse 1.6s ease-in-out infinite;
}


/* ====================================================================
   STARTING — progress steps
   ==================================================================== */
.phase-starting {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 !important;
  min-height: 0;
  flex: 1;
}
.starting-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--bone-3);
}
.starting-progress-step {
  padding: 14px 18px;
  background: var(--ink);
  border-right: 1px solid var(--bone-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.starting-progress-step:last-child { border-right: none; }
.sps-num {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.04em;
}
.sps-label {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sps-state {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-faint);
}
.starting-progress-step-done .sps-state { color: var(--success); }
.starting-progress-step-current { background: var(--crimson-tint); }
.starting-progress-step-current .sps-num { color: var(--crimson); }
.starting-progress-step-current .sps-label { color: var(--bone); }
.starting-progress-step-current .sps-state { color: var(--crimson-bright); animation: hd-pulse 1.6s ease-in-out infinite; }

.starting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 64px;
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: center;
}
.starting-card {
  display: grid;
  grid-template-columns: auto 44px 1fr;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  min-height: 0;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  position: relative;
}
.starting-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--crimson);
}
.sc-num {
  font-family: var(--font-headline);
  font-size: 44px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sc-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  border: 1.5px solid var(--bone-3);
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  color: var(--bone);
}
.sc-name {
  font-family: var(--font-bold);
  font-size: 19px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====================================================================
   ROLE_DEAL — real playing card (player) + grid (host)
   ==================================================================== */
.role-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}
/* Real playing card: 5:7 ratio, double border, rounded, role-colored */
.role-card {
  width: min(360px, 78vh * 5 / 7);
  aspect-ratio: 5 / 7;
  max-height: calc(100dvh - 150px);
  border-radius: 16px;
  padding: 10px;
  background:
    linear-gradient(160deg, rgba(245,240,235,0.05), transparent 60%),
    var(--black-2);
  border: 1px solid var(--bone-3);
  box-shadow:
    0 0 0 1px var(--black),
    0 30px 60px -20px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(245,240,235,0.06);
  position: relative;
}
.role-card-inner {
  position: relative;
  height: 100%;
  border-radius: 9px;
  border: 1px solid var(--bone-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 22px;
  overflow: hidden;
}
.role-card[data-role-deal-role="DON"]      .role-card-inner,
.role-card[data-role-deal-role="MAFIA"]    .role-card-inner { border-color: var(--crimson-bright); }
.role-card[data-role-deal-role="COMMISSAR"].role-card-inner,
.role-card[data-role-deal-role="DOCTOR"]   .role-card-inner,
.role-card[data-role-deal-role="CITIZEN"]  .role-card-inner { border-color: var(--bone-faint); }

/* corner pips like a real card */
.rc-corner {
  position: absolute;
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rc-corner-tl { top: 10px; left: 12px; }
.rc-corner-br { bottom: 10px; right: 12px; transform: rotate(180deg); }

.rc-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.rc-icon-frame {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(245,240,235,0.08), transparent 70%);
  border: 1px solid var(--bone-faint);
  margin-bottom: 4px;
}
.role-card[data-role-deal-role="DON"] .rc-icon-frame,
.role-card[data-role-deal-role="MAFIA"] .rc-icon-frame {
  border-color: var(--crimson-bright);
  background: radial-gradient(circle at 50% 40%, rgba(255,71,86,0.14), transparent 70%);
}
.rc-icon { width: 80px; height: 80px; object-fit: contain; }
/* masked = silhouette filled with exact brand color */
img.icon-masked {
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.rc-icon.icon-masked { background-color: var(--bone); }
.role-card[data-role-deal-role="DON"] .rc-icon.icon-masked,
.role-card[data-role-deal-role="MAFIA"] .rc-icon.icon-masked { background-color: var(--crimson-bright); }
.rc-role {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-transform: uppercase;
}
.role-card[data-role-deal-role="DON"]      .rc-role,
.role-card[data-role-deal-role="MAFIA"]    .rc-role { color: var(--crimson-bright); }
.rc-team {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.rc-desc {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--bone-2);
  line-height: 1.5;
  text-align: center;
}
.role-card-confirm { max-width: 280px; }
.role-card-status {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.10em;
}

/* Host: role-deal grid */
.role-deal-host {
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
}
.role-deal-host > .lobby-hero-frame { flex-shrink: 0; }
.role-deal-host > .lobby-actions { flex-shrink: 0; }
.role-deal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: center;
}
.role-deal-card {
  display: grid;
  grid-template-columns: 44px 48px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  border-left-width: 3px;
  border-left-color: var(--bone-3);
}
.role-deal-card[data-confirmed="true"] {
  border-left-color: var(--bone-faint);
}
.role-deal-card-pending {
  border-left-color: var(--crimson);
}
.rdc-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.rdc-icon.icon-masked { background-color: var(--bone); }
/* Mafia icons → bright brand crimson everywhere */
.role-deal-card[data-role="DON"] .rdc-icon.icon-masked,
.role-deal-card[data-role="MAFIA"] .rdc-icon.icon-masked {
  background-color: var(--crimson-bright);
}
.rdc-num {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.rdc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rdc-name {
  font-family: var(--font-bold);
  font-size: 17px;
  font-weight: 700;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rdc-role {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.rdc-state {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* ====================================================================
   NIGHT_ZERO — team intro vs sleep
   ==================================================================== */
.phase-screen.phase-night-zero {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.night-zero-frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.night-zero-frame > .lobby-hero-frame { flex-shrink: 0; padding: 14px 0 10px; }
.night-zero-frame .lobby-hero-title { font-size: clamp(34px, 5vw, 52px); }
.night-zero-host,
.night-zero-frame {
  min-height: 0;
}
.night-zero-host {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.night-zero-host > .lobby-hero-frame { flex-shrink: 0; padding: 14px 0 10px; }
.night-zero-host .lobby-hero-title { font-size: clamp(34px, 5vw, 52px); }
.night-zero-host > .lobby-actions { flex-shrink: 0; }
.night-zero-host-grid { min-height: 0; overflow-y: auto; flex: 1; }
.nz-title-mafia { color: var(--crimson-bright); }
.nz-team-intro {
  text-align: center;
  padding: 18px 24px;
  background: var(--crimson-tint);
  border-left: 3px solid var(--crimson);
}
.nz-team-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bone);
  line-height: 1.5;
}
.nz-team-text b {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: 0.04em;
}

.nz-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.nz-team-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  border-left: 3px solid var(--crimson);
  align-items: center;
}
.nz-team-card[data-self="true"] {
  border-color: var(--bone);
  background: rgba(245, 240, 235, 0.06);
}
.ntc-portrait {
  width: 64px;
  height: 64px;
  background: var(--ink-3);
  border-radius: 50%;
  border: 2px solid var(--bone-3);
  display: grid;
  place-items: center;
  background-image: radial-gradient(circle at 50% 50%, rgba(245, 240, 235, 0.10) 1px, transparent 1.5px);
  background-size: 4px 4px;
}
.nz-team-card[data-self="true"] .ntc-portrait { border-color: var(--bone); }
.ntc-letter {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--bone);
}
.ntc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntc-num {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: 0.04em;
}
.ntc-name {
  font-family: var(--font-bold);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ntc-self-tag {
  font-family: var(--font-headline);
  font-size: 8.5px;
  font-weight: 700;
  color: var(--black);
  background: var(--bone);
  padding: 1px 5px;
  letter-spacing: 0.20em;
}
.ntc-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

.nz-sleep-icon {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  color: var(--bone-mute);
}
.nz-sleep-text {
  text-align: center;
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bone-mute);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

.night-zero-host-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.nzh-cell {
  background: var(--ink);
  border: 1px solid var(--bone-3);
  padding: 14px 16px;
}
.nzh-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.30em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.nzh-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nzh-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--black);
  border-left: 2px solid var(--bone-3);
}
.nzh-item[data-role="DON"],
.nzh-item[data-role="MAFIA"] { border-left-color: var(--crimson); }
.nzh-item[data-role="COMMISSAR"],
.nzh-item[data-role="DOCTOR"] { border-left-color: var(--success); }
.nzhi-num {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson-bright);
  text-align: center;
}
.nzhi-name {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--bone);
}
.nzhi-role {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ====================================================================
   NIGHT — per-role hero frames (already partially defined)
   ==================================================================== */
.phase-screen.phase-night {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Night stage = day .roster layout: ring + showcase absolute-centered.
   Action-bar floats as an overlay at top (does NOT push the ring down). */
.night-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
}
.night-bar-zone {
  position: absolute;
  top: 14px;
  left: calc(50% + var(--stage-shift));
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  justify-content: center;
  width: min(560px, 90vw);
}
.night-bar-zone .night-action-bar {
  margin-bottom: 0;
  width: 100%;
  max-height: 30vh;
  overflow-y: auto;
}
/* night-zero sleep view centers its sparse content */
.night-zero-sleep {
  justify-content: center;
  align-items: center;
  text-align: center;
}
/* Ring centered exactly like day (top:50%), NOT bottom-anchored */
.phase-night .roster-ring,
.phase-night-zero .roster-ring {
  --table-radius: clamp(190px, 24vmin, 290px);
  z-index: 1;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  height: calc(var(--table-radius) * 2 + var(--seat-h) * 1.2);
}
/* Night showcase centered exactly like day */
.showcase-night {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
}

/* Role-specific seat highlight — ONLY for the matching role's own view.
   Mafia (don+mafia) see fellow mafia seats; commissar sees own; doctor sees own. */
body[data-role="don"]   .night-ring > li[data-seat-role="DON"]   .seat,
body[data-role="don"]   .night-ring > li[data-seat-role="MAFIA"] .seat,
body[data-role="mafia"] .night-ring > li[data-seat-role="DON"]   .seat,
body[data-role="mafia"] .night-ring > li[data-seat-role="MAFIA"] .seat {
  border-color: var(--crimson);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--crimson), 0 0 16px rgba(230,57,70,0.35);
}
body[data-role="commissar"] .night-ring > li[data-seat-role="COMMISSAR"] .seat,
body[data-role="doctor"]    .night-ring > li[data-seat-role="DOCTOR"]    .seat {
  border-color: var(--bone);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--bone), 0 0 18px rgba(245,240,235,0.30);
}
/* "own seat" extra marker label */
body[data-role="don"]   .night-ring > li[data-seat-role="DON"]   .seat::after,
body[data-role="mafia"] .night-ring > li[data-seat-role="MAFIA"]:nth-child(2) .seat::after,
body[data-role="commissar"] .night-ring > li[data-seat-role="COMMISSAR"] .seat::after,
body[data-role="doctor"]    .night-ring > li[data-seat-role="DOCTOR"]    .seat::after {
  content: 'ВЫ';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-headline);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--bone);
  background: var(--crimson);
  padding: 2px 6px;
  z-index: 12;
}
body[data-role="commissar"] .night-ring > li[data-seat-role="COMMISSAR"] .seat::after,
body[data-role="doctor"]    .night-ring > li[data-seat-role="DOCTOR"]    .seat::after {
  background: var(--bone);
  color: var(--black);
}
/* Jewel-token crest at TOP of commissar/doctor own seat (distinct from mafia) */
body[data-role="commissar"] .night-ring > li[data-seat-role="COMMISSAR"] .seat::before,
body[data-role="doctor"]    .night-ring > li[data-seat-role="DOCTOR"]    .seat::before {
  content: '✦';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--black);
  background: var(--bone);
  border: 2px solid var(--black);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(245,240,235,0.45);
  z-index: 13;
}
body[data-role="doctor"] .night-ring > li[data-seat-role="DOCTOR"] .seat::before {
  content: '✚';
}
.night-frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.night-frame > .lobby-hero-frame { flex-shrink: 0; padding: 14px 0 10px; }
.night-frame > .btn,
.night-frame > .lobby-actions { flex-shrink: 0; }
.night-frame .lobby-hero-title { font-size: clamp(34px, 5vw, 52px); }
/* the action grid/lists scroll internally; header + confirm button pinned */
.night-don-grid,
.night-investigation,
.night-heal,
.night-mafia-watch,
.night-host-progress {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
}

/* DON dual-target */
.night-don-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.night-don-cell {
  background: var(--ink);
  border: 1px solid var(--crimson-edge);
  border-left: 3px solid var(--crimson);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.night-don-cell-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bone-3);
}
.ndch-num {
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: -0.04em;
}
.ndch-label {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.ndch-hint {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--bone-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.night-don-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.night-target {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  background: var(--black);
  border: 1px solid var(--bone-3);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
  letter-spacing: 0.04em;
}
.night-target:hover:not(:disabled) {
  background: var(--ink-2);
  border-color: var(--bone);
}
.night-target.selected,
.night-target[data-selected="true"] {
  background: var(--crimson);
  color: var(--bone);
  border-color: var(--crimson);
}
.night-target:disabled {
  opacity: 0.30;
  cursor: not-allowed;
}
.night-target-self { font-style: italic; }

/* MAFIA passive */
.night-mafia-watch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nmw-cell {
  background: var(--ink);
  border: 1px solid var(--crimson-edge);
  border-left: 3px solid var(--crimson);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nmw-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.nmw-target {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--black);
  border: 1px dashed var(--bone-3);
}
.nmw-target-icon {
  font-family: var(--font-num);
  font-size: 20px;
  color: var(--bone-faint);
}
.nmw-target-text {
  font-family: var(--font-headline);
  font-size: 13px;
  color: var(--bone-mute);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.nmw-team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nmw-mate {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  background: var(--black);
}
.nmw-mate[data-self="true"] {
  background: var(--crimson-tint);
}
.nmw-mate > span:nth-child(1) {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--crimson-bright);
  text-align: center;
}
.nmw-mate > span:nth-child(2) {
  font-family: var(--font-medium);
  color: var(--bone);
}
.nmw-mate > span:nth-child(3) {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* COMMISSAR investigation */
.night-investigation {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ni-prev {
  background: var(--ink);
  border: 1px solid var(--bone-3);
  padding: 14px 16px;
}
.ni-prev-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ni-prev-list { display: flex; flex-direction: column; gap: 4px; }
.ni-prev-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 7px 10px;
  background: var(--black);
  border-left: 2px solid var(--bone-3);
}
.ni-prev-clean { border-left-color: var(--success); }
.nip-tag {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
  text-align: center;
}
.nip-target {
  font-family: var(--font-medium);
  font-size: 12.5px;
  color: var(--bone);
}
.nip-result {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ni-section {
  background: var(--ink);
  border: 1px solid var(--success);
  border-left: 3px solid var(--success);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ni-section-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}

/* DOCTOR heal */
.night-heal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nh-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nh-rule {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--ink);
  border: 1px solid var(--bone-3);
  font-family: var(--font-medium);
  font-size: 12px;
  color: var(--bone-mute);
}
.nh-rule-icon {
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--success);
  text-align: center;
}

/* HOST night progress list */
.night-host-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--bone-3);
}
.nhp-row {
  display: grid;
  grid-template-columns: 30px 1fr 80px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--ink);
  border-left: 3px solid var(--bone-3);
}
.nhp-row[data-state="done"] { border-left-color: var(--success); background: rgba(201, 194, 182, 0.06); }
.nhp-row[data-role="DON"][data-state="pending"],
.nhp-row[data-role="MAFIA"][data-state="pending"] { border-left-color: var(--crimson); }
.nhp-num {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson-bright);
  text-align: center;
}
.nhp-name {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--bone);
}
.nhp-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nhp-action {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--bone-2);
}
.nhp-state {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.nhp-row[data-state="done"] .nhp-state { color: var(--success); }

/* ====================================================================
   VOTING — debate scene
   ==================================================================== */
.phase-voting {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 32px 16px !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.phase-voting > .voting-head,
.phase-voting > .voting-showcase,
.phase-voting > .voting-voters-block,
.phase-voting > .voting-actions { flex-shrink: 0; }
.phase-voting > .voting-leaderboard-block { flex: 1; min-height: 0; overflow-y: auto; }

/* Voting header — clean, no neuroslop eyebrow */
.voting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bone-3);
}
.voting-head-left { display: flex; align-items: baseline; gap: 16px; }
.voting-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.voting-progress {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.voting-timer { display: flex; align-items: baseline; gap: 6px; }
.voting-timer-num {
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 700;
  color: var(--crimson-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}
.voting-timer-unit {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.voting-timer-num.voting-timer-done { color: var(--bone-faint); }
.voting-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.voting-hint {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.voting-showcase {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--black);
  border: 2px solid var(--crimson);
  position: relative;
  box-shadow:
    0 0 0 4px var(--black),
    0 0 0 5px var(--crimson-edge),
    8px 8px 0 var(--crimson);
}
.vs-portrait {
  width: 140px;
  height: 140px;
  background: var(--ink);
  border: 3px solid var(--crimson);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background-image: radial-gradient(circle at 50% 50%, rgba(245, 240, 235, 0.10) 1px, transparent 1.5px);
  background-size: 5px 5px;
}
.vs-portrait-num {
  position: absolute;
  top: -10px;
  right: -10px;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 4px 10px;
  border: 2px solid var(--black);
}
.vs-portrait-letter {
  font-family: var(--font-headline);
  font-size: 64px;
  font-weight: 700;
  color: var(--bone);
}
.vs-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vs-meta-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.vs-meta-name {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-transform: uppercase;
  /* allow long Discord nicknames to wrap (max 2 lines) instead of clipping */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.vs-meta-by {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--bone-mute);
}
.vs-meta-by b {
  font-family: var(--font-headline);
  color: var(--bone);
  font-weight: 700;
}

.vs-tally {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--bone-3);
  padding-left: 24px;
}
.vs-tally-num {
  font-family: var(--font-headline);
  font-size: 80px;
  font-weight: 700;
  color: var(--crimson-bright);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vs-tally-meta { display: flex; flex-direction: column; gap: 2px; }
.vs-tally-label {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.vs-tally-sub {
  font-family: var(--font-headline);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.voting-voters-block {
  background: var(--ink);
  border: 1px solid var(--bone-3);
  padding: 14px 18px;
}
.vvb-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.vvb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vvb-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--crimson-tint);
  border: 1px solid var(--crimson-edge);
}
.vvb-pill-pending {
  background: transparent;
  border-color: var(--bone-3);
  opacity: 0.5;
}
.vp-av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  border: 1px solid var(--crimson-edge);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
  flex-shrink: 0;
}
.vvb-pill-pending .vp-av { border-color: var(--bone-3); color: var(--bone-mute); }
.vp-num {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson-bright);
}
.vvb-pill-pending .vp-num { color: var(--bone-faint); }
.vp-name {
  font-family: var(--font-medium);
  font-size: 12.5px;
  color: var(--bone);
}
.vvb-pill-pending .vp-name { color: var(--bone-mute); }

.voting-leaderboard-block {
  background: var(--ink);
  border: 1px solid var(--bone-3);
  padding: 14px 18px;
}
.vlb-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.30em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.vlb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.vlb-card {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--black);
  border: 1px solid var(--bone-3);
  border-left-width: 3px;
  border-left-color: var(--bone-3);
}
.vlb-card[data-state="current"] {
  border-left-color: var(--crimson);
  background: var(--crimson-tint);
}
.vlb-card[data-state="done"] { opacity: 0.62; }
.vlb-card[data-state="upcoming"] { opacity: 0.78; }
.vlb-card-portrait {
  width: 44px;
  height: 44px;
  background: var(--ink);
  border: 2px solid var(--bone-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 700;
  color: var(--bone);
}
.vlb-card[data-state="current"] .vlb-card-portrait {
  border-color: var(--crimson);
  color: var(--crimson-bright);
}
.vlb-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vlb-card-name {
  font-family: var(--font-bold);
  font-size: 15px;
  font-weight: 700;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vlb-bar {
  height: 6px;
  background: var(--ink);
  border: 1px solid var(--hairline-mid);
  overflow: hidden;
}
.vlb-bar-fill {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--crimson);
}
.vlb-card[data-state="done"] .vlb-bar-fill { background: var(--bone-mute); }
.vlb-card-count {
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  min-width: 28px;
  text-align: center;
}
.vlb-card[data-state="current"] .vlb-card-count { color: var(--crimson-bright); }
.vlb-card-tag {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone);
  background: var(--crimson);
  padding: 3px 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.vlb-card-tag-done {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-mute);
  border: 1px solid var(--bone-3);
  padding: 3px 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.vlb-card-tag-mute {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ====================================================================
   FINISHED — winner reveal + role dossier
   ==================================================================== */
.phase-finished {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 !important;
  min-height: 0;
  flex: 1;
}
.finished-hero {
  margin-bottom: 0;
  flex-shrink: 0;
}
.finished-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.86;
  text-transform: uppercase;
  color: var(--bone);
  text-shadow: 0 0 80px rgba(245, 240, 235, 0.15);
}
.finished-title[data-winner="CITY"] {
  color: var(--win-gold, #c9a961);
  text-shadow: 0 0 80px rgba(201, 169, 97, 0.30);
}
.finished-title[data-winner="MAFIA"] {
  color: var(--crimson-bright);
  text-shadow: 0 0 80px rgba(230, 57, 70, 0.30);
}
.finished-title[data-winner="DRAW"] {
  color: var(--bone-3);
  text-shadow: 0 0 80px rgba(245, 240, 235, 0.12);
}

.finished-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--bone-3);
  flex-shrink: 0;
}
.finished-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--ink);
  border-right: 1px solid var(--bone-3);
  align-items: center;
}
.finished-stat:last-child { border-right: none; }
.fs-num {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fs-label {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

.finished-reveals {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.fr-block { display: flex; flex-direction: column; min-height: 0; }
.fr-list { overflow-y: auto; min-height: 0; flex: 1; }

/* Host MVP selection */
.finished-actions { gap: 14px; flex-shrink: 0; }
.finished-mvp {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.finished-mvp-label {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.finished-mvp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.fr-block {
  background: var(--ink);
  border: 1px solid var(--bone-3);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.fr-block-mafia {
  border-left: 3px solid var(--crimson);
}
.fr-block-city {
  border-left: 3px solid var(--success);
}
.fr-block-head {
  display: flex;
  align-items: baseline;
  flex-shrink: 0;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bone-3);
  background: var(--black);
}
.fr-block-label {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.30em;
  text-transform: uppercase;
}
.fr-block-mafia .fr-block-label { color: var(--crimson-bright); }
.fr-block-city .fr-block-label { color: var(--success); }
.fr-block-meta {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.fr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; flex: 1; }
.fr-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ink-2);
  position: relative;
}
.fr-row:last-child { border-bottom: none; }
.fr-row[data-alive="false"] { opacity: 0.6; }
.fr-row[data-mvp="true"] {
  background: linear-gradient(90deg, rgba(245,240,235,0.07), transparent 60%);
}
.fr-row[data-mvp="true"]::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--bone);
}
.fr-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  border: 1.5px solid var(--bone-3);
  font-family: var(--font-headline);
  font-size: 17px;
  font-weight: 700;
  color: var(--bone);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fr-row[data-role="DON"] .fr-num,
.fr-row[data-role="MAFIA"] .fr-num { border-color: var(--crimson-edge); color: var(--crimson-bright); }
.fr-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fr-name {
  font-family: var(--font-bold);
  font-size: 15px;
  font-weight: 700;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fr-mvp {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  color: var(--black);
  background: var(--bone);
  padding: 1px 5px;
  letter-spacing: 0.16em;
}
.fr-handle {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--bone-mute);
  letter-spacing: 0.04em;
}
.fr-role {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-mute);
  padding: 3px 8px;
  border: 1px solid var(--bone-3);
}
.fr-row[data-role="DON"] .fr-role,
.fr-row[data-role="MAFIA"] .fr-role { color: var(--crimson-bright); border-color: var(--crimson-edge); }
.fr-row[data-role="COMMISSAR"] .fr-role,
.fr-row[data-role="DOCTOR"] .fr-role { color: var(--bone); border-color: var(--hairline-bold); }

.fr-delta {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.fr-delta-up { color: var(--bone); }
.fr-delta-down { color: var(--crimson-bright); }
.fr-state {
  font-size: 0;
  text-align: right;
  white-space: nowrap;
}
.fr-state::before {
  content: 'жив';
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone-mute);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.fr-row[data-alive="false"] .fr-state::before {
  content: 'убит';
  color: var(--crimson-bright);
}
