/* ==========================================================================
   《三秒讀心劇院》v2.0 — Grand Edition Styling
   Aesthetic: Midnight Velvet · Warm Tungsten Spotlight · Art Deco Gold Foil
   ========================================================================== */

:root {
  --velvet-deep: #060508;
  --velvet-mid: #0e0b13;
  --velvet-surface: #16121d;
  --velvet-elevated: #211b2b;
  --velvet-crimson: #45101e;
  --velvet-crimson-light: #781d35;

  --gold-white: #fff7e2;
  --gold-bright: #f5dda3;
  --gold-primary: #d4a853;
  --gold-muted: #987435;
  --gold-hairline: rgba(212, 168, 83, 0.25);
  --gold-hairline-strong: rgba(212, 168, 83, 0.58);

  --ink-primary: #f4ede1;
  --ink-secondary: #bbb09e;
  --ink-muted: #7d7365;

  --forensic-cyan: #72c8d4;
  --forensic-violet: #b68ee8;
  --forensic-crimson: #e05a6d;
  --forensic-emerald: #5cc49a;

  --font-serif: 'Baskerville', 'Cormorant Garamond', 'Songti TC', 'STSong', 'Noto Serif TC', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Helvetica Neue', 'Microsoft JhengHei', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-theater: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--velvet-deep);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(212, 168, 83, 0.32);
  color: var(--gold-white);
}

.hidden {
  display: none !important;
}

/* ==================== ATMOSPHERIC LAYERS ==================== */
.velvet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 58% at 50% -5%, rgba(88, 56, 24, 0.32), transparent 64%),
    radial-gradient(ellipse 70% 55% at 50% 105%, rgba(56, 16, 32, 0.42), transparent 68%),
    radial-gradient(circle at 15% 50%, rgba(30, 12, 24, 0.35), transparent 50%),
    radial-gradient(circle at 85% 50%, rgba(30, 12, 24, 0.35), transparent 50%),
    linear-gradient(180deg, #08060b 0%, #0d0a12 52%, #050407 100%);
  transition: opacity 0.8s var(--ease-theater);
}

.proscenium-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.86);
}

.spotlight-beam {
  position: fixed;
  top: -15%;
  left: 50%;
  width: 115vw;
  max-width: 1360px;
  height: 125vh;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 42% 58% at 50% 18%,
    rgba(248, 208, 130, 0.17) 0%,
    rgba(212, 168, 83, 0.065) 42%,
    transparent 72%
  );
  transition: opacity 0.45s ease, transform 0.35s ease-out;
}

body.blackout .spotlight-beam { opacity: 0 !important; }
body.blackout .stage-viewport { filter: brightness(0.05); transition: filter 0.1s ease; }

body.spotlight-tight .spotlight-beam {
  background: radial-gradient(
    ellipse 26% 46% at 50% 24%,
    rgba(250, 214, 142, 0.24) 0%,
    rgba(212, 168, 83, 0.06) 44%,
    transparent 70%
  );
}

body.spotlight-crimson .spotlight-beam {
  background: radial-gradient(
    ellipse 38% 54% at 50% 22%,
    rgba(224, 90, 109, 0.22) 0%,
    rgba(130, 24, 48, 0.08) 46%,
    transparent 72%
  );
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.backstage-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(rgba(114, 200, 212, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 200, 212, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  transition: opacity 0.9s var(--ease-theater);
}

body.mode-backstage .backstage-grid { opacity: 1; }
body.mode-backstage .spotlight-beam { opacity: 0.28; }

.dust-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ==================== HEAVY VELVET CURTAINS ==================== */
.curtain-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}

.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.52) 0px,
      rgba(104, 20, 38, 0.28) 26px,
      rgba(148, 30, 56, 0.16) 50px,
      rgba(0, 0, 0, 0.58) 82px
    ),
    linear-gradient(180deg, #2d0914 0%, #481020 45%, #1d050c 100%);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.88);
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.35, 1);
}

.curtain-left {
  left: 0;
  transform: translateX(-103%);
}

.curtain-right {
  right: 0;
  transform: translateX(103%);
}

.curtain-trim {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #987435, #f5dda3, #987435);
  box-shadow: 0 0 18px rgba(212, 168, 83, 0.5);
}

.curtain-left .curtain-trim { right: 0; }
.curtain-right .curtain-trim { left: 0; }

.curtain-overlay.closed .curtain-left { transform: translateX(0%); }
.curtain-overlay.closed .curtain-right { transform: translateX(0%); }

.curtain-valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 11px;
  background: linear-gradient(90deg, #3c101b, #751f34 50%, #3c101b);
  border-bottom: 1.5px solid var(--gold-hairline-strong);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.78);
}

/* ==================== ART DECO DOUBLE FRAME ==================== */
.theater-frame {
  position: fixed;
  inset: 14px;
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(212, 168, 83, 0.18);
}

.theater-frame-inner {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(212, 168, 83, 0.08);
}

.theater-frame .corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--gold-primary);
  border-style: solid;
  opacity: 0.85;
}

