/* =============================================
   OMEN AI v3 — Main Stylesheet
   White / bright dominant. Glass panels.
   Accent: #ff6200. Text: #0a0a0a.
   ============================================= */

/* ---- Design tokens ---- */
:root {
  --accent: #ed3237;
  --text: #2b0b0c;
  --text-white: #ffffff93;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.20);
  --glass-blur: blur(24px);
  --glass-border: 0.5px solid rgba(255, 255, 255, 0.50);
  --radius: 8px;
  --header-h: 52px;

  /* Frame bounds — overwritten by FrameManager.init() */
  --frame-top: 52px;
  --frame-left: 0px;
  --frame-width: 100vw;
  --frame-height: calc(100vh - 52px);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

ol,
ul {
  list-style: none;
}

input {
  font: inherit;
}

/* ---- Layout utility classes ---- */
.indent-1 {
  margin-left: 12px;
}

.indent-2 {
  margin-left: 24px;
}

.indent-3 {
  margin-left: 48px;
}

/* ---- Font utility classes ---- */
/* Gotham Utilities */
.f-logo {
  font-family: 'Gotham', 'Arial', sans-serif;
  font-weight: 900;
}

.f-logo-med {
  font-family: 'Gotham', 'Arial', sans-serif;
  font-weight: 500;
}

/* RBNO Utilities */
.f-thin {
  font-family: 'RBNO', sans-serif;
  font-weight: 100;
}

.f-extralight {
  font-family: 'RBNO', sans-serif;
  font-weight: 200;
}

.f-light {
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
}

.f-book {
  font-family: 'RBNO', sans-serif;
  font-weight: 400;
}

.f-medium {
  font-family: 'RBNO', sans-serif;
  font-weight: 500;
}

.f-bold {
  font-family: 'RBNO', sans-serif;
  font-weight: 700;
}

.f-extrabold {
  font-family: 'RBNO', sans-serif;
  font-weight: 800;
}

.f-black {
  font-family: 'RBNO', sans-serif;
  font-weight: 900;
}

.f-ultra {
  font-family: 'RBNO', sans-serif;
  font-weight: 950;
}

/* Legado (Para no romper código anterior) */
.f-headline {
  font-family: 'RBNO', 'Arial Black', sans-serif;
  font-weight: 800;
}

.f-italic {
  font-family: 'RBNO', 'Georgia', serif;
  font-style: italic;
}

.f-body {
  font-family: 'RBNO', 'Arial', sans-serif;
  font-weight: 300;
}

/* ---- Accent colour ---- */
.accent {
  color: var(--accent);
}


/* ═══════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #2b0b0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.45s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-size: 28px;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--white);
}

.loading-logo span {
  color: var(--accent);
}

.loading-bar {
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
  overflow: hidden;
}

.loading-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.loading-percent {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: -12px;
}


/* ═══════════════════════════════════════════════
   FRAME OVERLAY  (pointer-events: none — middle layer)
   ═══════════════════════════════════════════════ */
#ui-frame {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#ui-frame svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Glass blur div using CSS mask matching the SVG main path */
.frame-glass-blur {
  position: absolute;
  inset: 0;
  background: #ffffff;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1080' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1919.99,61.25V0H0v1080s68.09-.53,97.1-.53h1822.9V61.25ZM1714.59,1031.29h-23.15l-35.64,33.72H14.83V61.86h1890.33v783.81l-190.57,185.62Z' fill='black'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1920 1080' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1919.99,61.25V0H0v1080s68.09-.53,97.1-.53h1822.9V61.25ZM1714.59,1031.29h-23.15l-35.64,33.72H14.83V61.86h1890.33v783.81l-190.57,185.62Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
}

/* Sub-elements of the SVG */
.frame-main-line {
  fill: none;
  stroke: rgba(10, 10, 10, 0.08);
  /* Inner line matching the glass panel border */
  stroke-width: 1.5;
}

.frame-acc1 {
  fill: #e7eaf1;
  /* Light greyish white details */
  fill-rule: evenodd;
}

.frame-acc2 {
  display: none;
  /* replaced by CSS pseudo-element below to avoid SVG stretch distortion */
}

/* Diamond accent — positioned at same % coords as the SVG polygon (1632/1920, 1047/1080)
   but sized with equal vmin so it stays square at any aspect ratio */
#ui-frame::after {
  content: '';
  position: absolute;
  right: 14.9%;
  bottom: 3.1%;
  width: clamp(9px, 0.85vmin, 13px);
  height: clamp(9px, 0.85vmin, 13px);
  background: var(--text);
  transform: rotate(45deg);
  pointer-events: none;
}


/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
#app-header {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.ui-widget {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: center;
}

