/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #050508;
  --surface: #0e0e14;
  --surface2: #16161f;
  --surface3: #1d1d28;
  --border: #252535;
  --border2: #333348;
  --text: #f0e8d8;
  --muted: #8a8070;
  --accent: #e45b41;
  --ok: #93c89a;
  --warn: #f2b46b;
  --info: #7ab3e0;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --shadow: 0 24px 60px rgba(0,0,0,0.45);
}

/* ── Base reset ────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footnote { font-size: 0.62rem; color: var(--muted); line-height: 1.6; }
.hidden { display: none !important; }
.hidden-feed {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
button {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
button:disabled { opacity: 0.3; cursor: not-allowed; }
button:focus-visible,
.typed-input:focus-visible,
.mod-toggle:has(input:focus-visible) {
  outline: 2px solid var(--info);
  outline-offset: 3px;
}
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover:not(:disabled) { opacity: 0.85; }
.secondary { background: transparent; color: var(--text); border-color: var(--border2); }
.secondary:hover:not(:disabled) { border-color: var(--muted); }

/* ── Status pill / badges ───────────────────────────────────────────────────── */
.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--border2); border-radius: 2px;
  background: var(--surface2); color: var(--muted);
}
.status-pill[data-ok="true"]  { border-color: var(--ok);    color: var(--ok); }
.status-pill[data-ok="false"] { border-color: var(--accent); color: var(--accent); }
.status-pill[data-state="booting"] { border-color: var(--warn); color: var(--warn); }
.status-copy { font-size: 0.62rem; color: var(--muted); }
.badge, .overlay-chip {
  display: inline-block; padding: 0.15rem 0.45rem;
  font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--border); border-radius: 2px;
  background: var(--surface2); color: var(--muted);
}
.badge[data-state="connected"] { border-color: var(--ok);    color: var(--ok); }
.badge[data-state="checking"]  { border-color: var(--warn);  color: var(--warn); }
.badge[data-state="error"]     { border-color: var(--accent); color: var(--accent); }

/* ══ B0: BOOT SCREEN ══════════════════════════════════════════════════════════ */
.boot-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: var(--bg);
  animation: boot-fade-in 0.6s ease;
}
@keyframes boot-fade-in { from { opacity: 0; } to { opacity: 1; } }
.boot-panel {
  max-width: 520px; width: 100%; min-width: 0; padding: 2.5rem;
  border: 1px solid var(--border2); background: var(--surface);
  border-radius: 3px; display: flex; flex-direction: column; gap: 1.2rem;
}
.boot-eyebrow { margin-bottom: -0.6rem; }
.boot-title { font-size: 2.8rem; letter-spacing: 0.1em; color: var(--accent); line-height: 1; }
.boot-lede { font-size: 0.82rem; color: var(--muted); line-height: 1.65; }
.boot-status-row { display: flex; flex-direction: column; gap: 0.4rem; }
.modifier-fieldset {
  border: 1px solid var(--border); border-radius: 2px;
  min-width: 0;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.modifier-fieldset legend { padding: 0 0.4rem; margin-left: -0.2rem; }
.mod-toggle {
  display: flex; align-items: flex-start;
  min-width: 0;
  cursor: pointer; padding: 0.6rem 0.8rem;
  border: 1px solid var(--border); border-radius: 2px;
  transition: border-color 0.15s, background 0.15s;
}
.mod-toggle:hover { border-color: var(--border2); background: var(--surface2); }
.mod-toggle input[type="checkbox"] { display: none; }
.mod-toggle:has(input:checked) { border-color: var(--accent); background: rgba(228,91,65,0.06); }
.mod-body { display: flex; align-items: flex-start; gap: 0.7rem; min-width: 0; }
.mod-icon { font-size: 1.2rem; line-height: 1.2; flex-shrink: 0; }
.mod-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.mod-name { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.mod-desc { font-size: 0.62rem; color: var(--muted); line-height: 1.4; }
.boot-footnote { line-height: 1.55; }
.boot-start { width: 100%; padding: 0.7rem; font-size: 0.75rem; }
.cold-start-note { margin-top: 0.6rem; text-align: center; }

/* ══ B1: INTERROGATION ROOM ═══════════════════════════════════════════════════ */
.interrogation-room { display: flex; flex-direction: column; min-height: 100vh; }
.room-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem; background: var(--surface);
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.room-label { flex: 1; min-width: 160px; }
.header-chips { display: flex; align-items: center; gap: 0.4rem; }
.stop-btn { margin-left: auto; }
.room-body {
  display: grid; grid-template-columns: 1fr 1fr;
  flex: 1; border-bottom: 1px solid var(--border);
}
.monitor-section, .amn-section {
  padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.monitor-section { border-right: 1px solid var(--border); }
.section-label { margin-bottom: -0.25rem; }

/* Live examiner phase indicator — diegetic "the machine is working" cue that
   cuts perceived latency in the gap between the subject pausing and A.M.N.
   replying. */
.examiner-phase {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.1rem 0 0.35rem; font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--muted); transition: color 0.25s ease;
}
.examiner-phase .phase-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 8px currentColor;
  transition: background 0.25s ease;
}
.examiner-phase[data-phase="listening"]  { color: var(--info); }
.examiner-phase[data-phase="analyzing"]   { color: var(--warn); }
.examiner-phase[data-phase="responding"]  { color: var(--accent); }
.examiner-phase[data-phase="standby"]     { color: var(--muted); }
/* Analyzing pulses to read as active computation; listening breathes gently. */
.examiner-phase[data-phase="analyzing"] .phase-dot { animation: phase-pulse 0.7s ease-in-out infinite; }
.examiner-phase[data-phase="listening"] .phase-dot { animation: phase-pulse 1.6s ease-in-out infinite; }
.examiner-phase[data-phase="responding"] .phase-dot { animation: phase-pulse 0.4s ease-in-out infinite; }
@keyframes phase-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .examiner-phase .phase-dot { animation: none !important; }
}

