/* =============================================
   OGH Training — Level Up styles
   Loaded after style.css (shared v4 base).

   Colour semantics — strict (§3.2):
     brand   OMEN red, STATIC        → --accent
     error   saturated red, PULSING  → --c-error + .is-error
     correct green                   → --c-correct
     idle    greys
   ============================================= */

:root {
  --c-error: #ff1f3d;
  --c-error-rgb: 255, 31, 61;
  --c-correct: #22c55e;
  --c-correct-rgb: 34, 197, 94;
  --c-alex: #3ba3ff;
  --c-cole: var(--accent);
  --panel-dark: #0e0e10;
  --notch: polygon(0 0, 0 100%, calc(100% - 79px) 100%, calc(100% - 68px) calc(100% - 11px),
      calc(100% - 60px) calc(100% - 11px), 100% calc(100% - 71px), 100% 0);
}

/* ---- Placeholder until final video lands (dark: virtual world) ---- */
.vid-placeholder {
  background: radial-gradient(ellipse at 50% 45%, #24242c 0%, #121216 70%);
}

.vid-placeholder {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 4% 9%;
}

.vid-placeholder::after {
  color: rgba(255, 255, 255, 0.22);
}

/* Progress dots sit over dark footage — idle dots need a light outline */
.progress-dot {
  border-color: rgba(255, 255, 255, 0.35);
}

/* Scene sitting over the previous scene's frozen frame (S11 over S10) */
.scene.is-overlaid>.scene-video-layer {
  display: none;
}

/* ═══════════════════════════════════════════════
   FX LAYER — effects belong to the image (§3.3)
   ═══════════════════════════════════════════════ */
.scene-fx {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

@keyframes ogh-shake {

  0%,
  100% {
    transform: translate(0, 0);
  }

  20% {
    transform: translate(-4px, 2px);
  }

  40% {
    transform: translate(3px, -3px);
  }

  60% {
    transform: translate(-3px, -1px);
  }

  80% {
    transform: translate(4px, 2px);
  }
}

@keyframes ogh-error-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--c-error-rgb), 0);
  }

  40% {
    box-shadow: 0 0 0 4px rgba(var(--c-error-rgb), 0.45), 0 0 22px rgba(var(--c-error-rgb), 0.55);
  }
}

/* FAIL: pulsing saturated red + 0.5s shake — never the static brand red */
.is-error {
  background: var(--c-error) !important;
  border-color: var(--c-error) !important;
  color: #fff !important;
  animation: ogh-shake 0.5s ease, ogh-error-pulse 0.5s ease;
}


/* ═══════════════════════════════════════════════
   SHARED COPY / PANEL
   ═══════════════════════════════════════════════ */
.ogh-copy .ogh-title {
  font-size: clamp(22px, 3.6vw, 40px);
  line-height: 1.02;
  text-transform: uppercase;
  color: #fff;
}

.ogh-copy .ogh-sub {
  margin-top: 10px;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.ogh-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.ogh-copy-top {
  position: absolute;
  top: 9%;
  left: 4%;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.ogh-floor-card {
  position: absolute;
  top: 50%;
  left: 6%;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 28px 40px 28px 0;
  z-index: 20;
}

.ogh-floor-card .ogh-eyebrow,
.ogh-floor-card .ogh-title,
.ogh-floor-card .ogh-sub {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 4px 20px rgba(0, 0, 0, 0.85);
}

.ogh-floor-card .ogh-sub {
  font-size: 16px;
}

/* Split scenes: copy top-left (lower-left third stays clear for the fx caption) */
.ogh-split::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 42%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.ogh-split .split-copy {
  align-self: flex-start;
  margin-top: 43vh;
}

.split-overlay .glass-panel.ogh-panel {
  flex: 0 0 340px;
  max-width: 340px;
  max-height: calc(var(--frame-height) - 56px);
  overflow-y: auto;
  padding-bottom: 52px;
  /* keep content clear of the corner notch */
}

.panel-prompt {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.6);
  margin-bottom: 14px;
}

.btn-block {
  width: 100%;
  height: 36px;
  font-size: 9px;
}

/* Range input */
.ogh-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(10, 10, 10, 0.14);
  outline: none;
  cursor: pointer;
}