.ui-top-left {
  top: 0;
  left: clamp(12px, 3vw, 32px);
  height: 5.67vh;
  /* Alineado verticalmente con el SVG frame (61.25 / 1080 = 5.67%) */
}

.ui-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 5.67vh;
}

.ui-top-right {
  top: 0;
  right: clamp(12px, 3vw, 32px);
  height: 5.67vh;
  gap: clamp(4px, 1vw, 8px);
}

.ui-bottom-center {
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.ui-bottom-right {
  bottom: 24px;
  right: 24px;
}

.ui-bottom-left {
  bottom: 24px;
  left: 24px;
  gap: 4px;
}

.rhombus {
  width: clamp(5px, 0.8vh, 9px);
  height: clamp(5px, 0.8vh, 9px);
  background-color: #2b0b0c;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.sponsor-logo {
  display: block;
  height: clamp(14px, 2.6vh, 28px);
  /* Ajusta proporcionalmente con el alto del marco */
  width: auto;
  max-width: clamp(60px, 20vw, 120px);
  object-fit: contain;
}

#menu-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s;
}

#menu-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

#audio-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
  opacity: 0.55;
}

#audio-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  opacity: 1;
}

#audio-btn .audio-icon-off {
  display: none;
}

#audio-btn.muted .audio-icon-on {
  display: none;
}

#audio-btn.muted .audio-icon-off {
  display: block;
}

#audio-btn.muted {
  opacity: 0.38;
}

.header-logo {
  font-size: clamp(10px, 1.5vh, 17px);
  /* Ajusta proporcionalmente con el marco */
  letter-spacing: clamp(2px, 0.4vw, 4px);
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
  margin-top: -1px;
  /* Pequeño ajuste óptico para alinear el texto con el rombo */
}

.header-scene-label {
  flex: 1;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#progress-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(10, 10, 10, 0.22);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.progress-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
}

.progress-dot.done {
  background: var(--text);
  border-color: var(--text);
}


/* ═══════════════════════════════════════════════
   STAGE  &  SCENES
   ═══════════════════════════════════════════════ */
#stage {
  position: fixed;
  top: var(--frame-top);
  left: var(--frame-left);
  width: var(--frame-width);
  height: var(--frame-height);
  overflow: hidden;
  background: #000000;
}

/* Default: scenes are hidden */
.scene {
  position: absolute;
  inset: 0;
  display: none;
}

.scene.active {
  display: block;
}

/* S1 registration — always visible (no active class needed) */
.scene-reg {
  display: block;
  transition: opacity 0.5s ease;
}

.scene-reg.fading-out {
  opacity: 0;
  pointer-events: none;
}


/* ---- Video layer ---- */
.scene-video-layer {
  position: absolute;
  inset: 0;
  background: #000000 center / cover no-repeat;
}

/* Dev placeholder: white background shown when no video file exists */
.vid-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  z-index: 0;
}

.vid-placeholder::after {
  content: attr(data-label);
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.25);
}

.scene-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
}

.scene-video.active-vid {
  opacity: 1;
}


/* ---- Scene overlays ---- */
.scene-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scene-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}


/* ═══════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════ */

/* Glass panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.5px solid rgba(10, 10, 10, 0.08);
  padding: 22px;
  color: var(--text);
  /* Muesca responsiva basada en código original SVG (79px base width) */
  clip-path: 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);
}

/* Copy typography (overlaid on video — dark text for bright video content) */
.copy-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.50);
  margin-bottom: 8px;
}

.copy-headline {
  font-size: clamp(24px, 3.8vw, 42px);
  line-height: 1.0;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.copy-headline-long {
  font-size: clamp(20px, 3.2vw, 34px);
  line-height: 1.0;
  /* Espaciado entre líneas */
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.copy-body {
  font-size: 12px;
  line-height: 1.4;
  /* Espaciado entre líneas */
  color: rgba(10, 10, 10, 0.65);
}

/* Panel label (inside glass panels on light bg) */
.panel-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.50);
  margin-bottom: 12px;
}

/* Split overlay: left copy + right panel */
.split-overlay {
  padding: 0;
  /* reset base .scene-overlay padding */
}

.split-overlay.visible {
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px;
}

.split-copy {
  flex: 1;
  max-width: 45vw;
  /* Aumentado para evitar saltos de línea prematuros */
}

.split-overlay .glass-panel {
  flex: 0 0 300px;
  max-width: 300px;
}

/* Centred overlay (S3) */
.copy-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: 60vw;
  /* Aumentado para evitar saltos de línea prematuros */
}

/* Custom alignment overlay (S3) */
.copy-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* 'left' no es válido en flexbox, debe ser flex-start */
  text-align: left;
  gap: 10px;
  max-width: 60vw;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 15vw;
  /* Cambia este valor (ej. 10vw, 20vw, 200px) para probar distancias */
}