.corner-tl { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.corner-tr { top: -1px; right: -1px; border-width: 1.5px 1.5px 0 0; }
.corner-bl { bottom: -1px; left: -1px; border-width: 0 0 1.5px 1.5px; }
.corner-br { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; }

/* ==================== HEADER HUD ==================== */
.theater-header {
  position: fixed;
  top: 24px;
  left: 30px;
  right: 30px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.theater-header > * { pointer-events: auto; }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-emblem {
  color: var(--gold-primary);
  font-size: 13px;
  text-shadow: 0 0 12px rgba(212, 168, 83, 0.6);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
}

.brand-sub {
  font-family: var(--font-serif);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  border-left: 1px solid var(--gold-hairline);
  padding-left: 10px;
}

.act-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-theater);
}

.act-progress.visible {
  opacity: 1;
  transform: translateY(0);
}

.act-pip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--gold-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 10px;
  color: var(--ink-muted);
  background: rgba(14, 11, 19, 0.78);
  transition: all 0.35s var(--ease-theater);
}

.act-pip.active {
  border-color: var(--gold-white);
  color: var(--velvet-deep);
  background: linear-gradient(135deg, #f5dda3, #c9973e);
  box-shadow: 0 0 18px rgba(212, 168, 83, 0.65);
  font-weight: 700;
  transform: scale(1.12);
}

.act-pip.done {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  background: rgba(212, 168, 83, 0.16);
}

.act-line {
  width: 11px;
  height: 1px;
  background: var(--gold-hairline);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--gold-hairline);
  border-radius: 999px;
  background: rgba(14, 11, 19, 0.78);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-secondary);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
  animation: pulseDot 1.8s infinite;
}

body.mode-backstage .pulse-dot {
  background: var(--forensic-cyan);
  box-shadow: 0 0 10px var(--forensic-cyan);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.75); }
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-hairline);
  background: rgba(14, 11, 19, 0.8);
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.icon-btn:hover {
  border-color: var(--gold-bright);
  background: rgba(212, 168, 83, 0.15);
}

/* ==================== STAGE VIEWPORT & SCREENS ==================== */
.stage-viewport {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 82px 28px 44px;
  transition: filter 0.3s ease;
}

.screen {
  display: none;
  width: 100%;
  max-width: 1120px;
  animation: screenFadeIn 0.65s var(--ease-theater) forwards;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== FOYER / INTRO ==================== */
.intro-inner {
  text-align: center;
  max-width: 740px;
  padding: 18px 20px;
}

.playbill-crest {
  margin-bottom: 12px;
  opacity: 0.92;
  filter: drop-shadow(0 0 16px rgba(212, 168, 83, 0.35));
}

.playbill-tag {
  font-family: var(--font-serif);
  font-size: 11.5px;
  letter-spacing: 0.34em;
  color: var(--gold-primary);
  margin-bottom: 14px;
}

.main-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.title-zh {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.8vw, 4.3rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff9e8 0%, #ebd08e 48%, #b38333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 12px 34px rgba(212, 168, 83, 0.2));
}

.title-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  letter-spacing: 0.2em;
  color: var(--ink-secondary);
}

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px auto;
  width: 260px;
}

.ornament-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.ornament-divider .diamond {
  color: var(--gold-bright);
  font-size: 13px;
}

.referral-banner, .encore-banner {
  margin: 0 auto 20px;
  padding: 14px 22px;
  border: 1px solid var(--gold-hairline-strong);
  background: linear-gradient(135deg, rgba(72, 18, 34, 0.55), rgba(20, 15, 28, 0.9));
  border-radius: 4px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.referral-seal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.referral-banner p, .encore-banner p {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-primary);
}

.intro-lead {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.9;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.program-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.program-preview span {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border: 1px solid rgba(212, 168, 83, 0.22);
  border-radius: 2px;
  background: rgba(20, 15, 26, 0.65);
  color: var(--ink-secondary);
}

.intro-meta {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 12px 28px;
  border-top: 1px solid var(--gold-hairline);
  border-bottom: 1px solid var(--gold-hairline);
  margin-bottom: 30px;
}

.meta-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.meta-num { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--gold-bright); }
.meta-label { font-size: 11px; color: var(--ink-muted); letter-spacing: 0.08em; }
.meta-sep { width: 1px; height: 28px; background: var(--gold-hairline); }

.intro-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.audio-hint { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.06em; }

/* ==================== LUXURY BUTTONS ==================== */
.btn-gold-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 15px 40px;
  border: 1px solid var(--gold-bright);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(235, 194, 112, 0.24) 0%, rgba(154, 112, 40, 0.16) 100%);
  color: var(--gold-white);
  font-family: var(--font-serif);
  cursor: pointer;
  transition: all 0.3s var(--ease-theater);
  box-shadow: 0 0 36px rgba(212, 168, 83, 0.18), inset 0 1px 0 rgba(255, 248, 224, 0.3);
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 246, 214, 0.24), transparent);
  animation: shimmerSweep 3.8s infinite;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0% { left: -120%; }
  35%, 100% { left: 160%; }
}