.ogh-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  background: var(--thumb, var(--text));
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.25);
  cursor: grab;
}

.ogh-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  background: var(--thumb, var(--text));
  border: 2px solid #fff;
  border-radius: 0;
  cursor: grab;
}

.ogh-range:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.ogh-range:disabled {
  cursor: default;
  opacity: 0.6;
}

/* Toggle (display-only in S4 — flips itself on in WIN) */
.ogh-toggle {
  position: relative;
  flex: 0 0 34px;
  height: 18px;
  border-radius: 9px;
  background: rgba(10, 10, 10, 0.18);
  transition: background 0.3s ease;
}

.ogh-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s ease;
}

.ogh-toggle.is-on {
  background: var(--c-correct);
}

.ogh-toggle.is-on::after {
  transform: translateX(16px);
}


/* ═══════════════════════════════════════════════
   CAPTIONS — Alex (blue) / Cole (red)
   ═══════════════════════════════════════════════ */
.dialogue {
  position: fixed;
  left: 50%;
  bottom: calc(var(--frame-bottom, 0px) + 11vh);
  transform: translate(-50%, 8px);
  z-index: 60;
  max-width: min(46vw, 640px);
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-left: 3px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dialogue.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dialogue-who {
  display: block;
  font-size: 9px;
  letter-spacing: 2.5px;
  margin-bottom: 3px;
}

.dialogue-text {
  font-size: 14px;
  line-height: 1.4;
}

.dialogue.who-alex {
  border-left-color: var(--c-alex);
}

.dialogue.who-alex .dialogue-who {
  color: var(--c-alex);
}

.dialogue.who-cole {
  border-left-color: var(--c-cole);
}

.dialogue.who-cole .dialogue-who {
  color: var(--c-cole);
}

/* On-screen game beat (e.g. DEFEAT.) */
.dialogue.who-fx {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  bottom: 44vh;
}

.dialogue.who-fx .dialogue-text {
  font-family: 'RBNO', sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(32px, 6vw, 72px);
  letter-spacing: 6px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}


/* ═══════════════════════════════════════════════
   LEFT SCRIM / SHADOW GRADIENT
   Dark gradient from left to right so left-aligned
   copy and buttons pop clearly against light video backgrounds
   ═══════════════════════════════════════════════ */
#scene-S2::before,
#scene-S3::before,
#scene-S6::before,
#scene-S9::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.70) 25%,
    rgba(0, 0, 0, 0.38) 48%,
    rgba(0, 0, 0, 0.08) 68%,
    transparent 82%
  );
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#scene-S2.active::before,
#scene-S3.active::before,
#scene-S6.active::before,
#scene-S9.active::before {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   S2 — THE MATCH → THE HUB
   ═══════════════════════════════════════════════ */
.s2-block {
  position: absolute;
  top: 46vh;
  left: 6%;
  transform: translateY(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#scene-S2.is-armed .s2-block {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateY(0);
}

.s2-block .ogh-title {
  font-size: clamp(22px, 3.6vw, 42px);
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 4px 25px rgba(0, 0, 0, 0.85);
}

.s2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 24px;
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 2px;
  font-family: 'RBNO', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(232, 17, 45, 0.45);
  transition: background 0.15s ease, opacity 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.s2-btn:hover {
  background: #ff1f3d;
  box-shadow: 0 6px 24px rgba(232, 17, 45, 0.65);
  transform: translateY(-1px);
}

.s2-btn:active {
  transform: translateY(1px);
}

.ogh-statement {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  font-size: clamp(40px, 8vw, 110px);
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease, transform 1.2s ease;
}

.scene.is-won .ogh-statement {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#scene-S2.is-won .s2-block {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.95);
}


/* ═══════════════════════════════════════════════
   S4 — POWER MODES
   ═══════════════════════════════════════════════ */
#scene-S4 {
  --mcol: #7c8aa5;
  --mcol-rgb: 124, 138, 165;
  --mspeed: 4.4s;
  --thumb: var(--mcol);
}

.s4-fx>* {
  position: absolute;
  inset: 0;
}

.s4-fx .fx-tint {
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(var(--mcol-rgb), 0.32) 100%);
  transition: background 0.5s ease;
}

