/* Scene 9 only. Presentation state never participates in saved progress. */
body.truth-story {
  isolation: isolate;
}

.truth-story::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 65%, #170b21, transparent 75%);
  opacity: 0;
}

.truth-story.truth-pulsing::before {
  animation: truth-pulse 11s ease-in-out infinite;
}

.truth-story .story-prose > p {
  min-height: 38svh;
  padding-block: 10svh;
  --reveal-duration: 1.35s;
}

.truth-story.reveal-sequence .story-prose > p {
  transition-duration: var(--reveal-duration);
}

.truth-story .story-prose > .truth-despair,
.truth-story .story-prose > .truth-resolve {
  min-height: 70svh;
  padding-block: 24svh;
  --reveal-duration: 2.4s;
}

.truth-story .truth-despair .truth-turn {
  color: #9978ad;
  font-size: 1.65rem;
  text-shadow: 0 0 26px #482756;
}

.truth-story .truth-resolve .truth-turn {
  color: #bba2c7;
  font-size: 1.6rem;
  letter-spacing: .23em;
  text-shadow: 0 0 16px #422c50;
}

.truth-story .story-prose > .truth-confused {
  min-height: var(--confused-gap);
  padding: 8svh var(--displacement);
}

.truth-story.reveal-sequence .truth-confused.is-visible {
  transition-delay: var(--stagger);
}

.truth-story .story-prose > .truth-isolated {
  display: flex;
  align-items: center;
  min-height: 112svh;
  padding-block: 44svh;
  color: #c6becb;
}

.truth-story .story-prose > .truth-all {
  min-height: 94svh;
  padding-top: 18svh;
  font-size: 1.8rem;
}

.truth-story .story-prose > .truth-betrayal,
.truth-story .story-prose > .truth-vow {
  min-height: 68svh;
  padding-block: 22svh;
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  --reveal-duration: 2s;
}

.truth-story .truth-all .text-warning,
.truth-story .truth-betrayal .text-warning,
.truth-story .truth-vow .text-warning {
  color: #d7afe5;
  text-shadow: 0 0 22px #573166;
}

.truth-story .story-prose > .truth-accusation {
  min-height: calc(35svh - var(--pressure) * 2svh);
  padding-block: calc(9svh - var(--pressure) * .7svh);
  font-size: calc(1.1rem + var(--pressure) * .055rem);
  color: #d5b8df;
}

.truth-story .story-prose > .truth-hatred {
  min-height: calc(19svh - var(--pressure) * 1svh);
  padding-block: 3svh;
  font-size: calc(1.45rem + var(--pressure) * .12rem);
  color: #dfb4ee;
  --reveal-duration: .7s;
}

.truth-story .story-prose > .truth-scream,
.truth-story .story-prose > .truth-summon,
.truth-story .story-prose > .truth-command {
  min-height: 62svh;
  padding-block: 20svh;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  line-height: 1.8;
  color: #dec6e8;
  --reveal-duration: .9s;
}

.truth-story .truth-scream.is-visible {
  animation: truth-tremble .16s 9 alternate;
}

.truth-story .truth-summon {
  text-shadow: 0 0 12px #b775cb, 0 0 32px #783d93;
}

.truth-story .truth-command .text-warning {
  color: #e7c2f4;
  text-shadow: 0 0 16px #a267bd, 0 0 32px #693a80;
}

.truth-story .story-prose > .truth-call {
  color: #d6b2e3;
  font-size: 1.3rem;
}

.truth-flash {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  background: #371b4a;
  opacity: 0;
}

.truth-flash.is-playing {
  animation: truth-impact 1.6s ease-out 1;
}

.truth-butterflies {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 19;
  pointer-events: none;
}

.truth-butterflies img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  opacity: .42;
  transform: rotate(var(--angle));
  animation: truth-flight var(--drift) ease-in-out var(--delay) infinite alternate;
}

.truth-story .story-prose > .truth-silence {
  display: flex;
  align-items: center;
  min-height: 105svh;
  padding-block: 38svh;
  color: #d4cfd7;
  text-shadow: none;
  white-space: pre-line;
  --reveal-duration: 2s;
}

.truth-story.truth-hushed::before,
.truth-story.truth-hushed .truth-flash,
.truth-story.truth-hushed .truth-butterflies {
  display: none;
}

.truth-story.truth-hushed .truth-scream {
  animation: none;
}

.truth-story.truth-hushed .horror-frame {
  opacity: .025;
}

.truth-story .story-prose > .truth-fading {
  color: rgb(calc(210 - var(--life) * 5) calc(205 - var(--life) * 5) calc(214 - var(--life) * 5));
  min-height: 44svh;
  text-shadow: none;
  --reveal-duration: 2s;
}

.truth-story .story-prose > .truth-last-word {
  min-height: 92svh;
  padding-block: 35svh;
  color: #aaa2af;
  --reveal-duration: var(--last-duration);
}

.truth-story .story-prose > .truth-last-breath {
  min-height: 160svh;
  padding-bottom: 112svh;
  color: #9b939f;
}

.truth-story .story-prose > .truth-end,
.truth-story .story-prose > .chief-interruption {
  color: #b6aebc;
  text-shadow: none;
}

.truth-story.truth-paused::before,
.truth-paused .truth-butterflies img {
  animation-play-state: paused;
}

@keyframes truth-pulse {
  0%, 100% {
    opacity: .2;
  }
  50% {
    opacity: .65;
  }
}

@keyframes truth-tremble {
  from {
    translate: -1px 0;
  }
  to {
    translate: 1px .5px;
  }
}

@keyframes truth-impact {
  0%, 100% {
    opacity: 0;
  }
  22% {
    opacity: .38;
  }
}

@keyframes truth-flight {
  to {
    translate: 10px -40px;
    rotate: 14deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .truth-story.truth-pulsing::before,
  .truth-story .truth-scream,
  .truth-story .truth-butterflies img {
    animation: none;
  }
  .truth-flash {
    display: none;
  }
  .truth-story.reveal-sequence .story-prose > p {
    transition-duration: .01ms;
    transition-delay: 0s;
  }
}
