:root {
  --bg-obsidian: #050811;
  --bg-panel: rgba(11, 18, 34, 0.78);
  --bg-panel-strong: rgba(14, 23, 44, 0.92);
  --border-hud: rgba(0, 229, 255, 0.25);
  --border-crimson: rgba(225, 29, 72, 0.45);
  --crimson: #e11d48;
  --crimson-bright: #fb7185;
  --cyan: #00e5ff;
  --blue-school: #38bdf8;
  --gold: #f59e0b;
  --orange-emerg: #ff6b00;
  --yellow-warn: #facc15;
  --purple-psych: #a855f7;
  --emerald: #10b981;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --font-display: 'Kanit', 'Prompt', 'Noto Sans Thai', 'Segoe UI', sans-serif;
  --font-body: 'Prompt', 'Sarabun', 'Noto Sans Thai', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-obsidian);
  color: var(--text-main);
  font-family: var(--font-body);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* Cinema Root & Canvas Backdrop */
.cinema-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #0d162c 0%, #050811 75%);
}

#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.scanline-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.45;
}

.vignette-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 58%, rgba(2, 4, 10, 0.78) 100%);
}

/* 1920x1080 Scaled Virtual Stage */
.stage-wrapper {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-scaler {
  position: relative;
  width: 1920px;
  height: 1080px;
  flex-shrink: 0;
  transform-origin: center center;
  overflow: hidden;
}

/* Top Persistent HUD Header */
.hud-header {
  position: absolute;
  top: 24px;
  left: 44px;
  right: 44px;
  height: 70px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: rgba(8, 13, 27, 0.74);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-emblem-mini {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-brand-text {
  display: flex;
  flex-direction: column;
}

.hud-brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #fff;
}

.hud-brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.accent-cyan { color: var(--cyan); }
.accent-crimson { color: var(--crimson-bright); }
.accent-gold { color: var(--gold); }
.accent-emerald { color: var(--emerald); }
.accent-purple { color: var(--purple-psych); }
.accent-orange { color: var(--orange-emerg); }
.accent-blue { color: var(--blue-school); }

.hud-center-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hud-chapter-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.55);
  color: #fda4af;
}

.hud-scene-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.hud-right-telemetry {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hud-scene-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hud-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hud-dot.done {
  background: rgba(0, 229, 255, 0.55);
}

.hud-dot.active {
  width: 28px;
  background: linear-gradient(90deg, var(--crimson), var(--cyan));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.65);
}

.hud-timecode-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(5, 10, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 10px var(--crimson);
  animation: pulseDot 1.4s infinite ease-in-out;
}

.hud-timecode {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--cyan);
}

/* Main Scene Stage Area (1832x848px) */
.scene-stage {
  position: absolute;
  top: 112px;
  left: 44px;
  right: 44px;
  bottom: 120px;
  z-index: 10;
  overflow: hidden;
}

/* Scene Transition Sweep */
.scene-transition {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.18), rgba(5, 8, 17, 0.9));
  transition: opacity 0.28s ease;
}

.scene-transition.active {
  opacity: 1;
}

.transition-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 240px;
  left: -260px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.45), rgba(225, 29, 72, 0.35), transparent);
  transform: skewX(-18deg);
}

.scene-transition.active .transition-beam {
  animation: beamSweep 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Subtitle Bar */
.subtitle-bar {
  position: absolute;
  left: 150px;
  right: 150px;
  bottom: 24px;
  z-index: 22;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.subtitle-bar.off {
  opacity: 0;
  transform: translateY(14px);
}

.subtitle-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1500px;
  padding: 13px 26px;
  border-radius: 16px;
  background: rgba(5, 9, 20, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
}

.subtitle-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.38);
  white-space: nowrap;
}

.subtitle-text {
  font-family: var(--font-body);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.4;
  color: #f8fafc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Glass Panel & Tactical Corner Brackets */
.glass-panel {
  position: relative;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-panel.glow-cyan {
  border-color: rgba(0, 229, 255, 0.42);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.12), inset 0 1px 0 rgba(0, 229, 255, 0.18);
}

.glass-panel.glow-crimson {
  border-color: rgba(225, 29, 72, 0.48);
  box-shadow: 0 0 32px rgba(225, 29, 72, 0.14), inset 0 1px 0 rgba(225, 29, 72, 0.2);
}

.glass-panel.glow-gold {
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.14), inset 0 1px 0 rgba(245, 158, 11, 0.2);
}