.s4-fx .fx-edge {
  box-shadow: inset 0 0 0 2px rgba(var(--mcol-rgb), 0.75), inset 0 0 120px rgba(var(--mcol-rgb), 0.5);
  transition: box-shadow 0.5s ease;
}

.s4-fx .fx-flow span {
  position: absolute;
  left: 0;
  width: 34%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--mcol-rgb), 0.9), transparent);
  animation: ogh-flow var(--mspeed) linear infinite;
  opacity: 0.7;
}

.s4-fx .fx-flow span:nth-child(1) {
  top: 18%;
  animation-delay: calc(var(--mspeed) * -0.1);
}

.s4-fx .fx-flow span:nth-child(2) {
  top: 31%;
  animation-delay: calc(var(--mspeed) * -0.55);
}

.s4-fx .fx-flow span:nth-child(3) {
  top: 46%;
  animation-delay: calc(var(--mspeed) * -0.3);
}

.s4-fx .fx-flow span:nth-child(4) {
  top: 59%;
  animation-delay: calc(var(--mspeed) * -0.8);
}

.s4-fx .fx-flow span:nth-child(5) {
  top: 73%;
  animation-delay: calc(var(--mspeed) * -0.45);
}

.s4-fx .fx-flow span:nth-child(6) {
  top: 86%;
  animation-delay: calc(var(--mspeed) * -0.7);
}

@keyframes ogh-flow {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(310%);
  }
}

/* Caption overlay — lower-left third of the frame */
.s4-fx .fx-caption {
  inset: auto auto 13% 4%;
  max-width: 28vw;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.fx-caption-mode {
  font-size: clamp(20px, 2.6vw, 32px);
  text-transform: uppercase;
  color: var(--mcol);
  transition: color 0.4s ease;
}

.fx-caption-text {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.fx-claim {
  margin-top: 8px;
  font-size: 18px;
  color: var(--c-correct);
}

.fx-flag {
  display: inline-block;
  min-height: 1px;
  margin-bottom: 6px;
  font-family: 'RBNO', sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
}

.fx-flag:empty {
  display: none;
}

.fx-flag.is-unstable {
  padding: 3px 8px;
  background: var(--mcol);
  color: #fff;
}

.fx-flag.is-optimized {
  padding: 3px 8px;
  background: var(--c-correct);
  color: #fff;
}

/* EXTREME: turbulence on the image — video + fx layer, not the panel */
#scene-S4.is-unstable .scene-video-layer,
#scene-S4.is-unstable .scene-fx {
  animation: ogh-shake 0.34s infinite;
}

#scene-S4.is-optimized .fx-flow span {
  opacity: 1;
  height: 3px;
}

/* Panel — controls and data only */
.s4-mode {
  font-size: 22px;
  text-transform: uppercase;
  color: var(--mcol);
  margin-bottom: 10px;
  transition: color 0.4s ease;
}

.s4-stops {
  display: flex;
  justify-content: space-between;
  margin: 8px -4px 16px;
  font-size: 7px;
  letter-spacing: 1px;
  color: rgba(10, 10, 10, 0.4);
}

.s4-stop.is-active {
  color: var(--text);
}

.s4-readouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.readout {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 8px;
  background: rgba(10, 10, 10, 0.05);
  border-top: 2px solid var(--mcol);
  transition: border-color 0.4s ease;
}

.readout-val {
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.readout-label {
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(10, 10, 10, 0.5);
}

.s4-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 11px;
  color: rgba(10, 10, 10, 0.7);
}


/* ═══════════════════════════════════════════════
   CHECKPOINTS (S5 · S8 · S11)
   ═══════════════════════════════════════════════ */
.ogh-cp-overlay {
  background: transparent;
}

.cp-panel {
  width: 100%;
  max-width: clamp(580px, 48vw, 720px);
  max-height: calc(var(--frame-height) - 48px);
  overflow: visible;
  padding: 10px 16px 20px;
  background: transparent;
  border: none;
  color: #fff;
  clip-path: none;
  box-shadow: none;
  transform: translateY(-4vh);
}

.cp-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.cp-title {
  margin-top: 6px;
  margin-bottom: 4px;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: #fff;
}

.cp-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 22px;
}