.copy-rights2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* 'left' no es válido en flexbox, debe ser flex-start */
  text-align: left;
  gap: 10px;
  max-width: 60vw;
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  right: 10vw;
  /* Cambia este valor (ej. 10vw, 20vw, 200px) para probar distancias */
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--white);
  border-radius: 2px;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 8px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  background: rgba(10, 10, 10, 0.12);
  color: rgba(10, 10, 10, 0.32);
  cursor: not-allowed;
  transform: none;
  opacity: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(10, 10, 10, 0.22);
  border-radius: 2px;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 8px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(10, 10, 10, 0.06);
}


/* ═══════════════════════════════════════════════
   S1 — REGISTRATION
   ═══════════════════════════════════════════════ */
#overlay-S1 {
  background: transparent;
}

.reg-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 340px;
}

.reg-logo {
  font-size: 20px;
  line-height: 0.1;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.reg-headline {
  font-size: clamp(22px, 4.5vw, 36px);
  line-height: 1.0;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}

.reg-headline2 {
  font-size: clamp(22px, 4.5vw, 36px);
  line-height: 1.0;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.978);
  margin-bottom: -2px;
}

.reg-headline3 {
  font-size: clamp(22px, 4.5vw, 36px);
  line-height: 1.0;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.978);
  margin-bottom: -2px;
}

.reg-sub {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(10, 10, 10, 0.52);
}

.reg-sub3 {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(238, 238, 238, 0.52);
}

.reg-sub2 {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(238, 238, 238, 0.52);
}

.reg-sub4 {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(238, 238, 238, 0.52);
}

.reg-body {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(10, 10, 10, 0.55);
  margin-bottom: 1px;
}

.reg-body2 {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.773);
  margin-bottom: 1px;
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 6px;
}

.reg-label {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.50);
}

.reg-label2 {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.908);
}

.req {
  color: var(--accent);
}

.reg-input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #ed3237;
  border-radius: 1px;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--text-white);
  background: rgba(0, 0, 0, 0.806);
  outline: none;
  transition: border-color 0.2s;
}

.reg-input:focus {
  border-color: var(--accent);
}

.reg-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.reg-error {
  font-size: 10px;
  color: #c62828;
  display: none;
  padding-top: 1px;
}

.reg-error.visible {
  display: block;
}

#overlay-S1 .btn-primary {
  height: 36px;
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 6px;
}


/* ═══════════════════════════════════════════════
   S2 — THE FRUSTRATION (cinematic trigger)
   ═══════════════════════════════════════════════ */
.s2-copy-block {
  position: absolute;
  top: 50%;
  left: 9%;
  transform: translateY(-50%);
  pointer-events: none;
  max-width: 50%;
}

.s2-copy-block2 {
  position: absolute;
  top: 30%;
  left: 2%;
  transform: translateY(-50%);
  pointer-events: none;
  max-width: 50%;
}


.s2-headline {
  font-size: clamp(20px, 3.2vw, 34px);
  line-height: 0.7;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.s2-headline2 {
  font-size: clamp(20px, 3.2vw, 34px);
  line-height: 0.1;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.s2-cta {
  font-size: 12px;
  letter-spacing: 1.5px;
  line-height: 1.2;
  color: var(--accent);
}

/* Hotspot — clickable zone over OMEN AI button in video */
.s2-hotspot {
  position: absolute;
  /* Default placeholder position — adjust with % once video is final */
  bottom: 26%;
  right: 38%;
  width: 100px;
  height: 100px;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.s2-hotspot:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.s2-pulse {
  display: block;
  width: 60px;
  height: 60px;
  background: rgba(237, 50, 55, 0.30);
  transform: rotate(45deg);
  position: relative;
  animation: pulseRing 1.9s ease-in-out infinite;
  visibility: hidden;
}

.s2-pulse::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  background: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes pulseRing {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.6);
    opacity: 0.45;
  }
}


/* ═══════════════════════════════════════════════
   S3 — THE LEAP (centred copy + button)
   ═══════════════════════════════════════════════ */
/* Uses .copy-center layout; styles inherited from shared components */
#overlay-S3 .btn-primary {
  margin-top: 6px;
}

.typing-cursor {
  display: inline-block;
  width: 0.1em;
  height: 0.8em;
  background-color: var(--accent);
  margin-left: 2px;
  vertical-align: baseline;
  animation: blink-caret 4.75s step-end infinite;
}

.typing-cursor.typing-done {
  animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* S3 Staggered Animation */
#overlay-S3 .copy-right>*:not(#s3-typing-text) {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#overlay-S3 .copy-right.show-rest>*:not(#s3-typing-text) {
  opacity: 1;
  transform: translateY(0);
}

#overlay-S3 .copy-right.show-rest>p.reg-sub.indent-3 {
  transition-delay: 0.1s;
}

