/* ==========================================================================
   《測謊驗證碼 / Are You Even Human?》v2.0
   Aesthetic: 1994 Retro Bureaucratic Web Form × Cold Interrogation Room
   Palette: High-contrast B&W (#F4F3EC / #0B0B0C) + Micro-Red Alert (#D91E18)
   ========================================================================== */

:root {
  --bg-desk: #0d0d0f;
  --bg-paper: #f3f2eb;
  --bg-paper-alt: #e6e5dc;
  --bg-monitor: #0a0a0c;
  --bg-monitor-card: #131316;

  --ink-black: #0b0b0c;
  --ink-muted: #52524c;
  --ink-light: #e6e6de;
  --ink-dim: #7b7b73;

  --border-dark: #0b0b0c;
  --border-mid: #8f8f87;
  --border-light: #ffffff;

  --alert-red: #d91e18;
  --alert-red-bright: #ff2a24;
  --alert-red-bg: #fff0ef;
  --alert-red-dark-bg: #260909;

  --font-mono: 'SF Mono', 'IBM Plex Mono', 'Menlo', 'Courier New', monospace;
  --font-serif: 'Songti TC', 'Noto Serif TC', 'PMingLiU', Georgia, serif;
  --font-sans: 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', -apple-system, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-desk);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #1d1d22 0%, #0a0a0c 72%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  color: var(--ink-black);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle CRT scanlines & interrogation room spotlight vignette */
.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.05) 0px,
    rgba(0, 0, 0, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.55;
}

.room-vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 890;
  background: radial-gradient(circle at 50% 42%, transparent 55%, rgba(0, 0, 0, 0.62) 100%);
}

.alert-flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  box-shadow: inset 0 0 90px rgba(217, 30, 24, 0);
  background: rgba(217, 30, 24, 0);
  transition: background 0.14s ease, box-shadow 0.14s ease;
}
.alert-flash.active {
  background: rgba(217, 30, 24, 0.14);
  box-shadow: inset 0 0 130px rgba(217, 30, 24, 0.65);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   1994 Terminal Boot Overlay
   ========================================================================== */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: #070708;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.boot-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.boot-box {
  width: 100%;
  max-width: 580px;
  border: 2px solid #3c3c42;
  background: #0c0c0e;
  padding: 18px 20px;
  font-family: var(--font-mono);
  color: #dcdcd4;
  box-shadow: 8px 8px 0 #000000;
}

.boot-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--alert-red-bright);
  border-bottom: 1px solid #2b2b30;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.boot-log {
  margin: 0;
  min-height: 125px;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.boot-footer {
  margin-top: 12px;
  font-size: 11px;
  color: #777770;
  text-align: right;
}

/* ==========================================================================
   Top Surveillance Bar
   ========================================================================== */
.surveillance-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 18px;
  background: #070708;
  color: var(--ink-light);
  border-bottom: 1px solid #2b2b2f;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.surv-left, .surv-right {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--alert-red-bright);
  font-weight: 700;
  border: 1px solid rgba(255, 42, 36, 0.5);
  padding: 1px 6px;
  background: rgba(217, 30, 24, 0.14);
}

.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--alert-red-bright);
  animation: blinkRec 1.05s steps(2, start) infinite;
}

