:root {
  color-scheme: dark;
  --red: #ff111f;
  --dark-red: #7c0009;
  --damage: 0;
  --proximity: 0;
  font-family: "Cascadia Mono", "Lucida Console", "Courier New", monospace;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  min-height: 100dvh;
  color: #d7c6c7;
  isolation: isolate;
  cursor: crosshair;
}

button,
input { font: inherit; }

button { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.void,
.scanlines,
.noise,
.vignette,
.screen-flash {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.void {
  z-index: -4;
  background:
    radial-gradient(ellipse at 50% 36%, rgba(92, 0, 7, calc(.08 + var(--proximity) * .14 + var(--damage) * .025)) 0, transparent 38%),
    radial-gradient(ellipse at center, #090304 0, #020203 52%, #000 100%);
}

.scanlines {
  z-index: 24;
  opacity: .2;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .48) 3px 4px);
}

.noise {
  z-index: 23;
  opacity: calc(.045 + var(--damage) * .018);
  background-image:
    repeating-radial-gradient(circle at 18% 31%, rgba(255,255,255,.55) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 76% 67%, rgba(255,0,20,.48) 0 1px, transparent 1px 5px);
  background-size: 9px 11px, 13px 15px;
  mix-blend-mode: screen;
  animation: textureShift .32s steps(2) infinite;
}

.vignette {
  z-index: 30;
  box-shadow: inset 0 0 15vw 6vw #000, inset 0 0 3vw rgba(118, 0, 8, .22);
}

.screen-flash {
  z-index: 100;
  opacity: 0;
  background: var(--flash-color, #fff);
  mix-blend-mode: screen;
}

.screen-flash.active {
  animation: fullFlash var(--flash-duration, 260ms) steps(2) forwards;
}

body::before {
  content: "";
  position: fixed;
  z-index: 21;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,.08) 5px, transparent 6px),
    linear-gradient(90deg, rgba(255,0,18,.24), transparent 28% 72%, rgba(0,180,210,.13));
  mix-blend-mode: screen;
}

body.glitch-pulse::before {
  animation: screenTextureGlitch 340ms steps(7) 1;
}

.interrogation {
  position: relative;
  z-index: 5;
  width: min(980px, 92vw);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(25px, 5vh, 54px) 0 clamp(20px, 4vh, 40px);
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  gap: clamp(10px, 2vh, 20px);
}

.protocol-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3px 12px;
  border-bottom: 1px solid rgba(255, 32, 40, .17);
}

.node-label,
.stage-readout {
  margin: 0;
  color: #8c696b;
  font-size: clamp(9px, 1.2vw, 12px);
  letter-spacing: .26em;
}

.node-label { position: relative; }

.node-label::before,
.node-label::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

body.glitch-pulse .node-label::before {
  color: var(--red);
  opacity: .65;
  transform: translateX(3px);
  clip-path: inset(12% 0 57% 0);
}

body.glitch-pulse .node-label::after {
  color: #84eaff;
  opacity: .32;
  transform: translateX(-3px);
  clip-path: inset(65% 0 5% 0);
}

.stage-readout {
  color: #c30b16;
  text-shadow: 0 0 8px rgba(255,0,17,.52);
}

.stage-readout .separator { color: #513638; }

.observer {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
}

.eye-halo {
  position: absolute;
  width: clamp(330px, 57vw, 720px);
  aspect-ratio: 1.9;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,0,14,calc(.08 + var(--proximity) * .18 + var(--damage) * .025)), transparent 68%);
  filter: blur(20px);
}

.eye {
  position: relative;
  width: clamp(340px, 58vw, 720px);
  aspect-ratio: 1.92;
  filter: drop-shadow(0 0 calc(10px + var(--proximity) * 22px) rgba(255,0,18,calc(.18 + var(--proximity) * .46)));
}

.eye-image-stack {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform, filter, opacity;
  animation: eyePulse 4.8s ease-in-out infinite;
}

.eye-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.eye-image-base {
  opacity: calc(.68 + var(--proximity) * .27 + var(--damage) * .02);
  filter: brightness(calc(.72 + var(--proximity) * .35 + var(--damage) * .06)) contrast(1.28) saturate(1.2);
}

.eye.is-blinking .eye-image-stack {
  animation: eyeBlink 340ms cubic-bezier(.75,0,.25,1) 1;
}

.eye.is-glitching .eye-image-stack {
  animation: eyeGlitch 430ms steps(8) 1;
}

.question-panel {
  position: relative;
  width: min(790px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 4vw, 42px) clamp(18px, 3vw, 26px);
  border: 1px solid rgba(172, 0, 10, .33);
  background: linear-gradient(110deg, rgba(33,0,3,.16), transparent 45%), rgba(2,1,2,.86);
  box-shadow: 0 0 0 1px rgba(0,0,0,.85), 0 0 26px rgba(150,0,8,calc(.05 + var(--proximity) * .11)), inset 0 0 38px rgba(0,0,0,.75);
}

.question-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,28,37,.68), transparent);
  transform: scaleX(calc(.2 + var(--proximity) * .8));
}

.panel-corner {
  position: absolute;
  width: 13px;
  height: 13px;
  border-color: var(--red);
  opacity: .65;
}