#overlay-S3 .copy-right.show-rest>p.reg-headline:nth-of-type(2) {
  transition-delay: 0.2s;
}

#overlay-S3 .copy-right.show-rest>p.reg-headline:nth-of-type(3) {
  transition-delay: 0.3s;
}

#overlay-S3 .copy-right.show-rest>p.reg-sub:not(.indent-3) {
  transition-delay: 0.4s;
}

#overlay-S3 .copy-right.show-rest>p.s2-cta {
  transition-delay: 0.5s;
}

#overlay-S3 .copy-right.show-rest>button.btn-primary {
  transition-delay: 0.6s;
}

/* ═══════════════════════════════════════════════
   S4 — CHECKBOXES
   ═══════════════════════════════════════════════ */
.s4-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.s4-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
  color: var(--text);
}

.s4-option:hover {
  background: rgba(237, 50, 55, 0.06);
  border-color: rgba(237, 50, 55, 0.28);
}

.s4-option:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.s4-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1.5px solid rgba(10, 10, 10, 0.25);
  background: transparent;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.s4-option.checked .s4-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

/* Línea divisoria del header */
#app-header::before {
  display: none;
  /* Oculta la línea porque el marco SVG ya hace de borde */
}

.s4-option.checked .s4-checkbox::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 8px;
  border: 2px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.s4-opt-text {
  font-size: 12px;
}

.s4-option.wrong-flash {
  animation: shakeFlash 0.38s ease;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.45);
}

@keyframes shakeFlash {

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

  20% {
    transform: translateX(-7px);
  }

  60% {
    transform: translateX(5px);
  }

  80% {
    transform: translateX(-3px);
  }
}


/* ═══════════════════════════════════════════════
   S5 — DRAG TO REORDER
   ═══════════════════════════════════════════════ */
.s5-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.s5-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.85);
  cursor: grab;
  user-select: none;
  touch-action: none;
  color: var(--text);
  font-size: 12px;
  transition: box-shadow 0.15s, background 0.15s, border-color 0.15s;
}

.s5-pill:active {
  cursor: grabbing;
}

.s5-pill.dragging {
  opacity: 0.35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.s5-pill.drag-over {
  border-color: var(--accent);
  background: rgba(237, 50, 55, 0.07);
}

.s5-pill.wrong-flash {
  animation: shakeFlash 0.38s ease;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.45);
}

.drag-handle {
  color: rgba(10, 10, 10, 0.28);
  font-size: 17px;
  flex-shrink: 0;
  line-height: 1;
}

/* Ghost clone (injected by JS) — inherits pill styles via JS cloneNode */
#s5-ghost {
  pointer-events: none;
}


/* ═══════════════════════════════════════════════
   S6 & S7 — TEXT CONTRAST OVERLAYS
   ═══════════════════════════════════════════════ */
#overlay-S6::before,
#overlay-S7::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

#overlay-S4 .split-copy .reg-headline,
#overlay-S6 .split-copy .reg-headline,
#overlay-S7 .split-copy .reg-headline {
  color: rgba(255, 255, 255, 0.98);
}

#overlay-S4 .split-copy .reg-sub,
#overlay-S6 .split-copy .reg-sub,
#overlay-S7 .split-copy .reg-sub {
  color: rgba(255, 255, 255, 0.55);
}


/* ═══════════════════════════════════════════════
   S6 — SINGLE CHOICE
   ═══════════════════════════════════════════════ */
.s6-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s6-option {
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 5px;
  font-size: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  line-height: 1.45;
  transition: background 0.15s, border-color 0.15s;
}

.s6-option:hover {
  background: rgba(237, 50, 55, 0.06);
  border-color: rgba(237, 50, 55, 0.28);
}

.s6-option.selected {
  background: rgba(237, 50, 55, 0.10);
  border-color: rgba(237, 50, 55, 0.42);
}

.s6-option.wrong-flash {
  animation: shakeFlash 0.38s ease;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.42);
}


/* ═══════════════════════════════════════════════
   S7 — GAME SORT (drag to column)
   ═══════════════════════════════════════════════ */
#overlay-S7.visible {
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
}

.s7-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 720px;
}

.s7-copy {
  flex: 0 0 auto;
  max-width: 35vw;
  /* Aumentado para evitar saltos de línea prematuros */
}

.s7-panel {
  flex: 1;
  min-width: 0;
}

.s7-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  margin-bottom: 14px;
}

.s7-pill {
  padding: 7px 12px;
  border: 1px solid rgba(10, 10, 10, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--text);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.15s;
}

.s7-pill:active {
  cursor: grabbing;
}

.s7-pill.dragging {
  opacity: 0.35;
}

.s7-pill.wrong-flash {
  animation: shakeFlash 0.38s ease;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.42);
}