@keyframes blinkRec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.sys-path { color: #b2b2aa; }
.divider { color: #3a3a40; }
.case-id { color: #ffffff; font-weight: 700; }
.room-tag { color: #8c8c85; font-size: 11px; }

.session-clock {
  color: #b5b5ad;
  min-width: 60px;
  text-align: right;
}

.suspicion-meter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  background: #141417;
  border: 1px solid #303036;
}

.suspicion-label { color: #b5b5ad; font-size: 11px; }

.suspicion-bar {
  width: 86px;
  height: 9px;
  background: #232327;
  border: 1px solid #44444a;
  overflow: hidden;
}

.suspicion-fill {
  height: 100%;
  background: var(--ink-light);
  transition: width 0.35s ease, background-color 0.25s ease;
}
.suspicion-fill.warn { background: #e06b1f; }
.suspicion-fill.danger { background: var(--alert-red-bright); }

.suspicion-val {
  min-width: 34px;
  text-align: right;
  font-weight: 700;
  color: #ffffff;
}
.suspicion-val.danger { color: var(--alert-red-bright); }

.util-btn {
  background: #18181b;
  color: #d8d8d0;
  border: 1px solid #48484f;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}
.util-btn:hover {
  background: #28282d;
  color: #ffffff;
  border-color: #8a8a92;
}

/* ==========================================================================
   Main Two-Column Interrogation Desk
   ========================================================================== */
.interrogation-desk {
  max-width: 1220px;
  margin: 22px auto 38px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.96fr);
  gap: 20px;
  align-items: start;
}

/* ==========================================================================
   Left: Classic 90s Retro Web Form Window
   ========================================================================== */
.retro-window {
  position: relative;
  background: var(--bg-paper);
  background-image: radial-gradient(rgba(11, 11, 12, 0.045) 1px, transparent 0);
  background-size: 18px 18px;
  border: 2px solid var(--border-dark);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
}

.retro-window.shake {
  animation: windowShake 0.28s linear;
}
@keyframes windowShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--ink-black);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-icon { color: var(--alert-red-bright); font-size: 10px; }

.window-controls { display: flex; gap: 4px; }

.win-ctrl-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  line-height: 1;
  background: #e4e4dc;
  color: var(--ink-black);
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #555550;
  border-bottom: 2px solid #555550;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.win-ctrl-btn:active {
  border-top-color: #555550;
  border-left-color: #555550;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
.win-close-btn:hover { background: var(--alert-red); color: #ffffff; }

.protocol-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-paper-alt);
  border-bottom: 1px solid var(--border-dark);
  font-family: var(--font-mono);
  font-size: 11px;
}

.proto-tag { font-weight: 700; color: var(--ink-muted); }

.proto-url {
  flex: 1;
  background: #ffffff;
  border: 1px inset #9c9c94;
  padding: 2px 7px;
  color: #222220;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-badge {
  background: var(--ink-black);
  color: #ffffff;
  padding: 2px 8px;
  font-weight: 700;
  white-space: nowrap;
}

/* Case Progress Rail */
.progress-rail {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #deded5;
  border-bottom: 1px solid var(--border-dark);
}

.rail-pip {
  flex: 1;
  height: 8px;
  background: #f5f5ef;
  border: 1px solid #6d6d66;
  transition: background 0.2s, border-color 0.2s;
}
.rail-pip.active {
  background: var(--ink-black);
  border-color: var(--ink-black);
  box-shadow: inset 0 0 0 1px #ffffff;
}
.rail-pip.passed {
  background: #2f2f32;
  border-color: #0b0b0c;
}
.rail-pip.flagged {
  background: var(--alert-red);
  border-color: #8a0f0a;
}

/* Micro-Red Warning Box with Hazard Accent */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 18px 0;
  padding: 9px 12px;
  background: var(--alert-red-bg);
  border: 1.5px solid var(--alert-red);
  border-left-width: 6px;
  color: #8a0e0a;
  font-size: 13px;
  font-weight: 600;
  animation: fadeSlideDown 0.18s ease-out;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.warn-icon { color: var(--alert-red); font-size: 15px; line-height: 1.25; }

/* Transient Rubber Stamp Overlay on Round Completion */
.round-stamp-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(243, 242, 235, 0.28);
}

.round-stamp-box {
  padding: 10px 26px;
  border: 5px solid var(--ink-black);
  outline: 2px solid var(--ink-black);
  outline-offset: -9px;
  background: rgba(243, 242, 235, 0.94);
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink-black);
  transform: rotate(-8deg) scale(1);
  animation: stampSlam 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.round-stamp-box.suspect {
  border-color: var(--alert-red);
  outline-color: var(--alert-red);
  color: var(--alert-red);
  background: rgba(255, 240, 239, 0.96);
}
@keyframes stampSlam {
  0% { transform: rotate(-14deg) scale(1.85); opacity: 0; }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}

/* Main Form Stage */
.form-stage {
  padding: 20px 22px 22px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.round-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.round-title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.32;
  margin: 0 0 8px;
  color: var(--ink-black);
}

.round-subtitle {
  margin: 0 0 16px;
  color: #363632;
  font-size: 13.5px;
  border-left: 3px solid var(--ink-black);
  padding-left: 10px;
}

/* Classic 90s Fieldset */
.retro-fieldset {
  border: 1.5px solid var(--ink-black);
  padding: 15px;
  margin: 0 0 16px;
  background: #ffffff;
}
.retro-fieldset legend {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  background: var(--ink-black);
  color: #ffffff;
  letter-spacing: 0.06em;
}

/* Retro Beveled Buttons */
.retro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-black);
  background: #e5e5dd;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #2b2b28;
  border-bottom: 2px solid #2b2b28;
  outline: 1px solid var(--ink-black);
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
}
.retro-btn:hover:not(:disabled) { background: #d9d9cf; }
.retro-btn:active:not(:disabled) {
  border-top-color: #2b2b28;
  border-left-color: #2b2b28;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  transform: translate(1px, 1px);
}
.retro-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.retro-btn.primary {
  background: var(--ink-black);
  color: #ffffff;
  border-top-color: #4b4b4f;
  border-left-color: #4b4b4f;
  border-right-color: #000000;
  border-bottom-color: #000000;
}
.retro-btn.primary:hover:not(:disabled) { background: #232327; }

.retro-btn.danger {
  background: var(--alert-red-bg);
  color: var(--alert-red);
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: var(--alert-red);
  border-bottom-color: var(--alert-red);
  outline-color: var(--alert-red);
}
.retro-btn.danger:hover:not(:disabled) { background: var(--alert-red); color: #ffffff; }

.retro-btn.small { padding: 6px 11px; font-size: 11px; }
.retro-btn.active { background: var(--ink-black); color: #ffffff; }
.retro-btn.full-width { width: 100%; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed #9b9b92;
  margin-top: auto;
}
.action-hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }

.window-statusbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 12px;
  background: var(--bg-paper-alt);
  border-top: 1px solid var(--border-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Round Widgets
   ========================================================================== */

/* Entry Gate */
.entry-stamp-line {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--alert-red);
  border: 1.5px solid var(--alert-red);
  padding: 2px 8px;
  margin-bottom: 10px;
  background: var(--alert-red-bg);
}

.entry-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 900;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.entry-en {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0 0 14px;
}

.entry-notice {
  font-size: 13.5px;
  background: #ffffff;
  border: 1.5px solid var(--ink-black);
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.65;
}

.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.mode-card {
  border: 1.5px solid var(--ink-black);
  background: #f9f9f5;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.mode-card:hover { background: #ffffff; }
.mode-card.selected {
  background: var(--ink-black);
  color: #ffffff;
}
.mode-card-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.mode-card-desc {
  font-size: 11.5px;
  opacity: 0.82;
}

.classic-captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 400px;
  padding: 14px 16px;
  background: #f9f9f6;
  border: 2px solid var(--ink-black);
  box-shadow: 4px 4px 0 #c9c9c0;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.classic-captcha-box:hover { background: #ffffff; }

.captcha-check-left { display: flex; align-items: center; gap: 14px; }
.captcha-checkbox {
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink-black);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
}
.captcha-checkbox.checking { border-color: var(--alert-red); color: var(--alert-red); }
.captcha-checkbox.failed { background: var(--alert-red); border-color: var(--alert-red); color: #ffffff; }
.captcha-label-main { font-weight: 700; font-size: 15px; }
.captcha-label-sub { font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); }
.captcha-brand { text-align: right; font-family: var(--font-mono); font-size: 9px; color: var(--ink-muted); line-height: 1.3; }

/* Q1: CCTV Traffic Light 3x3 Grid */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.tl-tile {
  position: relative;
  border: 2px solid var(--ink-black);
  background: #f8f8f4;
  padding: 5px;
  cursor: pointer;
  text-align: center;
  user-select: none;
  overflow: hidden;
}
.tl-tile:hover { background: #ffffff; }
.tl-tile.selected {
  border-color: var(--alert-red);
  background: var(--alert-red-bg);
  box-shadow: inset 0 0 0 2px var(--alert-red);
}
.tl-tile svg { width: 100%; height: 106px; display: block; }
.tl-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-check-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--ink-black);
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.tl-tile.selected .tl-check-badge {
  background: var(--alert-red);
  border-color: var(--alert-red);
  color: #ffffff;
}

@keyframes flickerBulb {
  0%, 19%, 21%, 63%, 65%, 100% { opacity: 1; }
  20%, 64% { opacity: 0.15; }
}
.svg-flicker { animation: flickerBulb 2.2s infinite; }

@keyframes shiverPole {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-0.9px); }
  75% { transform: translateX(0.9px); }
}
.svg-shiver { animation: shiverPole 0.22s infinite; }

/* Q2: Hesitation Line Canvas */
.draw-stage-wrap {
  position: relative;
  border: 2px solid var(--ink-black);
  background: #ffffff;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  margin-bottom: 10px;
}
#hesitationCanvas { display: block; width: 100%; height: 220px; cursor: crosshair; touch-action: none; }
.draw-endpoints {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  background: var(--bg-paper-alt);
  border-top: 1px solid var(--ink-black);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.draw-live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.draw-stat { border: 1px solid var(--ink-black); background: #f8f8f4; padding: 6px 8px; font-family: var(--font-mono); font-size: 11px; }
.draw-stat strong { display: block; font-size: 15px; margin-top: 2px; }

/* Q3: 3-Second Confession */
.timer-mega-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--ink-black);
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 14px;
  border: 2px solid var(--ink-black);
}
.timer-mega-box.urgent { background: var(--alert-red); border-color: var(--alert-red); }
.timer-digits { font-size: 34px; font-weight: 700; letter-spacing: 0.04em; }

.confession-input {
  width: 100%;
  padding: 11px 12px;
  font-family: var(--font-sans);
  font-size: 15.5px;
  border: 2px inset #7c7c75;
  background: #ffffff;
  color: var(--ink-black);
  outline: none;
}
.confession-input:focus { border-color: var(--alert-red); background: #fffdfd; }

.fallback-confessions {
  margin-top: 12px;
  padding: 12px;
  background: var(--alert-red-bg);
  border: 1.5px solid var(--alert-red);
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1.5px solid var(--ink-black);
  cursor: pointer;
  font-size: 13.5px;
  transition: background 0.1s;
}
.radio-option:hover { background: #f0f0ea; }
.radio-option input { margin-top: 3px; accent-color: var(--alert-red); }

/* Q4 (NEW): Boss Friday 23:58 Pager / Chat Trap */
.pager-chat-box {
  border: 2px solid var(--ink-black);
  background: #141416;
  color: #e8e8e0;
  padding: 14px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}
.pager-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #ff6b66;
  margin-bottom: 8px;
  border-bottom: 1px dashed #333338;
  padding-bottom: 6px;
}
.pager-bubble {
  background: #232328;
  border-left: 3px solid var(--alert-red-bright);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: #ffffff;
}
.rage-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.rage-bar {
  flex: 1;
  height: 10px;
  border: 1px solid var(--ink-black);
  background: #e6e5dc;
  overflow: hidden;
}
.rage-fill {
  height: 100%;
  width: 0%;
  background: var(--alert-red);
  transition: width 0.2s ease;
}

/* Q5 (NEW): Crooked Frame OCD Rotation CAPTCHA */
.ocd-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: #ffffff;
  border: 2px solid var(--ink-black);
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 18px 18px;
  margin-bottom: 12px;
}
.ocd-frame {
  width: 230px;
  padding: 14px 16px;
  border: 4px solid var(--ink-black);
  outline: 2px solid var(--ink-black);
  outline-offset: -8px;
  background: #f4f3eb;
  text-align: center;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.22);
  transition: transform 0.08s ease;
  user-select: none;
}
.ocd-frame-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 4px;
}
.ocd-frame-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
}
.ocd-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.angle-readout {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  min-width: 78px;
  text-align: center;
  padding: 4px 8px;
  border: 1.5px solid var(--ink-black);
  background: var(--bg-paper);
}

