/* ==========================================================================
   《它知道你在猶豫》 v2.0 — Swiss Avant-Garde Behavioral Lab × Darkroom Dossier
   ========================================================================== */

:root {
  --bg: #f3efe6;
  --bg-elevated: #faf7f0;
  --bg-subtle: #e7e1d5;
  --ink: #0f0f10;
  --ink-muted: #57544d;
  --ink-faint: #8c877c;
  --accent: #d42b22;
  --accent-glow: rgba(212, 43, 34, 0.25);
  --accent-soft: rgba(212, 43, 34, 0.09);
  --accent-border: rgba(212, 43, 34, 0.36);
  --amber: #b87314;
  --border: rgba(15, 15, 16, 0.13);
  --border-strong: rgba(15, 15, 16, 0.32);
  --grid-line: rgba(15, 15, 16, 0.045);
  --shadow-sm: 0 4px 16px rgba(15, 15, 16, 0.045);
  --shadow-lg: 0 28px 64px rgba(15, 15, 16, 0.12);

  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --font-sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Interrogation Mode (Act III & Caught Ambushes) */
body[data-theme="interrogation"] {
  --bg: #09090b;
  --bg-elevated: #111115;
  --bg-subtle: #19191f;
  --ink: #ede9e0;
  --ink-muted: #9b968c;
  --ink-faint: #625f58;
  --accent: #ff3b30;
  --accent-glow: rgba(255, 59, 48, 0.35);
  --accent-soft: rgba(255, 59, 48, 0.13);
  --accent-border: rgba(255, 59, 48, 0.45);
  --border: rgba(237, 233, 224, 0.11);
  --border-strong: rgba(237, 233, 224, 0.3);
  --grid-line: rgba(237, 233, 224, 0.038);
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.72);
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.75s var(--ease-out), color 0.75s var(--ease-out);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Paper Grain & Subtle Vignette */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.036;
  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");
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.06) 100%);
  transition: background 0.8s ease;
}

body[data-theme="interrogation"] .vignette-overlay {
  background: radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.52) 100%);
}

/* Architectural Cursor Crosshair Guides */
.crosshair-x,
.crosshair-y {
  position: fixed;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.custom-cursor-active .crosshair-x,
body.custom-cursor-active .crosshair-y {
  opacity: 1;
}

.crosshair-x {
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  will-change: transform;
}

.crosshair-y {
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  will-change: transform;
}

.coord-readout {
  position: fixed;
  right: 24px;
  bottom: 46px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  pointer-events: none;
  z-index: 80;
  font-variant-numeric: tabular-nums;
}

/* Ephemeral Cursor Trail Canvas */
.trail-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 5;
}

/* Custom Telemetry Cursor (Desktop) */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-active {
    cursor: none;
  }
  body.custom-cursor-active a,
  body.custom-cursor-active button,
  body.custom-cursor-active input,
  body.custom-cursor-active .option-btn {
    cursor: none;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}

.custom-cursor.visible {
  opacity: 1;
}

.cursor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.cursor-ring {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  transform: translate(-50%, -50%);
  transition: width 0.22s var(--ease-out), height 0.22s var(--ease-out), border-color 0.2s ease, background-color 0.2s ease;
}