.btn-gold-primary:hover {
  background: linear-gradient(180deg, rgba(242, 204, 126, 0.36) 0%, rgba(180, 134, 52, 0.28) 100%);
  box-shadow: 0 0 48px rgba(212, 168, 83, 0.36), inset 0 1px 0 rgba(255, 248, 224, 0.5);
  transform: translateY(-1px);
}

.btn-gold-primary:active { transform: translateY(1px); }
.btn-gold-primary .btn-label { font-size: 17px; font-weight: 600; letter-spacing: 0.14em; }
.btn-gold-primary .btn-sub { font-size: 10px; letter-spacing: 0.24em; color: var(--gold-primary); opacity: 0.88; }
.btn-gold-primary.btn-sm { padding: 9px 20px; flex-direction: row; }
.btn-gold-primary.btn-sm .btn-label { font-size: 13px; letter-spacing: 0.08em; }

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--gold-hairline-strong);
  border-radius: 3px;
  background: rgba(16, 13, 22, 0.72);
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-outline-gold:hover {
  border-color: var(--gold-white);
  background: rgba(212, 168, 83, 0.16);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-ghost:hover { border-color: var(--gold-hairline-strong); color: var(--gold-bright); }
.btn-xs { padding: 6px 12px; font-size: 12px; }

/* ==================== ACT STAGE COMMON ==================== */
.act-header {
  text-align: center;
  max-width: 760px;
  margin-bottom: 20px;
}

.act-roman {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 7px;
}

.act-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  margin-bottom: 9px;
}

.act-prompt {
  font-family: var(--font-serif);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.75;
  color: var(--ink-secondary);
  min-height: 28px;
}

.act-prompt strong { color: var(--gold-bright); }

.act-stage-area {
  position: relative;
  width: 100%;
  min-height: 375px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 20px;
  border: 1px solid var(--gold-hairline);
  background:
    radial-gradient(ellipse 68% 68% at 50% 42%, rgba(42, 31, 52, 0.62), rgba(10, 8, 14, 0.92));
  border-radius: 6px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(245, 221, 163, 0.12),
    inset 0 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.act-footer {
  margin-top: 20px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  max-width: 760px;
}

.magician-whisper {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--gold-white);
  letter-spacing: 0.05em;
  animation: fadeUp 0.55s var(--ease-theater) forwards;
}

.magician-sub-whisper {
  font-size: 13px;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  line-height: 1.65;
}

.magician-sub-whisper strong { color: var(--gold-bright); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.countdown-bar-wrap {
  width: 280px;
  height: 3.5px;
  background: rgba(212, 168, 83, 0.16);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 16px;
}

.countdown-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold-muted), var(--gold-white));
  transform-origin: left;
  box-shadow: 0 0 12px rgba(245, 221, 163, 0.6);
}

/* ==================== ACT I: LUXURY THEORY11-STYLE CARDS ==================== */
.deck-focus-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
  margin-bottom: 16px;
  padding: 5px 14px;
  border: 1px solid var(--gold-hairline-strong);
  border-radius: 99px;
  background: rgba(212, 168, 83, 0.1);
}

.card-deck-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(84px, 120px));
  gap: 16px;
  justify-content: center;
  perspective: 1100px;
}

.card-deck-grid.five-cards {
  grid-template-columns: repeat(5, minmax(92px, 128px));
  gap: 20px;
}

.playing-card {
  position: relative;
  aspect-ratio: 2.5 / 3.6;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 20%, #fffcf4 0%, #f5ebd4 55%, #e5d2b0 100%);
  border: 1.5px solid #c99d4b;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.6),
    inset 0 0 0 3px #f9f2e3,
    inset 0 0 0 4.5px rgba(182, 138, 62, 0.55);
  color: #17131c;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 9px;
  user-select: none;
  cursor: default;
  transition: transform 0.35s var(--ease-theater), box-shadow 0.35s ease;
  animation: cardDeal 0.52s var(--ease-theater) backwards;
  overflow: hidden;
}

.playing-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 35%, rgba(255, 250, 232, 0.45) 50%, transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.playing-card:hover::after { opacity: 1; }
.playing-card.red { color: #9c172a; }

.playing-card.spotlight-row {
  box-shadow:
    0 16px 38px rgba(212, 168, 83, 0.25),
    inset 0 0 0 3px #fcf6e8,
    inset 0 0 0 4.5px rgba(196, 148, 64, 0.72);
}

.playing-card.force-subtle {
  transform: translateY(-4px) rotate(-0.9deg);
  box-shadow:
    0 20px 44px rgba(240, 198, 114, 0.34),
    inset 0 0 0 3px #fffaf0,
    inset 0 0 0 5px rgba(212, 162, 68, 0.88);
}

.playing-card.dimmed-row {
  opacity: 0.52;
  filter: brightness(0.74) saturate(0.75);
}

.playing-card:hover { transform: translateY(-7px) scale(1.04); }

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-family: var(--font-serif);
  font-weight: 700;
  width: 22px;
}