/* Q6: Blind 5 Seconds with Psychological Distraction */
.blind-clock-stage {
  position: relative;
  text-align: center;
  padding: 26px 16px;
  background: var(--ink-black);
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 16px;
  border: 2px solid var(--ink-black);
  overflow: hidden;
}
.blind-clock-readout { font-size: 46px; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 8px; }
.blind-clock-readout.red { color: var(--alert-red-bright); }
.blind-clock-sub { font-size: 12px; color: #a5a59d; }
.blind-distract {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 12px;
  color: var(--alert-red-bright);
  font-weight: 700;
}

/* Q7 (NEW): Terms & Conditions Scroll Trap */
.tos-scroll-box {
  height: 190px;
  overflow-y: scroll;
  border: 2px inset #7c7c75;
  background: #ffffff;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #2b2b28;
  margin-bottom: 12px;
}
.tos-scroll-box h4 {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-bottom: 1px solid #0b0b0c;
  padding-bottom: 4px;
}
.tos-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border: 1.5px solid var(--ink-black);
  background: var(--bg-paper-alt);
  cursor: pointer;
}
.tos-check-label.locked { opacity: 0.5; cursor: not-allowed; }

/* Q8: Evasive Happiness Button */
.evade-arena {
  position: relative;
  height: 230px;
  border: 2px solid var(--ink-black);
  background: #ffffff;
  background-image: radial-gradient(#d5d5cc 1px, transparent 1px);
  background-size: 16px 16px;
  overflow: hidden;
  margin-bottom: 14px;
}
.evade-btn {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  transition: left 0.15s cubic-bezier(0.22, 1, 0.36, 1), top 0.15s cubic-bezier(0.22, 1, 0.36, 1), transform 0.12s ease;
  white-space: nowrap;
  z-index: 5;
}
.evade-taunt-bubble {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--alert-red);
  pointer-events: none;
  z-index: 4;
}
.giveup-btn-wrap { position: absolute; bottom: 12px; right: 12px; z-index: 2; }