.cp-dots {
  display: flex;
  gap: 7px;
}

.cp-dot {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.2);
}

.cp-dot.active {
  background: #fff;
}

.cp-dot.done {
  background: var(--c-correct);
}

.cp-count {
  font-size: 10px;
  letter-spacing: 2.2px;
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
}

.cp-card {
  position: relative;
}

.cp-card.cp-enter {
  animation: cp-in 0.35s ease;
}

@keyframes cp-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.cp-who {
  font-family: 'RBNO', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--c-cole);
  margin-bottom: 6px;
}

.cp-question {
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.4;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.95);
}

.cp-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cp-option {
  width: 100%;
  text-align: left;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cp-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  transform: translateX(4px);
}

.cp-option:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cp-option.is-correct {
  background: rgba(var(--c-correct-rgb), 0.16);
  border-color: var(--c-correct);
  color: #6ee7a0;
  opacity: 1;
}

.cp-option.is-tried {
  opacity: 0.35;
  text-decoration: line-through;
  text-decoration-color: rgba(var(--c-error-rgb), 0.7);
}

.cp-option:disabled:not(.is-correct):not(.is-tried) {
  opacity: 0.4;
}

.cp-takeaway {
  position: absolute;
  top: calc(100% + 43px);
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgba(var(--c-correct-rgb), 0.35);
  border-left: 4px solid var(--c-correct);
  background: rgba(14, 15, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(var(--c-correct-rgb), 0.15);
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.cp-takeaway:empty {
  display: none;
}

.cp-takeaway.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


/* ═══════════════════════════════════════════════
   S7 — MATCH THE REFERENCE
   ═══════════════════════════════════════════════ */
#scene-S7 {
  --lc: hsl(206, 42%, 48%);
  --la: hsl(160, 38%, 52%);
  --tp: hsl(349, 86%, 49%);
  --ta: hsl(28, 95%, 56%);
}

/* Room ambient light tints to the live PRIMARY */
.s7-fx .fx-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 45% 55%, var(--lc) 0%, transparent 65%);
  opacity: 0.32;
  transition: opacity 0.8s ease;
}

#scene-S7.is-matched .fx-ambient {
  opacity: 0.6;
}

/* Device strip along the frame */
.s7-strip {
  position: absolute;
  left: 4%;
  bottom: 8%;
  display: flex;
  gap: 8px;
}

.s7-zone {
  min-width: 52px;
  padding: 8px 10px;
  text-align: center;
  font-family: 'RBNO', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.75);
  background: var(--lc);
  opacity: 0.32;
  transition: opacity 0.35s ease, box-shadow 0.35s ease;
}

.s7-zone.is-accent {
  background: var(--la);
}

.s7-zone.is-lit {
  opacity: 1;
  color: #fff;
  box-shadow: 0 0 22px var(--lc);
}

.s7-zone.is-accent.is-lit {
  box-shadow: 0 0 22px var(--la);
}

/* Panel — two big diamonds: outer = wallpaper reference, inner = live lighting.
   The closer the match, the more the inner diamond disappears into the outer one. */
.s7-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.s7-ch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 10px;
  border: 1px solid rgba(10, 10, 10, 0.12);
  background: rgba(10, 10, 10, 0.03);
  transition: border-color 0.2s, background 0.2s;
}

.s7-ch:hover:not(:disabled) {
  border-color: rgba(10, 10, 10, 0.35);
}

.s7-ch.is-selected {
  border-color: var(--text);
  background: rgba(10, 10, 10, 0.07);
}

.s7-ch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.s7-ch:disabled {
  cursor: default;
}

.s7-gem {
  position: relative;
  width: 112px;
  height: 112px;
}