.card-corner.bottom { align-self: flex-end; transform: rotate(180deg); }
.card-rank { font-size: 17px; }
.card-suit-sm { font-size: 13px; }

.card-center-art {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  position: relative;
}

.card-center-crest {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px dashed rgba(182, 138, 62, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.1), transparent 70%);
}

@keyframes cardDeal {
  from { opacity: 0; transform: translateY(28px) rotateX(18deg) scale(0.9); }
  to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

/* ==================== ACT II: WAX ENVELOPE & RELICS ==================== */
.envelope-stage { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }

.wax-envelope {
  position: relative;
  width: 236px;
  height: 122px;
  background: linear-gradient(160deg, #2a2033 0%, #140f1b 100%);
  border: 1px solid var(--gold-hairline-strong);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  transition: all 0.5s var(--ease-theater);
}

.wax-envelope::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 58px;
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.14), transparent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 1px solid rgba(212, 168, 83, 0.25);
}

.wax-seal {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c92d42 0%, #831426 62%, #4a0813 100%);
  border: 1.5px solid rgba(245, 221, 163, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-white);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65), inset 0 2px 5px rgba(255, 255, 255, 0.22);
  transition: transform 0.45s ease, opacity 0.4s ease;
}

.wax-envelope.opened .wax-seal { transform: scale(1.55) rotate(28deg); opacity: 0; }
.envelope-caption { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--gold-muted); margin-top: 8px; }

.prediction-slip {
  position: absolute;
  inset: 6px;
  background: linear-gradient(160deg, #fdf6e6 0%, #ebd6b0 100%);
  color: #1c140d;
  border: 1.5px solid #b88a38;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition: all 0.6s var(--ease-theater);
  pointer-events: none;
}

.wax-envelope.opened .prediction-slip {
  opacity: 1;
  transform: translateY(-8px) scale(1.07);
  box-shadow: 0 20px 44px rgba(212, 168, 83, 0.38);
}

.prediction-slip-label { font-size: 10px; letter-spacing: 0.22em; color: #7c5c22; }
.prediction-slip-value { font-family: var(--font-serif); font-size: 24px; font-weight: 700; letter-spacing: 0.14em; color: #24170c; margin-top: 3px; }

.relic-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 170px)); gap: 18px; width: 100%; justify-content: center; }

.relic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 14px 18px;
  border: 1px solid var(--gold-hairline);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(30, 23, 39, 0.92), rgba(14, 11, 19, 0.96));
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.35s var(--ease-theater);
}

.relic-card:hover:not(.eliminated):not(.locked) {
  border-color: var(--gold-bright);
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(212, 168, 83, 0.24);
}

.relic-card.selected {
  border-color: var(--gold-white);
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.24), rgba(28, 22, 36, 0.95));
  box-shadow: 0 0 30px rgba(212, 168, 83, 0.35);
}

.relic-card.eliminated { opacity: 0.14; transform: scale(0.86); filter: grayscale(1); pointer-events: none; }
.relic-card.final-winner { border-color: var(--gold-white); box-shadow: 0 0 48px rgba(245, 221, 163, 0.45); transform: scale(1.06); }
.relic-svg { width: 58px; height: 58px; color: var(--gold-bright); }
.relic-name { font-family: var(--font-serif); font-size: 18px; font-weight: 600; letter-spacing: 0.12em; }
.relic-en { font-family: var(--font-serif); font-style: italic; font-size: 11px; letter-spacing: 0.16em; color: var(--ink-muted); }

/* ==================== ACT III: NIXIE TUNGSTEN BULBS ==================== */
.flash-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 270px; }

.crosshair-ring {
  position: relative;
  width: 204px;
  height: 204px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(212, 168, 83, 0.16), inset 0 0 34px rgba(212, 168, 83, 0.1);
}

.crosshair-ring::before, .crosshair-ring::after { content: ''; position: absolute; background: rgba(212, 168, 83, 0.24); }
.crosshair-ring::before { width: 100%; height: 1px; }
.crosshair-ring::after { width: 1px; height: 100%; }

.flash-digit {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: 92px;
  font-weight: 600;
  color: var(--gold-white);
  text-shadow: 0 0 38px rgba(245, 205, 128, 0.65);
  transition: transform 0.08s ease;
}

.bulb-arc-grid { display: grid; grid-template-columns: repeat(9, minmax(56px, 78px)); gap: 12px; justify-content: center; padding: 18px 8px; }

.number-bulb {
  position: relative;
  aspect-ratio: 1 / 1.24;
  border-radius: 14px 14px 36px 36px;
  border: 1px solid var(--gold-hairline);
  background:
    radial-gradient(ellipse 65% 45% at 50% 25%, rgba(255, 232, 180, 0.14), transparent 65%),
    radial-gradient(circle at 50% 45%, rgba(44, 34, 54, 0.92), rgba(12, 9, 17, 0.98));
  color: var(--ink-secondary);
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s var(--ease-theater);
  box-shadow: inset 0 6px 14px rgba(255, 240, 200, 0.06), 0 10px 24px rgba(0, 0, 0, 0.5);
}