/* Q9 (NEW): Distorted Grudge CAPTCHA Canvas */
.distort-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
#distortCanvas {
  border: 2px solid var(--ink-black);
  background: #ffffff;
  max-width: 100%;
  height: auto;
}
.distort-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Q10 (NEW): 3AM Thought Sorting Trays */
.sort-cards-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 46px;
}
.thought-chip {
  padding: 7px 11px;
  background: #ffffff;
  border: 1.5px solid var(--ink-black);
  box-shadow: 2px 2px 0 #0b0b0c;
  font-size: 13px;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  transition: transform 0.1s, background 0.1s;
}
.thought-chip.selected {
  background: var(--ink-black);
  color: #ffffff;
}
.thought-chip.cursed {
  border-color: var(--alert-red);
  color: var(--alert-red);
  background: var(--alert-red-bg);
}
.trays-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.filing-tray {
  border: 2px dashed var(--ink-black);
  background: #f9f9f4;
  padding: 10px;
  min-height: 118px;
  cursor: pointer;
  transition: background 0.12s;
}
.filing-tray:hover, .filing-tray.drag-over {
  background: #ecece2;
  border-style: solid;
}
.tray-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--ink-black);
  color: #ffffff;
  padding: 2px 7px;
  display: inline-block;
  margin-bottom: 8px;
}
.tray-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}
.tray-item-pill {
  padding: 4px 7px;
  background: #ffffff;
  border: 1px solid #0b0b0c;
}