/* CRT monitor frame */
.monitor-frame {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border: 2px solid var(--border2);
  border-radius: 2px; overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
}
.monitor-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom, transparent 0px, transparent 2px,
    rgba(0,0,0,0.15) 2px, rgba(0,0,0,0.15) 4px
  );
  pointer-events: none; z-index: 2;
}
.chromatic-fringe {
  position: absolute; inset: 0;
  background: linear-gradient(to right,
    rgba(255,0,0,0.04) 0%, transparent 8%,
    transparent 92%, rgba(0,0,255,0.04) 100%);
  pointer-events: none; z-index: 3;
}
.monitor-chips {
  position: absolute; top: 0.45rem; left: 0.45rem;
  display: flex; gap: 0.35rem; z-index: 4;
}
.chip-live, .chip-sensor {
  font-size: 0.56rem; letter-spacing: 0.1em;
  padding: 0.12rem 0.35rem; background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 2px;
}
.chip-live { color: var(--ok); }
.chip-sensor { color: var(--muted); }
body.camera-denied .chip-sensor { color: var(--accent); }
body.camera-denied .monitor-video { opacity: 0.15; filter: grayscale(1); }
@keyframes screen-pulse {
  0%,100% { box-shadow: inset 0 0 40px rgba(0,0,0,0.6), 0 0 0 1px var(--border); }
  50% { box-shadow: inset 0 0 40px rgba(0,0,0,0.6), 0 0 0 2px var(--accent), 0 0 20px rgba(228,91,65,0.2); }
}
body.high-suspicion .monitor-frame { animation: screen-pulse 1.4s ease-in-out infinite; }

/* ── B3: Evidence tags ─────────────────────────────────────────────────────── */
.evidence-tags {
  position: absolute; bottom: 0.5rem; right: 0.5rem;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 0.35rem;
  z-index: 5; max-width: 160px;
}
.evidence-tag {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: rgba(10,8,6,0.92);
  border: 1px solid rgba(228,91,65,0.6);
  border-radius: 2px; font-size: 0.65rem;
  letter-spacing: 0.1em; color: var(--accent);
  animation: tag-slide-in 0.25s ease-out;
  transition: opacity 0.35s, transform 0.35s;
  white-space: nowrap;
}
.evidence-tag.positive { border-color: rgba(147,200,154,0.6); color: var(--ok); }
.evidence-tag.fading { opacity: 0; transform: translateX(8px); }
.tag-icon { font-size: 0.75rem; }
@keyframes tag-slide-in { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:none; } }