.number-bulb::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 26%;
  right: 26%;
  height: 3px;
  border-radius: 99px;
  background: rgba(245, 221, 163, 0.28);
}

.number-bulb:hover {
  border-color: var(--gold-bright);
  color: var(--gold-white);
  background: radial-gradient(circle at 50% 38%, rgba(248, 208, 130, 0.36), rgba(32, 24, 38, 0.95));
  box-shadow: 0 0 32px rgba(245, 205, 128, 0.38);
  transform: translateY(-6px);
}

.number-bulb.lit {
  border-color: var(--gold-white);
  color: #16100a;
  background: radial-gradient(circle at 50% 35%, #fff8e4 0%, #e8b85e 66%, #9b7028 100%);
  box-shadow: 0 0 46px rgba(245, 205, 128, 0.78);
  transform: translateY(-8px) scale(1.09);
}

.number-bulb.ghost-aim {
  border-color: var(--forensic-crimson);
  box-shadow: 0 0 24px rgba(224, 90, 109, 0.55);
}

/* ==================== ACT IV: MINI VICTORIAN STAGE ==================== */
.mini-theater-wrap {
  position: relative;
  width: 100%;
  max-width: 780px;
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--gold-hairline-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #09070d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
}

.mini-theater-svg { width: 100%; height: 100%; display: block; }
.flicker-veil { position: absolute; inset: 0; background: #050307; opacity: 0; pointer-events: none; transition: opacity 0.08s ease; z-index: 5; }
.flicker-veil.flash { opacity: 0.97; }
.moth-choice-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.stage-compare-badge {
  position: absolute; top: 14px; left: 14px; z-index: 8;
  padding: 6px 13px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  border: 1px solid var(--gold-bright); background: rgba(10, 8, 14, 0.88); color: var(--gold-bright); border-radius: 3px;
}

/* ==================== ACT V: THE VELVET STROOP ==================== */
.stroop-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 620px;
}

.stroop-round-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold-primary);
  padding: 4px 14px;
  border: 1px solid var(--gold-hairline);
  border-radius: 99px;
}

.stroop-word-card {
  width: 280px;
  height: 150px;
  border: 1px solid var(--gold-hairline-strong);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 45%, rgba(30, 24, 40, 0.92), rgba(10, 8, 15, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6);
}

.stroop-word-text {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 28px currentColor;
  animation: fadeUp 0.18s ease;
}

.stroop-color-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}

.stroop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid var(--gold-hairline);
  border-radius: 4px;
  background: rgba(18, 14, 26, 0.88);
  color: var(--ink-primary);
  font-family: var(--font-serif);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stroop-btn:hover {
  border-color: var(--gold-bright);
  transform: translateY(-2px);
  background: rgba(34, 26, 46, 0.95);
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

/* ==================== ACT VI: DRM FALSE MEMORY ==================== */
.memory-flash-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 16px;
}

.memory-flash-word {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-white);
  text-shadow: 0 0 42px rgba(245, 214, 148, 0.5);
  animation: wordPulse 0.6s var(--ease-theater);
}

@keyframes wordPulse {
  0% { opacity: 0; transform: scale(0.9); filter: blur(4px); }
  25% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 1; transform: scale(1.03); }
}

.memory-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 185px));
  gap: 16px;
  justify-content: center;
}

.memory-word-btn {
  padding: 24px 16px;
  border: 1px solid var(--gold-hairline);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(28, 22, 38, 0.92), rgba(14, 11, 20, 0.96));
  color: var(--ink-primary);
  font-family: var(--font-serif);
  font-size: 23px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: all 0.25s var(--ease-theater);
}

.memory-word-btn:hover:not(:disabled) {
  border-color: var(--gold-bright);
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(212, 168, 83, 0.22);
}

.memory-word-btn.picked {
  border-color: var(--gold-white);
  background: rgba(212, 168, 83, 0.22);
  color: var(--gold-white);
  box-shadow: 0 0 28px rgba(212, 168, 83, 0.35);
}

.memory-word-btn.false-caught {
  border-color: var(--forensic-crimson);
  background: rgba(224, 90, 109, 0.24);
  color: #ffd5dc;
  box-shadow: 0 0 36px rgba(224, 90, 109, 0.55);
}

/* ==================== ACT VII: PHANTOM AUDIENCE DOORS ==================== */
.door-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 240px));
  gap: 22px;
  justify-content: center;
  width: 100%;
}

.theater-door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 18px 20px;
  border: 1px solid var(--gold-hairline);
  border-radius: 100px 100px 6px 6px;
  background:
    radial-gradient(ellipse 80% 55% at 50% 20%, rgba(212, 168, 83, 0.14), transparent 70%),
    linear-gradient(180deg, #22172c 0%, #100b16 100%);
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.35s var(--ease-theater);
  overflow: hidden;
}

.theater-door:hover:not(.locked) {
  border-color: var(--gold-bright);
  transform: translateY(-6px);
  box-shadow: 0 18px 46px rgba(212, 168, 83, 0.26);
}