.s7-columns {
  display: flex;
  gap: 10px;
}

.s7-column {
  flex: 1;
  border: 1px dashed rgba(10, 10, 10, 0.14);
  border-radius: 5px;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}

.s7-column.drag-over {
  border-color: var(--accent);
  background: rgba(237, 50, 55, 0.05);
}

.s7-col-head {
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.42);
  padding: 7px 10px;
  border-bottom: 0.5px solid rgba(10, 10, 10, 0.08);
  background: rgba(10, 10, 10, 0.03);
}

.s7-drop-zone {
  min-height: 80px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}


/* ═══════════════════════════════════════════════
   S8 — NOTIFICATION BUBBLE
   ═══════════════════════════════════════════════ */
.s8-notif {
  position: absolute;
  top: 80%;
  right: 140px;
  z-index: 30;
  opacity: 0;
  transform: translateY(calc(-50% + 14px));
  pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  cursor: pointer;
}

.s8-notif.visible {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.s8-notif:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 10px;
}

.s8-notif.pulse {
  animation: notifBounce 0.42s ease;
}

@keyframes notifBounce {
  0% {
    transform: translateY(-50%) scale(1);
  }

  40% {
    transform: translateY(calc(-50% - 5px)) scale(1.04);
  }

  100% {
    transform: translateY(-50%) scale(1);
  }
}

.notif-inner {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 0.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 200px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.notif-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Gotham', sans-serif;
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
  letter-spacing: 0;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-name {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}

.notif-msg {
  font-size: 11px;
  font-style: italic;
  color: rgba(10, 10, 10, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-tap {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-cta {
  font-size: 11px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: right;
  font-weight: bold;
  animation: bounceArrow 1.5s infinite;
  display: block;
}

@keyframes bounceArrow {

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

  50% {
    transform: translateY(-4px);
  }
}


/* ═══════════════════════════════════════════════
   S9 — QUIZ CHAT OVERLAY  (dark theme)
   ═══════════════════════════════════════════════ */
.quiz-overlay {
  position: fixed;
  top: var(--frame-top);
  left: var(--frame-left);
  width: var(--frame-width);
  height: var(--frame-height);
  z-index: 10;
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}

.quiz-chat-panel {
  width: 100%;
  max-width: 460px;
  height: 100%;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: #0e0e0e;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  /* override glass-panel clip-path for chat */
  clip-path: none;
}

/* Chat header */
.quiz-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Gotham', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.chat-who {
  flex: 1;
  min-width: 0;
}

.chat-name {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1;
}

.chat-status {
  font-size: 10px;
  color: #22c55e;
  margin-top: 3px;
}

.quiz-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.quiz-progress-dots {
  display: flex;
  gap: 4px;
}

.quiz-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.quiz-progress-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

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

.quiz-prog-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.30);
}

/* Chat feed */
.quiz-chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scroll-behavior: smooth;
}

.quiz-chat-feed::-webkit-scrollbar {
  width: 3px;
}

.quiz-chat-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 2px;
}

/* Chat bubbles */
.chat-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 12px;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.90);
  word-break: break-word;
  animation: bubblePop 0.18s ease-out;
}

@keyframes bubblePop {
  from {
    transform: scale(0.90);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-bubble.alex {
  background: rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}

.chat-bubble.player {
  background: rgba(237, 50, 55, 0.22);
  border-bottom-right-radius: 3px;
  align-self: flex-end;
  text-align: right;
}

.chat-bubble.player.correct {
  background: rgba(34, 197, 94, 0.18);
  border: 0.5px solid rgba(34, 197, 94, 0.35);
}

.chat-bubble.player.incorrect {
  background: rgba(239, 68, 68, 0.16);
  border: 0.5px solid rgba(239, 68, 68, 0.30);
}

/* Answer options */
.quiz-options {
  padding: 10px 14px 14px;
  display: none;
  flex-direction: column;
  gap: 7px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.quiz-options.visible {
  display: flex;
}

.quiz-opt-btn {
  width: 100%;
  text-align: left;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.80);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: rgba(237, 50, 55, 0.14);
  border-color: rgba(237, 50, 55, 0.45);
  color: #ffffff;
}

.quiz-opt-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.quiz-opt-btn.correct {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}

.quiz-opt-btn.incorrect {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.40);
  color: #f87171;
}


/* ═══════════════════════════════════════════════
   S10 — THE ENDING (infographic, dark theme)
   ═══════════════════════════════════════════════ */
.s10-overlay {
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.s10-panel {
  width: 100%;
  max-width: 400px;
  max-height: calc(var(--frame-height) - 48px);
  overflow-y: auto;
  background: #0e0e0e;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  padding: 28px 26px 24px;
  clip-path: 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);
}

.s10-panel::-webkit-scrollbar {
  width: 3px;
}

.s10-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 2px;
}