.glass-panel.glow-emerald {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.12);
}

.glass-panel.glow-purple {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.16);
}

.glass-panel.glow-blue {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.16);
}

.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--cyan);
  border-style: solid;
  pointer-events: none;
}
.corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 6px; }
.corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-top-right-radius: 6px; }
.corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-bottom-left-radius: 6px; }
.corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 6px; }

/* HUD Badges */
.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-crimson { background: rgba(225, 29, 72, 0.18); border: 1px solid rgba(225, 29, 72, 0.55); color: #fda4af; }
.badge-cyan { background: rgba(0, 229, 255, 0.14); border: 1px solid rgba(0, 229, 255, 0.5); color: #67e8f9; }
.badge-gold { background: rgba(245, 158, 11, 0.16); border: 1px solid rgba(245, 158, 11, 0.55); color: #fcd34d; }
.badge-emerald { background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.55); color: #6ee7b7; }
.badge-purple { background: rgba(168, 85, 247, 0.18); border: 1px solid rgba(168, 85, 247, 0.55); color: #d8b4fe; }
.badge-orange { background: rgba(255, 107, 0, 0.2); border: 1px solid rgba(255, 107, 0, 0.65); color: #fdba74; }
.badge-yellow { background: rgba(250, 204, 21, 0.18); border: 1px solid rgba(250, 204, 21, 0.6); color: #fef08a; }
.badge-blue { background: rgba(56, 189, 248, 0.18); border: 1px solid rgba(56, 189, 248, 0.55); color: #7dd3fc; }

/* Deterministic Reveal Motion System */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  filter: blur(4px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease;
}

.reveal.from-left { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.from-scale { transform: scale(0.86); }

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* Start & End Overlays */
.start-overlay, .end-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(12, 20, 42, 0.86), rgba(3, 6, 14, 0.96));
  backdrop-filter: blur(18px);
}

.start-card, .end-card {
  width: min(900px, 95vw);
  padding: 38px 44px;
  text-align: center;
  border-color: rgba(0, 229, 255, 0.35);
}

.start-emblems {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 18px;
}

.start-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.start-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.start-title span {
  background: linear-gradient(90deg, #fb7185, #00e5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.start-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.start-audio-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  cursor: pointer;
  font-size: 14px;
  color: #e2e8f0;
}

.toggle-chip input { display: none; }

.toggle-indicator {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #334155;
  position: relative;
  transition: background 0.2s ease;
}

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

.toggle-chip input:checked + .toggle-indicator { background: var(--cyan); }
.toggle-chip input:checked + .toggle-indicator::after { transform: translateX(16px); }

.voice-warning {
  font-size: 13px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 8px 14px;
  margin: 0 auto 14px;
  max-width: 680px;
}

.start-actions, .end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  margin-bottom: 18px;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e11d48 0%, #0284c7 100%);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.35), 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 38px rgba(0, 229, 255, 0.55), 0 12px 26px rgba(0, 0, 0, 0.55);
}

.btn-secondary-hud {
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(15, 23, 42, 0.78);
  color: #67e8f9;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-secondary-hud:hover { background: rgba(0, 229, 255, 0.14); }

.start-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.start-shortcuts kbd {
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  margin-right: 4px;
}

.end-title { font-family: var(--font-display); font-size: 40px; margin: 18px 0 8px; }
.end-sub { font-size: 18px; color: #cbd5e1; margin-bottom: 24px; }

/* Floating Cinema Control Dock */
.control-dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(1040px, 94vw);
  z-index: 45;
  padding: 10px 18px 12px;
  border-radius: 18px;
  background: rgba(7, 11, 24, 0.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cinema-root.dock-idle .control-dock {
  opacity: 0.18;
  transform: translateX(-50%) translateY(6px);
}

.control-dock:hover,
.cinema-root.paused .control-dock {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

.dock-timeline-wrap { margin-bottom: 9px; }

.timeline-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  cursor: pointer;
  overflow: visible;
}

.timeline-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--crimson), var(--cyan));
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.65);
  pointer-events: none;
}

.timeline-chapters { position: absolute; inset: 0; pointer-events: none; }
.chapter-tick { position: absolute; top: -2px; width: 2px; height: 14px; background: rgba(255, 255, 255, 0.45); }

.timeline-tooltip {
  position: absolute;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: #f8fafc;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.dock-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dock-left, .dock-right { display: flex; align-items: center; gap: 8px; }

.dock-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dock-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.dock-btn-play {
  width: 40px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.85), rgba(2, 132, 199, 0.85));
  border-color: rgba(0, 229, 255, 0.45);
  color: #fff;
}

.dock-scene-label {
  font-size: 13px;
  color: #cbd5e1;
  margin-left: 6px;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-pill {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dock-pill.active {
  color: #67e8f9;
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.14);
}

/* Presenter Script Drawer */
.script-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 96px;
  width: min(440px, 92vw);
  z-index: 55;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 18px;
  background: rgba(7, 12, 26, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: -12px 10px 40px rgba(0, 0, 0, 0.75);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  margin-bottom: 12px;
}

.drawer-header h3 { font-family: var(--font-display); font-size: 20px; margin-top: 6px; }

.script-presenter-note {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.script-drawer-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.script-cue-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}

.script-cue-item.active { border-color: var(--cyan); background: rgba(0, 229, 255, 0.12); }
.script-cue-time { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); margin-bottom: 4px; }
.script-cue-text { font-size: 14px; line-height: 1.55; color: #f1f5f9; }

/* Toast Banner */
.toast-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: #f8fafc;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ================================================================
   SHARED SCENE TYPOGRAPHY & MOTION GRAPHIC PRIMITIVES (1920x1080)
   ================================================================ */
.scene-root {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 4px;
}

.scene-hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
}

.scene-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.scene-h2 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.14;
  color: #ffffff;
}

.scene-sub {
  font-size: 19px;
  color: #cbd5e1;
  margin-top: 3px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.card-pad { padding: 20px 22px; }
.card-pad-sm { padding: 14px 18px; }

.stat-number { font-family: var(--font-mono); font-weight: 700; line-height: 1.05; }

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--cyan);
}

.icon-box.crimson { background: rgba(225, 29, 72, 0.16); border-color: rgba(225, 29, 72, 0.45); color: #fb7185; }
.icon-box.gold { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.45); color: #fcd34d; }
.icon-box.emerald { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.icon-box.purple { background: rgba(168, 85, 247, 0.16); border-color: rgba(168, 85, 247, 0.45); color: #d8b4fe; }
.icon-box.blue { background: rgba(56, 189, 248, 0.16); border-color: rgba(56, 189, 248, 0.45); color: #7dd3fc; }
.icon-box.orange { background: rgba(255, 107, 0, 0.18); border-color: rgba(255, 107, 0, 0.55); color: #fdba74; }

.flow-line { stroke-dasharray: 10 8; animation: flowDash 1.3s linear infinite; }
.flow-line-slow { stroke-dasharray: 14 10; animation: flowDash 2.4s linear infinite; }

/* ================================================================
   NEW MOTION GRAPHIC SCENE COMPONENTS
   ================================================================ */

/* Scene 1: Orbital Network Core */
.s1-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  flex: 1;
  align-items: center;
}

.s1-orbital-stage {
  position: relative;
  height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s1-orbit-ring {
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 229, 255, 0.35);
  animation: spinSlow 28s linear infinite;
}

.s1-orbit-ring.inner {
  width: 390px;
  height: 390px;
  border-color: rgba(225, 29, 72, 0.45);
  animation-direction: reverse;
  animation-duration: 18s;
}

.s1-core-node {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 26px;
}

.s1-sat-node {
  position: absolute;
  z-index: 5;
  width: 196px;
  padding: 10px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 18, 36, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.38);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}

/* Scene 2: Database & 6 Partners Firewall */
.s2-layout {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 16px;
  flex: 1;
  align-items: stretch;
}

.s2-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 10px;
}

.s2-partner-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(0, 229, 255, 0.24);
}

/* Scene 3: How It Works 4-Step Loop + 7 Highlights */
.s3-loop-board {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 310px 1fr;
  gap: 18px;
  align-items: center;
  flex: 1;
}

.s3-highlights-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.s3-hi-pill {
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(11, 18, 34, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Scene 4: Joint Visits & OAS Meter */
.s4-flow {
  display: grid;
  grid-template-columns: 0.96fr 1.12fr 0.92fr;
  gap: 20px;
  flex: 1;
}

.oas-meter-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.oas-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 7px;
}

.oas-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.status-chip { padding: 11px 8px; border-radius: 12px; text-align: center; font-weight: 700; font-size: 16px; }

/* Scene 5: Guardian Mobile App Simulation */
.s5-guardian-stage {
  display: grid;
  grid-template-columns: 410px 180px 1fr;
  gap: 18px;
  align-items: center;
  flex: 1;
}

.phone-frame {
  position: relative;
  width: 390px;
  height: 675px;
  border-radius: 38px;
  padding: 16px;
  background: linear-gradient(160deg, #1e293b, #090e1c);
  border: 3px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 42px rgba(16, 185, 129, 0.2), 0 24px 50px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 130px;
  height: 20px;
  border-radius: 999px;
  background: #020617;
  margin: 0 auto 12px;
}

.phone-screen {
  flex: 1;
  border-radius: 24px;
  background: #060b16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 15.5px;
  transition: all 0.35s ease;
}

.check-row.checked {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.14);
}

.check-row.risk {
  border-color: rgba(225, 29, 72, 0.75);
  background: rgba(225, 29, 72, 0.18);
}

.phone-send-btn {
  margin-top: auto;
  padding: 13px;
  border-radius: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.phone-send-btn.fired {
  background: linear-gradient(135deg, #e11d48, #10b981);
  color: #fff;
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.55);
}

/* Scene 6: QR Laser + AI Constellation */
.s6-tips-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.15fr 0.95fr;
  gap: 20px;
  flex: 1;
}

.qr-scanner-box {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 8px auto;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(0, 229, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-laser-beam {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  background: #00e5ff;
  box-shadow: 0 0 14px #00e5ff, 0 0 26px #00e5ff;
  animation: laserSweep 2.2s ease-in-out infinite;
}

.status-rail-pill {
  padding: 10px 12px;
  border-radius: 12px;
  text-align: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.4s ease;
}

.status-rail-pill.lit {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25);
}

/* Scene 7: Sandbox Donut Ring */
.s7-sandbox-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  flex: 1;
}

.donut-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scene 8: Dual-Layer Radar & Purple Flow */
.s8-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  flex: 1;
}

.radar-screen {
  position: relative;
  height: 330px;
  border-radius: 16px;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.14), rgba(5, 8, 17, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.4);
  overflow: hidden;
}

/* Scene 9: VHV Bridge, SOS Hold & Speed Race */
.s9-bridge-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.bridge-row {
  display: grid;
  grid-template-columns: 1fr 150px 1fr 150px 1fr;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
}

.bridge-arrow-svg { width: 100%; height: 42px; }

.sos-hold-demo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.45);
}