.corner-one { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.corner-two { right: -1px; bottom: -1px; border-right: 1px solid; border-bottom: 1px solid; }

.prompt-prefix {
  display: flex;
  justify-content: space-between;
  margin: 0 0 13px;
  color: #a3131a;
  font-size: 10px;
  letter-spacing: .32em;
}

.question-text {
  position: relative;
  min-height: 3.7em;
  margin: 0 0 clamp(18px, 3vh, 28px);
  color: #cbbabb;
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.75;
  letter-spacing: .055em;
  text-wrap: balance;
}

.question-text::before,
.question-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

body.glitch-pulse .question-text::before {
  color: #ff2937;
  opacity: .65;
  transform: translateX(4px);
  clip-path: inset(14% 0 61% 0);
}

body.glitch-pulse .question-text::after {
  color: #8ceaff;
  opacity: .3;
  transform: translateX(-4px);
  clip-path: inset(62% 0 12% 0);
}

.question-text.morphing {
  color: #ff2937;
  text-shadow: 1px 0 #fff, -1px 0 #710008;
}

.answer-form {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border: 1px solid rgba(255,38,47,.32);
  background: rgba(0,0,0,.78);
  overflow: hidden;
}

.input-prompt {
  padding-left: 16px;
  color: var(--red);
  text-shadow: 0 0 9px var(--red);
  animation: promptBlink 1.1s steps(1) infinite;
}

.answer-form input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: #f2d9da;
  caret-color: var(--red);
  background: transparent;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.answer-form input::placeholder { color: #50383a; opacity: 1; }

.answer-form button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid rgba(255,38,47,.25);
  padding: 0 clamp(12px, 2.7vw, 24px);
  color: #a9787b;
  background: rgba(40,0,4,.22);
  font-size: 10px;
  letter-spacing: .18em;
  transition: color .14s, background .14s, text-shadow .14s;
}

.answer-form button:hover,
.answer-form button:focus-visible {
  color: #ff7177;
  background: rgba(100,0,8,.25);
  text-shadow: 0 0 8px #ff0015;
  outline: none;
}

.answer-form input:disabled,
.answer-form button:disabled { opacity: .36; cursor: wait; }

.response-text {
  min-height: 1em;
  margin: 13px 0 0;
  color: #654d4f;
  font-size: 9px;
  letter-spacing: .2em;
}

.response-text.accepted { color: #ff333e; text-shadow: 0 0 10px rgba(255,0,18,.65); }
.response-text.denied { color: #f1c4c6; }

body.answer-impact .interrogation {
  animation: cleanImpact 410ms steps(5) 1;
}

body.wrong-answer .question-panel {
  animation: wrongShake 310ms steps(4) 1;
  border-color: #fff;
}

.white-stage,
.red-static {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  pointer-events: none;
}

.white-stage {
  z-index: 70;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #050505;
  background: #efeded;
  opacity: 0;
}

body.white-active .white-stage {
  visibility: visible;
  pointer-events: auto;
  animation: whiteReveal 540ms steps(3) forwards;
}

.white-wave,
.white-noise {
  position: absolute;
  inset: -10%;
  pointer-events: none;
}

.white-wave {
  opacity: .12;
  background: repeating-radial-gradient(ellipse at 50% 50%, transparent 0 35px, rgba(0,0,0,.08) 36px 37px, transparent 38px 70px);
  animation: whiteWave 9s linear infinite;
}

.white-noise {
  opacity: .1;
  background-image: repeating-radial-gradient(circle at 33% 57%, #111 0 1px, transparent 1px 4px);
  background-size: 7px 8px;
  mix-blend-mode: multiply;
  animation: textureShift .35s steps(2) infinite;
}

.final-message {
  position: relative;
  z-index: 3;
  width: min(1080px, 88vw);
  min-height: 3em;
  display: grid;
  place-items: center;
  color: #070707;
  font-family: "OCR A Std", "Cascadia Mono", "Lucida Console", monospace;
  font-size: clamp(22px, 3.2vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.final-line {
  position: relative;
  margin: 0;
  max-width: 100%;
}

.final-line::before,
.final-line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.final-line.corrupting::before {
  color: #b70014;
  opacity: .55;
  transform: translateX(5px);
  clip-path: inset(8% 0 66% 0);
}

.final-line.corrupting::after {
  color: #00758a;
  opacity: .35;
  transform: translateX(-5px);
  clip-path: inset(64% 0 10% 0);
}

.white-stage.final-crash {
  animation: whiteCrash 1.35s steps(7) forwards !important;
}

.red-static {
  z-index: 105;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #160003;
  opacity: 0;
}

body.static-active .red-static { visibility: visible; opacity: 1; }

.red-static-noise,
.red-static::before,
.red-static::after {
  content: "";
  position: absolute;
  inset: -20%;
}

.red-static-noise {
  opacity: .75;
  background-image:
    repeating-radial-gradient(circle at 10% 30%, #ff0a20 0 1px, transparent 1px 3px),
    repeating-radial-gradient(circle at 70% 80%, #750006 0 1px, #050001 1px 4px);
  background-size: 5px 7px, 9px 6px;
  animation: redNoise .14s steps(2) infinite;
}

.red-static::before {
  z-index: 2;
  opacity: .65;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.68) 4px 6px);
}

.red-static::after {
  z-index: 3;
  background: radial-gradient(ellipse at center, transparent 0 20%, rgba(0,0,0,.54) 63%, #000 100%);
}

.red-static p {
  position: relative;
  z-index: 4;
  margin: 0;
  padding: 8px 11px;
  color: rgba(0,0,0,.76);
  background: rgba(255,20,35,.13);
  font-size: clamp(9px, 1vw, 12px);
  font-weight: 800;
  letter-spacing: .38em;
  text-shadow: 1px 0 rgba(255,70,80,.35);
}

.red-static p span { color: rgba(255,73,82,.45); }

@keyframes textureShift {
  0% { transform: translate(0); }
  50% { transform: translate(-2px, 1px); }
  100% { transform: translate(2px, -1px); }
}

@keyframes fullFlash {
  0% { opacity: 0; }
  12% { opacity: var(--flash-opacity, .82); }
  42% { opacity: calc(var(--flash-opacity, .82) * .38); }
  100% { opacity: 0; }
}

@keyframes screenTextureGlitch {
  0%, 100% { opacity: 0; transform: translateX(0); clip-path: inset(0); }
  15% { opacity: .72; transform: translateX(9px); clip-path: inset(0 0 74% 0); }
  34% { opacity: .28; transform: translateX(-7px); clip-path: inset(52% 0 11% 0); }
  58% { opacity: .56; transform: translateX(5px); clip-path: inset(20% 0 55% 0); }
  79% { opacity: .22; transform: translateX(-3px); clip-path: inset(72% 0 2% 0); }
}

@keyframes eyePulse {
  0%, 100% { transform: scale(1); filter: brightness(.84); }
  50% { transform: scale(1.012); filter: brightness(1.08); }
}

@keyframes eyeBlink {
  0%, 100% { transform: scaleY(1); filter: brightness(1); opacity: 1; }
  45%, 58% { transform: scaleY(.018); filter: brightness(1.55); opacity: .82; }
}

@keyframes eyeGlitch {
  0%, 100% { transform: translateX(0) scaleY(1); filter: brightness(1) contrast(1); clip-path: inset(0); }
  14% { transform: translateX(-7px) scaleY(.98); filter: brightness(1.45) contrast(1.65); clip-path: inset(7% 0 61% 0); }
  31% { transform: translateX(8px) scaleY(1.02); clip-path: inset(59% 0 5% 0); }
  49% { transform: translateX(-4px) scaleY(.97); filter: brightness(1.2) contrast(1.5); clip-path: inset(26% 0 41% 0); }
  68% { transform: translateX(6px) scaleY(1.01); clip-path: inset(72% 0 1% 0); }
  84% { transform: translateX(-2px); clip-path: inset(0); }
}

@keyframes promptBlink { 0%, 54% { opacity: 1; } 55%, 100% { opacity: .25; } }

@keyframes cleanImpact {
  0%, 100% { transform: translate(0); filter: none; }
  20% { transform: translateX(-5px); filter: contrast(1.55) brightness(1.18); }
  42% { transform: translateX(5px); }
  66% { transform: translateX(-2px); filter: contrast(1.15); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

@keyframes whiteReveal {
  0% { opacity: 0; filter: brightness(4); }
  28% { opacity: 1; filter: brightness(1.8); }
  52% { opacity: .58; }
  100% { opacity: 1; filter: none; }
}

@keyframes whiteWave { to { transform: scale(1.12); } }
@keyframes whiteCrash {
  0% { opacity: 1; filter: none; }
  12% { filter: invert(1) contrast(3); background: #fff; }
  23% { filter: none; background: #9d0010; }
  35% { filter: invert(1) contrast(5); background: #fff; }
  48% { filter: none; background: #000; }
  64% { filter: brightness(3) contrast(4); background: #d00016; }
  82% { opacity: 1; filter: brightness(0); background: #000; }
  100% { opacity: 0; filter: brightness(0); background: #000; }
}

@keyframes redNoise {
  0% { transform: translate(0) scale(1.06); }
  50% { transform: translate(-2%, 2%) scale(1.1); }
  100% { transform: translate(2%, -1%) scale(1.08); }
}

@media (max-height: 760px) {
  .interrogation {
    padding-top: 20px;
    padding-bottom: 17px;
    grid-template-rows: auto minmax(150px, 1fr) auto;
  }

  .eye { width: clamp(300px, 51vw, 620px); }
  .question-panel { padding-top: 17px; padding-bottom: 16px; }
  .question-text { line-height: 1.55; margin-bottom: 16px; }
}

@media (max-width: 600px) {
  .interrogation { width: 90vw; padding-top: 44px; }
  .protocol-header { align-items: flex-end; gap: 14px; }
  .node-label { max-width: 70%; line-height: 1.55; }
  .eye { width: min(96vw, 520px); }
  .answer-form { grid-template-columns: auto 1fr; }
  .answer-form button {
    grid-column: 1 / -1;
    min-height: 38px;
    border-left: 0;
    border-top: 1px solid rgba(255,38,47,.25);
  }
  .question-text { min-height: 7em; }
  .final-message { width: 91vw; font-size: clamp(19px, 6vw, 30px); }
}

@media (prefers-reduced-motion: reduce) {
  .noise,
  .eye-image-stack,
  .white-noise,
  .white-wave,
  .red-static-noise { animation-duration: 12s !important; }
}

/* Revised full-screen signal, fracture, and finale systems. */
:root {
  --eye-skew: .18deg;
  --eye-stretch: 1.004;
  --eye-shift: 1px;
  --screen-shift: 2px;
  --screen-shift-neg: -2px;
}

body.damage-1 {
  --eye-skew: .38deg;
  --eye-stretch: 1.008;
  --eye-shift: 2px;
  --screen-shift: 3px;
  --screen-shift-neg: -3px;
}

body.damage-2 {
  --eye-skew: .72deg;
  --eye-stretch: 1.014;
  --eye-shift: 4px;
  --screen-shift: 5px;
  --screen-shift-neg: -5px;
}

body.damage-3 {
  --eye-skew: 1.15deg;
  --eye-stretch: 1.022;
  --eye-shift: 7px;
  --screen-shift: 8px;
  --screen-shift-neg: -8px;
}

.ambient-codes,
.transition-wave,
.passive-glitch-field,
.tv-static-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ambient-codes {
  z-index: 3;
  overflow: hidden;
  color: rgba(255, 47, 58, .54);
  font-family: "Cascadia Mono", "Lucida Console", monospace;
  font-size: clamp(7px, .68vw, 10px);
  letter-spacing: .16em;
  text-shadow: 0 0 6px rgba(255, 0, 19, .72);
  transition: none;
}

.ambient-code {
  position: absolute;
  max-width: 24vw;
  opacity: 0;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(var(--code-scale, 1));
  transform-origin: center;
}

.ambient-code.active {
  opacity: .44;
  animation: codeFlicker 180ms steps(2) infinite;
}

.ambient-code.resolved {
  color: rgba(235, 238, 238, .72);
  opacity: .78;
  text-shadow: 1px 0 rgba(255, 0, 20, .9), -1px 0 rgba(80, 220, 255, .35);
  animation: codeResolve 230ms steps(4) both;
}

.burst-code {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 38%;
  color: rgba(255, 34, 47, .78);
  font: 700 clamp(7px, .8vw, 12px)/1 "Cascadia Mono", monospace;
  letter-spacing: .18em;
  white-space: nowrap;
  text-shadow: 0 0 8px #ff0018;
  animation: codeBurst 920ms cubic-bezier(.08,.62,.12,1) var(--burst-delay, 0ms) both;
}

.burst-code.violent {
  color: rgba(255,255,255,.9);
  font-size: clamp(8px, 1vw, 15px);
  text-shadow: 2px 0 #ff0018, -2px 0 rgba(0,213,255,.65), 0 0 12px #ff0018;
  animation-duration: 1320ms;
}

body.white-active .ambient-codes {
  visibility: hidden;
  opacity: 0;
}

.passive-glitch-field {
  z-index: 27;
  opacity: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(to bottom, transparent 0 5px, rgba(255,255,255,.07) 6px, transparent 7px 13px),
    linear-gradient(90deg, rgba(255,0,24,.17), transparent 23% 76%, rgba(95,220,255,.08));
  background-size: 100% 100%, 100% 100%;
  mix-blend-mode: screen;
  animation: passiveScreenGlitch 6.2s steps(1) infinite;
}

.passive-glitch-field::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18%;
  height: 16%;
  background: linear-gradient(to bottom, transparent, rgba(255, 16, 35, .14), rgba(255,255,255,.06), transparent);
  filter: blur(4px);
  animation: passiveTrackingBand 8.5s linear infinite;
}

body.vhs-pulse .passive-glitch-field {
  animation: vhsFieldImpact 620ms steps(8) both;
}

body.vhs-hard .passive-glitch-field {
  animation-duration: 1050ms;
}

body.vhs-pulse .interrogation {
  animation: vhsContentJolt 580ms steps(8) both;
}

body.vhs-hard .interrogation {
  animation-duration: 960ms;
}

.transition-wave {
  z-index: 91;
  opacity: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    repeating-radial-gradient(ellipse at 50% 39%,
      transparent 0 5%,
      rgba(255,0,25,.05) 6%,
      rgba(255,255,255,.08) 7%,
      transparent 8% 14%),
    radial-gradient(ellipse at 50% 39%, rgba(255,0,22,.42), transparent 62%);
  mix-blend-mode: screen;
}

.transition-wave::before,
.transition-wave::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: repeating-radial-gradient(ellipse at center, transparent 0 5%, rgba(255,255,255,.12) 5.5%, rgba(255,0,22,.2) 6.2%, transparent 7.4% 13%);
}

.transition-wave.active {
  animation: gradientRippleSweep 1380ms cubic-bezier(.05,.65,.11,1) both;
}

.transition-wave.active::before {
  animation: rippleSurface 1380ms cubic-bezier(.06,.68,.12,1) both;
}

.transition-wave.final-ripple {
  z-index: 108;
  animation: finalGradientCrash 2200ms cubic-bezier(.04,.64,.12,1) both;
}

.transition-wave.final-ripple::before {
  animation: finalRippleSurface 2200ms cubic-bezier(.04,.68,.11,1) both;
}

.transition-wave.final-ripple::after {
  background:
    linear-gradient(105deg, transparent 10%, rgba(255,0,28,.42) 43%, rgba(255,255,255,.36) 50%, rgba(62,205,255,.24) 55%, transparent 89%);
  animation: finalWaveShear 2200ms steps(10) both;
}

.screen-flash {
  background:
    radial-gradient(ellipse at 50% 42%, var(--flash-color, #fff) 0, color-mix(in srgb, var(--flash-color, #fff) 48%, transparent) 35%, transparent 82%),
    linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--flash-color, #fff) 22%, transparent) 45%, transparent 100%);
}

.eye-image-stack {
  backface-visibility: hidden;
  animation: eyePulseStable 4.8s ease-in-out infinite;
}

.eye-image-base {
  opacity: 1 !important;
  backface-visibility: hidden;
  transform-origin: 50% 50%;
  animation: eyePassiveWarp 5.6s steps(1) infinite;
}

.eye.is-blinking .eye-image-stack {
  animation: eyeBlinkStable 350ms cubic-bezier(.76,0,.24,1) 1;
}

.eye.is-glitching .eye-image-stack {
  animation: eyeShapeGlitch 490ms steps(9) 1;
}

.eye.is-severe .eye-image-stack {
  animation-duration: 720ms;
}

body.finalizing .question-panel {
  visibility: hidden;
  pointer-events: none;
}

.white-stage {
  background: #ededed;
}

.tv-static-canvas {
  position: absolute;
  z-index: 1;
  opacity: .42;
  image-rendering: pixelated;
  filter: grayscale(1) contrast(1.55) brightness(1.14);
  mix-blend-mode: multiply;
}

.white-wave {
  z-index: 2;
  inset: -12%;
  opacity: .34;
  background:
    linear-gradient(to bottom, transparent 0 40%, rgba(255,255,255,.45) 47%, rgba(0,0,0,.14) 51%, rgba(255,255,255,.2) 55%, transparent 62%),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.08) 4px, transparent 5px 8px);
  filter: blur(.35px);
  animation: whiteTrackingWave 3.8s linear infinite;
}

.white-noise {
  z-index: 2;
  inset: 0;
  opacity: .18;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.18) 0 1px, rgba(0,0,0,.08) 2px, transparent 3px 5px),
    linear-gradient(90deg, transparent 0 47%, rgba(0,0,0,.06) 50%, transparent 53%);
  background-size: 100% 6px, 170% 100%;
  mix-blend-mode: multiply;
  animation: tvFineTracking 620ms steps(5) infinite;
}

.final-message {
  z-index: 4;
}

.white-stage.final-crash {
  animation: whiteRippleCrash 1.62s steps(9) forwards !important;
}

@keyframes codeFlicker {
  0% { transform: translate(-50%, -50%) scale(var(--code-scale, 1)) translateX(-1px); opacity: .22; }
  50% { transform: translate(-50%, -50%) scale(var(--code-scale, 1)) translateX(2px); opacity: .58; }
  100% { transform: translate(-50%, -50%) scale(var(--code-scale, 1)); opacity: .38; }
}

@keyframes codeResolve {
  0% { transform: translate(-50%, -50%) scaleX(1.4); filter: blur(2px); }
  35% { transform: translate(-50%, -50%) scaleX(.82); filter: none; }
  100% { transform: translate(-50%, -50%) scaleX(1); }
}

@keyframes codeBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(.2); filter: blur(3px); }
  12% { opacity: .92; }
  48% { opacity: .74; filter: none; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) scaleX(1.18); filter: blur(1px); }
}

@keyframes passiveScreenGlitch {
  0%, 8%, 11%, 37%, 40%, 70%, 74%, 100% { opacity: 0; transform: translateX(0) scaleX(1); clip-path: inset(0); }
  8.5% { opacity: .16; transform: translateX(var(--screen-shift)) scaleX(1.003); clip-path: inset(7% 0 69% 0); }
  9.4% { opacity: .22; transform: translateX(var(--screen-shift-neg)) scaleX(.997); clip-path: inset(55% 0 12% 0); }
  38% { opacity: .12; transform: translateX(var(--screen-shift-neg)); clip-path: inset(28% 0 46% 0); }
  39% { opacity: .2; transform: translateX(var(--screen-shift)); clip-path: inset(73% 0 3% 0); }
  71% { opacity: .1; transform: translateX(var(--screen-shift)); clip-path: inset(0 0 82% 0); }
  72.2% { opacity: .18; transform: translateX(var(--screen-shift-neg)); clip-path: inset(81% 0 0 0); }
}

@keyframes passiveTrackingBand {
  from { transform: translateY(-20vh); }
  to { transform: translateY(138vh); }
}

@keyframes vhsFieldImpact {
  0%, 100% { opacity: 0; transform: translateX(0); clip-path: inset(0); }
  10% { opacity: .54; transform: translateX(var(--screen-shift)); clip-path: inset(0 0 76% 0); }
  24% { opacity: .31; transform: translateX(var(--screen-shift-neg)); clip-path: inset(43% 0 23% 0); }
  42% { opacity: .62; transform: translateX(var(--screen-shift)); clip-path: inset(68% 0 4% 0); }
  61% { opacity: .24; transform: translateX(var(--screen-shift-neg)); clip-path: inset(16% 0 55% 0); }
  79% { opacity: .4; transform: translateX(var(--screen-shift)); clip-path: inset(83% 0 0 0); }
}

@keyframes vhsContentJolt {
  0%, 100% { transform: translateX(0) skewX(0); filter: none; }
  13% { transform: translateX(var(--screen-shift-neg)) skewX(-.18deg); filter: contrast(1.16) saturate(1.18); }
  25% { transform: translateX(var(--screen-shift)) skewX(.12deg); }
  47% { transform: translateX(-1px) skewX(0); filter: contrast(1.08); }
  66% { transform: translateX(calc(var(--screen-shift) / 2)); }
  82% { transform: translateX(-1px); }
}

@keyframes gradientRippleSweep {
  0% { opacity: 0; transform: scale(.1,.04); filter: blur(8px) contrast(1); }
  12% { opacity: .72; }
  44% { opacity: .5; filter: blur(2px) contrast(1.65); }
  100% { opacity: 0; transform: scale(2.1,2.8); filter: blur(5px) contrast(1.2); }
}

@keyframes rippleSurface {
  0% { transform: scale(.08,.03) rotate(0); filter: blur(8px); }
  55% { transform: scale(1.1,.88) rotate(.4deg); filter: blur(1px); }
  100% { transform: scale(2.4,3.1) rotate(-.3deg); filter: blur(8px); }
}

@keyframes finalGradientCrash {
  0% { opacity: 0; transform: scale(.05,.015); filter: blur(12px) contrast(1); }
  8% { opacity: .95; }
  24% { opacity: .72; transform: scale(.45,.18); filter: blur(2px) contrast(2.4) saturate(1.6); }
  48% { opacity: .88; transform: scale(1.1,.72) skewY(.8deg); filter: blur(1px) contrast(3); }
  72% { opacity: .48; transform: scale(1.7,1.5) skewY(-.5deg); filter: blur(4px) contrast(1.7); }
  100% { opacity: 0; transform: scale(2.7,3.4); filter: blur(16px) contrast(1); }
}

@keyframes finalRippleSurface {
  0% { transform: scale(.02,.01); filter: blur(15px); }
  38% { transform: scale(.8,.34); filter: blur(1px); }
  66% { transform: scale(1.45,1.1); filter: blur(3px); }
  100% { transform: scale(2.8,3.3); filter: blur(14px); }
}

@keyframes finalWaveShear {
  0%, 100% { opacity: 0; transform: translateX(0) skewX(0); }
  10% { opacity: .65; transform: translateX(-9%) skewX(-4deg); }
  25% { opacity: .35; transform: translateX(8%) skewX(3deg); }
  42% { opacity: .78; transform: translateX(-5%) skewX(-2deg); }
  63% { opacity: .28; transform: translateX(4%) skewX(1deg); }
  81% { opacity: .48; transform: translateX(-2%); }
}

@keyframes eyePulseStable {
  0%, 100% { transform: scale(1); filter: brightness(.94) contrast(1.05); }
  50% { transform: scale(1.01); filter: brightness(1.08) contrast(1.12); }
}

@keyframes eyePassiveWarp {
  0%, 14%, 17%, 43%, 46%, 76%, 79%, 100% { transform: translateX(0) skewX(0) scaleX(1); clip-path: inset(0); }
  14.5% { transform: translateX(var(--eye-shift)) skewX(var(--eye-skew)) scaleX(var(--eye-stretch)); clip-path: polygon(0 0,100% 0,100% 46%,98% 48%,100% 51%,100% 100%,0 100%,0 52%,2% 49%,0 46%); }
  15.4% { transform: translateX(calc(-1 * var(--eye-shift))) skewX(calc(-1 * var(--eye-skew))) scaleX(.994); }
  44% { transform: translateX(var(--eye-shift)) skewX(calc(.65 * var(--eye-skew))) scaleX(var(--eye-stretch)); }
  45% { transform: translateX(-1px) skewX(calc(-.4 * var(--eye-skew))) scaleX(.998); }
  77% { transform: translateX(calc(-1 * var(--eye-shift))) skewX(calc(-1 * var(--eye-skew))) scaleX(1.006); clip-path: polygon(0 0,100% 0,100% 63%,97% 65%,100% 68%,100% 100%,0 100%,0 69%,3% 66%,0 63%); }
  78% { transform: translateX(var(--eye-shift)) skewX(var(--eye-skew)) scaleX(.996); }
}

@keyframes eyeBlinkStable {
  0%, 100% { transform: scaleY(1); filter: brightness(1) contrast(1); }
  43%, 58% { transform: scaleY(.018); filter: brightness(1.34) contrast(1.25); }
}

@keyframes eyeShapeGlitch {
  0%, 100% { transform: translateX(0) skewX(0) scale(1); filter: brightness(1) contrast(1); }
  12% { transform: translateX(var(--eye-shift)) skewX(var(--eye-skew)) scaleX(var(--eye-stretch)); filter: brightness(1.24) contrast(1.42); }
  26% { transform: translateX(calc(-1 * var(--eye-shift))) skewX(calc(-1 * var(--eye-skew))) scaleX(.992); filter: brightness(1.06) contrast(1.7); }
  41% { transform: translateX(calc(var(--eye-shift) / 2)) skewX(var(--eye-skew)) scaleY(.985); filter: brightness(1.35) contrast(1.3); }
  58% { transform: translateX(var(--eye-shift-neg, -2px)) skewX(calc(-.6 * var(--eye-skew))) scaleX(var(--eye-stretch)); }
  74% { transform: translateX(var(--eye-shift)) skewX(calc(.4 * var(--eye-skew))) scaleY(1.012); filter: brightness(1.12) contrast(1.5); }
  88% { transform: translateX(-1px) skewX(0) scale(1); }
}

@keyframes whiteTrackingWave {
  0% { transform: translateY(-66%) skewX(0); }
  45% { transform: translateY(4%) skewX(.3deg); }
  100% { transform: translateY(68%) skewX(-.2deg); }
}

@keyframes tvFineTracking {
  0% { transform: translate(0); background-position: 0 0, 0 0; }
  33% { transform: translateX(-3px); background-position: 0 2px, 8% 0; }
  66% { transform: translateX(4px); background-position: 0 -2px, -7% 0; }
  100% { transform: translate(0); background-position: 0 1px, 0 0; }
}

@keyframes whiteRippleCrash {
  0% { opacity: 1; transform: scale(1); filter: contrast(1) brightness(1); }
  12% { transform: scaleX(1.025) scaleY(.992); filter: contrast(1.8) brightness(1.45); }
  26% { transform: scaleX(.97) scaleY(1.015) skewY(.35deg); filter: invert(.16) contrast(2.6); }
  44% { transform: scaleX(1.06) scaleY(.96) skewY(-.55deg); filter: contrast(3.2) brightness(1.2); }
  63% { opacity: .9; transform: scaleX(.91) scaleY(1.08); filter: invert(.7) contrast(4); }
  80% { opacity: .48; transform: scaleX(1.16) scaleY(.72); filter: brightness(.35) contrast(5); }
  100% { opacity: 0; transform: scaleX(1.35) scaleY(.12); filter: brightness(0) contrast(4); }
}

@media (max-width: 600px) {
  .ambient-code { max-width: 42vw; }
  .transition-wave { inset: -8%; width: 116%; height: 116%; }
}

@media (prefers-reduced-motion: reduce) {
  .passive-glitch-field,
  .eye-image-base { animation-duration: 14s !important; }
}

/* Supplied crack artwork and refined static/finale pass. */
.fracture-layer {
  position: fixed;
  z-index: 12;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.crack-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-position: 50% 42%;
  background-repeat: no-repeat;
  transform-origin: 50% 42%;
  filter: brightness(.82) saturate(.9) drop-shadow(0 0 4px rgba(255,0,20,.46));
  transition: none;
}

.crack-cluster {
  background-image: url("assets/crack-cluster.png");
  background-size: min(1180px, 92vw) auto;
}

.crack-field {
  background-image: url("assets/crack-field.png");
  background-size: cover;
  background-position: center;
}

body.damage-1 .crack-cluster {
  opacity: .25;
  transform: scale(.74);
  -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 0 42%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 46%, #000 0 42%, transparent 70%);
}

body.damage-2 .crack-cluster {
  opacity: .36;
  transform: scale(.9);
  -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 0 64%, transparent 88%);
  mask-image: radial-gradient(ellipse at 50% 46%, #000 0 64%, transparent 88%);
}

body.damage-2 .crack-field {
  opacity: .14;
  -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 0 40%, transparent 76%);
  mask-image: radial-gradient(ellipse at 50% 46%, #000 0 40%, transparent 76%);
}

body.damage-3 .crack-cluster {
  opacity: .44;
  transform: scale(1.04);
  -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 0 72%, transparent 100%);
  mask-image: radial-gradient(ellipse at 50% 46%, #000 0 72%, transparent 100%);
}

body.damage-3 .crack-field {
  opacity: .34;
  -webkit-mask-image: linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000);
}

.fracture-layer.crack-impact .crack-texture {
  animation: suppliedCrackStrike 720ms cubic-bezier(.08,.68,.12,1) both;
}

body.vhs-pulse .fracture-layer {
  animation: vhsContentJolt 580ms steps(8) both;
}

body.vhs-hard .fracture-layer {
  animation-duration: 960ms;
}

.tv-static-canvas {
  opacity: .31;
  image-rendering: auto;
  filter: grayscale(1) contrast(1.34) brightness(1.08);
}

.white-wave {
  opacity: .22;
  background:
    linear-gradient(to bottom, transparent 0 44%, rgba(255,255,255,.34) 48%, rgba(0,0,0,.1) 51%, rgba(255,255,255,.13) 54%, transparent 59%),
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.045) 3px, transparent 4px 6px);
}

.white-noise {
  opacity: .12;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.12) 0 1px, rgba(0,0,0,.055) 1px, transparent 2px 3px),
    linear-gradient(90deg, transparent 0 48%, rgba(0,0,0,.035) 50%, transparent 52%);
  background-size: 100% 3px, 190% 100%;
}

.red-static-noise {
  opacity: .64;
  background-image:
    repeating-radial-gradient(circle at 10% 30%, rgba(255,22,38,.9) 0 .55px, transparent .7px 2px),
    repeating-radial-gradient(circle at 70% 80%, rgba(118,0,8,.9) 0 .65px, rgba(5,0,1,.88) .8px 2.7px);
  background-size: 3px 4px, 5px 4px;
}

.red-static::before {
  opacity: .52;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.55) 3px 4px);
}

.white-stage.final-crash {
  animation: simpleWhiteCollapse 1.34s cubic-bezier(.1,.62,.18,1) forwards !important;
}

.transition-wave.final-ripple {
  animation: simpleFinalRipple 1.7s cubic-bezier(.05,.68,.12,1) both;
}

.transition-wave.final-ripple::before {
  animation: simpleFinalRippleSurface 1.7s cubic-bezier(.05,.68,.12,1) both;
}

.transition-wave.final-ripple::after {
  display: none;
}

@keyframes suppliedCrackStrike {
  0% { filter: brightness(2.2) saturate(1.35) drop-shadow(0 0 12px #ff0017); clip-path: circle(1% at 50% 42%); }
  18% { filter: brightness(1.35) saturate(1.1) drop-shadow(0 0 8px rgba(255,0,20,.75)); clip-path: circle(31% at 50% 42%); }
  55% { filter: brightness(.98) saturate(.95) drop-shadow(0 0 5px rgba(255,0,20,.55)); clip-path: circle(72% at 50% 42%); }
  100% { filter: brightness(.82) saturate(.9) drop-shadow(0 0 4px rgba(255,0,20,.46)); clip-path: circle(145% at 50% 42%); }
}

@keyframes simpleWhiteCollapse {
  0% { opacity: 1; transform: scale(1); filter: contrast(1) brightness(1); }
  22% { transform: scaleX(1.018); filter: contrast(1.55) brightness(1.24); }
  48% { transform: scaleX(.985) scaleY(1.008); filter: contrast(2.1) brightness(.92); }
  75% { opacity: .82; transform: scaleX(1.035) scaleY(.93); filter: contrast(2.6) brightness(.48); }
  100% { opacity: 0; transform: scaleX(1.08) scaleY(.08); filter: contrast(3) brightness(0); }
}

@keyframes simpleFinalRipple {
  0% { opacity: 0; transform: scale(.05,.015); filter: blur(9px) contrast(1); }
  15% { opacity: .78; }
  48% { opacity: .58; transform: scale(.88,.38); filter: blur(2px) contrast(1.9); }
  100% { opacity: 0; transform: scale(2.2,2.6); filter: blur(10px) contrast(1.1); }
}

@keyframes simpleFinalRippleSurface {
  0% { transform: scale(.04,.015); filter: blur(11px); }
  52% { transform: scale(.92,.42); filter: blur(2px); }
  100% { transform: scale(2.4,2.8); filter: blur(10px); }
}

/* One uninterrupted center-origin wipe into the final carrier-loss screen. */
body.final-wipe-active .red-static {
  visibility: visible;
  opacity: 1;
  animation: redStaticCenterReveal 1.88s cubic-bezier(.04,.64,.1,1) both;
}

/* White-stage-only concluding transmission. */
.conclusion-message {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: min(1240px, 94vw);
  margin: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: "OCR A Std", "Cascadia Mono", "Lucida Console", monospace;
  font-size: clamp(30px, 5.7vw, 88px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: .075em;
  text-transform: uppercase;
  isolation: isolate;
}

.conclusion-message.revealing[aria-hidden="false"] {
  visibility: visible;
  animation:
    conclusionArrival 2.3s steps(1, end) both,
    conclusionRupture 92ms steps(2, end) infinite;
}

.conclusion-message span {
  position: relative;
  display: inline-block;
}

.conclusion-red {
  color: #9e0012;
  text-shadow:
    0 0 2px #ff001e,
    0 0 13px rgba(174, 0, 20, .58),
    4px 0 0 rgba(76, 0, 7, .74);
}

.conclusion-awaits {
  color: #080808;
  text-shadow:
    0 0 2px rgba(0, 0, 0, .95),
    -3px 0 0 rgba(255, 255, 255, .7);
}

.conclusion-message span::before,
.conclusion-message span::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.conclusion-message span::before {
  color: #ec001e;
  opacity: .78;
  transform: translate(9px, -3px) skewX(8deg);
  clip-path: inset(3% 0 57% 0);
  animation: conclusionSliceUpper 137ms steps(2, end) infinite;
}

.conclusion-message span::after {
  color: #001014;
  opacity: .67;
  transform: translate(-10px, 4px) skewX(-11deg);
  clip-path: inset(56% 0 5% 0);
  animation: conclusionSliceLower 109ms steps(2, end) infinite reverse;
}

.conclusion-message .conclusion-awaits::before {
  color: #ffffff;
}

.conclusion-message .conclusion-awaits::after {
  color: #151515;
}

body.final-wipe-active .conclusion-message,
body.static-active .conclusion-message,
.white-stage[aria-hidden="true"] .conclusion-message {
  visibility: hidden !important;
  opacity: 0 !important;
  animation: none !important;
}

@keyframes conclusionArrival {
  0% { opacity: 0; filter: blur(22px) contrast(3); }
  6% { opacity: .96; filter: blur(0) contrast(2.5); }
  9% { opacity: .08; }
  13% { opacity: 1; transform: translate(-50%, -50%) scaleX(1.1); }
  18% { opacity: .22; transform: translate(-50%, -50%) scaleX(.88); }
  23%, 72% { opacity: 1; filter: blur(.35px) contrast(1.5); }
  78% { opacity: .34; transform: translate(-50%, -50%) skewX(4deg); }
  82% { opacity: 1; transform: translate(-50%, -50%) skewX(-2deg); }
  92% { opacity: .88; filter: blur(1px) contrast(2.2); }
  100% { opacity: 0; filter: blur(8px) contrast(3); }
}

@keyframes conclusionRupture {
  0% { transform: translate(calc(-50% - 4px), calc(-50% + 2px)) skewX(-1deg); }
  25% { transform: translate(calc(-50% + 7px), calc(-50% - 3px)) scaleY(.94) skewX(3deg); }
  50% { transform: translate(calc(-50% - 8px), calc(-50% + 1px)) scaleX(1.02); }
  75% { transform: translate(calc(-50% + 3px), calc(-50% + 4px)) skewX(-4deg); }
  100% { transform: translate(-50%, -50%); }
}

@keyframes conclusionSliceUpper {
  0% { clip-path: inset(2% 0 68% 0); transform: translate(10px, -4px) skewX(12deg); }
  50% { clip-path: inset(28% 0 45% 0); transform: translate(-6px, 2px) skewX(-9deg); }
  100% { clip-path: inset(7% 0 57% 0); transform: translate(5px, -2px); }
}

@keyframes conclusionSliceLower {
  0% { clip-path: inset(54% 0 4% 0); transform: translate(-11px, 4px) skewX(-13deg); }
  50% { clip-path: inset(42% 0 27% 0); transform: translate(8px, -1px) skewX(8deg); }
  100% { clip-path: inset(70% 0 2% 0); transform: translate(-4px, 3px); }
}

@media (max-width: 700px) {
  .conclusion-message {
    font-size: clamp(26px, 9vw, 52px);
    letter-spacing: .045em;
  }
}

.transition-wave.final-ripple {
  opacity: 1;
  background: none;
  animation: none;
  mix-blend-mode: screen;
}

.transition-wave.final-ripple::before {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: 18vmin;
  height: 18vmin;
  border-radius: 50%;
  background: radial-gradient(circle,
    transparent 0 43%,
    rgba(255,0,22,.08) 48%,
    rgba(255,255,255,.22) 53%,
    rgba(255,0,25,.88) 59%,
    rgba(112,0,11,.42) 64%,
    transparent 72%);
  box-shadow: 0 0 7vmin rgba(255,0,22,.34), inset 0 0 4vmin rgba(255,255,255,.12);
  backdrop-filter: blur(3px) contrast(2.2) saturate(1.65);
  -webkit-backdrop-filter: blur(3px) contrast(2.2) saturate(1.65);
  animation: singularRedWipe 1.88s cubic-bezier(.03,.66,.08,1) both;
}

.transition-wave.final-ripple::after {
  display: none;
}

@keyframes redStaticCenterReveal {
  0% { clip-path: ellipse(0 0 at 50% 50%); filter: contrast(1.8) brightness(1.35); }
  20% { clip-path: ellipse(17% 6% at 50% 50%); filter: contrast(1.65) brightness(1.2); }
  43% { clip-path: ellipse(42% 24% at 50% 50%); filter: contrast(1.4) brightness(1.1); }
  68% { clip-path: ellipse(72% 61% at 50% 50%); filter: contrast(1.18) brightness(1.04); }
  100% { clip-path: ellipse(126% 145% at 50% 50%); filter: none; }
}

@keyframes singularRedWipe {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.02,.008); filter: blur(9px); }
  7% { opacity: 1; }
  22% { opacity: .96; transform: translate(-50%, -50%) scale(1.8,.52); filter: blur(2px); }
  47% { opacity: .88; transform: translate(-50%, -50%) scale(4.9,2.25); filter: blur(.6px); }
  72% { opacity: .66; transform: translate(-50%, -50%) scale(8.4,5.3); filter: blur(2px); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(14.5,10.2); filter: blur(8px); }
}

/* Subtle red-vapor VHS carrier behind the interrogation. */
.void {
  overflow: hidden;
}

.void::before,
.void::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.void::before {
  inset: -16%;
  opacity: .46;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(185, 0, 31, .18) 0, rgba(103, 0, 32, .075) 32%, transparent 65%),
    linear-gradient(118deg, transparent 12%, rgba(86, 0, 48, .085) 36%, rgba(205, 0, 38, .1) 51%, rgba(71, 0, 46, .07) 68%, transparent 90%);
  filter: blur(13px) saturate(1.12);
  animation: vaporCarrierDrift 17s ease-in-out infinite alternate;
}

.void::after {
  inset: -8%;
  opacity: .09;
  background:
    linear-gradient(to bottom, transparent 0 43%, rgba(255, 19, 52, .17) 48%, rgba(65, 0, 31, .2) 51%, transparent 57%),
    repeating-radial-gradient(circle at 37% 61%, rgba(255, 43, 69, .32) 0 .45px, transparent .65px 2.4px),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255, 0, 35, .08) 4px, transparent 5px 8px);
  background-size: 100% 190%, 4px 5px, 100% 8px;
  mix-blend-mode: screen;
  animation: vaporTrackingRoll 8.6s linear infinite, vaporStaticJitter .3s steps(3) infinite;
}