.theater-door.popular-glow {
  border-color: rgba(245, 221, 163, 0.72);
  box-shadow: 0 0 34px rgba(245, 221, 163, 0.18);
}

.theater-door.chosen-door {
  border-color: var(--gold-white);
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.26), #150f1d);
  box-shadow: 0 0 46px rgba(245, 221, 163, 0.45);
}

.door-roman { font-family: var(--font-serif); font-size: 12px; letter-spacing: 0.24em; color: var(--gold-primary); margin-bottom: 6px; }
.door-name { font-family: var(--font-serif); font-size: 20px; font-weight: 600; letter-spacing: 0.1em; color: var(--gold-bright); margin-bottom: 12px; }

.door-live-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(10, 8, 14, 0.82);
  border: 1px solid var(--gold-hairline);
  color: var(--forensic-cyan);
  margin-bottom: 10px;
}

.door-live-badge.warn { color: var(--forensic-crimson); border-color: rgba(224, 90, 109, 0.5); }
.door-live-badge.hot { color: var(--gold-bright); border-color: var(--gold-bright); }

.door-vote-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.door-vote-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-muted), var(--gold-bright));
  transition: width 0.5s ease;
}

/* ==================== ACT VIII: COLD READ DOSSIER ==================== */
.cold-read-dossier {
  width: 100%;
  max-width: 720px;
  padding: 32px 36px;
  border: 1px solid var(--gold-hairline-strong);
  background: linear-gradient(180deg, rgba(26, 20, 34, 0.94), rgba(12, 9, 16, 0.98));
  border-radius: 4px;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.dossier-stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold-primary);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--gold-hairline);
  padding-bottom: 10px;
}

.cold-read-lines { display: flex; flex-direction: column; gap: 13px; font-family: var(--font-serif); font-size: 17.5px; line-height: 1.85; color: var(--ink-primary); min-height: 210px; }
.cold-read-line { opacity: 0; animation: fadeUp 0.7s var(--ease-theater) forwards; }

.rating-panel {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--gold-hairline);
  display: flex; flex-direction: column; align-items: center; gap: 14px; animation: fadeUp 0.6s var(--ease-theater) forwards;
}

.rating-label { font-family: var(--font-serif); font-size: 16px; color: var(--gold-bright); }
.accuracy-slider-row { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 430px; }

.gold-range {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px;
  background: rgba(212, 168, 83, 0.25); border-radius: 99px; outline: none;
}

.gold-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-bright); border: 2px solid var(--velvet-deep);
  box-shadow: 0 0 14px rgba(212, 168, 83, 0.75); cursor: pointer;
}

.accuracy-value { font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--gold-bright); min-width: 64px; text-align: right; }

/* ==================== CLIMAX / PULL BACK THE CURTAIN ==================== */
.climax-inner { text-align: center; max-width: 680px; padding: 20px; }
.climax-title { font-family: var(--font-serif); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600; letter-spacing: 0.14em; color: var(--gold-bright); margin-bottom: 18px; }
.climax-quote { font-family: var(--font-serif); font-size: 19px; line-height: 1.9; color: var(--ink-secondary); margin-bottom: 38px; }

.curtain-switch-box {
  display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px 28px;
  border: 1px solid var(--gold-hairline-strong);
  background: linear-gradient(180deg, rgba(32, 25, 42, 0.85), rgba(12, 9, 17, 0.95));
  border-radius: 8px; box-shadow: 0 26px 70px rgba(0, 0, 0, 0.7);
}

.switch-caption { font-size: 14px; color: var(--ink-secondary); letter-spacing: 0.05em; }

.brass-switch {
  display: inline-flex; align-items: center; gap: 20px; padding: 16px 28px 16px 20px;
  border: 1.5px solid var(--gold-bright); border-radius: 999px;
  background: linear-gradient(180deg, #2d2217 0%, #150f0a 100%);
  color: var(--gold-white); cursor: pointer; transition: all 0.35s var(--ease-theater);
  box-shadow: 0 0 38px rgba(212, 168, 83, 0.26), inset 0 2px 6px rgba(0, 0, 0, 0.7);
}

.brass-switch:hover { box-shadow: 0 0 58px rgba(245, 221, 163, 0.48); transform: scale(1.02); }
.switch-track { position: relative; width: 62px; height: 32px; border-radius: 999px; background: rgba(212, 168, 83, 0.18); border: 1px solid var(--gold-primary); display: flex; align-items: center; padding: 3px; }
.switch-knob { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8e2, #d4a853 65%, #8a6422 100%); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65); transition: transform 0.4s var(--ease-theater); }
.brass-switch.toggled .switch-knob { transform: translateX(30px); }
.brass-switch.toggled .switch-track { background: rgba(114, 200, 212, 0.35); border-color: var(--forensic-cyan); }
.switch-labels { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.switch-main { font-family: var(--font-serif); font-size: 21px; font-weight: 700; letter-spacing: 0.14em; }
.switch-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-secondary); }

/* ==================== BACKSTAGE REVEAL THEATER ==================== */
.screen-reveal { align-items: stretch; max-width: 1140px; }
.reveal-header { width: 100%; margin-bottom: 18px; }
.reveal-top-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.backstage-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--forensic-cyan); margin-bottom: 6px; }
.reveal-title { font-family: var(--font-serif); font-size: clamp(1.5rem, 2.8vw, 2.15rem); font-weight: 600; letter-spacing: 0.08em; color: var(--gold-bright); }
.reveal-top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.forensic-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.forensic-stat { padding: 14px 16px; border: 1px solid var(--gold-hairline); background: rgba(16, 13, 22, 0.85); border-radius: 4px; }
.forensic-stat-label { font-size: 11px; color: var(--ink-muted); letter-spacing: 0.06em; margin-bottom: 4px; }
.forensic-stat-val { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--gold-bright); }
.forensic-stat-sub { font-size: 11px; color: var(--forensic-cyan); margin-top: 2px; }