.cursor-tag {
  position: absolute;
  left: 20px;
  top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: var(--bg-elevated);
  padding: 2px 7px;
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.custom-cursor.hovering .cursor-ring {
  width: 46px;
  height: 46px;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.custom-cursor.hovering .cursor-dot {
  background: var(--accent);
}

.custom-cursor.hesitating .cursor-tag {
  opacity: 1;
  transform: translateY(0);
}

.custom-cursor.clicking .cursor-ring {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Top Telemetry Bar & Live Oscilloscope
   ========================================================================== */
.telemetry-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: background-color 0.6s ease, border-color 0.6s ease;
}

.telemetry-left,
.telemetry-center,
.telemetry-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-canvas {
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.divider {
  color: var(--border-strong);
  font-size: 11px;
}

.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background-color 0.3s ease;
}

.rec-dot.recording {
  background: var(--accent);
  animation: pulse-rec 1.6s infinite;
}

@keyframes pulse-rec {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.55; box-shadow: 0 0 0 7px rgba(212, 43, 34, 0); }
}

.status-label.alert {
  color: var(--accent);
  font-weight: 600;
}

.progress-track {
  width: 132px;
  height: 3px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.5s var(--ease-out);
}

.live-metric {
  min-width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ==========================================================================
   Left Editorial Rail & Right Live Profile Meters
   ========================================================================== */
.margin-rail.left-rail {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  z-index: 40;
  pointer-events: none;
  opacity: 0.55;
}

.live-profile-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 118px;
  padding: 14px 12px;
  background: color-mix(in srgb, var(--bg-elevated) 84%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.4s ease, border-color 0.4s ease;
}

body[data-stage="intro"] .live-profile-rail,
body[data-stage="diagnosis"] .live-profile-rail {
  opacity: 0;
  pointer-events: none;
}

.rail-header {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.rail-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-meter-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.rail-bar {
  height: 3px;
  background: var(--border);
  overflow: hidden;
}

.rail-bar-fill {
  height: 100%;
  background: var(--ink);
  transition: width 0.45s var(--ease-out);
}

.rail-bar-fill.accent {
  background: var(--accent);
}

/* ==========================================================================
   Main Stage & Clinical Crop-Mark Frame
   ========================================================================== */
.stage-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: 92px 24px 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stage-container {
  width: 100%;
  max-width: 720px;
  position: relative;
}

.stage-container.wide {
  max-width: 1020px;
}

.chapter-card {
  position: relative;
  padding: 36px 38px;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  animation: chapter-in 0.5s var(--ease-out) both;
}

/* Precision Swiss Corner Crop Marks */
.chapter-card::before,
.chapter-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent);
  border-style: solid;
  pointer-events: none;
  opacity: 0.7;
}

.chapter-card::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.chapter-card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

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

.chapter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.chapter-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chapter-index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 3px 9px;
  background: var(--accent-soft);
}

.chapter-act {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* Intro / Cover Screen */
.intro-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-block;
}

.intro-title {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.intro-subtitle {
  font-size: clamp(0.98rem, 2.1vw, 1.12rem);
  color: var(--ink-muted);
  max-width: 560px;
  margin-bottom: 30px;
  line-height: 1.8;
}

.intro-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.rule-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rule-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.rule-text {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

/* Hold-to-Calibrate Prologue Button */
.hold-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 36px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.hold-btn-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  z-index: 0;
  transition: width 0.05s linear;
}

.hold-btn-label {
  position: relative;
  z-index: 1;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.primary-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px var(--accent-glow);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  border-color: var(--ink);
  background: var(--bg-subtle);
}

.fine-print {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  max-width: 540px;
  line-height: 1.65;
  margin-top: 12px;
  transition: color 0.25s ease;
}

.fine-print:hover {
  color: var(--ink-muted);
}

.returning-notice {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--ink);
}

/* ==========================================================================
   Question Typography & Interactive Controls
   ========================================================================== */
.question-title {
  font-family: var(--font-serif);
  font-size: clamp(1.48rem, 3.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.44;
  margin-bottom: 12px;
  color: var(--ink);
}

.question-sub {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin-bottom: 26px;
  line-height: 1.78;
}

.shy-word {
  display: inline-block;
  transition: transform 0.32s var(--ease-snappy), color 0.25s ease;
}

.shy-word.dodged {
  color: var(--accent);
}

.shy-word.redacted {
  background: var(--ink);
  color: var(--ink);
  border-radius: 2px;
  user-select: none;
}

/* Option Buttons with Live Hover Hesitation Bar */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.options-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.option-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

.option-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 0.2s var(--ease-out);
}

.option-btn:hover {
  border-color: var(--ink);
  background: var(--bg-elevated);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.option-btn:hover::before {
  width: 3px;
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-btn.selected::before {
  width: 4px;
}

.option-btn.disabled {
  pointer-events: none;
  opacity: 0.42;
}

.option-btn.selected.disabled {
  opacity: 1;
}

/* Live Hesitation Fill Bar at bottom of option */
.option-pressure-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 0.08s linear;
  pointer-events: none;
}

.option-key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-right: 14px;
  flex-shrink: 0;
}