/* Q11: Bedtime Slider + Fake Phone Status */
.phone-sim-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #0b0b0c;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 12px;
}
.phone-batt.low { color: var(--alert-red-bright); font-weight: 700; }

.slider-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 11px 14px;
  background: var(--bg-paper-alt);
  border: 1.5px solid var(--ink-black);
}
.slider-big-val { font-family: var(--font-mono); font-size: 25px; font-weight: 700; color: var(--ink-black); }
.slider-big-val.suspect { color: var(--alert-red); }
.retro-range {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--ink-black);
  outline: none;
  margin: 12px 0;
}
.retro-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 26px;
  background: #e5e5dd;
  border: 2px solid var(--ink-black);
  box-shadow: inset 2px 2px 0 #ffffff, inset -2px -2px 0 #666660;
  cursor: ew-resize;
}
.slider-ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }

/* ==========================================================================
   Right: Cold Interrogation Telemetry Monitor + Mechanical Eye
   ========================================================================== */
.telemetry-panel {
  background: var(--bg-monitor);
  color: var(--ink-light);
  border: 2px solid #2e2e34;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.78);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: #17171b;
  border-bottom: 1px solid #2e2e34;
  font-size: 11px;
  font-weight: 700;
}

.panel-status {
  color: var(--alert-red-bright);
  padding: 1px 6px;
  border: 1px solid rgba(255, 42, 36, 0.45);
  background: rgba(217, 30, 24, 0.14);
}