/* One viewport-centered analog tracking ripple per accepted answer. */
.transition-wave.active {
  opacity: 1;
  overflow: visible;
  background: none;
  animation: none;
  mix-blend-mode: screen;
}

.transition-wave.active::before {
  inset: auto;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(34vw, 440px);
  height: min(10vh, 92px);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(ellipse,
    transparent 0 44%,
    rgba(255, 34, 54, .1) 49%,
    rgba(255, 220, 222, .25) 52%,
    rgba(255, 0, 31, .76) 57%,
    rgba(92, 0, 21, .2) 64%,
    transparent 72%);
  box-shadow: 0 0 3.2vmin rgba(255, 0, 29, .28);
  backdrop-filter: blur(1.8px) contrast(1.7) saturate(1.34);
  -webkit-backdrop-filter: blur(1.8px) contrast(1.7) saturate(1.34);
  transform-origin: 50% 50%;
  animation: centeredTvRipple 1.22s cubic-bezier(.06,.67,.13,1) both;
}

.transition-wave.active::after {
  display: none;
}

.screen-flash {
  background:
    radial-gradient(ellipse at 50% 50%, var(--flash-color, #fff) 0, color-mix(in srgb, var(--flash-color, #fff) 58%, transparent) 34%, color-mix(in srgb, var(--flash-color, #fff) 16%, transparent) 68%, transparent 100%),
    linear-gradient(to bottom, color-mix(in srgb, var(--flash-color, #fff) 8%, transparent), transparent 24% 76%, color-mix(in srgb, var(--flash-color, #fff) 8%, transparent));
}

/* Reveal the real carrier-loss layer through one clean center seam. */
body.final-wipe-active .red-static {
  visibility: visible;
  opacity: 1;
  animation: carrierSeamReveal 1.08s cubic-bezier(.16,.76,.26,1) both;
}

.transition-wave.final-ripple,
.transition-wave.final-ripple::before,
.transition-wave.final-ripple::after {
  display: none;
  animation: none;
}

@keyframes vaporCarrierDrift {
  0% { transform: translate3d(-2.5%, -1.5%, 0) scale(1.03); filter: blur(13px) saturate(1.04); }
  48% { transform: translate3d(2%, 1%, 0) scale(1.08); filter: blur(16px) saturate(1.2); }
  100% { transform: translate3d(-.5%, 2.2%, 0) scale(1.05); filter: blur(14px) saturate(1.1); }
}

@keyframes vaporTrackingRoll {
  from { background-position: 0 -92%, 0 0, 0 0; }
  to { background-position: 0 105%, 0 0, 0 0; }
}

@keyframes vaporStaticJitter {
  0% { transform: translate3d(-1px, 0, 0); }
  50% { transform: translate3d(1px, -1px, 0); }
  100% { transform: translate3d(0, 1px, 0); }
}

@keyframes centeredTvRipple {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.018,.045); filter: blur(5px); }
  9% { opacity: .92; }
  30% { opacity: .82; transform: translate(-50%, -50%) scale(1.25,.48); filter: blur(.8px); }
  55% { opacity: .56; transform: translate(-50%, -50%) scale(3.05,2.1); filter: blur(1.2px); }
  78% { opacity: .28; transform: translate(-50%, -50%) scale(5.2,5.8); filter: blur(2.5px); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(7.4,10.8); filter: blur(6px); }
}

@keyframes carrierSeamReveal {
  0% { clip-path: inset(calc(50% - .5px) 0 calc(50% - .5px) 0); }
  14% { clip-path: inset(45% 0 45% 0); }
  44% { clip-path: inset(27% 0 27% 0); }
  74% { clip-path: inset(9% 0 9% 0); }
  100% { clip-path: inset(0); }
}

/* Decaying red carrier flashes synchronized to the final center seam. */
.screen-flash.ending-cycle {
  z-index: 112;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 12, 35, .96) 0, rgba(210, 0, 31, .56) 34%, rgba(101, 0, 19, .2) 68%, transparent 100%),
    linear-gradient(to bottom, rgba(255, 0, 28, .2), transparent 28% 72%, rgba(255, 0, 28, .18));
  mix-blend-mode: screen;
  animation: endingRedFlashDecay 1.1s linear both;
}

@keyframes endingRedFlashDecay {
  0% { opacity: 0; }
  7% { opacity: .9; }
  18% { opacity: .08; }
  30% { opacity: .62; }
  43% { opacity: .06; }
  56% { opacity: .4; }
  69% { opacity: .035; }
  81% { opacity: .22; }
  100% { opacity: 0; }
}

body.secret-transmission-active .node-label {
  color: #d20a24;
  text-shadow:
    0 0 3px #ff0022,
    0 0 10px rgba(255, 0, 34, .9),
    0 0 24px rgba(134, 0, 31, .78);
  animation: buriedTransmissionGlow 2.4s ease-in-out infinite;
}

@keyframes buriedTransmissionGlow {
  0%, 100% { filter: brightness(.82); }
  50% { filter: brightness(1.28); }
}