.s7-sw {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.s7-target {
  width: 78px;
  height: 78px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.s7-live {
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  transition: width 0.6s ease, height 0.6s ease, border-color 0.6s ease;
}

/* Matched: the live tone swallows the reference — one seamless diamond */
#scene-S7.is-matched .s7-live {
  width: 78px;
  height: 78px;
  border-color: transparent;
}

.s7-ch-name {
  font-size: 9px;
  letter-spacing: 2px;
}

.s7-pct {
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(10, 10, 10, 0.55);
}

.s7-ch.is-pass .s7-pct {
  color: var(--c-correct);
}

.s7-legend {
  margin-bottom: 14px;
  text-align: center;
  font-size: 7px;
  letter-spacing: 1.5px;
  color: rgba(10, 10, 10, 0.45);
}

.s7-slider {
  display: grid;
  grid-template-columns: 78px 1fr 38px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: rgba(10, 10, 10, 0.6);
}

.s7-slider output {
  text-align: right;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.s7-hue {
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}

.s7-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 0.5px solid rgba(10, 10, 10, 0.12);
  font-size: 8px;
  letter-spacing: 2px;
}

.s7-meter .f-bold {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.s7-meter-track {
  height: 6px;
  background: rgba(10, 10, 10, 0.1);
  overflow: hidden;
}

.s7-meter-track i {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(10, 10, 10, 0.55);
  transition: width 0.2s ease, background 0.3s ease;
}

.s7-meter.is-pass .s7-meter-track i,
#scene-S7.is-matched .s7-meter-track i {
  background: var(--c-correct);
}


/* ═══════════════════════════════════════════════
   S10 — DRAG & CONSOLIDATE (flat / 2D)
   ═══════════════════════════════════════════════ */
.s10-scatter {
  position: relative;
  height: 150px;
  margin-bottom: 12px;
}

.s10-chip {
  position: absolute;
  padding: 9px 14px;
  border: 1px solid rgba(10, 10, 10, 0.18);
  background: #fff;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.s10-chip:hover:not(:disabled) {
  border-color: var(--text);
}

.s10-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.s10-chip.is-dragging {
  z-index: 50;
  cursor: grabbing;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

/* Scattered — `rotate` stays independent of the drag transform */
.s10-scatter .s10-chip:nth-child(1) {
  left: 2%;
  top: 4%;
  rotate: -6deg;
}

.s10-scatter .s10-chip:nth-child(2) {
  left: 48%;
  top: 0%;
  rotate: 4deg;
}

.s10-scatter .s10-chip:nth-child(3) {
  left: 20%;
  top: 38%;
  rotate: 3deg;
}

.s10-scatter .s10-chip:nth-child(4) {
  left: 60%;
  top: 46%;
  rotate: -5deg;
}

.s10-scatter .s10-chip:nth-child(5) {
  left: 6%;
  top: 72%;
  rotate: 2deg;
}

.s10-library {
  padding: 12px;
  border: 1px dashed rgba(10, 10, 10, 0.3);
  transition: border-color 0.2s, background 0.2s;
}

.s10-library.is-hover {
  border-style: solid;
  border-color: var(--text);
  background: rgba(10, 10, 10, 0.05);
}

.s10-library.is-complete {
  border-style: solid;
  border-color: var(--c-correct);
  background: rgba(var(--c-correct-rgb), 0.07);
}

.s10-lib-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 9px;
  letter-spacing: 2px;
}

.s10-lib-head .f-bold {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.s10-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.s10-slot {
  min-height: 34px;
  background: rgba(10, 10, 10, 0.05);
}

.s10-slot .s10-chip {
  position: static;
  width: 100%;
  rotate: 0deg;
  cursor: default;
  box-shadow: none;
  border-color: rgba(10, 10, 10, 0.12);
}

.s10-library.is-complete .s10-chip {
  border-color: rgba(var(--c-correct-rgb), 0.5);
}


/* ═══════════════════════════════════════════════
   S12 — THE REVEAL (drive the camera)
   p ∈ [0,1] drives everything:
     camera rotateX(64deg × (1 − p))
     spread 120px × (1 − p)
     beam   opacity .22 + .62p
   ═══════════════════════════════════════════════ */
#scene-S12 {
  --p: 0;
}

.s12-stage {
  position: absolute;
  inset: 0;
  perspective: 1100px;
  perspective-origin: 50% 42%;
}

.s12-tower {
  --spread: calc(120px * (1 - var(--p)));
  position: absolute;
  left: 50%;
  top: 48%;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  transform-style: preserve-3d;
  transform: rotateX(calc(64deg * (1 - var(--p))));
}

.s12-floor {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(calc(var(--zf) * var(--spread))) rotate(45deg);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.08) inset;
  transition: opacity 0.9s ease, background 0.9s ease, border-color 0.9s ease;
}