.option-label-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-stat-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

/* Whisper sub-note revealed after 650ms hover (Q12) */
.option-secret-note {
  font-size: 12px;
  color: var(--accent);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.option-secret-note.revealed {
  max-height: 40px;
  opacity: 1;
  margin-top: 4px;
}

.option-hover-ms {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 12px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.option-btn:hover .option-hover-ms.show {
  opacity: 0.9;
}

/* ==========================================================================
   Special Interactive Set-Pieces
   ========================================================================== */

/* Q4: Long Terms Scroll Box */
.terms-scroll-box {
  height: 210px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  padding: 20px 22px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.9;
  margin-bottom: 18px;
}

.terms-scroll-box p {
  margin-bottom: 14px;
}

.terms-easter-egg {
  display: inline;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dashed;
  cursor: pointer;
  font-weight: 500;
}

/* Q6: Don't Press Countdown */
.temptation-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px;
  border: 1px solid var(--border);
  background: var(--bg);
  gap: 22px;
}

.countdown-display {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.forbidden-btn {
  padding: 20px 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  animation: breathe-red 1.7s infinite;
  transition: transform 0.15s ease;
}

.forbidden-btn:hover {
  transform: scale(1.05);
}

.forbidden-btn.shattered {
  animation: none;
  background: var(--bg-subtle);
  color: var(--accent);
  border: 1px dashed var(--accent);
  pointer-events: none;
}

@keyframes breathe-red {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 20px rgba(212, 43, 34, 0); }
}

/* Q7: Fleeing Button */
.flee-arena {
  position: relative;
  min-height: 215px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.flee-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  min-height: 18px;
}

.flee-btn-wrap {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.flee-target {
  transition: transform 0.25s var(--ease-snappy);
  will-change: transform;
}

/* Q8: Drag Lie Detector Canvas */
.drag-arena {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 18px;
}

.drag-canvas {
  width: 100%;
  height: 180px;
  display: block;
  touch-action: none;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 39px,
    var(--border) 39px,
    var(--border) 40px
  );
}

.drag-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Q9: Blurred Mosaic Secret Peeker */
.mosaic-box {
  position: relative;
  border: 1px dashed var(--accent-border);
  background: var(--bg);
  padding: 30px 26px;
  margin-bottom: 18px;
  overflow: hidden;
  user-select: none;
}

.mosaic-secret {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  filter: blur(13px);
  transition: filter 0.12s linear;
}

.mosaic-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border: 1px solid var(--accent-border);
}

/* Q10: Solitude Slider */
.slider-arena {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 28px 24px;
}

.slider-value-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.slider-big-num {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.clinical-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-strong);
  outline: none;
  margin: 16px 0 24px;
}

.clinical-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--ink);
  border: 2px solid var(--bg);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.clinical-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--accent);
}

/* Q13: Leaked File Bait */
.bait-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.leaked-file-btn {
  align-self: flex-end;
  padding: 10px 16px;
  background: var(--bg-subtle);
  border: 1px dashed var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transform: rotate(-1.2deg);
  transition: all 0.22s ease;
  opacity: 0.88;
}

.leaked-file-btn:hover {
  opacity: 1;
  transform: rotate(0deg) scale(1.03);
  background: var(--accent-soft);
}

/* Q14: Darkroom Light Switch Fight */
.switch-arena {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tactile-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tactile-switch:hover {
  border-color: var(--accent);
}

.switch-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.tactile-switch.on .switch-led {
  background: #ffd166;
  box-shadow: 0 0 12px #ffd166;
}

/* Q15: Fake 97% Lag Loader */
.lag-arena {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 40px 26px;
  text-align: center;
  user-select: none;
}

.lag-bar-outer {
  width: 100%;
  height: 6px;
  background: var(--border);
  margin: 20px 0 14px;
  overflow: hidden;
}

.lag-bar-inner {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s linear;
}

.lag-pct {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lag-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* Q17: Watching SVG Eye */
.eye-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 26px;
  gap: 10px;
}

.watching-eye {
  width: 180px;
  height: 92px;
  overflow: visible;
}

.eye-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  min-height: 18px;
}