.reveal-tabs { display: flex; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--gold-hairline); padding-bottom: 12px; }

.reveal-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px;
  border: 1px solid var(--gold-hairline); border-radius: 4px;
  background: rgba(18, 14, 24, 0.72); color: var(--ink-secondary);
  font-size: 12.5px; cursor: pointer; transition: all 0.22s ease;
}

.reveal-tab:hover { border-color: var(--gold-primary); color: var(--gold-bright); }
.reveal-tab.active { border-color: var(--gold-bright); background: rgba(212, 168, 83, 0.18); color: var(--gold-white); font-weight: 500; }
.tab-num { font-family: var(--font-serif); color: var(--gold-primary); font-weight: 600; }

.reveal-body {
  width: 100%; border: 1px solid var(--gold-hairline);
  background: rgba(12, 9, 17, 0.9); border-radius: 6px; padding: 24px; min-height: 450px;
}

.reveal-split { display: grid; grid-template-columns: 1.32fr 1fr; gap: 24px; align-items: start; }
.replay-stage-box { display: flex; flex-direction: column; gap: 12px; }
.replay-canvas-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--gold-hairline-strong); border-radius: 4px; background: #09070d; overflow: hidden; }
.replay-canvas-frame canvas { width: 100%; height: 100%; display: block; }

.replay-controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--gold-hairline); border-radius: 4px; background: rgba(20, 16, 28, 0.88); }
.replay-btn { padding: 6px 11px; border: 1px solid var(--gold-hairline-strong); background: rgba(212, 168, 83, 0.12); color: var(--gold-bright); border-radius: 3px; font-family: var(--font-mono); font-size: 11.5px; cursor: pointer; }
.replay-btn.active { background: var(--gold-primary); color: var(--velvet-deep); font-weight: 600; }
.replay-scrubber { flex: 1; min-width: 110px; }
.replay-timecode { font-family: var(--font-mono); font-size: 12px; color: var(--forensic-cyan); min-width: 96px; text-align: right; }

.forensic-notes { display: flex; flex-direction: column; gap: 14px; }
.note-card { padding: 16px 18px; border: 1px solid var(--gold-hairline); border-left: 3px solid var(--gold-primary); background: rgba(22, 18, 30, 0.75); border-radius: 4px; }
.note-card.cyan { border-left-color: var(--forensic-cyan); }
.note-card.crimson { border-left-color: var(--forensic-crimson); }
.note-card h4 { font-family: var(--font-serif); font-size: 16px; color: var(--gold-bright); margin-bottom: 6px; letter-spacing: 0.06em; }
.note-card p { font-size: 13.5px; line-height: 1.75; color: var(--ink-secondary); }
.note-card strong { color: var(--gold-bright); }

.swap-diff-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.swap-pair { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--gold-hairline); border-radius: 4px; background: rgba(16, 12, 22, 0.88); font-family: var(--font-mono); font-size: 13px; }
.swap-before { color: var(--ink-secondary); text-decoration: line-through; opacity: 0.7; }
.swap-arrow { color: var(--forensic-crimson); font-size: 11px; }
.swap-after { color: var(--gold-bright); font-weight: 600; }

.equivoque-tree { padding: 18px; border: 1px solid var(--gold-hairline); border-radius: 6px; background: rgba(12, 9, 17, 0.88); }
.tree-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.tree-node { padding: 14px 16px; border: 1px solid var(--gold-hairline); border-radius: 4px; background: rgba(24, 19, 32, 0.72); font-size: 13px; line-height: 1.65; color: var(--ink-secondary); }
.tree-node.taken { border-color: var(--gold-bright); background: rgba(212, 168, 83, 0.14); color: var(--ink-primary); box-shadow: 0 0 22px rgba(212, 168, 83, 0.18); }
.tree-badge { display: inline-block; font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 3px; background: rgba(212, 168, 83, 0.18); color: var(--gold-bright); margin-bottom: 6px; }