.hold-ring-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle, #ef4444, #991b1b);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.5);
}

.race-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 6px;
}

.race-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scene 10: Region 4 Map & Finale */
.s10-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 22px;
  flex: 1;
}

.s10-map-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 22px;
}

.s10-map-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
}

.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar-track { width: 100%; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-fill { height: 100%; width: 0%; border-radius: 999px; transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1); }

/* Province Map Highlighting */
.prov-shape { fill: rgba(127, 29, 29, 0.55); stroke: rgba(255, 255, 255, 0.48); stroke-width: 1.6; transition: all 0.5s ease; }
.prov-shape.lit { fill: rgba(190, 18, 60, 0.85); stroke: #fda4af; }
.prov-shape.db6.lit { fill: rgba(14, 116, 144, 0.88); stroke: #00e5ff; filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.65)); }
.prov-label { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: #f8fafc; text-anchor: middle; pointer-events: none; }

/* Animations */
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

@keyframes beamSweep {
  0% { left: -260px; }
  100% { left: 2100px; }
}

@keyframes flowDash {
  to { stroke-dashoffset: -36; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes laserSweep {
  0%, 100% { top: 14px; }
  50% { top: 152px; }
}

.float-slow { animation: floatSlow 4.2s ease-in-out infinite; }