.s10-logo {
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 16px;
}

/* Elements injected by scene-manager.js _showEnding() */
.s10-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 4px;
}

.s10-headline {
  font-family: 'RBNO', 'Arial Black', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 42px);
  line-height: 1.0;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 10px;
}

.s10-score {
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}

.s10-score strong {
  font-family: 'RBNO', sans-serif;
  font-weight: 800;
  color: var(--accent);
}

.s10-need {
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.40);
}

.s10-divider {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

.s10-recap-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  margin-bottom: 8px;
}

.s10-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s10-fact {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}

.s10-bullet {
  color: var(--accent);
  font-size: 9px;
  flex-shrink: 0;
  margin-top: 4px;
}

.s10-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* btn-secondary dark variant — used inside .s10-panel */
.s10-panel .btn-secondary {
  color: rgba(255, 255, 255, 0.70);
  border-color: rgba(255, 255, 255, 0.18);
}

.s10-panel .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}


/* ═══════════════════════════════════════════════
   PAUSE MENU
   ═══════════════════════════════════════════════ */
#pause-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
}

#pause-menu.active {
  display: flex;
}

.pause-panel {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 220px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.98);
}

.pause-title {
  font-size: 20px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
}

.pause-item {
  width: 100%;
  text-align: left;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.15s;
}

.pause-item:hover {
  background: rgba(10, 10, 10, 0.06);
}

.pause-item.danger {
  color: #dc2626;
}

.pause-item.danger:hover {
  background: rgba(220, 38, 38, 0.07);
}

/* Admin link — subtle, looks like the others */
a.pause-item {
  display: block;
  text-decoration: none;
}

.pause-admin {
  color: rgba(10, 10, 10, 0.38);
  font-size: 10px;
}

.pause-admin:hover {
  background: rgba(10, 10, 10, 0.04);
  color: rgba(10, 10, 10, 0.60);
}

.pause-divider {
  height: 0.5px;
  background: rgba(10, 10, 10, 0.09);
  margin: 5px 0;
}


/* ═══════════════════════════════════════════════
   PROGRESS PANEL
   ═══════════════════════════════════════════════ */
#progress-panel {
  position: fixed;
  inset: 0;
  z-index: 101;
  background: rgba(255, 255, 255, 0.99);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#progress-panel.active {
  display: flex;
}

.prog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 0.5px solid rgba(10, 10, 10, 0.09);
  flex-shrink: 0;
}

.prog-title {
  font-size: 19px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}

.prog-close {
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(10, 10, 10, 0.50);
  padding: 6px 10px;
  border-radius: 3px;
  transition: background 0.15s;
}

.prog-close:hover {
  background: rgba(10, 10, 10, 0.06);
}

.prog-table-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'RBNO', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: var(--text);
}

thead th {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.38);
  text-align: left;
  padding: 0 8px 10px;
  border-bottom: 0.5px solid rgba(10, 10, 10, 0.09);
  font-weight: 300;
}

tbody td {
  padding: 10px 8px;
  border-bottom: 0.5px solid rgba(10, 10, 10, 0.06);
  vertical-align: middle;
}

tbody td.status {
  color: var(--accent);
  font-size: 11px;
}

.prog-footer {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 0.5px solid rgba(10, 10, 10, 0.09);
}

.prog-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prog-stat-label {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.38);
}

.prog-stat-val {
  font-size: 22px;
  font-family: 'RBNO', sans-serif;
  font-weight: 800;
  color: var(--text);
}


/* ═══════════════════════════════════════════════
   ERROR FLASH
   ═══════════════════════════════════════════════ */
#error-flash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
      transparent 40%,
      rgba(237, 50, 55, 0.55) 100%);
  opacity: 0;
}

@keyframes flash-red {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

#error-flash.is-flashing {
  animation: flash-red 0.7s ease-out forwards;
}

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

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

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

  .s7-layout {
    flex-direction: column;
    padding: 16px;
  }

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

  .quiz-chat-panel {
    max-height: calc(var(--frame-height) - 12px);
  }
}

@media (max-height: 500px) {
  .quiz-chat-panel {
    max-height: calc(var(--frame-height) - 8px);
  }

  .s10-panel {
    max-height: calc(var(--frame-height) - 24px);
  }
}

/* ============================================================
   v4 — NEW MECHANIC STYLES
   ============================================================ */

/* ── S4: Drag-lasso nodes ── */
.s4-lasso-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  cursor: crosshair;
  user-select: none;
}

.s4-nodes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.s4-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.s4-node.fail-flash {
  border-color: rgba(220, 50, 50, 0.8);
  background: rgba(220, 50, 50, 0.12);
  box-shadow: 0 0 10px rgba(220, 50, 50, 0.3);
}