/* Q18: Regret Bar */
.regret-bar {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: chapter-in 0.3s ease both;
}

/* ==========================================================================
   Live Reaction Dock
   ========================================================================== */
.reaction-dock {
  width: 100%;
  max-width: 720px;
  margin-top: 20px;
  min-height: 76px;
}

.reaction-card {
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: chapter-in 0.35s var(--ease-out) both;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reaction-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

.reaction-text {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.75;
}

.reaction-next-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.next-btn {
  padding: 10px 24px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.next-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateX(3px);
}

/* ==========================================================================
   Ambient Whisper Feed & Caught Banner
   ========================================================================== */
.whisper-feed {
  position: fixed;
  left: 24px;
  bottom: 48px;
  width: min(350px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.whisper-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  animation: whisper-in 0.35s var(--ease-out) both;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.whisper-item.leaving {
  opacity: 0;
  transform: translateX(-10px);
}

.whisper-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

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

.caught-banner {
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  z-index: 300;
  box-shadow: 0 12px 32px var(--accent-glow);
  animation: slide-down 0.35s var(--ease-out) both;
}

.caught-banner[hidden] {
  display: none;
}

.caught-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.caught-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.caught-text {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.caught-dismiss {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.terminal-modal {
  width: 100%;
  max-width: 580px;
  background: #0d0e11;
  border: 1px solid rgba(255, 59, 48, 0.55);
  color: #e6e3dc;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.78);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.terminal-close {
  background: transparent;
  border: none;
  color: #ff3b30;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.terminal-alert {
  color: #ff3b30;
  font-weight: 600;
  margin-top: 12px;
  display: block;
}

/* ==========================================================================
   Act V: Evidence Replay & Final 9:16 Diagnosis Dossier
   ========================================================================== */
.replay-canvas-wrap {
  margin: 18px 0 22px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  padding: 12px;
}

.replay-canvas {
  width: 100%;
  height: 160px;
  display: block;
}

.evidence-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 26px;
}

.evidence-item {
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  font-size: 14px;
  line-height: 1.65;
  animation: chapter-in 0.45s var(--ease-out) both;
}

.diagnosis-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 32px;
  align-items: start;
}

.diagnosis-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diagnosis-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.rarity-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  padding: 4px 10px;
  white-space: nowrap;
}

.archetype-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.archetype-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 900;
  line-height: 1.2;
}

.archetype-en {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.verdict-box {
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  font-size: 15px;
  line-height: 1.8;
}

.radar-and-stats {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: center;
}

.radar-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  padding: 13px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.metric-val.accent {
  color: var(--accent);
}

.metric-sub {
  font-size: 11px;
  color: var(--ink-faint);
}

.card-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 76px;
}

.card-frame {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: #111;
}

.card-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.card-theme-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.theme-pill {
  padding: 7px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.share-actions .primary-btn,
.share-actions .secondary-btn {
  flex: 1;
  min-width: 150px;
  padding: 13px 16px;
  font-size: 13.5px;
}

/* Footer */
.clinical-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  z-index: 90;
}

.glitch-shake {
  animation: glitch-jitter 0.28s linear 1;
}

@keyframes glitch-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 1px); }
  50% { transform: translate(4px, -1px); }
  75% { transform: translate(-2px, 0); }
  100% { transform: translate(0, 0); }
}

/* Responsive */
@media (max-width: 1120px) {
  .hide-tablet {
    display: none !important;
  }
}

@media (max-width: 880px) {
  .diagnosis-layout {
    grid-template-columns: 1fr;
  }
  .radar-and-stats {
    grid-template-columns: 1fr;
  }
  .card-preview-col {
    position: static;
  }
}

@media (max-width: 640px) {
  .telemetry-bar {
    padding: 0 14px;
  }
  .hide-mobile {
    display: none !important;
  }
  .chapter-card {
    padding: 24px 20px;
  }
  .progress-track {
    width: 60px;
  }
  .intro-rules {
    grid-template-columns: 1fr;
  }
  .options-grid.two-col {
    grid-template-columns: 1fr;
  }
  .caught-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .whisper-feed {
    left: 14px;
    bottom: 44px;
  }
  .clinical-footer {
    padding: 0 14px;
  }
}