/* Surveillance Mechanical Eye Viewport */
.optic-viewport {
  position: relative;
  height: 108px;
  background: radial-gradient(circle at center, #18181d 0%, #070708 78%);
  border-bottom: 1px solid #2e2e34;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.optic-crosshair-h {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.optic-crosshair-v {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.optic-eye {
  position: relative;
  width: 124px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid #5c5c64;
  background: #0d0d10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9), 0 0 0 4px rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.optic-eye.alert {
  border-color: var(--alert-red-bright);
  box-shadow: inset 0 0 18px rgba(217, 30, 24, 0.45), 0 0 16px rgba(255, 42, 36, 0.25);
}

.optic-sclera {
  width: 108px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #e8e8e0 45%, #a8a8a0 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.optic-iris {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #2b2b30 25%, #0c0c0e 70%, #55555c 100%);
  border: 2px solid #0b0b0c;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transition: background 0.2s ease, width 0.2s ease, height 0.2s ease;
}
.optic-eye.alert .optic-iris {
  background: radial-gradient(circle, #ff3a34 18%, #8f0e0a 72%, #2b0505 100%);
  width: 28px;
  height: 28px;
}

.optic-pupil {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000000;
}

.optic-glint {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.optic-meta-tl, .optic-meta-tr, .optic-meta-bl, .optic-meta-br {
  position: absolute;
  font-size: 9px;
  color: #777770;
  letter-spacing: 0.04em;
}
.optic-meta-tl { top: 6px; left: 9px; }
.optic-meta-tr { top: 6px; right: 9px; color: #b5b5ad; }
.optic-meta-bl { bottom: 6px; left: 9px; }
.optic-meta-br { bottom: 6px; right: 9px; }

/* Polygraph */
.polygraph-box { position: relative; border-bottom: 1px solid #2e2e34; background: #070708; }
#polygraphCanvas { display: block; width: 100%; height: 104px; }
.poly-overlay-top, .poly-overlay-bottom {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 10px;
  color: #8f8f88;
}
.poly-bpm { color: var(--alert-red-bright); font-weight: 700; }

/* Metrics */
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #2e2e34; }
.metric-cell {
  padding: 8px 11px;
  border-right: 1px solid #242429;
  border-bottom: 1px solid #242429;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metric-cell:nth-child(2n) { border-right: none; }
.metric-cell:nth-last-child(-n+2) { border-bottom: none; }
.metric-label { font-size: 10px; color: #888881; }
.metric-value { font-size: 17px; font-weight: 700; color: #ffffff; }
.metric-value small { font-size: 10px; font-weight: 400; color: #8f8f88; }
.metric-value.alert { color: var(--alert-red-bright); }

/* Live Behavioral Tags Strip */
.tags-strip {
  padding: 8px 11px;
  background: #111114;
  border-bottom: 1px solid #242429;
  font-size: 10px;
}
.tags-strip-label { color: #888881; display: block; margin-bottom: 5px; }
.tags-strip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-tag {
  padding: 2px 6px;
  background: #1e1e23;
  border: 1px solid #44444d;
  color: #f0f0e8;
  font-family: var(--font-sans);
  font-size: 10.5px;
}
.mini-tag.red {
  background: #2b0d0c;
  border-color: var(--alert-red);
  color: #ff8e8a;
}
.mini-tag.muted { color: #74746d; border-style: dashed; }

/* Interrogator Log Feed */
.log-section { display: flex; flex-direction: column; flex: 1; }
.log-header {
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  background: #141417;
  border-bottom: 1px solid #242429;
  font-size: 10px;
  color: #9e9e96;
}
.log-feed {
  padding: 9px 11px;
  height: 225px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  line-height: 1.46;
  font-family: var(--font-sans);
}
.log-entry {
  padding: 6px 9px;
  background: #141417;
  border-left: 3px solid #55555a;
  animation: fadeSlideDown 0.16s ease-out;
}
.log-entry.warn { border-left-color: #e06b1f; background: #1b1612; }
.log-entry.alert { border-left-color: var(--alert-red-bright); background: var(--alert-red-dark-bg); }
.log-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #8e8e86;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}
.log-entry.alert .log-meta { color: #ff7a75; }
.log-msg { color: #e8e8e0; }

/* ==========================================================================
   Final Report Overlay
   ========================================================================== */
.report-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6, 6, 8, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
}

.report-shell {
  width: 100%;
  max-width: 1000px;
  background: var(--bg-paper);
  border: 2px solid var(--ink-black);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.85);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}

.report-body {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
  gap: 22px;
  overflow-y: auto;
}

.report-canvas-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.aspect-switcher { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.canvas-frame {
  width: 100%;
  display: flex;
  justify-content: center;
  background: #17171a;
  padding: 14px;
  border: 2px inset #666660;
}
#reportCanvas {
  max-width: 100%;
  max-height: 64vh;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.report-actions-panel { display: flex; flex-direction: column; gap: 14px; }

.verdict-summary-box { background: #ffffff; border: 2px solid var(--ink-black); padding: 14px; }
.verdict-summary-box.kicked { border-color: var(--alert-red); background: var(--alert-red-bg); }
.verdict-kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--alert-red); margin-bottom: 4px; }
.verdict-headline { font-family: var(--font-serif); font-size: 22px; font-weight: 900; margin: 0 0 8px; line-height: 1.3; }
.verdict-desc { margin: 0 0 10px; font-size: 13.5px; color: #33332f; }
.verdict-tags-row { display: flex; flex-wrap: wrap; gap: 6px; }
.verdict-tag-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  background: var(--ink-black);
  color: #ffffff;
}
.verdict-tag-pill.red { background: var(--alert-red); }

.share-copy-box { display: flex; flex-direction: column; gap: 5px; }
.share-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink-muted); }
#shareCopyTextarea {
  width: 100%;
  padding: 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.5;
  border: 1.5px solid var(--ink-black);
  background: #ffffff;
  color: var(--ink-black);
  resize: none;
}

.action-buttons-stack { display: flex; flex-direction: column; gap: 9px; }
.report-footnote { font-size: 11px; color: var(--ink-muted); margin: 2px 0 0; line-height: 1.45; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 920px) {
  .interrogation-desk { grid-template-columns: 1fr; margin-top: 14px; }
  .log-feed { height: 170px; }
  .report-body { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

@media (max-width: 560px) {
  .mode-selector, .trays-grid { grid-template-columns: 1fr; }
  .tl-grid { gap: 5px; }
  .tl-tile svg { height: 84px; }
  .entry-title { font-size: 26px; }
  .round-title { font-size: 19px; }
  .form-stage { padding: 14px; }
}