.s4-node.active {
  border-color: var(--accent, #ff6200);
  background: rgba(255, 98, 0, 0.1);
}

.s4-node.lit {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.s4-node-icon {
  font-size: 0.85rem;
  color: var(--accent, #ff6200);
  opacity: 0.35;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.s4-node.active .s4-node-icon,
.s4-node.lit .s4-node-icon {
  opacity: 1;
}

.s4-node-name {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
}

.s4-node-micro {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.s4-node.active .s4-node-micro,
.s4-node.lit .s4-node-micro {
  opacity: 1;
  color: rgba(255, 255, 255, 0.65);
}

.s4-hint {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

@keyframes hintPulse {
  0% {
    color: rgba(255, 255, 255, 0.45);
  }

  50% {
    color: rgba(255, 98, 0, 0.9);
  }

  100% {
    color: rgba(255, 255, 255, 0.45);
  }
}

.s4-hint.hint-pulse {
  animation: hintPulse 0.6s ease;
}

.s4-win-line {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  color: #fff;
  margin-top: 8px;
}

/* S4 nodes in glass-panel (light context) */
.s4-lasso-panel .s4-node {
  border-color: rgba(10, 10, 10, 0.14);
  color: var(--text);
}

.s4-lasso-panel .s4-node-name {
  color: var(--text);
}

.s4-lasso-panel .s4-node-micro {
  color: rgba(10, 10, 10, 0.38);
}

.s4-lasso-panel .s4-node:hover:not(.active):not(.lit):not(.fail-flash) {
  border-color: rgba(10, 10, 10, 0.28);
  background: rgba(10, 10, 10, 0.04);
}

.s4-lasso-panel .s4-node.active .s4-node-micro,
.s4-lasso-panel .s4-node.lit .s4-node-micro {
  color: rgba(10, 10, 10, 0.65);
}

.s4-lasso-panel .s4-hint {
  color: rgba(10, 10, 10, 0.45);
}

/* ── S6: Framework reveal ── */
.s6-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  z-index: 10;
  text-align: center;
  gap: 14px;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.s6-reveal.hidden {
  opacity: 0;
  pointer-events: none;
}

.s6-reveal-chain {
  font-size: clamp(0.9rem, 1.4vw, 1.3rem);
  letter-spacing: 0.14em;
  color: var(--accent, #ff6200);
}

.s6-reveal-outcomes {
  font-size: clamp(0.7rem, 1vw, 0.9rem);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
}

.s6-feedback {
  opacity: 0;
  transition: opacity 0.4s ease;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* ── S7: The Duel ── */
.s7-duel-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px 60px;
  gap: 28px;
  text-align: center;
}

.s7-duel-intro {
  margin-bottom: 4px;
}

.s7-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.s7-competitors {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.s7-comp-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 110px;
  transition: opacity 0.5s ease;
}

.s7-comp-col.dimmed {
  opacity: 0.2;
}

.s7-comp-label {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  transition: color 0.5s ease;
}

.s7-omen-col .s7-comp-label {
  color: rgba(255, 255, 255, 0.9);
}

.s7-bar-track {
  width: 56px;
  height: 140px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.s7-bar-fill {
  width: 100%;
  height: 0%;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 3px 3px 0 0;
  transition: height 0.65s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.s7-omen-col .s7-bar-fill {
  background: var(--accent, #ff6200);
}

.s7-omen-col.maxed .s7-bar-fill {
  background: var(--accent, #ff6200);
  box-shadow: 0 0 18px rgba(255, 98, 0, 0.55);
}

.s7-switches {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.s7-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s, color 0.2s, opacity 0.3s;
}

.s7-switch-orb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.s7-switch:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.s7-switch:hover:not(:disabled) .s7-switch-orb {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
}

.s7-switch:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.s7-switch.triggered {
  border-color: rgba(255, 122, 0, 0.35);
  background: rgba(255, 122, 0, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.s7-switch.triggered .s7-switch-orb {
  background: #ff7a00;
  border-color: #ffaa40;
  box-shadow: 0 0 7px 2px rgba(255, 122, 0, 0.65), 0 0 16px 5px rgba(255, 100, 0, 0.22);
}

.s7-note {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  transition: opacity 0.3s ease;
}

.s7-win-copy {
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  line-height: 1.6;
}

.s7-win-copy p {
  margin: 2px 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

.s7-win-highlight {
  font-size: 1.05rem !important;
  color: #fff !important;
  letter-spacing: 0.09em;
}

/* ── S8: Copy overlay ── */
.s8-copy-block {
  position: absolute;
  left: 5%;
  top: 20%;
  transform: translateY(-50%);
  max-width: 460px;
}

.s8-line {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.s8-line-lg {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing: 0.07em;
  margin-bottom: 2px;
}

/* overlay-S8 is display-only — must never block the notification click */
#overlay-S8,
#overlay-S8.visible {
  pointer-events: none;
}

/* Dark gradient behind left copy — S8 */
#overlay-S8::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.22) 42%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

#overlay-S8 .s8-copy-block {
  position: absolute;
  z-index: 1;
}

#overlay-S8 .reg-sub,
#overlay-S8 .s8-line,
#overlay-S8 .s8-line-lg,
#overlay-S8 .s2-cta {
  color: rgba(255, 255, 255, 0.90);
}

/* ── S4: full-screen win state overlay ── */
.s4-win-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: background 0.55s ease, opacity 0.45s ease;
  padding: 0 10%;
}

.s4-win-overlay.show {
  background: rgba(0, 0, 0, 0.78);
  opacity: 1;
}

.s4-win-overlay.fade-out {
  opacity: 0;
}

.s4-win-title {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin: 0;
  color: #fff;
}

.s4-win-sub {
  font-size: clamp(0.85rem, 1.3vw, 1.1rem);
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* ── S7: Duel — glass panel, wide, gray-on-white palette ── */
.s7-duel-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 20px;
  position: relative;
  z-index: 1;
}

/* Wide glass panel for S7 */
#overlay-S7 .glass-panel {
  flex: 0 0 450px;
  max-width: 450px;
}

/* Dark gradient behind left copy — S7 (same as S4) */
#overlay-S7::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.22) 42%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

#overlay-S7 .split-copy {
  position: relative;
  z-index: 1;
}

/* S4 wider panel */
#overlay-S4 .glass-panel {
  flex: 0 0 300px;
  max-width: 400px;
}

/* Dark gradient behind left copy — S2 */
#overlay-S2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.22) 42%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

#overlay-S2 .s2-copy-block {
  position: absolute;
  z-index: 1;
}

/* Dark gradient behind left copy — S4 */
#overlay-S4::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.22) 42%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

#overlay-S4 .split-copy {
  position: relative;
  z-index: 1;
}

/* Bar track sizing */
.s7-duel-panel .s7-bar-track {
  height: 110px;
  width: 52px;
}

.s7-duel-panel .s7-competitors {
  gap: 32px;
}

.s7-duel-panel .s7-comp-col {
  width: 96px;
}

.s7-duel-panel .s7-comp-label {
  color: rgba(10, 10, 10, 0.50);
  height: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 6px;
}

.s7-duel-panel .s7-omen-col .s7-comp-label {
  color: rgba(10, 10, 10, 0.80);
  font-weight: 700;
}

.s7-duel-panel .s7-bar-track {
  background: rgba(10, 10, 10, 0.06);
  border-color: rgba(10, 10, 10, 0.10);
}

.s7-duel-panel .s7-bar-fill {
  background: rgba(10, 10, 10, 0.18);
}

.s7-duel-panel .s7-switches {
  gap: 8px;
  flex-direction: column;
  width: 100%;
}

.s7-duel-panel .s7-switch {
  justify-content: flex-start;
  color: rgba(10, 10, 10, 0.45);
  border-color: rgba(10, 10, 10, 0.14);
  background: transparent;
}

.s7-duel-panel .s7-switch-orb {
  background: rgba(10, 10, 10, 0.08);
  border-color: rgba(10, 10, 10, 0.18);
}

.s7-duel-panel .s7-switch:hover:not(:disabled) {
  border-color: rgba(10, 10, 10, 0.32);
  background: rgba(10, 10, 10, 0.04);
  color: rgba(10, 10, 10, 0.72);
}

.s7-duel-panel .s7-switch:hover:not(:disabled) .s7-switch-orb {
  background: rgba(10, 10, 10, 0.14);
  border-color: rgba(10, 10, 10, 0.30);
}

.s7-duel-panel .s7-switch.triggered {
  color: rgba(10, 10, 10, 0.72);
  border-color: rgba(255, 122, 0, 0.30);
  background: rgba(255, 122, 0, 0.05);
}

.s7-duel-panel .s7-note {
  color: rgba(10, 10, 10, 0.38);
}

/* OMEN AI bar — orange */
.s7-omen-col .s7-bar-fill {
  background: #ff7a00;
}

.s7-omen-col.maxed .s7-bar-fill {
  background: #ff7a00;
  box-shadow: 0 0 20px rgba(255, 122, 0, 0.6);
}

/* Subtle orange tint on OMEN track from the start */
.s7-duel-panel .s7-omen-col .s7-bar-track {
  background: rgba(255, 122, 0, 0.08);
  border-color: rgba(255, 122, 0, 0.3);
}

/* Win copy inside split-copy */
.s7-win-copy .s7-win-highlight {
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.08em;
  margin-top: 4px;
}