.s12-floor span {
  transform: rotate(-45deg);
  font-size: 9px;
  letter-spacing: 2.5px;
  color: rgba(255, 255, 255, 0.85);
  transition: opacity 0.6s ease;
}

/* Connecting beam — must read through all three floors at every angle (non-negotiable) */
.s12-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: calc(2 * var(--spread) + 90px);
  transform: translate(-50%, -50%) rotateX(90deg);
  background: linear-gradient(180deg, transparent, var(--accent) 12%, #ff6b70 50%, var(--accent) 88%, transparent);
  box-shadow: 0 0 16px var(--accent), 0 0 36px rgba(237, 50, 55, 0.6);
  opacity: calc(0.22 + 0.62 * var(--p));
}

.s12-beam-b {
  transform: translate(-50%, -50%) rotateZ(90deg) rotateX(90deg);
}

/* Visible core where the beam meets the floor plane */
.s12-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--accent) 35%, transparent 70%);
  opacity: calc(0.35 + 0.65 * var(--p));
}

/* Lock → floors fuse into one OMEN diamond, beam resolves to a point and fades */
#scene-S12.is-fused .s12-floor:not(.s12-floor-mid) {
  opacity: 0;
}

#scene-S12.is-fused .s12-floor-mid {
  background: rgba(237, 50, 55, 0.9);
  border-color: var(--accent);
}

#scene-S12.is-fused .s12-floor span {
  opacity: 0;
}

#scene-S12.is-fused .s12-beam {
  opacity: 0;
  transition: opacity 1.2s ease;
}

#scene-S12.is-fused .s12-core {
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 1.2s ease 0.6s, transform 1.2s ease 0.6s;
}

.s12-statement {
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(22px, 3.4vw, 44px);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

#scene-S12.is-statement .s12-statement {
  opacity: 1;
  transform: none;
}

/* The whole frame is the drag surface */
.s12-overlay {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#scene-S12.is-armed-camera .s12-overlay {
  cursor: grab;
}

#scene-S12.is-driving .s12-overlay {
  cursor: grabbing;
}

.s12-control {
  position: absolute;
  right: 7%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
  outline: none;
}

#scene-S12.is-armed-camera .s12-control {
  opacity: 1;
}

#scene-S12.is-locked .s12-control {
  opacity: 0;
}

.s12-control:focus-visible .s12-track {
  outline: 2px solid #fff;
  outline-offset: 6px;
}

.s12-track {
  position: relative;
  width: 3px;
  height: 200px;
  background: rgba(255, 255, 255, 0.2);
}

.s12-thumb {
  position: absolute;
  left: 50%;
  top: calc((1 - var(--p)) * 100%);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  transform: rotate(45deg);
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
}

.s12-cam-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  color: #fff;
}

.s12-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}


/* ═══════════════════════════════════════════════
   S13 — ENDING additions
   ═══════════════════════════════════════════════ */
.end-panel {
  max-width: 440px;
}

.end-fact strong {
  color: #fff;
  font-weight: 800;
}

.end-tagline {
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 14px;
}

.end-egg {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.end-egg summary {
  list-style: none;
  width: 14px;
  color: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.end-egg summary::-webkit-details-marker {
  display: none;
}

.end-egg[open] summary {
  color: var(--accent);
}

.end-egg strong {
  color: #fff;
  letter-spacing: 2px;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 760px) {
  .split-overlay.visible {
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    padding: 20px 16px;
    gap: 16px;
  }

  .split-overlay .glass-panel.ogh-panel {
    flex: none;
    max-width: 100%;
    max-height: none;
  }

  .split-copy {
    max-width: 100%;
  }

  .ogh-copy .ogh-sub {
    display: none;
  }

  .s4-fx .fx-caption {
    display: none;
  }

  .dialogue {
    max-width: calc(100vw - 32px);
    width: calc(100vw - 32px);
  }

  .s12-control {
    right: 16px;
  }
}

@media (max-height: 560px) {

  .cp-panel,
  .end-panel {
    max-height: calc(var(--frame-height) - 16px);
  }
}

.progress-dot.done {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.7);
}