:root {
  --cine-ink: #f0ede4;
  --cine-muted: #9b9890;
  --cine-red: #e34a3d;
  --cine-green: #b8d8c2;
  --cine-black: #070707;
  --cine-progress: 0;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

body.cinematic-mode {
  background: var(--cine-black);
  color: var(--cine-ink);
  margin: 0;
  overflow: hidden;
}
.cinematic-experience :focus-visible,
.details-dialog :focus-visible {
  outline: 2px solid var(--cine-ink);
  outline-offset: 4px;
}


.cinematic-experience {
  background: #080808;
  color: var(--cine-ink);
  font-family: "Helvetica Neue", "Arial Narrow", Arial, sans-serif;
  height: 100svh;
  isolation: isolate;
  min-height: 600px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.cine-atmosphere,
.cine-noise,
.cine-scan-plane {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.cine-atmosphere {
  height: 100%;
  opacity: 0.9;
  width: 100%;
  z-index: -3;
}

.cine-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.08;
  z-index: 8;
}

.cine-scan-plane {
  background: rgba(239, 237, 225, 0.04);
  border-left: 1px solid rgba(241, 238, 225, 0.58);
  box-shadow: -22px 0 80px rgba(238, 235, 219, 0.15), 2px 0 22px rgba(255, 252, 230, 0.12);
  left: -12%;
  opacity: var(--scan-opacity, 0);
  right: auto;
  transform: translate3d(var(--scan-x, 0vw), 0, 0) skewX(-4deg);
  width: 11vw;
  z-index: -1;
}

.cine-header {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  left: clamp(18px, 3.2vw, 54px);
  position: absolute;
  right: clamp(18px, 3.2vw, 54px);
  top: clamp(18px, 3.3vh, 36px);
  z-index: 20;
}

.cine-wordmark {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 12px;
  justify-self: start;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.cine-wordmark > span {
  align-items: center;
  border: 1px solid rgba(239, 237, 228, 0.7);
  display: inline-flex;
  font-family: Georgia, serif;
  font-size: 15px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.cine-wordmark strong {
  font-size: 11px;
  font-weight: 600;
}

.cine-status {
  align-items: center;
  color: rgba(240, 237, 228, 0.64);
  display: flex;
  font-size: 9px;
  gap: 9px;
  letter-spacing: 0.18em;
}

.cine-status-light {
  background: #d7b768;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(215, 183, 104, 0.6);
  height: 5px;
  width: 5px;
}

.cine-text-button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(240, 237, 228, 0.3);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  justify-self: end;
  letter-spacing: 0.13em;
  padding: 8px 0;
  text-transform: uppercase;
}

.cine-case-index {
  display: flex;
  gap: 4px;
  left: clamp(18px, 3.2vw, 54px);
  position: absolute;
  top: 17vh;
  z-index: 20;
}

.cine-case-index button {
  background: transparent;
  border: 0;
  color: rgba(240, 237, 228, 0.58);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.15em;
  padding: 8px 11px 8px 0;
  text-align: left;
  text-transform: uppercase;
  transition: color 220ms ease;
}

.cine-case-index button + button {
  border-left: 1px solid rgba(240, 237, 228, 0.12);
  padding-left: 11px;
}

.cine-case-index button span {
  display: block;
  font-size: 7px;
  margin-bottom: 4px;
}

.cine-case-index button.selected {
  color: var(--cine-ink);
}

.cine-stage {
  cursor: grab;
  height: 100%;
  overflow: hidden;
  position: relative;
  touch-action: none;
  user-select: none;
  width: 100%;
}

.cine-stage.dragging {
  cursor: grabbing;
}

.cine-chapter {
  bottom: 20vh;
  left: clamp(18px, 3.2vw, 54px);
  position: absolute;
  z-index: 12;
}

.cine-chapter span {
  color: rgba(240, 237, 228, 0.35);
  display: block;
  font-size: 8px;
  letter-spacing: 0.2em;
  margin-bottom: 5px;
}

.cine-chapter strong {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.23em;
}

.cine-camera {
  height: 100%;
  perspective: 1100px;
  position: relative;
  transform: translate3d(var(--camera-x, 0), var(--camera-y, 0), 0) scale(var(--camera-scale, 1));
  transform-origin: center;
  width: 100%;
}

.cine-depth-field {
  border-bottom: 1px solid rgba(240, 237, 228, 0.08);
  height: 46vh;
  left: -10%;
  position: absolute;
  top: 20vh;
  transform: perspective(500px) rotateX(72deg) translateZ(-80px);
  width: 120%;
}

.cine-depth-field::before,
.cine-depth-field::after {
  border-top: 1px solid rgba(240, 237, 228, 0.04);
  content: "";
  inset: 28% 0 auto;
  position: absolute;
}

.cine-depth-field::after {
  inset: 66% 0 auto;
}

.cine-sentence-wrap {
  left: 50%;
  max-width: 1500px;
  position: absolute;
  top: 48%;
  transform: translate3d(-50%, -50%, 0);
  width: min(88vw, 1500px);
}

.cine-kicker {
  color: rgba(240, 237, 228, 0.36);
  font-size: 9px;
  letter-spacing: 0.24em;
  margin: 0 0 clamp(16px, 3vh, 30px);
  opacity: var(--candidate-opacity, 1);
  text-align: center;
}

.cine-candidate {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.2vw, 82px);
  font-weight: 400;
  justify-content: center;
  letter-spacing: -0.045em;
  line-height: 1.06;
  position: relative;
  text-align: center;
  text-wrap: balance;
  transform-style: preserve-3d;
}

.cine-claim,
.cine-gap {
  display: inline-block;
  position: relative;
  transform-style: preserve-3d;
  white-space: pre-wrap;
}

.cine-claim {
  opacity: var(--claim-opacity, 1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 48px rgba(0, 0, 0, 0.55);
  transform: translate3d(var(--claim-x, 0), var(--claim-y, 0), var(--claim-z, 0))
    rotateX(var(--claim-rx, 0deg)) rotateY(var(--claim-ry, 0deg));
  transition: color 180ms linear;
}

.cine-claim[data-action="ALLOW"] {
  color: var(--cine-ink);
}

.cine-claim[data-action="QUALIFY"] {
  color: #e8e0cf;
}

.cine-claim[data-action="BLOCK"] {
  color: rgba(240, 237, 228, var(--blocked-alpha, 1));
  filter: blur(var(--blocked-blur, 0));
}

.cine-claim-mark {
  color: var(--cine-red);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(8px, 0.7vw, 11px);
  font-style: normal;
  font-weight: 700;
  left: 50%;
  letter-spacing: 0.18em;
  opacity: var(--mark-opacity, 0);
  pointer-events: none;
  position: absolute;
  text-transform: uppercase;
  top: calc(100% + 11px);
  transform: translateX(-50%) rotate(var(--mark-angle, -2deg)) scale(var(--mark-scale, 0.75));
  white-space: nowrap;
}

.cine-claim-mark::before {
  border: 1px solid currentColor;
  content: "";
  inset: -7px -10px;
  position: absolute;
  transform: rotate(-1deg);
}

.cine-claim-strike {
  background: var(--cine-red);
  box-shadow: 0 0 16px rgba(227, 74, 61, 0.45);
  height: 3px;
  left: -1%;
  opacity: var(--strike-opacity, 0);
  position: absolute;
  top: 52%;
  transform: rotate(var(--strike-angle, -2deg)) scaleX(var(--strike-scale, 0));
  transform-origin: left center;
  width: 102%;
}

.cine-claim-pin {
  background: var(--cine-green);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(184, 216, 194, 0.5);
  height: 5px;
  left: 50%;
  opacity: var(--pin-opacity, 0);
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
  width: 5px;
}

.cine-evidence-field {
  inset: -19vh 0 -20vh;
  pointer-events: none;
  position: absolute;
}

.cine-evidence-node {
  color: rgba(240, 237, 228, 0.64);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 8px;
  left: var(--node-x);
  letter-spacing: 0.13em;
  max-width: 170px;
  opacity: var(--node-opacity, 0);
  position: absolute;
  text-transform: uppercase;
  top: var(--node-y);
  transform: translate3d(-50%, var(--node-drift, 20px), 0);
}

.cine-evidence-node::before {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 16px currentColor;
  content: "";
  height: 4px;
  left: -12px;
  position: absolute;
  top: 3px;
  width: 4px;
}

.cine-evidence-node[data-status="conflict"],
.cine-evidence-node[data-status="missing"] {
  color: rgba(227, 74, 61, 0.7);
}

.cine-blocked-ghosts {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 1.5vw, 24px);
  left: 50%;
  opacity: var(--ghost-opacity, 0);
  position: absolute;
  top: calc(100% + 14vh);
  transform: translateX(-50%);
  width: min(80vw, 950px);
}

.cine-blocked-ghost {
  color: rgba(227, 74, 61, 0.36);
  display: block;
  margin: 8px 0;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cine-gate {
  bottom: 10vh;
  left: var(--gate-x, -15vw);
  opacity: var(--gate-opacity, 0);
  pointer-events: none;
  position: absolute;
  top: 9vh;
  width: 2px;
  z-index: 5;
}

.cine-gate i {
  background: var(--cine-red);
  box-shadow: 0 0 10px rgba(227, 74, 61, 0.9), 0 0 75px rgba(227, 74, 61, 0.28);
  inset: 0;
  position: absolute;
}

.cine-gate span {
  bottom: 0;
  color: var(--cine-red);
  font-size: 8px;
  left: 14px;
  letter-spacing: 0.18em;
  position: absolute;
  transform: rotate(-90deg);
  transform-origin: left bottom;
  white-space: nowrap;
}

.cine-release {
  left: 50%;
  opacity: var(--release-opacity, 0);
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate3d(-50%, calc(-50% + var(--release-y, 50px)), 0)
    scale(var(--release-scale, 0.94));
  width: min(86vw, 1100px);
}

.cine-release > p {
  color: rgba(240, 237, 228, 0.42);
  font-size: 9px;
  letter-spacing: 0.25em;
  margin: 0 0 25px;
}

#cine-released-text {
  color: var(--cine-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.35vw, 66px);
  letter-spacing: -0.038em;
  line-height: 1.08;
  text-wrap: balance;
}

#cine-final-line {
  color: var(--cine-red);
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  margin-top: 40px;
  opacity: var(--final-opacity, 0);
}

.cine-decision {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  opacity: var(--decision-opacity, 0);
  position: absolute;
  right: clamp(18px, 3.2vw, 54px);
  text-align: right;
  top: 17vh;
  z-index: 12;
}

.cine-decision span {
  color: rgba(240, 237, 228, 0.38);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.cine-decision strong {
  color: var(--decision-color, var(--cine-ink));
  font-family: Georgia, serif;
  font-size: clamp(22px, 2.4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-top: 5px;
}

.cine-mode-switch {
  align-items: stretch;
  background: rgba(8, 8, 8, 0.82);
  border: 1px solid rgba(240, 237, 228, 0.16);
  bottom: 15vh;
  display: flex;
  left: 50%;
  padding: 3px;
  position: absolute;
  transform: translateX(-50%);
  z-index: 20;
}

.cine-mode-switch button {
  background: transparent;
  border: 0;
  color: rgba(240, 237, 228, 0.4);
  cursor: pointer;
  font: inherit;
  min-width: 118px;
  padding: 9px 16px 8px;
}

.cine-mode-switch button span,
.cine-mode-switch button small {
  display: block;
}

.cine-mode-switch button span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.cine-mode-switch button small {
  font-size: 8px;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

.cine-mode-switch button.selected {
  background: var(--cine-ink);
  color: #090909;
}

.cine-controls {
  align-items: center;
  bottom: clamp(16px, 3vh, 30px);
  display: grid;
  gap: 20px;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  left: clamp(18px, 3.2vw, 54px);
  position: absolute;
  right: clamp(18px, 3.2vw, 54px);
  z-index: 20;
}

.cine-transport {
  align-items: center;
  display: flex;
  gap: 5px;
}

.cine-transport button {
  align-items: center;
  background: transparent;
  border: 0;
  color: rgba(240, 237, 228, 0.7);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11px;
  height: 34px;
  justify-content: center;
  min-width: 34px;
}

.cine-transport .cine-play {
  border: 1px solid rgba(240, 237, 228, 0.45);
  border-radius: 50%;
  margin: 0 4px;
}

#cine-sound {
  border-left: 1px solid rgba(240, 237, 228, 0.15);
  font-size: 8px;
  letter-spacing: 0.14em;
  margin-left: 5px;
  padding-left: 14px;
}

.cine-scrubber {
  cursor: ew-resize;
  display: block;
  height: 24px;
  position: relative;
}

.cine-scrubber::before {
  background: rgba(240, 237, 228, 0.18);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  top: 12px;
}

.cine-scrubber input {
  cursor: ew-resize;
  height: 24px;
  inset: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.cine-scrubber i {
  background: var(--cine-ink);
  box-shadow: 0 0 18px rgba(240, 237, 228, 0.35);
  height: 1px;
  left: 0;
  position: absolute;
  top: 12px;
  transform: scaleX(var(--cine-progress));
  transform-origin: left center;
  width: 100%;
}

.cine-scrubber i::after {
  background: var(--cine-ink);
  border-radius: 50%;
  content: "";
  height: 5px;
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
}

.cine-time {
  align-items: center;
  color: rgba(240, 237, 228, 0.45);
  display: flex;
  font-size: 8px;
  gap: 8px;
  letter-spacing: 0.13em;
}

.cine-time i {
  background: rgba(240, 237, 228, 0.2);
  height: 1px;
  width: 14px;
}

.cine-controls > p {
  bottom: 30px;
  color: rgba(240, 237, 228, 0.28);
  font-size: 8px;
  left: 50%;
  letter-spacing: 0.09em;
  margin: 0;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.details-dialog {
  background: #0b0b0a;
  border: 0;
  color: #e9e6dc;
  height: 100%;
  inset: 0;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 0;
  width: 100%;
}

.details-dialog::backdrop {
  background: #080808;
}

.details-dialog[open] {
  animation: details-enter 300ms ease both;
}

.details-surface {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.details-dialog .masthead {
  background: rgba(11, 11, 10, 0.94);
  position: sticky;
  top: 0;
  z-index: 50;
}

.details-close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.details-opening h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8.5vw, 138px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.88;
  margin: 0;
  max-width: 1180px;
}

.details-opening h2 span {
  color: var(--signal);
  display: block;
}

@keyframes details-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .cinematic-experience {
    min-height: 540px;
  }

  .cine-header {
    grid-template-columns: 1fr auto;
  }

  .cine-status {
    bottom: -28px;
    left: 0;
    position: absolute;
  }

  .cine-wordmark strong {
    display: none;
  }

  .cine-case-index {
    top: 13vh;
  }

  .cine-case-index button {
    font-size: 8px;
    padding-right: 8px;
  }

  .cine-case-index button + button {
    padding-left: 8px;
  }

  .cine-decision {
    top: 14vh;
  }

  .cine-sentence-wrap {
    top: 45%;
    width: 91vw;
  }

  .cine-candidate {
    font-size: clamp(29px, 9.2vw, 47px);
    line-height: 1.08;
  }

  .cine-claim-mark {
    font-size: 7px;
    letter-spacing: 0.11em;
    top: calc(100% + 6px);
  }

  .cine-claim-mark::before {
    inset: -5px -6px;
  }

  .cine-chapter {
    bottom: 22vh;
  }

  .cine-mode-switch {
    bottom: 14.5vh;
  }

  .cine-mode-switch button {
    min-width: 104px;
    padding: 8px 10px 7px;
  }

  .cine-mode-switch button small {
    display: none;
  }

  .cine-controls {
    bottom: 14px;
    gap: 10px;
    grid-template-columns: auto 1fr;
  }

  .cine-time {
    display: none;
  }

  .cine-scrubber {
    min-width: 0;
  }

  .cine-controls > p {
    display: none;
  }

  #cine-sound {
    font-size: 0;
    min-width: 28px;
    padding-left: 8px;
  }

  #cine-sound::after {
    content: "SFX";
    font-size: 7px;
  }

  .cine-release {
    width: 90vw;
  }

  #cine-released-text {
    font-size: clamp(28px, 8vw, 42px);
  }

  #cine-final-line {
    font-size: 8px;
    margin-top: 28px;
  }

  .cine-blocked-ghosts {
    top: calc(100% + 10vh);
  }

  .details-dialog .masthead-index > span {
    display: none;
  }

  .details-opening h2 {
    font-size: clamp(44px, 15vw, 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cine-noise {
    display: none;
  }

  .cine-claim,
  .cine-scan-plane,
  .cine-camera,
  .cine-release {
    transition: none !important;
  }
}

.cinematic-experience.canvas-fallback .cine-atmosphere {
  display: none;
}

.cinematic-experience.canvas-fallback {
  background: #090909;
}