/* ── B8: Typed input fallback ──────────────────────────────────────────────── */
.typed-row {
  border: 1px solid var(--warn); background: rgba(242,180,107,0.04);
  border-radius: 2px; padding: 0.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.typed-mode-notice { font-size: 0.65rem; letter-spacing: 0.1em; color: var(--warn); text-transform: uppercase; }
.warn-icon { margin-right: 0.25rem; }
.typed-input-group { display: flex; gap: 0.4rem; }
.typed-input {
  flex: 1; font-family: var(--mono); font-size: 0.75rem;
  padding: 0.45rem 0.65rem; background: var(--surface2);
  border: 1px solid var(--border2); border-radius: 2px;
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.typed-input:focus { border-color: var(--warn); }
.typed-input::placeholder { color: var(--muted); }
.session-note { margin-top: auto; }

/* ══ B2: THE EYE ══════════════════════════════════════════════════════════════ */
.eye-chamber {
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, #1c0808 30%, #0c0408 80%, #050207 100%);
  border: 2px solid #2a1515;
  position: relative; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color 0.4s, box-shadow 0.4s;
}
.eye-shell {
  width: 64px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #400808 15%, #220404 60%, #0e0202 100%);
  position: relative; display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s, background 0.4s;
  animation: eye-idle 3.5s ease-in-out infinite;
}
.eye-pupil {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a2a2a, #000);
  box-shadow: 0 0 8px rgba(0,0,0,0.9);
  transition: width 0.3s, height 0.3s;
}
.eye-rings {
  position: absolute; inset: 6px; border-radius: 50%;
  border: 1px solid rgba(180,50,40,0.25);
  animation: ring-rotate 8s linear infinite;
}
.eye-fog {
  position: absolute; inset: 0; border-radius: 50%;
  pointer-events: none; opacity: 0;
  transition: opacity 0.6s, background 0.6s;
}
.eye-glitch-layer {
  position: absolute; inset: 0; border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity 0.1s;
}
.eye-glitch-r { background: rgba(255,0,0,0.15); mix-blend-mode: screen; }
.eye-glitch-b { background: rgba(0,100,255,0.15); mix-blend-mode: screen; }
@keyframes eye-idle {
  0%,100% { transform: scaleY(1); }
  40%,60% { transform: scaleY(0.88); }
}
@keyframes ring-rotate { to { transform: rotate(360deg); } }

/* thinking */
.eye-chamber[data-state="thinking"] .eye-shell {
  animation: eye-think 1.2s ease-in-out infinite;
  background: radial-gradient(circle at 50% 40%, #5a4200 15%, #2a2000 60%, #0e0a02 100%);
}
.eye-chamber[data-state="thinking"] .eye-pupil {
  background: radial-gradient(circle at 35% 35%, #3a3000, #1a1500);
}
@keyframes eye-think {
  0%,100% { transform: scaleY(0.5) scaleX(1.1); }
  50% { transform: scaleY(0.65) scaleX(1.05); }
}
/* suspicious */
.eye-chamber[data-state="suspicious"] {
  border-color: rgba(228,91,65,0.7);
  box-shadow: 0 0 20px rgba(228,91,65,0.2);
}
.eye-chamber[data-state="suspicious"] .eye-shell {
  animation: eye-suspicious 2s ease-in-out infinite;
  background: radial-gradient(circle at 50% 40%, #7a1010 20%, #4a0808 60%, #1a0303 100%);
}
.eye-chamber[data-state="suspicious"] .eye-pupil { width: 26px; height: 26px; }
.eye-chamber[data-state="suspicious"] .eye-rings {
  border-color: rgba(228,91,65,0.45); animation: ring-rotate 4s linear infinite;
}
@keyframes eye-suspicious {
  0%,100% { transform: scale(1.05); }
  50% { transform: scale(1.15); }
}
/* glitching */
.eye-chamber[data-state="glitching"] .eye-shell { animation: eye-glitch 0.15s steps(1) infinite; }
.eye-chamber[data-state="glitching"] .eye-glitch-r { opacity:1; animation: glitch-r 0.15s steps(1) infinite; }
.eye-chamber[data-state="glitching"] .eye-glitch-b { opacity:1; animation: glitch-b 0.15s steps(1) infinite; }
@keyframes eye-glitch {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-3px,1px) scaleX(1.04); }
  50%  { transform: translate(2px,-2px) scaleY(0.96); }
  75%  { transform: translate(-1px,2px); }
  100% { transform: translate(0,0); }
}
@keyframes glitch-r {
  0%,100% { transform:translate(0,0); opacity:0.15; }
  33% { transform:translate(-4px,0); opacity:0.3; }
  66% { transform:translate(2px,0); opacity:0.2; }
}
@keyframes glitch-b {
  0%,100% { transform:translate(0,0); opacity:0.15; }
  33% { transform:translate(3px,0); opacity:0.25; }
  66% { transform:translate(-1px,0); opacity:0.2; }
}
/* fogged */
.eye-chamber[data-state="fogged"] .eye-shell {
  filter: blur(1.5px); animation: eye-fog-pulse 2.5s ease-in-out infinite;
}
.eye-chamber[data-state="fogged"] .eye-fog {
  opacity: 1;
  background: radial-gradient(circle, rgba(140,160,220,0.18) 40%, rgba(100,120,200,0.35) 100%);
}
@keyframes eye-fog-pulse {
  0%,100% { opacity: 0.6; }
  50% { opacity: 0.85; }
}
/* mimic — D6: first time suspicion crosses 70, Eye twitches as if copying the subject */
.eye-chamber[data-state="mimic"] {
  border-color: rgba(228,91,65,0.9);
  box-shadow: 0 0 28px rgba(228,91,65,0.35);
}
.eye-chamber[data-state="mimic"] .eye-shell {
  animation: eye-mimic 0.12s steps(1) infinite;
  background: radial-gradient(circle at 50% 40%, #900808 20%, #500404 60%, #1a0303 100%);
}
.eye-chamber[data-state="mimic"] .eye-pupil { width: 28px; height: 28px; }
.eye-chamber[data-state="mimic"] .eye-glitch-r { opacity: 0.7; animation: glitch-r 0.12s steps(1) infinite; }
.eye-chamber[data-state="mimic"] .eye-glitch-b { opacity: 0.5; animation: glitch-b 0.12s steps(1) infinite; }
@keyframes eye-mimic {
  0%   { transform: scaleY(1)    translate(0,0); }
  20%  { transform: scaleY(0.1)  translate(0,0); }
  35%  { transform: scaleY(1)    translate(-2px,1px); }
  55%  { transform: scaleY(0.08) translate(1px,-1px); }
  80%  { transform: scaleY(1)    translate(0,2px); }
  100% { transform: scaleY(1)    translate(0,0); }
}

/* mirror — D7: two-way mirror on WIN, eye shows player's own feed */
.eye-chamber[data-state="mirror"] {
  border-color: var(--ok);
  box-shadow: 0 0 32px rgba(147,200,154,0.35);
}
.eye-chamber[data-state="mirror"] .eye-shell {
  animation: eye-mirror-pulse 1.4s ease-in-out infinite;
  background: radial-gradient(circle at 50% 40%, #0a280a 20%, #061806 60%, #020a02 100%);
}
@keyframes eye-mirror-pulse {
  0%,100% { transform: scale(1);    opacity: 1;   }
  50%     { transform: scale(1.06); opacity: 0.75; }
}
.eye-mirror-canvas {
  position: absolute; inset: 0;
  border-radius: 50%; object-fit: cover;
  opacity: 0.72; mix-blend-mode: luminosity;
  pointer-events: none;
  animation: mirror-fade-in 0.5s ease-out;
}
@keyframes mirror-fade-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 0.72; transform: none; }
}

/* confession verdict stamp */
.verdict-stamp.confession {
  animation: confession-pulse 0.6s ease-out 2;
}
@keyframes confession-pulse {
  0%,100% { box-shadow: none; }
  50%     { box-shadow: 0 0 24px rgba(228,91,65,0.6); }
}

/* Global FX body classes */
@keyframes body-glitch {
  0%,100% { filter: none; }
  15% { filter: hue-rotate(50deg) contrast(1.18) brightness(1.08); }
  30% { filter: saturate(0.25) hue-rotate(-40deg) brightness(0.85); }
  45% { filter: hue-rotate(100deg) contrast(1.25) invert(0.06); }
  60% { filter: saturate(1.5) hue-rotate(-20deg) brightness(1.05); }
  75% { filter: hue-rotate(30deg) contrast(1.1) blur(0.3px); }
}
body.glitch-active { animation: body-glitch 0.15s steps(1) infinite; }
@keyframes body-decay {
  0%,100% { filter: none; }
  50% { filter: blur(0.3px) brightness(0.95) saturate(0.8); }
}
body.decay-active { animation: body-decay 0.5s ease-in-out 4; }

/* D4: Déjà-vu VHS hitch — telegraph before Goldfish memory decay */
@keyframes dejavu-hitch {
  0%   { transform: translate(0, 0)    skewX(0deg);   filter: none; }
  12%  { transform: translate(-4px, 0) skewX(-0.4deg); filter: brightness(1.2) saturate(0.5); }
  25%  { transform: translate(5px, 0)  skewX(0.6deg);  filter: hue-rotate(30deg); }
  38%  { transform: translate(-3px, 2px) skewX(-0.3deg); filter: brightness(0.8); }
  50%  { transform: translate(0, 0)    skewX(0deg);   filter: contrast(1.4) saturate(0.3); }
  63%  { transform: translate(3px, -1px) skewX(0.2deg); filter: hue-rotate(-20deg); }
  75%  { transform: translate(-2px, 0) skewX(-0.1deg); filter: brightness(1.1); }
  100% { transform: translate(0, 0)    skewX(0deg);   filter: none; }
}
body.dejavu-active { animation: dejavu-hitch 0.9s steps(2) 1; }
body.dejavu-active .monitor-frame::after {
  content: "";
  position: absolute; inset: 0; z-index: 10;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.04) 4px
  );
  pointer-events: none;
}

/* ══ B4: SUSPICION GAUGE ══════════════════════════════════════════════════════ */
.suspicion-panel { display: flex; flex-direction: column; gap: 0.5rem; }
.gauge-header { display: flex; justify-content: space-between; align-items: baseline; }
.suspicion-number {
  font-size: 1.4rem; font-variant-numeric: tabular-nums;
  color: var(--text); transition: color 0.4s;
}
.suspicion-bar-track {
  position: relative; height: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 1px; overflow: hidden;
}
.suspicion-bar-fill {
  height: 100%; width: 50%;
  background: hsl(120,65%,52%);
  transition: background 0.5s; border-radius: 1px;
}
.suspicion-ticks {
  position: absolute; inset: 0;
  display: flex; justify-content: space-around; align-items: stretch;
  pointer-events: none;
}
.suspicion-ticks span { width: 1px; background: rgba(255,255,255,0.07); }
.polygraph-strip {
  height: 48px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 1px; overflow: hidden;
}
#polygraph { width: 100%; height: 100%; display: block; }

/* ══ B5: STREAMING SUBTITLES ══════════════════════════════════════════════════ */
.subtitle-panel { flex: 1; display: flex; align-items: flex-end; min-height: 80px; }
.subtitle-bar {
  width: 100%; min-height: 3.5rem;
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: 2px; padding: 0.6rem 0.8rem;
  display: flex; align-items: flex-end;
}
.subtitle-text {
  font-size: 0.8rem; line-height: 1.55;
  color: var(--text); flex: 1; word-break: break-word;
}
.cursor-blink {
  color: var(--accent); font-size: 0.85rem;
  animation: blink 0.9s step-end infinite;
  margin-left: 1px; flex-shrink: 0;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* §6: HEARD overlay — what A.M.N. transcribed from the subject's audio. */
.heard-panel {
  margin-top: 0.45rem; display: flex; align-items: baseline; gap: 0.5rem;
  background: rgba(0,0,0,0.32); border: 1px dashed var(--border);
  border-radius: 2px; padding: 0.4rem 0.65rem;
}
.heard-panel[hidden] { display: none; }
.heard-label {
  font-size: 0.56rem; letter-spacing: 0.12em; color: var(--muted);
  flex-shrink: 0;
}
.heard-text {
  font-size: 0.74rem; line-height: 1.45; color: var(--text);
  font-style: italic; opacity: 0.92; word-break: break-word;
}

/* ══ B6: CASE FILE ════════════════════════════════════════════════════════════ */
.case-file {
  border-top: 1px solid var(--border);
  padding: 0.65rem 1rem; background: var(--surface);
}
.case-file-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.case-count { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.1em; }
.case-file-notes {
  display: flex; gap: 0.4rem;
  overflow-x: auto; padding-bottom: 0.35rem;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.case-note {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 0.2rem;
  padding: 0.45rem 0.6rem; min-width: 72px; max-width: 90px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 2px; font-size: 0.58rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  animation: note-pop 0.2s ease-out;
  transition: opacity 0.4s, transform 0.4s, filter 0.4s;
}
.case-note.positive { color: var(--ok); border-color: rgba(147,200,154,0.35); }
.case-note.scrambled { color: var(--muted); border-color: var(--border); filter: blur(0.4px); }
.case-note.decayed { opacity: 0; transform: scale(0.85); pointer-events: none; }
.note-icon { font-size: 0.85rem; }
.note-label { text-align: center; line-height: 1.3; word-break: break-all; }
.note-turn { color: var(--muted); font-size: 0.52rem; }
@keyframes note-pop {
  from { opacity:0; transform: scale(0.8) translateY(4px); }
  to   { opacity:1; transform: none; }
}

/* ══ B7: DIEGETIC TIMER ═══════════════════════════════════════════════════════ */
.diegetic-timer { display: flex; align-items: center; gap: 0.4rem; min-width: 140px; }
.timer-label { flex-shrink: 0; }
.power-track {
  flex: 1; height: 6px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 1px; overflow: hidden;
}
.power-fill {
  height: 100%; width: 100%; background: var(--ok);
  transition: width 0.6s, background 0.5s; border-radius: 1px;
}
.power-pct {
  font-size: 0.65rem; color: var(--text);
  min-width: 2.8rem; text-align: right; font-variant-numeric: tabular-nums;
}

/* ══ B7: SILENCE WHISPER ══════════════════════════════════════════════════════ */
.silence-whisper {
  position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%);
  padding: 0.55rem 1.4rem;
  background: rgba(10,8,6,0.92); border: 1px solid rgba(228,91,65,0.4);
  border-radius: 2px; font-size: 0.72rem; letter-spacing: 0.12em;
  color: rgba(228,91,65,0.7); font-style: italic;
  pointer-events: none; opacity: 0; transition: opacity 0.6s;
  z-index: 50; white-space: nowrap;
}
.silence-whisper.visible { opacity: 1; }

/* ══ B7: VERDICT OVERLAY ══════════════════════════════════════════════════════ */
.verdict-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,5,8,0.95);
  opacity: 0; transition: opacity 0.4s;
}
.verdict-overlay.visible { opacity: 1; }
.verdict-inner {
  max-width: 480px; width: 90%; padding: 2.5rem;
  border: 2px solid var(--border2); background: var(--surface);
  border-radius: 3px; display: flex; flex-direction: column;
  gap: 1rem; align-items: center; text-align: center;
  animation: verdict-enter 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes verdict-enter {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.verdict-stamp {
  font-size: 1.6rem; letter-spacing: 0.08em;
  padding: 0.5rem 1.2rem;
  border: 3px solid transparent; border-radius: 3px;
  font-weight: bold; text-transform: uppercase;
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.verdict-stamp.stamped { transform: scale(1) rotate(-2deg); }
.verdict-stamp.human { color: var(--ok); border-color: var(--ok); background: rgba(147,200,154,0.08); }
.verdict-stamp.robot { color: var(--accent); border-color: var(--accent); background: rgba(228,91,65,0.08); }
.verdict-rationale { font-size: 0.8rem; color: var(--muted); font-style: italic; line-height: 1.6; max-width: 36ch; }
.verdict-stats { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.stat-item {
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 0.2rem 0.5rem;
  border: 1px solid var(--border); border-radius: 2px;
}
.verdict-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* ══ W1: BOOT PROGRESS BAR ═══════════════════════════════════════════════════ */
.boot-progress {
  height: 3px; background: var(--surface3); border-radius: 1px; overflow: hidden;
  margin-top: 0.2rem;
}
#boot-progress-fill {
  height: 100%; width: 0%; background: var(--warn);
  transition: width 0.55s ease, background 0.4s ease;
  border-radius: 1px;
}
#boot-progress-fill.ready { background: var(--ok); }

/* ══ W2: BOOT BIOMETRIC PANEL ════════════════════════════════════════════════ */
.boot-biometric {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 2px;
}
.boot-biometric[hidden] { display: none; }
.boot-cam-feed {
  width: 76px; height: 57px; object-fit: cover; border-radius: 2px;
  border: 1px solid var(--border); background: #000; flex-shrink: 0;
  transform: scaleX(-1);
  filter: contrast(1.08) saturate(0.85);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.boot-bio-readout {
  flex: 1; display: flex; flex-direction: column; gap: 0.28rem;
}
.bio-row {
  display: flex; justify-content: space-between; align-items: baseline;
}
.bio-label {
  font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.bio-value {
  font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--info); font-variant-numeric: tabular-nums;
}
.boot-bio-caption { margin-top: 0.3rem; line-height: 1.4; }

/* ══ W6: CALIBRATION HINT ════════════════════════════════════════════════════ */
.calibration-hint {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--warn); margin-bottom: -0.25rem;
  animation: calibration-blink 1.1s ease-in-out infinite;
}
.calibration-hint[hidden] { display: none; }
@keyframes calibration-blink {
  0%, 100% { opacity: 1; } 50% { opacity: 0.35; }
}

/* ══ W3: TRANSCRIPT LOG ══════════════════════════════════════════════════════ */
.transcript-details {
  margin-top: 0.4rem;
  border: 1px solid var(--border); border-radius: 2px;
  background: var(--surface2);
}
.transcript-summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 0.38rem 0.65rem;
  font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); display: flex; justify-content: space-between;
  align-items: center;
}
.transcript-summary::-webkit-details-marker { display: none; }
.transcript-summary::after { content: "\25BC"; font-size: 0.48rem; }
.transcript-details[open] .transcript-summary::after { content: "\25B2"; }
.transcript-summary:hover { color: var(--text); }
.transcript-log {
  max-height: 150px; overflow-y: auto; padding: 0.4rem 0.65rem 0.55rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.transcript-entry {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0.45rem;
  font-size: 0.7rem; line-height: 1.45; align-items: baseline;
  animation: txr-pop 0.18s ease-out;
}
@keyframes txr-pop { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; } }
.txr-label {
  font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase;
  flex-shrink: 0;
}
.transcript-entry.transcript-subject .txr-label { color: var(--info); }
.transcript-entry.transcript-amn .txr-label { color: var(--accent); }
.txr-text { color: var(--text); opacity: 0.88; word-break: break-word; }
.transcript-entry.transcript-amn .txr-text { font-style: italic; }

/* ══ W4: EYE LIVE-BIOMETRIC CSS VARS ════════════════════════════════════════ */
.eye-chamber {
  --pupil-scale: 1;
  --eye-narrow: 0;
  --eye-jitter: 0px;
  transform: scaleY(calc(1 - var(--eye-narrow) * 0.3)) translateX(var(--eye-jitter));
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.3s ease;
}
.eye-pupil {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a2a2a, #000);
  box-shadow: 0 0 8px rgba(0,0,0,0.9);
  transform: scale(var(--pupil-scale, 1));
  transition: width 0.3s, height 0.3s, transform 0.2s ease;
}

/* ══ W7: SUSPICION THRESHOLD MARKER ═════════════════════════════════════════ */
.suspicion-bar-track {
  position: relative; height: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 1px; overflow: hidden;
}
.suspicion-bar-track::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: 80%; width: 1px; background: rgba(228,91,65,0.55);
  z-index: 2; pointer-events: none;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .room-body { grid-template-columns: 1fr; }
  .monitor-section { border-right: none; border-bottom: 1px solid var(--border); }
  .diegetic-timer { display: none; }
  .boot-panel { padding: 1.5rem; }
  .boot-title { font-size: 2rem; }
  .boot-biometric { flex-direction: column; }
  .boot-cam-feed { width: 100%; height: 80px; }
  .transcript-log { max-height: 120px; }
  .transcript-entry { grid-template-columns: 2.6rem 1fr; font-size: 0.66rem; }
  .eye-chamber { width: 88px; height: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Accessibility: visible keyboard focus (plan1.md §23.6) ─────────────────── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 2px solid #8fb6ff;
  outline-offset: 2px;
  border-radius: 4px;
}