.compare-slider-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--gold-hairline-strong); border-radius: 6px; overflow: hidden; user-select: none; cursor: ew-resize; }
.compare-layer { position: absolute; inset: 0; }
.compare-layer-after { clip-path: inset(0 0 0 50%); }
.compare-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--gold-bright); box-shadow: 0 0 14px var(--gold-primary); z-index: 10; pointer-events: none; }
.compare-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--gold-bright); color: var(--velvet-deep); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; box-shadow: 0 0 18px rgba(0, 0, 0, 0.8); }

/* Word Proof Pills (Act VI Reveal) */
.word-proof-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.word-proof-chip {
  padding: 10px 6px;
  text-align: center;
  border: 1px solid var(--gold-hairline);
  border-radius: 4px;
  background: rgba(22, 18, 30, 0.85);
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-primary);
}

.lure-stamp-box {
  padding: 14px 18px;
  border: 1.5px dashed var(--forensic-crimson);
  background: rgba(224, 90, 109, 0.1);
  border-radius: 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #ffb8c2;
}

/* Radar Chart Canvas Box */
.radar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--gold-hairline);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 50%, rgba(30, 24, 42, 0.72), rgba(10, 8, 15, 0.94));
}

.radar-panel canvas {
  max-width: 100%;
  height: auto;
}

/* Barnum Highlighter */
.barnum-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px; }
.legend-chip { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; }
.hl-barnum { background: rgba(182, 142, 232, 0.22); border-bottom: 1.5px solid var(--forensic-violet); padding: 1px 4px; border-radius: 2px; }
.hl-telemetry { background: rgba(212, 168, 83, 0.24); border-bottom: 1.5px solid var(--gold-bright); padding: 1px 4px; border-radius: 2px; color: var(--gold-bright); }

.vuln-bars { display: flex; flex-direction: column; gap: 11px; }
.vuln-row-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.vuln-track { height: 7px; background: rgba(255, 255, 255, 0.07); border-radius: 99px; overflow: hidden; }
.vuln-fill { height: 100%; background: linear-gradient(90deg, var(--gold-muted), var(--gold-bright)); border-radius: 99px; }

/* ==================== TICKET MODAL ==================== */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(5, 4, 8, 0.88); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeUp 0.3s ease; }
.modal-card { position: relative; width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto; padding: 28px 30px; border: 1px solid var(--gold-hairline-strong); border-radius: 6px; background: linear-gradient(180deg, #171220 0%, #0d0a12 100%); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.88); }
.modal-close { position: absolute; top: 16px; right: 18px; background: transparent; border: none; color: var(--ink-secondary); font-size: 28px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--gold-bright); }
.modal-head h3 { font-family: var(--font-serif); font-size: 22px; color: var(--gold-bright); margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--ink-secondary); margin-bottom: 16px; }
.ticket-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--ink-secondary); }
.ticket-name-row input { background: rgba(10, 8, 14, 0.85); border: 1px solid var(--gold-hairline-strong); color: var(--gold-bright); padding: 6px 12px; border-radius: 3px; font-size: 13px; width: 170px; outline: none; }
.ticket-canvas-wrap { width: 100%; border-radius: 6px; overflow: hidden; border: 1px solid var(--gold-hairline); margin-bottom: 18px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7); }
.ticket-canvas-wrap canvas { width: 100%; height: auto; display: block; }
.ticket-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ticket-actions > button { flex: 1; min-width: 200px; }
.share-preview-box { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--gold-hairline); border-radius: 4px; background: rgba(10, 8, 14, 0.65); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.65; color: var(--ink-secondary); word-break: break-all; }

/* ==================== TOAST ==================== */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 100; padding: 10px 22px; border: 1px solid var(--gold-bright); border-radius: 999px; background: rgba(16, 12, 22, 0.95); color: var(--gold-bright); font-size: 13px; letter-spacing: 0.06em; opacity: 0; pointer-events: none; transition: all 0.35s var(--ease-theater); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .brand-sub { display: none; }
  .card-deck-grid { grid-template-columns: repeat(4, minmax(72px, 104px)); gap: 10px; }
  .card-deck-grid.five-cards { grid-template-columns: repeat(5, minmax(58px, 92px)); gap: 8px; }
  .relic-grid { grid-template-columns: repeat(2, minmax(128px, 180px)); }
  .bulb-arc-grid { grid-template-columns: repeat(3, minmax(68px, 92px)); gap: 10px; }
  .door-grid { grid-template-columns: 1fr; max-width: 340px; }
  .forensic-strip { grid-template-columns: repeat(2, 1fr); }
  .reveal-split { grid-template-columns: 1fr; }
  .tree-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .theater-frame { inset: 6px; }
  .theater-header { top: 12px; left: 14px; right: 14px; }
  .act-progress { display: none; }
  .stage-viewport { padding: 68px 14px 30px; }
  .card-deck-grid { grid-template-columns: repeat(3, minmax(78px, 96px)); }
  .stroop-color-btns { grid-template-columns: repeat(2, 1fr); }
  .memory-card-grid { grid-template-columns: repeat(2, 1fr); }
  .word-proof-grid { grid-template-columns: repeat(2, 1fr); }
  .swap-diff-grid { grid-template-columns: repeat(3, 1fr); }
}
