@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('../assets/fonts/BeVietnamPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('../assets/fonts/BeVietnamPro-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('../assets/fonts/BeVietnamPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro ExtraBold';
  src: url('../assets/fonts/BeVietnamPro-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/PlayfairDisplay.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/PlayfairDisplay-Italic.ttf') format('truetype');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --crimson-deep: #4A0409;
  --crimson-dark: #5E060C;
  --crimson-mid: #8B0A12;
  --crimson-bright: #C8102E;
  --gold-light: #FFD34E;
  --gold-mid: #E0A000;
  --gold-dark: #8A5A00;
  --ivory: #FFF6E0;
  --emerald-bg: #115E34;
  --wrong-bg: #7A0B18;
  --wrong-border: #FF6B6B;
  --font-head: 'Be Vietnam Pro ExtraBold', 'Be Vietnam Pro', system-ui, sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-sub: 'Playfair Display', Georgia, serif;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #220205;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

/* Global Stage Backdrop & Vignette */
.reveal {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(200, 16, 46, 0.28) 0%, rgba(139, 10, 18, 0.40) 50%, rgba(35, 2, 5, 0.92) 100%),
    linear-gradient(135deg, #6E070F 0%, #8B0A12 45%, #B80F28 100%);
  font-family: var(--font-body);
  color: var(--ivory);
}

.stage-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url('../assets/img/bg_crimson_silk.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  mix-blend-mode: soft-light;
}

.stage-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle at 50% 48%, transparent 56%, rgba(8, 12, 26, 0.42) 100%);
}

#gold-embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.reveal .slides {
  z-index: 5;
}

.reveal .slides section {
  width: 1280px !important;
  height: 720px !important;
  padding: 0 !important;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
}

/* Persistent 0.3" Gold Frame Border + Corner Diamonds on every slide */
.slide-frame {
  position: absolute;
  inset: 28px;
  border: 1.5px solid rgba(224, 160, 0, 0.72);
  box-shadow: inset 0 0 24px rgba(255, 211, 78, 0.08);
  pointer-events: none;
  z-index: 1;
}
.slide-frame::before,
.slide-frame::after {
  content: '';
  position: absolute;
  inset: 0;
}
.corner-diamond {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--gold-light);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 211, 78, 0.65);
  z-index: 2;
  pointer-events: none;
}
.cd-tl { top: 23px; left: 23px; }
.cd-tr { top: 23px; right: 23px; }
.cd-bl { bottom: 23px; left: 23px; }
.cd-br { bottom: 23px; right: 23px; }

/* 10% Golden Emblem Watermark */
.crest-watermark {
  position: absolute;
  right: 80px;
  top: 50%;
  width: 440px;
  height: 440px;
  transform: translateY(-50%);
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

/* Auto-Animate Persistent Scene Morph Actors */
.morph-star {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.14;
  filter: drop-shadow(0 0 12px rgba(255, 211, 78, 0.35));
}
.morph-ribbon {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.16;
  background: linear-gradient(90deg, transparent, rgba(255, 211, 78, 0.85), transparent);
  border-radius: 999px;
}

/* Header & Metallic Gold Typography */
.eyebrow {
  position: absolute;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  z-index: 10;
}
.eyebrow .star-glyph {
  color: var(--gold-light);
  filter: drop-shadow(0 0 6px rgba(255, 211, 78, 0.7));
}

.epic-title {
  position: absolute;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.13;
  letter-spacing: 0.4px;
  background: linear-gradient(180deg, #FFE885 0%, #FFD34E 38%, #E0A000 72%, #B57900 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 5px rgba(25, 0, 2, 0.85)) drop-shadow(0 0 12px rgba(255, 211, 78, 0.42));
  z-index: 10;
}

.gold-divider {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, #FFD34E 0%, #E0A000 75%, #FFD34E 100%);
  box-shadow: 0 0 10px rgba(255, 211, 78, 0.65);
  z-index: 10;
}
.gold-divider::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -5px;
  width: 14px;
  height: 14px;
  background: var(--gold-light);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(255, 211, 78, 0.85);
}

/* Footer */
.slide-footer {
  position: absolute;
  right: 54px;
  bottom: 38px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 1px;
  z-index: 12;
  border-top: 1px solid rgba(224, 160, 0, 0.45);
  padding-top: 5px;
  min-width: 108px;
  text-align: right;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Glass Snipped-Corner Content Cards */
.glass-card {
  position: absolute;
  background: rgba(94, 6, 12, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  border: 1.5px solid rgba(224, 160, 0, 0.85);
  box-shadow: 0 10px 26px rgba(15, 0, 2, 0.55), inset 0 0 18px rgba(255, 211, 78, 0.08);
  padding: 14px 20px 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Outer gold edge SVG overlay helper via pseudo-corners */
.glass-card::before {
  content: '★';
  position: absolute;
  top: 5px;
  left: 11px;
  font-size: 11px;
  color: var(--gold-light);
  text-shadow: 0 0 6px rgba(255, 211, 78, 0.75);
}

.card-badge {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #780912 0%, #3E0307 100%);
  border: 2px solid var(--gold-light);
  box-shadow: 0 0 12px rgba(255, 211, 78, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-light);
}

.card-badge-sq {
  flex: 0 0 84px;
  height: 70px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  background: linear-gradient(145deg, #6E0811, #3D0307);
  border: 2px solid var(--gold-light);
  box-shadow: 0 0 14px rgba(255, 211, 78, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-light);
}

.card-content {
  flex: 1;
  min-width: 0;
}
.card-head {
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.24;
  margin-bottom: 4px;
}
.card-head.italic {
  font-family: var(--font-sub);
  font-style: italic;
  font-size: 22px;
}
.card-body {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 400;
  color: var(--ivory);
  line-height: 1.32;
}

/* Framed Documentary & Hero Photos (Snipped & Hexagon) */
.photo-wrap {
  position: absolute;
  z-index: 10;
  filter: drop-shadow(0 12px 24px rgba(10, 0, 2, 0.7)) drop-shadow(0 0 10px rgba(255, 211, 78, 0.35));
}
.photo-gold-rim {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 3px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #FFE999 0%, #E0A000 50%, #9E6800 100%);
  overflow: hidden;
}
.photo-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #3A0307;
  position: relative;
}
.photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.photo-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(158, 11, 22, 0.12);
  pointer-events: none;
}

.shape-snip {
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}
.shape-hex {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* Ken Burns 8s Zoom when slide is active */
.reveal .slides section.present .ken-burns {
  animation: kenBurnsZoom 8.5s ease-out forwards;
}
@keyframes kenBurnsZoom {
  0% { transform: scale(1.07); }
  100% { transform: scale(1.0); }
}

/* Caption Plaque */
.photo-caption {
  position: absolute;
  background: rgba(94, 6, 12, 0.88);
  border: 1.25px solid rgba(224, 160, 0, 0.85);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  padding: 8px 16px;
  font-family: var(--font-sub);
  font-style: italic;
  font-size: 19px;
  color: var(--gold-light);
  text-align: center;
  line-height: 1.26;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 11;
}

/* Tag Pill */
.pill-tag {
  position: absolute;
  background: linear-gradient(135deg, #7B0914, #4D0409);
  border: 1.5px solid var(--gold-light);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  padding: 5px 16px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(255, 211, 78, 0.35);
  z-index: 12;
}

/* Hero Giant Numbers (Slides 5, 14, 15) */
.hero-number {
  position: absolute;
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 0.95;
  background: linear-gradient(180deg, #FFF0A6 0%, #FFD34E 35%, #E0A000 72%, #9A6300 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 5px 10px rgba(20, 0, 2, 0.85)) drop-shadow(0 0 18px rgba(255, 211, 78, 0.55));
  z-index: 10;
}
.reveal .slides section.present .hero-num-pop {
  animation: heroPopIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes heroPopIn {
  0% { transform: scale(1.22); opacity: 0; }
  65% { transform: scale(0.98); opacity: 1; }
  100% { transform: scale(1.0); opacity: 1; }
}

/* Animated Vector Flag (Zero duplicated raster asset!) */
.svg-flag-wrap {
  position: absolute;
  pointer-events: none;
  z-index: 9;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.65));
}
.svg-flag-wave {
  transform-origin: left top;
  animation: flagFlutter 3.6s ease-in-out infinite alternate;
}
@keyframes flagFlutter {
  0% { transform: skewY(-1deg) scaleX(1.0); }
  100% { transform: skewY(1.8deg) scaleX(0.97); }
}

/* Slide 1 Curtains */
.curtain-wing {
  position: absolute;
  top: 0;
  height: 720px;
  width: 240px;
  object-fit: cover;
  z-index: 30;
  pointer-events: none;
  transition: transform 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.curtain-left { left: 0; transform: translateX(65px); }
.curtain-right { right: 0; transform: translateX(-65px); }
section.present.curtain-opened .curtain-left { transform: translateX(-165px); }
section.present.curtain-opened .curtain-right { transform: translateX(165px); }

/* Slide 2 CSS Velvet Side Valances & Parade Blend */
.s02-parade-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0.92;
}
.s02-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(84, 5, 11, 0.92) 0%, rgba(110, 8, 16, 0.68) 48%, rgba(94, 6, 12, 0.15) 100%);
  z-index: 3;
}
.css-valance-l, .css-valance-r {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  z-index: 15;
  background: linear-gradient(90deg, #420206, #8F0A14 55%, #3B0205);
  box-shadow: 0 0 16px rgba(0,0,0,0.7);
}
.css-valance-l { left: 0; }
.css-valance-r { right: 0; }

/* Timeline Slide 7 */
.tl-bar {
  position: absolute;
  left: 115px;
  top: 204px;
  width: 1050px;
  height: 6px;
  background: linear-gradient(90deg, #FFD34E, #E0A000, #FFD34E);
  box-shadow: 0 0 14px rgba(255, 211, 78, 0.8);
  z-index: 10;
}
.tl-node {
  position: absolute;
  top: 193px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 3px solid var(--crimson-deep);
  box-shadow: 0 0 16px rgba(255, 211, 78, 0.95);
  z-index: 11;
}
.reveal .slides section.present .tl-node {
  animation: nodePulse 2.2s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 211, 78, 0.85); transform: scale(1); }
  50% { box-shadow: 0 0 24px rgba(255, 232, 130, 1); transform: scale(1.12); }
}

/* Video Frame Slide 17 - Full Screen Phần 4 */
.cinema-screen-full {
  position: absolute;
  left: 56px;
  top: 78px;
  width: 1168px;
  height: 582px;
  background: #0d0102;
  border: 2.5px solid var(--gold-light);
  outline: 1.5px solid rgba(224, 160, 0, 0.5);
  outline-offset: 4px;
  overflow: hidden;
  z-index: 12;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.8), 0 0 26px rgba(255, 211, 78, 0.28);
}
.cinema-screen-full iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Minigame Slides 18–25: 4 Interactive Options (A/B/C/D) */
.quiz-prog-bg {
  position: absolute;
  left: 76px;
  top: 132px;
  width: 1128px;
  height: 14px;
  border-radius: 999px;
  background: #3D0307;
  border: 1px solid rgba(224, 160, 0, 0.75);
  overflow: hidden;
  z-index: 10;
}
.quiz-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFD34E, #E0A000, #FFE885);
  box-shadow: 0 0 12px rgba(255, 211, 78, 0.8);
}

.quiz-q-card {
  position: absolute;
  left: 76px;
  top: 158px;
  width: 1128px;
  height: 92px;
  background: rgba(94, 6, 12, 0.84);
  border: 2.5px solid var(--gold-light);
  outline: 1.5px solid rgba(224, 160, 0, 0.5);
  outline-offset: 3px;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
  box-sizing: border-box;
  font-size: 24px;
  font-weight: 700;
  color: var(--ivory);
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 10;
}

.quiz-options-wrap {
  position: absolute;
  left: 96px;
  top: 262px;
  width: 1088px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.quiz-opt-btn {
  width: 100%;
  height: 50px;
  background: rgba(94, 6, 12, 0.80);
  border: 1.5px solid rgba(224, 160, 0, 0.85);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  padding: 0 22px 0 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  transition: transform 0.18s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.quiz-opt-btn:hover:not(.is-locked) {
  transform: translateX(6px);
  background: rgba(139, 10, 18, 0.92);
  border-color: var(--gold-light);
  box-shadow: 0 0 18px rgba(255, 211, 78, 0.35);
}

.quiz-opt-letter {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--crimson-deep);
  border: 1.75px solid var(--gold-light);
  color: var(--gold-light);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.quiz-opt-status {
  margin-left: auto;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Wrong Answer State */
.quiz-opt-btn.is-wrong {
  background: linear-gradient(90deg, rgba(135, 10, 24, 0.95), rgba(88, 6, 14, 0.95));
  border-color: #FF6B6B;
  box-shadow: 0 0 16px rgba(255, 77, 77, 0.45);
  animation: shakeWrong 0.42s ease-in-out;
}
.quiz-opt-btn.is-wrong .quiz-opt-letter {
  background: #A80E22;
  border-color: #FF8E8E;
  color: #FFE5E5;
}
.quiz-opt-btn.is-wrong .quiz-opt-status {
  opacity: 1;
  color: #FF9E9E;
}

/* Correct Answer State */
.quiz-opt-btn.is-correct {
  background: linear-gradient(90deg, #115E34, #177844);
  border-color: var(--gold-light);
  box-shadow: 0 0 22px rgba(255, 211, 78, 0.55);
  animation: pulseWin 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.quiz-opt-btn.is-correct .quiz-opt-letter {
  background: var(--gold-light);
  border-color: var(--ivory);
  color: var(--crimson-deep);
}
.quiz-opt-btn.is-correct .quiz-opt-status {
  opacity: 1;
  color: var(--gold-light);
}

@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  45% { transform: translateX(8px); }
  70% { transform: translateX(-5px); }
  88% { transform: translateX(3px); }
}

@keyframes pulseWin {
  0% { transform: scale(1); }
  45% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Quiz Bottom Feedback Banner (Hidden initially; transitions Wrong vs Correct) */
.quiz-feedback-box {
  position: absolute;
  left: 76px;
  top: 506px;
  width: 1128px;
  min-height: 126px;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  padding: 14px 26px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 25;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.quiz-feedback-box.show-wrong {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto;
  background: rgba(118, 8, 22, 0.96);
  border: 2px solid #FF7575;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 18px rgba(255, 90, 90, 0.32);
}
.quiz-feedback-box.show-correct {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto;
  background: rgba(17, 94, 52, 0.96);
  border: 2px solid var(--gold-light);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 22px rgba(255, 211, 78, 0.35);
}

.quiz-fb-head {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 5px;
}
.quiz-feedback-box.show-wrong .quiz-fb-head {
  color: #FFD1D1;
}
.quiz-fb-body {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ivory);
  line-height: 1.32;
}

.quiz-hint-idle {
  position: absolute;
  left: 76px;
  top: 562px;
  width: 1128px;
  text-align: center;
  font-family: var(--font-sub);
  font-style: italic;
  font-size: 19px;
  color: rgba(255, 211, 78, 0.72);
  z-index: 9;
  transition: opacity 0.22s ease;
}
.quiz-hint-idle.is-hidden {
  opacity: 0;
}

.quiz-reset-btn {
  position: absolute;
  right: 16px;
  top: 12px;
  background: rgba(58, 3, 7, 0.75);
  border: 1px solid rgba(255, 211, 78, 0.7);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.quiz-reset-btn:hover {
  background: var(--gold-light);
  color: var(--crimson-deep);
}

/* Staggered Entrance Animations on Non-Morph / Present Elements */
.reveal .slides section .anim-enter {
  opacity: 0;
}
.reveal .slides section.present .anim-wipe {
  animation: wipeRightIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal .slides section.present .anim-up {
  animation: flyUpIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal .slides section.present .anim-fade-in {
  animation: simpleFadeIn 0.55s ease-out forwards;
}

.d1 { animation-delay: 0.08s !important; }
.d2 { animation-delay: 0.22s !important; }
.d3 { animation-delay: 0.38s !important; }
.d4 { animation-delay: 0.54s !important; }
.d5 { animation-delay: 0.70s !important; }
.d6 { animation-delay: 0.86s !important; }

@keyframes wipeRightIn {
  0% { opacity: 0; clip-path: inset(-16px 100% -16px 0); transform: translateX(-14px); }
  99% { opacity: 1; clip-path: inset(-16px 0 -16px 0); transform: translateX(0); }
  100% { opacity: 1; clip-path: none; transform: translateX(0); }
}
@keyframes flyUpIn {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes simpleFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Reveal Controls & Progress Bar override in Gold */
.reveal .controls {
  color: var(--gold-light) !important;
  bottom: 18px !important;
  left: 24px !important;
  right: auto !important;
}
.reveal .progress {
  height: 4px !important;
  background: rgba(58, 3, 7, 0.65) !important;
  color: var(--gold-light) !important;
}

/* Slide 17 Documentary Modal Overlay */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 1, 3, 0.88);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.video-modal.open {
  display: flex;
}
.video-modal-card {
  width: min(920px, 90vw);
  background: #3B0308;
  border: 2px solid var(--gold-light);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  padding: 28px 32px;
  color: var(--ivory);
  box-shadow: 0 24px 60px rgba(0,0,0,0.85), 0 0 32px rgba(255, 211, 78, 0.3);
}
/* ==========================================================================
   V2 UPGRADE: LUMINOUS JEWEL-TONE BACKGROUNDS + FOREGROUND STAR/CURTAIN FX
   ========================================================================== */

.reveal {
  background: transparent !important;
}

/* Remove overly dark global vignette so rich luminous backgrounds shine cleanly */
.stage-vignette {
  background:
    radial-gradient(circle at 50% 48%, transparent 56%, rgba(8, 6, 14, 0.42) 100%) !important;
}

.stage-bg-stack {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: #0f172a;
  overflow: hidden;
}

.stage-bg-layer {
  position: absolute;
  inset: -2%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.stage-bg-layer.is-active {
  opacity: 1;
  transform: scale(1.0);
}

/* Chapter 0: Radiant Imperial Crimson-Gold (Slides 1-2) */
.stage-bg-layer.bg-hero {
  background:
    radial-gradient(ellipse at 50% 24%, rgba(255, 211, 78, 0.24) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(210, 24, 48, 0.55) 0%, rgba(128, 12, 24, 0.78) 62%, rgba(56, 5, 12, 0.92) 100%),
    url('../assets/img/bg_crimson_silk.jpg') center/cover no-repeat;
  background-blend-mode: screen, normal, normal;
}

/* Chapter 1: Luminous Emerald Forest & Warm Gold (Slides 3-7 - Viet Bac) */
.stage-bg-layer.bg-forest {
  background:
    radial-gradient(ellipse at 72% 20%, rgba(255, 220, 100, 0.24) 0%, transparent 48%),
    linear-gradient(135deg, rgba(16, 98, 66, 0.84) 0%, rgba(11, 68, 46, 0.78) 52%, rgba(7, 42, 30, 0.88) 100%),
    url('../assets/img/bg_forest_vietbac.jpg') center/cover no-repeat;
}

/* Chapter 2: Heroic Garnet-Amber Spotlight (Slides 8-9 - Dien Bien Phu & 30/4) */
.stage-bg-layer.bg-victory {
  background:
    radial-gradient(ellipse at 32% 22%, rgba(251, 191, 36, 0.26) 0%, transparent 50%),
    linear-gradient(135deg, rgba(154, 28, 28, 0.82) 0%, rgba(115, 34, 18, 0.78) 52%, rgba(58, 12, 14, 0.90) 100%),
    url('../assets/img/bg_battlefield_victory.jpg') center/cover no-repeat;
}

/* Chapter 2b: Luminous Oceanic Azure-Teal (Slide 10 - Bien dao & Truong Sa) */
.stage-bg-layer.bg-maritime {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(56, 189, 248, 0.34) 0%, transparent 52%),
    radial-gradient(ellipse at 20% 80%, rgba(20, 184, 166, 0.24) 0%, transparent 50%),
    linear-gradient(145deg, #075985 0%, #0C4A6E 48%, #082F49 100%);
}

/* Chapter 3: Luminous Royal Cobalt Command 2030 (Slides 11-16) */
.stage-bg-layer.bg-modern {
  background:
    radial-gradient(ellipse at 50% 86%, rgba(56, 189, 248, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 18%, rgba(255, 211, 78, 0.18) 0%, transparent 45%),
    linear-gradient(135deg, rgba(29, 78, 216, 0.76) 0%, rgba(23, 52, 138, 0.80) 52%, rgba(15, 28, 72, 0.90) 100%),
    url('../assets/img/bg_modern_command.jpg') center/cover no-repeat;
}

/* Chapter 4: Rich Velvet Burgundy Cinema (Slide 17) */
.stage-bg-layer.bg-cinema {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 211, 78, 0.18) 0%, transparent 55%),
    linear-gradient(145deg, #6B1435 0%, #440B22 52%, #200510 100%);
}

/* Chapter 5: Luminous Royal Indigo-Blue Broadcast Quiz Arena (Slides 18-25) */
.stage-bg-layer.bg-quiz {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 211, 78, 0.24) 0%, transparent 46%),
    radial-gradient(ellipse at 80% 10%, rgba(96, 165, 250, 0.26) 0%, transparent 48%),
    linear-gradient(145deg, #312E81 0%, #1E3A8A 50%, #172554 100%);
}

/* Chapter 6: Grand Finale Radiant Crimson-Gold Sunburst (Slide 26) */
.stage-bg-layer.bg-finale {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 211, 78, 0.30) 0%, transparent 52%),
    linear-gradient(145deg, rgba(185, 20, 40, 0.80) 0%, rgba(128, 12, 24, 0.82) 55%, rgba(52, 4, 12, 0.94) 100%),
    url('../assets/img/bg_crimson_silk.jpg') center/cover no-repeat;
}

/* Context-Aware SVG Stage Asset Layers */
.stage-assets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.asset-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.asset-layer.is-active { opacity: 1; }

.asset-mountains {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34%;
}
.asset-compass {
  position: absolute; right: 5%; top: 10%; width: 240px; height: 240px; opacity: 0.26;
  animation: slowSpin 48s linear infinite;
}
.victory-ray {
  position: absolute; top: -20%; width: 26%; height: 150%;
  background: linear-gradient(180deg, rgba(255, 220, 100, 0.20) 0%, transparent 75%);
  transform-origin: top center; filter: blur(8px);
}
.victory-ray.ray-1 { left: 16%; transform: rotate(-22deg); }
.victory-ray.ray-2 { left: 48%; transform: rotate(-16deg); opacity: 0.7; }
.asset-laurel {
  position: absolute; left: 4%; bottom: 6%; width: 250px; height: 250px; opacity: 0.24;
  animation: slowSpinReverse 60s linear infinite;
}
.asset-waves {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26%;
}
.radar-wrap {
  position: absolute; right: -50px; bottom: -50px; width: 420px; height: 420px; opacity: 0.6;
}
.radar-wrap svg { width: 100%; height: 100%; }
.radar-sweep {
  position: absolute; inset: 15px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(125, 211, 252, 0.32) 0deg, rgba(125, 211, 252, 0.0) 60deg, transparent 360deg);
  animation: slowSpin 6.5s linear infinite;
}
.quiz-spot {
  position: absolute; top: -15%; width: 34%; height: 135%;
  background: linear-gradient(180deg, rgba(255, 211, 78, 0.16) 0%, rgba(147, 197, 253, 0.10) 45%, transparent 80%);
  filter: blur(12px);
}
.quiz-spot.spot-left { left: 8%; transform: rotate(-18deg); }
.quiz-spot.spot-right { right: 8%; transform: rotate(18deg); }

.sunburst-rays {
  position: absolute; left: 50%; top: 42%; width: 140vmax; height: 140vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 211, 78, 0.06) 0deg 8deg, transparent 8deg 24deg);
  animation: slowSpin 90s linear infinite;
}
@keyframes slowSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes slowSpinReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

/* Persistent Morph Actors inside slides */
.morph-star-2 {
  position: absolute; pointer-events: none; z-index: 2;
  color: #FFD34E; opacity: 0.28;
  filter: drop-shadow(0 0 12px rgba(255, 211, 78, 0.55));
}
.morph-halo {
  position: absolute; pointer-events: none; z-index: 1;
  color: #FFD34E; opacity: 0.18;
}
.morph-star-cluster {
  position: absolute; pointer-events: none; z-index: 2;
  color: #FFD34E; opacity: 0.28;
  filter: drop-shadow(0 0 10px rgba(255, 211, 78, 0.45));
}
body[data-stage-theme="theme-modern"] .morph-halo,
body[data-stage-theme="theme-maritime"] .morph-halo { color: #BAE6FD; }
body[data-stage-theme="theme-quiz"] .morph-halo { color: #C7D2FE; }

.stage-tactical-grid {
  position: absolute; inset: 0; opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ==========================================================================
   FOREGROUND TRANSITION STINGERS: FLYING GOLDEN STAR + RISING CURTAIN
   ========================================================================== */
.fx-transition-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

/* 1. Flying Golden Star Comet (plays on slide transitions, flies UP & vanishes) */
.fx-star-comet {
  position: absolute;
  left: 50%;
  bottom: -140px;
  width: 112px;
  height: 112px;
  margin-left: -56px;
  opacity: 0;
  will-change: transform, opacity;
}
.fx-star-svg {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 3;
  filter: drop-shadow(0 0 22px rgba(255, 211, 78, 0.95)) drop-shadow(0 0 44px rgba(255, 180, 0, 0.65));
}
.fx-star-trail {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 34px;
  height: 280px;
  margin-left: -17px;
  background: linear-gradient(180deg, rgba(255, 232, 130, 0.88) 0%, rgba(255, 195, 50, 0.35) 45%, transparent 100%);
  filter: blur(5px);
  z-index: 1;
}
.fx-star-flare {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 180, 0.75) 0%, rgba(255, 211, 78, 0.22) 45%, transparent 72%);
  z-index: 2;
}

.fx-transition-stage.play-star .fx-star-comet {
  animation: starRocketUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes starRocketUp {
  0% {
    opacity: 0;
    transform: translate3d(-120px, 0, 0) scale(0.45) rotate(-40deg);
  }
  20% {
    opacity: 1;
    transform: translate3d(-40px, -28vh, 0) scale(1.05) rotate(15deg);
  }
  65% {
    opacity: 0.95;
    transform: translate3d(55px, -78vh, 0) scale(1.22) rotate(135deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(110px, -118vh, 0) scale(0.55) rotate(220deg);
  }
}

/* Mini accompanying stars rising & dissolving */
.fx-mini-star {
  position: absolute;
  bottom: -40px;
  font-size: 26px;
  color: #FFE885;
  text-shadow: 0 0 14px rgba(255, 211, 78, 0.95);
  opacity: 0;
  will-change: transform, opacity;
}
.ms-1 { left: 26%; font-size: 22px; }
.ms-2 { left: 40%; font-size: 30px; }
.ms-3 { left: 54%; font-size: 20px; }
.ms-4 { left: 66%; font-size: 28px; }
.ms-5 { left: 78%; font-size: 22px; }

.fx-transition-stage.play-star .ms-1 { animation: miniStarRise 0.72s 0.04s ease-out forwards; }
.fx-transition-stage.play-star .ms-2 { animation: miniStarRise 0.80s 0.08s ease-out forwards; }
.fx-transition-stage.play-star .ms-3 { animation: miniStarRise 0.76s 0.12s ease-out forwards; }
.fx-transition-stage.play-star .ms-4 { animation: miniStarRise 0.82s 0.06s ease-out forwards; }
.fx-transition-stage.play-star .ms-5 { animation: miniStarRise 0.74s 0.10s ease-out forwards; }

@keyframes miniStarRise {
  0%   { opacity: 0; transform: translateY(0) scale(0.5) rotate(0deg); }
  25%  { opacity: 0.95; }
  75%  { opacity: 0.65; }
  100% { opacity: 0; transform: translateY(-92vh) scale(1.15) rotate(180deg); }
}

/* 2. Rising Ceremonial Twin Curtains + Banner (Chapter Transitions) */
.fx-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  opacity: 0;
  background: linear-gradient(135deg, rgba(145, 14, 30, 0.95) 0%, rgba(74, 5, 14, 0.98) 100%);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.75);
  will-change: transform, opacity;
}
.fx-curtain-left {
  left: 0;
  border-right: 3px solid #FFD34E;
  transform: translateX(-105%);
}
.fx-curtain-right {
  right: 0;
  border-left: 3px solid #FFD34E;
  transform: translateX(105%);
}
.fx-rising-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -110%;
  height: 100%;
  opacity: 0;
  background: linear-gradient(180deg, rgba(255, 211, 78, 0.35) 0%, rgba(20, 30, 68, 0.88) 18%, rgba(10, 16, 40, 0.96) 100%);
  border-top: 4px solid #FFD34E;
  box-shadow: 0 -14px 42px rgba(255, 211, 78, 0.45);
  will-change: transform, opacity;
}

.fx-transition-stage.play-curtain .fx-curtain-left {
  animation: curtainPartLeft 0.92s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.fx-transition-stage.play-curtain .fx-curtain-right {
  animation: curtainPartRight 0.92s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.fx-transition-stage.play-curtain .fx-rising-banner {
  animation: curtainRiseClear 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes curtainPartLeft {
  0%   { opacity: 0.96; transform: translateX(0); }
  25%  { opacity: 0.96; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-106%); }
}
@keyframes curtainPartRight {
  0%   { opacity: 0.96; transform: translateX(0); }
  25%  { opacity: 0.96; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(106%); }
}
@keyframes curtainRiseClear {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 0.85; transform: translateY(-95%); }
  100% { opacity: 0; transform: translateY(-215%); }
}

/* ==========================================================================
   SLIDE 17 CINEMA FRAME + LOCAL FALLBACK PLAYER
   ========================================================================== */
.cinema-screen-full {
  top: 132px !important;
  height: 522px !important;
  background: #0d0610 !important;
}
.yt-local-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 56px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 211, 78, 0.16) 0%, transparent 55%),
    linear-gradient(145deg, #2B0A1A 0%, #14050C 100%);
  color: #FFF6E0;
  z-index: 5;
}
.yt-local-fallback.is-hidden,
.local-mp4-player.is-hidden {
  display: none !important;
}
.yt-fb-badge {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #FFD34E;
  margin-bottom: 12px;
}
.yt-fb-title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  color: #FFE885;
  margin-bottom: 14px;
}
.yt-fb-desc {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 246, 224, 0.88);
  margin: 0 0 26px;
}
.yt-fb-desc code {
  background: rgba(255, 211, 78, 0.16);
  color: #FFD34E;
  padding: 2px 7px;
  border-radius: 5px;
}
.yt-fb-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.yt-fb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.yt-fb-primary {
  background: linear-gradient(135deg, #FFD34E, #E0A000);
  color: #2B0408;
  box-shadow: 0 6px 20px rgba(255, 211, 78, 0.38);
}
.yt-fb-secondary {
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 211, 78, 0.65);
  color: #FFF6E0;
}
.yt-fb-btn:hover { transform: translateY(-2px); }
.local-mp4-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 6;
}

/* ==========================================================================
   THEME-ADAPTIVE LUMINOUS GLASS CARDS, BADGES & QUIZ
   ========================================================================== */
body[data-stage-theme="theme-forest"] .glass-card,
body[data-stage-theme="theme-forest"] .photo-caption {
  background: linear-gradient(145deg, rgba(13, 56, 38, 0.84), rgba(8, 36, 24, 0.90)) !important;
  border-color: rgba(255, 211, 78, 0.82) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 230, 140, 0.25);
}
body[data-stage-theme="theme-forest"] .card-badge,
body[data-stage-theme="theme-forest"] .card-badge-sq,
body[data-stage-theme="theme-forest"] .tl-node {
  background: radial-gradient(circle at 30% 30%, #196B47 0%, #0C3B26 100%) !important;
  border-color: #FFD34E !important;
}
body[data-stage-theme="theme-forest"] .photo-inner { background: #0A3020 !important; }

body[data-stage-theme="theme-victory"] .glass-card,
body[data-stage-theme="theme-victory"] .photo-caption {
  background: linear-gradient(145deg, rgba(96, 20, 22, 0.84), rgba(56, 10, 14, 0.90)) !important;
  border-color: rgba(251, 191, 36, 0.85) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(251, 191, 36, 0.28);
}
body[data-stage-theme="theme-victory"] .card-badge,
body[data-stage-theme="theme-victory"] .card-badge-sq,
body[data-stage-theme="theme-victory"] .pill-tag {
  background: linear-gradient(145deg, #7C2D12, #451A03) !important;
}
body[data-stage-theme="theme-victory"] .photo-inner { background: #3B0A0A !important; }

body[data-stage-theme="theme-maritime"] .glass-card,
body[data-stage-theme="theme-maritime"] .photo-caption {
  background: linear-gradient(145deg, rgba(12, 68, 98, 0.84), rgba(7, 42, 64, 0.90)) !important;
  border-color: rgba(125, 211, 252, 0.78) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(186, 230, 253, 0.28);
}
body[data-stage-theme="theme-maritime"] .pill-tag {
  background: linear-gradient(135deg, #0284C7, #0369A1) !important;
  border-color: #BAE6FD !important;
}
body[data-stage-theme="theme-maritime"] .photo-inner { background: #082F49 !important; }

body[data-stage-theme="theme-modern"] .glass-card,
body[data-stage-theme="theme-modern"] .photo-caption {
  background: linear-gradient(145deg, rgba(22, 54, 126, 0.84), rgba(14, 34, 84, 0.90)) !important;
  border-color: rgba(255, 211, 78, 0.82) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(147, 197, 253, 0.30);
}
body[data-stage-theme="theme-modern"] .card-badge,
body[data-stage-theme="theme-modern"] .card-badge-sq,
body[data-stage-theme="theme-modern"] .pill-tag {
  background: linear-gradient(145deg, #1D4ED8, #1E3A8A) !important;
}
body[data-stage-theme="theme-modern"] .photo-inner { background: #102454 !important; }

/* Quiz Arena Theme (Slides 18-25): Luminous Royal Indigo-Blue */
body[data-stage-theme="theme-quiz"] .quiz-prog-bg {
  background: #172554 !important;
  border-color: rgba(147, 197, 253, 0.65) !important;
}
body[data-stage-theme="theme-quiz"] .quiz-q-card {
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.88), rgba(23, 37, 84, 0.94)) !important;
  border-color: #FFD34E !important;
  outline-color: rgba(147, 197, 253, 0.50) !important;
}
body[data-stage-theme="theme-quiz"] .quiz-opt-btn:not(.is-correct):not(.is-wrong) {
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.82), rgba(23, 37, 84, 0.90)) !important;
  border-color: rgba(147, 197, 253, 0.65) !important;
}
body[data-stage-theme="theme-quiz"] .quiz-opt-btn:not(.is-locked):hover {
  background: linear-gradient(145deg, rgba(49, 46, 129, 0.94), rgba(30, 64, 175, 0.94)) !important;
  border-color: #FFD34E !important;
  transform: translateX(6px) scale(1.008);
  box-shadow: 0 6px 22px rgba(255, 211, 78, 0.32);
}
body[data-stage-theme="theme-quiz"] .quiz-opt-btn:not(.is-correct):not(.is-wrong) .quiz-opt-letter {
  background: #1E1B4B !important;
  border-color: #FFD34E !important;
  color: #FFD34E !important;
}

/* Smooth Keynote-style Cross-Slide Transitions */
.reveal .slides > section {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
  transition-duration: 0.72s !important;
}
.reveal .slides section.present .anim-wipe {
  animation: smoothWipeIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
.reveal .slides section.present .anim-up {
  animation: smoothLockUp 0.62s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
.reveal .slides section.present .anim-fade-in {
  animation: smoothScaleFade 0.58s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
@keyframes smoothWipeIn {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-18px); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: translateX(0); }
}
@keyframes smoothLockUp {
  0% { opacity: 0; transform: translateY(24px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes smoothScaleFade {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* Hide Reveal edge controls on very small corner overlap? Keep them subtle & clean */
.reveal .controls {
  opacity: 0.65;
  transition: opacity 0.2s ease;
}
.reveal .controls:hover { opacity: 1; }
/* ==========================================================================
   V4 UPGRADE: 8 BOLD MULTI-FRAGMENT WIDE-AOE FOREGROUND TRANSITIONS
   ========================================================================== */

.doc-video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  z-index: 2;
}

/* Theme-adaptive bold metallic panel colors for all foreground fragments */
body {
  --fx-p1: #9E0B1A;
  --fx-p2: #4A040C;
  --fx-edge: #FFD34E;
  --fx-glow: rgba(255, 211, 78, 0.55);
}
body[data-stage-theme="theme-forest"] {
  --fx-p1: #146343;
  --fx-p2: #082E1F;
  --fx-edge: #FFD34E;
  --fx-glow: rgba(255, 215, 90, 0.50);
}
body[data-stage-theme="theme-victory"] {
  --fx-p1: #991B1B;
  --fx-p2: #450A0A;
  --fx-edge: #FBBF24;
  --fx-glow: rgba(251, 191, 36, 0.55);
}
body[data-stage-theme="theme-maritime"] {
  --fx-p1: #0369A1;
  --fx-p2: #082F49;
  --fx-edge: #7DD3FC;
  --fx-glow: rgba(56, 189, 248, 0.55);
}
body[data-stage-theme="theme-modern"] {
  --fx-p1: #1D4ED8;
  --fx-p2: #0F1E54;
  --fx-edge: #60A5FA;
  --fx-glow: rgba(96, 165, 250, 0.55);
}
body[data-stage-theme="theme-cinema"] {
  --fx-p1: #701A3B;
  --fx-p2: #240612;
  --fx-edge: #FFD34E;
  --fx-glow: rgba(255, 211, 78, 0.50);
}
body[data-stage-theme="theme-quiz"] {
  --fx-p1: #3730A3;
  --fx-p2: #172554;
  --fx-edge: #FFD34E;
  --fx-glow: rgba(255, 211, 78, 0.55);
}

.fx-rig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

/* ---------- 1. QUAD DOORS (4 corners blast open) ---------- */
.fx-transition-stage.fx-quad-doors .rig-quad { visibility: visible; opacity: 1; }
.fx-q {
  position: absolute;
  width: 52%;
  height: 52%;
  background: linear-gradient(135deg, var(--fx-p1), var(--fx-p2));
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.65), inset 0 0 24px var(--fx-glow);
  will-change: transform, opacity;
}
.q-tl { top: 0; left: 0; border-right: 3px solid var(--fx-edge); border-bottom: 3px solid var(--fx-edge); }
.q-tr { top: 0; right: 0; border-left: 3px solid var(--fx-edge); border-bottom: 3px solid var(--fx-edge); }
.q-bl { bottom: 0; left: 0; border-right: 3px solid var(--fx-edge); border-top: 3px solid var(--fx-edge); }
.q-br { bottom: 0; right: 0; border-left: 3px solid var(--fx-edge); border-top: 3px solid var(--fx-edge); }

.fx-center-crest {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 92px;
  color: var(--fx-edge);
  text-shadow: 0 0 34px var(--fx-glow), 0 0 60px rgba(255, 211, 78, 0.6);
  opacity: 0;
  will-change: transform, opacity;
}

.fx-transition-stage.fx-quad-doors .q-tl { animation: qOpenTL 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.fx-transition-stage.fx-quad-doors .q-tr { animation: qOpenTR 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.fx-transition-stage.fx-quad-doors .q-bl { animation: qOpenBL 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.fx-transition-stage.fx-quad-doors .q-br { animation: qOpenBR 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.fx-transition-stage.fx-quad-doors .fx-center-crest { animation: crestBurstOut 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes qOpenTL { 0% { opacity: 0.96; transform: translate3d(0,0,0); } 22% { opacity: 0.96; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(-112%,-112%,0); } }
@keyframes qOpenTR { 0% { opacity: 0.96; transform: translate3d(0,0,0); } 22% { opacity: 0.96; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(112%,-112%,0); } }
@keyframes qOpenBL { 0% { opacity: 0.96; transform: translate3d(0,0,0); } 22% { opacity: 0.96; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(-112%,112%,0); } }
@keyframes qOpenBR { 0% { opacity: 0.96; transform: translate3d(0,0,0); } 22% { opacity: 0.96; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(112%,112%,0); } }
@keyframes crestBurstOut { 0% { opacity: 1; transform: translate(-50%,-50%) scale(0.75) rotate(0deg); } 40% { opacity: 1; transform: translate(-50%,-50%) scale(1.25) rotate(35deg); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(2.4) rotate(90deg); } }

/* ---------- 2. 6-SLAT STAGE BLINDS (6 vertical louvers) ---------- */
.fx-transition-stage.fx-blinds-6 .rig-blinds {
  visibility: visible; opacity: 1;
  display: grid; grid-template-columns: repeat(6, 1fr);
}
.fx-blind {
  height: 100%;
  background: linear-gradient(180deg, var(--fx-p1), var(--fx-p2));
  border-right: 2.5px solid var(--fx-edge);
  box-shadow: inset 0 0 18px var(--fx-glow);
  transform-origin: left center;
  will-change: transform, opacity;
}
.fx-transition-stage.fx-blinds-6 .b-1 { animation: blindFold 0.68s 0.00s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-blinds-6 .b-2 { animation: blindFold 0.68s 0.05s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-blinds-6 .b-3 { animation: blindFold 0.68s 0.10s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-blinds-6 .b-4 { animation: blindFold 0.68s 0.15s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-blinds-6 .b-5 { animation: blindFold 0.68s 0.20s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-blinds-6 .b-6 { animation: blindFold 0.68s 0.25s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes blindFold {
  0%   { opacity: 0.95; transform: scaleX(1) translateY(0); }
  20%  { opacity: 0.95; transform: scaleX(1) translateY(0); }
  100% { opacity: 0; transform: scaleX(0) translateY(-18px); }
}

/* ---------- 3. V-CHEVRON TACTICAL SPLIT (4 interlocking chevrons) ---------- */
.fx-transition-stage.fx-chevrons-split .rig-chevrons { visibility: visible; opacity: 1; }
.fx-chev {
  position: absolute;
  top: 0; bottom: 0;
  width: 66%;
  background: linear-gradient(135deg, var(--fx-p1), var(--fx-p2));
  filter: drop-shadow(0 0 14px var(--fx-glow));
  will-change: transform, opacity;
}
.c-l1 { left: 0; clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%); border-right: 4px solid var(--fx-edge); }
.c-l2 { left: -6%; clip-path: polygon(0 0, 72% 0, 94% 50%, 72% 100%, 0 100%); background: linear-gradient(135deg, var(--fx-edge), transparent 55%); opacity: 0.55; }
.c-r1 { right: 0; clip-path: polygon(22% 0, 100% 0, 100% 100%, 22% 100%, 0 50%); border-left: 4px solid var(--fx-edge); }
.c-r2 { right: -6%; clip-path: polygon(28% 0, 100% 0, 100% 100%, 28% 100%, 6% 50%); background: linear-gradient(225deg, var(--fx-edge), transparent 55%); opacity: 0.55; }

.fx-transition-stage.fx-chevrons-split .c-l1 { animation: chevLeftOut 0.84s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-chevrons-split .c-l2 { animation: chevLeftOut 0.90s 0.06s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-chevrons-split .c-r1 { animation: chevRightOut 0.84s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-chevrons-split .c-r2 { animation: chevRightOut 0.90s 0.06s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes chevLeftOut  { 0% { opacity: 0.94; transform: translate3d(0,0,0); } 18% { opacity: 0.94; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(-115%,0,0); } }
@keyframes chevRightOut { 0% { opacity: 0.94; transform: translate3d(0,0,0); } 18% { opacity: 0.94; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(115%,0,0); } }

/* ---------- 4. 12-TILE TACTICAL MOSAIC (4x3 radial unfold) ---------- */
.fx-transition-stage.fx-mosaic-12 .rig-mosaic {
  visibility: visible; opacity: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
}
.fx-tile {
  background: linear-gradient(145deg, var(--fx-p1), var(--fx-p2));
  border: 1.5px solid var(--fx-edge);
  box-shadow: inset 0 0 18px var(--fx-glow);
  will-change: transform, opacity;
}
/* Center tiles open first, corners follow in a radial wave */
.fx-transition-stage.fx-mosaic-12 .t-6,
.fx-transition-stage.fx-mosaic-12 .t-7  { animation: tileUnfold 0.62s 0.00s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-mosaic-12 .t-2,
.fx-transition-stage.fx-mosaic-12 .t-3,
.fx-transition-stage.fx-mosaic-12 .t-5,
.fx-transition-stage.fx-mosaic-12 .t-8,
.fx-transition-stage.fx-mosaic-12 .t-10,
.fx-transition-stage.fx-mosaic-12 .t-11 { animation: tileUnfold 0.66s 0.08s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-mosaic-12 .t-1,
.fx-transition-stage.fx-mosaic-12 .t-4,
.fx-transition-stage.fx-mosaic-12 .t-9,
.fx-transition-stage.fx-mosaic-12 .t-12 { animation: tileUnfold 0.70s 0.16s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes tileUnfold {
  0%   { opacity: 0.95; transform: scale(1) rotate(0deg); }
  20%  { opacity: 0.95; transform: scale(0.96) rotate(0deg); }
  100% { opacity: 0; transform: scale(0.18) rotate(16deg); }
}

/* ---------- 5. 5 DIAGONAL SLASH BLADES (alternating sweep apart) ---------- */
.fx-transition-stage.fx-diagonal-blades .rig-blades {
  visibility: visible; opacity: 1;
  transform: rotate(-16deg) scale(1.38);
  display: flex; flex-direction: column;
}
.fx-blade {
  flex: 1;
  background: linear-gradient(90deg, var(--fx-p2), var(--fx-p1), var(--fx-p2));
  border-top: 2px solid var(--fx-edge);
  border-bottom: 2px solid var(--fx-edge);
  box-shadow: 0 0 20px var(--fx-glow);
  will-change: transform, opacity;
}
.fx-transition-stage.fx-diagonal-blades .d-1 { animation: bladeRight 0.76s 0.00s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-diagonal-blades .d-2 { animation: bladeLeft  0.76s 0.05s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-diagonal-blades .d-3 { animation: bladeRight 0.76s 0.10s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-diagonal-blades .d-4 { animation: bladeLeft  0.76s 0.15s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-diagonal-blades .d-5 { animation: bladeRight 0.76s 0.20s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes bladeRight { 0% { opacity: 0.95; transform: translate3d(0,0,0); } 18% { opacity: 0.95; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(115%,0,0); } }
@keyframes bladeLeft  { 0% { opacity: 0.95; transform: translate3d(0,0,0); } 18% { opacity: 0.95; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(-115%,0,0); } }

/* ---------- 6. 6-BLADE OPTICAL APERTURE (6 rotating wedges) ---------- */
.fx-transition-stage.fx-aperture-6 .rig-aperture { visibility: visible; opacity: 1; }
.fx-leaf {
  position: absolute;
  left: 50%; top: 50%;
  width: 95vmax; height: 95vmax;
  margin: -47.5vmax 0 0 -47.5vmax;
  clip-path: polygon(50% 50%, 100% 18%, 100% 82%);
  background: linear-gradient(120deg, var(--fx-p1), var(--fx-p2));
  border-right: 3px solid var(--fx-edge);
  filter: drop-shadow(0 0 12px var(--fx-glow));
  will-change: transform, opacity;
}
.fx-transition-stage.fx-aperture-6 .l-1 { animation: leaf1 0.85s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-aperture-6 .l-2 { animation: leaf2 0.85s 0.03s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-aperture-6 .l-3 { animation: leaf3 0.85s 0.06s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-aperture-6 .l-4 { animation: leaf4 0.85s 0.09s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-aperture-6 .l-5 { animation: leaf5 0.85s 0.12s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-aperture-6 .l-6 { animation: leaf6 0.85s 0.15s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes leaf1 { 0% { opacity: 0.94; transform: rotate(0deg)   translateX(0); } 100% { opacity: 0; transform: rotate(45deg)  translateX(65vmax); } }
@keyframes leaf2 { 0% { opacity: 0.94; transform: rotate(60deg)  translateX(0); } 100% { opacity: 0; transform: rotate(105deg) translateX(65vmax); } }
@keyframes leaf3 { 0% { opacity: 0.94; transform: rotate(120deg) translateX(0); } 100% { opacity: 0; transform: rotate(165deg) translateX(65vmax); } }
@keyframes leaf4 { 0% { opacity: 0.94; transform: rotate(180deg) translateX(0); } 100% { opacity: 0; transform: rotate(225deg) translateX(65vmax); } }
@keyframes leaf5 { 0% { opacity: 0.94; transform: rotate(240deg) translateX(0); } 100% { opacity: 0; transform: rotate(285deg) translateX(65vmax); } }
@keyframes leaf6 { 0% { opacity: 0.94; transform: rotate(300deg) translateX(0); } 100% { opacity: 0; transform: rotate(345deg) translateX(65vmax); } }

/* ---------- 7. 5 HORIZONTAL OCEAN WAVE STRIPS ---------- */
.fx-transition-stage.fx-wave-strips .rig-waves {
  visibility: visible; opacity: 1;
  display: flex; flex-direction: column;
}
.fx-wave {
  flex: 1;
  background: linear-gradient(90deg, var(--fx-p2), var(--fx-p1) 50%, var(--fx-edge) 96%, var(--fx-p1));
  border-bottom: 2px solid var(--fx-edge);
  will-change: transform, opacity;
}
.fx-transition-stage.fx-wave-strips .w-1 { animation: bladeRight 0.78s 0.00s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-wave-strips .w-2 { animation: bladeLeft  0.78s 0.06s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-wave-strips .w-3 { animation: bladeRight 0.78s 0.12s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-wave-strips .w-4 { animation: bladeLeft  0.78s 0.18s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-wave-strips .w-5 { animation: bladeRight 0.78s 0.24s cubic-bezier(0.22,1,0.36,1) forwards; }

/* ---------- 8. 4-PIECE CINEMA IRIS (top/bottom + left/right wings) ---------- */
.fx-transition-stage.fx-cinema-iris .rig-cinema { visibility: visible; opacity: 1; }
.fx-cin {
  position: absolute;
  background: linear-gradient(135deg, var(--fx-p1), var(--fx-p2));
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.7);
  will-change: transform, opacity;
}
.cin-top   { top: 0; left: 0; right: 0; height: 52%; border-bottom: 3px solid var(--fx-edge); }
.cin-bot   { bottom: 0; left: 0; right: 0; height: 52%; border-top: 3px solid var(--fx-edge); }
.cin-left  { top: 0; bottom: 0; left: 0; width: 22%; border-right: 3px solid var(--fx-edge); }
.cin-right { top: 0; bottom: 0; right: 0; width: 22%; border-left: 3px solid var(--fx-edge); }

.fx-transition-stage.fx-cinema-iris .cin-top   { animation: cinUp    0.84s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-cinema-iris .cin-bot   { animation: cinDown  0.84s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-cinema-iris .cin-left  { animation: chevLeftOut  0.74s 0.06s cubic-bezier(0.22,1,0.36,1) forwards; }
.fx-transition-stage.fx-cinema-iris .cin-right { animation: chevRightOut 0.74s 0.06s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes cinUp   { 0% { opacity: 0.96; transform: translate3d(0,0,0); } 20% { opacity: 0.96; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(0,-108%,0); } }
@keyframes cinDown { 0% { opacity: 0.96; transform: translate3d(0,0,0); } 20% { opacity: 0.96; transform: translate3d(0,0,0); } 100% { opacity: 0; transform: translate3d(0,108%,0); } }
/* ==========================================================================
   V5 UPGRADE: 3D CREATIVE SLIDE TRANSITIONS + TRANSLUCENT LUMINOUS FX OVERLAYS
   ========================================================================== */

.reveal .slides {
  perspective: 1800px !important;
  perspective-origin: 50% 50% !important;
}

.reveal .slides > section {
  transform-style: preserve-3d !important;
  backface-visibility: hidden !important;
  transition: transform 0.88s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.72s cubic-bezier(0.22, 1, 0.36, 1) !important;
  will-change: transform, opacity;
}

/* 1. FOLD-BOOK: Origami / Book Page 3D Fold */
.reveal:not(.overview) .slides > section[data-transition="fold-book"].past {
  opacity: 0 !important;
  transform-origin: 0% 50% !important;
  transform: translate3d(-18%, 0, -120px) rotateY(-76deg) scale(0.90) !important;
}
.reveal:not(.overview) .slides > section[data-transition="fold-book"].future {
  opacity: 0 !important;
  transform-origin: 100% 50% !important;
  transform: translate3d(18%, 0, -120px) rotateY(76deg) scale(0.90) !important;
}

/* 2. SPIN-ORBIT: Dynamic 3D Vortex Spin & Lock */
.reveal:not(.overview) .slides > section[data-transition="spin-orbit"].past {
  opacity: 0 !important;
  transform-origin: 50% 50% !important;
  transform: translate3d(-24%, -6%, -220px) rotateZ(-14deg) rotateY(-46deg) scale(0.76) !important;
}
.reveal:not(.overview) .slides > section[data-transition="spin-orbit"].future {
  opacity: 0 !important;
  transform-origin: 50% 50% !important;
  transform: translate3d(24%, 6%, -220px) rotateZ(14deg) rotateY(46deg) scale(0.76) !important;
}

/* 3. FLIP-VERTICAL: Tactical 3D Vertical Hinge Fold */
.reveal:not(.overview) .slides > section[data-transition="flip-vertical"].past {
  opacity: 0 !important;
  transform-origin: 50% 0% !important;
  transform: translate3d(0, -16%, -160px) rotateX(62deg) scale(0.88) !important;
}
.reveal:not(.overview) .slides > section[data-transition="flip-vertical"].future {
  opacity: 0 !important;
  transform-origin: 50% 100% !important;
  transform: translate3d(0, 18%, -160px) rotateX(-62deg) scale(0.88) !important;
}

/* 4. CUBE-TURN: Bold 3D Architectural Cube Rotation */
.reveal:not(.overview) .slides > section[data-transition="cube-turn"].past {
  opacity: 0 !important;
  transform-origin: 100% 50% !important;
  transform: translate3d(-52%, 0, 0) rotateY(-68deg) scale(0.92) !important;
}
.reveal:not(.overview) .slides > section[data-transition="cube-turn"].future {
  opacity: 0 !important;
  transform-origin: 0% 50% !important;
  transform: translate3d(52%, 0, 0) rotateY(68deg) scale(0.92) !important;
}

/* 5. ZOOM-PORTAL: Cinematic Depth Portal Rush */
.reveal:not(.overview) .slides > section[data-transition="zoom-portal"].past {
  opacity: 0 !important;
  transform-origin: 50% 50% !important;
  transform: translate3d(0, 0, 260px) scale(1.22) !important;
  filter: blur(4px);
}
.reveal:not(.overview) .slides > section[data-transition="zoom-portal"].future {
  opacity: 0 !important;
  transform-origin: 50% 50% !important;
  transform: translate3d(0, 0, -280px) scale(0.72) !important;
  filter: blur(4px);
}

/* 6. SWING-DOOR: Grand Ceremonial Hinged Door Swing */
.reveal:not(.overview) .slides > section[data-transition="swing-door"].past {
  opacity: 0 !important;
  transform-origin: 0% 50% !important;
  transform: rotateY(72deg) translate3d(-12%, 0, 0) scale(0.92) !important;
}
.reveal:not(.overview) .slides > section[data-transition="swing-door"].future {
  opacity: 0 !important;
  transform-origin: 0% 50% !important;
  transform: rotateY(-72deg) translate3d(12%, 0, 0) scale(0.92) !important;
}

/* 7. CASCADE-GLIDE: Angled 3D Perspective Sweep */
.reveal:not(.overview) .slides > section[data-transition="cascade-glide"].past {
  opacity: 0 !important;
  transform-origin: 50% 50% !important;
  transform: translate3d(-58%, 4%, -140px) rotateY(28deg) rotateZ(-3deg) scale(0.88) !important;
}
.reveal:not(.overview) .slides > section[data-transition="cascade-glide"].future {
  opacity: 0 !important;
  transform-origin: 50% 50% !important;
  transform: translate3d(58%, -4%, -140px) rotateY(-28deg) rotateZ(3deg) scale(0.88) !important;
}

/* Active slide snaps crisply into full 3D clarity */
.reveal:not(.overview) .slides > section.present {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1) !important;
  filter: blur(0px) !important;
}

/* Dynamic 3D Card & Photo Entrance Inside Active Slide */
.reveal .slides section.present .glass-card {
  animation: card3DEnter 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.reveal .slides section.present .glass-card:nth-of-type(2) { animation-delay: 0.08s; }
.reveal .slides section.present .glass-card:nth-of-type(3) { animation-delay: 0.16s; }
.reveal .slides section.present .glass-card:nth-of-type(4) { animation-delay: 0.24s; }

@keyframes card3DEnter {
  0%   { opacity: 0; transform: perspective(900px) translateY(24px) rotateX(-12deg) scale(0.96); }
  100% { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0deg) scale(1); }
}

.reveal .slides section.present .photo-wrap {
  animation: photoFloatEnter 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes photoFloatEnter {
  0%   { opacity: 0; transform: perspective(1000px) scale(0.92) rotateY(10deg); }
  100% { opacity: 1; transform: perspective(1000px) scale(1) rotateY(0deg); }
}

/* ==========================================================================
   TRANSLUCENT / SEE-THROUGH FOREGROUND MULTI-FRAGMENT FX (NEVER BLOCKS SLIDE!)
   ========================================================================== */
.fx-transition-stage {
  mix-blend-mode: screen;
}
.fx-rig {
  opacity: 0;
}
.fx-transition-stage.fx-quad-doors .rig-quad,
.fx-transition-stage.fx-blinds-6 .rig-blinds,
.fx-transition-stage.fx-chevrons-split .rig-chevrons,
.fx-transition-stage.fx-mosaic-12 .rig-mosaic,
.fx-transition-stage.fx-diagonal-blades .rig-blades,
.fx-transition-stage.fx-aperture-6 .rig-aperture,
.fx-transition-stage.fx-wave-strips .rig-waves,
.fx-transition-stage.fx-cinema-iris .rig-cinema {
  visibility: visible;
  opacity: 0.44 !important;
}

/* Soft glass-like translucent shards with luminous golden edges */
.fx-q, .fx-blind, .fx-chev, .fx-tile, .fx-blade, .fx-leaf, .fx-wave, .fx-cin {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
/* ==========================================================================
   V6 UPGRADE: SHARED-ELEMENT PHOTO-TO-PHOTO 3D MORPH + SILKY CINEMA HARMONY
   ========================================================================== */

/* Silky Cinema Dissolve for Photo-Morph pairs (lets the flying photo take center stage!) */
.reveal:not(.overview) .slides > section[data-transition="cinema-dissolve"].past {
  opacity: 0 !important;
  transform: scale(0.975) translate3d(-18px, 0, -40px) !important;
}
.reveal:not(.overview) .slides > section[data-transition="cinema-dissolve"].future {
  opacity: 0 !important;
  transform: scale(0.975) translate3d(18px, 0, -40px) !important;
}

/* Lighter, refined translucent foreground FX (0.32 opacity = classy glass light, zero clutter!) */
.fx-transition-stage.fx-quad-doors .rig-quad,
.fx-transition-stage.fx-blinds-6 .rig-blinds,
.fx-transition-stage.fx-chevrons-split .rig-chevrons,
.fx-transition-stage.fx-mosaic-12 .rig-mosaic,
.fx-transition-stage.fx-diagonal-blades .rig-blades,
.fx-transition-stage.fx-aperture-6 .rig-aperture,
.fx-transition-stage.fx-wave-strips .rig-waves,
.fx-transition-stage.fx-cinema-iris .rig-cinema {
  visibility: visible;
  opacity: 0.30 !important;
}

/* Top-layer Shared-Element Photo Morph Stage */
.photo-morph-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
  perspective: 1600px;
  overflow: hidden;
}

.pm-ghost {
  position: fixed;
  transform-style: preserve-3d;
  will-change: transform, width, height, left, top, opacity, filter;
  filter: drop-shadow(0 22px 46px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 22px rgba(255, 211, 78, 0.55));
}

.pm-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.pm-face {
  position: absolute;
  inset: 0;
  padding: 3px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #FFF3B0 0%, #FFD34E 45%, #B47B00 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.pm-face-img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #14080c;
}

.pm-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 20%;
  display: block;
}

/* Back face for 180-deg 3D Card Flip Morph */
.pm-face-back {
  transform: rotateY(180deg);
}

/* Golden light sheen sweeping across the transforming photo */
.pm-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 22%, rgba(255, 244, 180, 0.65) 50%, transparent 78%);
  transform: translateX(-130%);
  pointer-events: none;
  z-index: 5;
}

.pm-ghost.is-flying .pm-sheen {
  animation: pmSheenSweep 0.86s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pmSheenSweep {
  0%   { transform: translateX(-130%); opacity: 0; }
  35%  { opacity: 0.95; }
  100% { transform: translateX(130%); opacity: 0; }
}

/* Wipe-morph & Prism-arc overlay layer (Photo B reveals smoothly over Photo A) */
.pm-overlay-b {
  position: absolute;
  inset: 3px;
  overflow: hidden;
  z-index: 3;
  opacity: 0;
  will-change: opacity, clip-path;
}
.pm-overlay-b img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 20%;
  display: block;
}

.pm-ghost.mode-wipe .pm-overlay-b {
  opacity: 1;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.84s cubic-bezier(0.22, 1, 0.36, 1);
}
.pm-ghost.mode-wipe.is-flying .pm-overlay-b {
  clip-path: inset(0 0 0 0);
}

.pm-ghost.mode-prism .pm-overlay-b {
  opacity: 0;
  transition: opacity 0.72s 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
.pm-ghost.mode-prism.is-flying .pm-overlay-b {
  opacity: 1;
}

/* Temporarily hide target photo while flying ghost is mid-flight */
.photo-wrap.pm-hidden {
  opacity: 0 !important;
  transition: none !important;
}
/* ==========================================================================
   V7 UPGRADE: 60FPS GPU PERFORMANCE FIX + TIKTOK VIRAL LAYERED ASSETS
   ========================================================================== */

/* 1. KILL ALL FPS-KILLING BACKDROP-FILTERS, MIX-BLEND-MODES & BLUR TRANSITIONS */
.glass-card,
.quiz-q-card,
.quiz-opt-btn,
.fx-q, .fx-blind, .fx-chev, .fx-tile, .fx-blade, .fx-leaf, .fx-wave, .fx-cin {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.fx-transition-stage {
  mix-blend-mode: normal !important;
  contain: strict;
}

/* Remove filter: blur() during zoom-portal (huge GPU speedup!) */
.reveal:not(.overview) .slides > section[data-transition="zoom-portal"].past,
.reveal:not(.overview) .slides > section[data-transition="zoom-portal"].future {
  filter: none !important;
}

/* Pause heavy background SVG animations while slide is actively transitioning */
body.is-transitioning .sunburst-rays,
body.is-transitioning .asset-compass,
body.is-transitioning .asset-laurel,
body.is-transitioning .radar-sweep {
  animation-play-state: paused !important;
}

/* Lighter, GPU-friendly shadows (replace stacked double drop-shadows) */
.epic-title {
  filter: drop-shadow(0 3px 6px rgba(10, 0, 2, 0.72)) !important;
}
.photo-wrap {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.58)) !important;
}
.pm-ghost {
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.62)) !important;
}

/* Smooth GPU-only translucent foreground fragments (0.26 opacity = airy, fast, never blocks 3D slide!) */
.fx-transition-stage.fx-quad-doors .rig-quad,
.fx-transition-stage.fx-blinds-6 .rig-blinds,
.fx-transition-stage.fx-chevrons-split .rig-chevrons,
.fx-transition-stage.fx-mosaic-12 .rig-mosaic,
.fx-transition-stage.fx-diagonal-blades .rig-blades,
.fx-transition-stage.fx-aperture-6 .rig-aperture,
.fx-transition-stage.fx-wave-strips .rig-waves,
.fx-transition-stage.fx-cinema-iris .rig-cinema {
  visibility: visible;
  opacity: 0.26 !important;
}

/* 2. TIKTOK-STYLE VIRAL LAYERED EDITORIAL ASSETS INSIDE EVERY SLIDE */

/* Giant Ghosted Editorial Year/Era Watermark (Mid-depth parallax layer) */
.tk-bg-year {
  position: absolute;
  right: 44px;
  bottom: 42px;
  font-family: var(--font-head);
  font-size: 210px;
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -6px;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 211, 78, 0.14);
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transform: translate3d(32px, 0, 0);
  opacity: 0;
}
.reveal .slides section.present .tk-bg-year {
  animation: tkYearParallax 0.95s 0.08s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes tkYearParallax {
  0%   { opacity: 0; transform: translate3d(42px, 12px, 0) scale(0.94); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Historical GPS Coordinate & Era Stamp (Top-Right inside gold frame) */
.tk-coord-stamp {
  position: absolute;
  right: 48px;
  top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 4px;
  background: rgba(8, 12, 24, 0.52);
  border: 1px solid rgba(255, 211, 78, 0.42);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: rgba(255, 232, 150, 0.92);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 14;
  opacity: 0;
}
.tk-coord-stamp .tk-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFD34E;
  box-shadow: 0 0 8px #FFD34E;
}
.reveal .slides section.present .tk-coord-stamp {
  animation: tkStampIn 0.65s 0.14s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes tkStampIn {
  0%   { opacity: 0; transform: translate3d(18px, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Kinetic Vertical Accent Bars (Left margin micro-detail) */
.tk-accent-bars {
  position: absolute;
  left: 38px;
  bottom: 44px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  pointer-events: none;
  z-index: 12;
  opacity: 0.72;
}
.tk-accent-bars span {
  display: block;
  width: 3px;
  background: linear-gradient(180deg, #FFD34E, rgba(255, 211, 78, 0.15));
  border-radius: 2px;
  transform-origin: bottom;
}
.tk-accent-bars span:nth-child(1) { height: 14px; }
.tk-accent-bars span:nth-child(2) { height: 26px; }
.tk-accent-bars span:nth-child(3) { height: 18px; }
.reveal .slides section.present .tk-accent-bars span {
  animation: tkBarGrow 0.65s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tkBarGrow {
  0%   { transform: scaleY(0); opacity: 0; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Tactical Corner Reticle Brackets around Documentary Photos */
.tk-bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 15;
}
.tk-bracket.br-tl {
  top: -7px; left: -7px;
  border-top: 3px solid #FFD34E;
  border-left: 3px solid #FFD34E;
}
.tk-bracket.br-br {
  bottom: -7px; right: -7px;
  border-bottom: 3px solid #FFD34E;
  border-right: 3px solid #FFD34E;
}

/* Snappier, ultra-smooth 60fps transitions (0.76s instead of sluggish 0.88s) */
.reveal .slides > section {
  transition: transform 0.76s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
/* ==========================================================================
   V8 UPGRADE: DYNAMIC INTERLOCKING FLAG/BANNER BACKGROUND + ULTRA-LIGHT 60FPS
   ========================================================================== */

/* Rich jewel-tone dynamic banner colors synced to every chapter */
body {
  --dyn-a: rgba(210, 26, 48, 0.42);
  --dyn-b: rgba(135, 10, 22, 0.54);
  --dyn-c: rgba(255, 211, 78, 0.20);
  --dyn-edge: rgba(255, 215, 95, 0.62);
}
body[data-stage-theme="theme-forest"] {
  --dyn-a: rgba(24, 134, 88, 0.40);
  --dyn-b: rgba(10, 66, 42, 0.56);
  --dyn-c: rgba(255, 215, 95, 0.18);
  --dyn-edge: rgba(255, 215, 95, 0.58);
}
body[data-stage-theme="theme-victory"] {
  --dyn-a: rgba(190, 42, 32, 0.42);
  --dyn-b: rgba(98, 22, 16, 0.56);
  --dyn-c: rgba(251, 191, 36, 0.22);
  --dyn-edge: rgba(251, 191, 36, 0.65);
}
body[data-stage-theme="theme-maritime"] {
  --dyn-a: rgba(14, 138, 196, 0.38);
  --dyn-b: rgba(8, 66, 104, 0.54);
  --dyn-c: rgba(125, 211, 252, 0.22);
  --dyn-edge: rgba(125, 211, 252, 0.62);
}
body[data-stage-theme="theme-modern"] {
  --dyn-a: rgba(37, 99, 235, 0.38);
  --dyn-b: rgba(18, 44, 118, 0.54);
  --dyn-c: rgba(96, 165, 250, 0.20);
  --dyn-edge: rgba(255, 211, 78, 0.55);
}
body[data-stage-theme="theme-cinema"] {
  --dyn-a: rgba(138, 24, 68, 0.42);
  --dyn-b: rgba(58, 10, 28, 0.56);
  --dyn-c: rgba(255, 211, 78, 0.18);
  --dyn-edge: rgba(255, 211, 78, 0.55);
}
body[data-stage-theme="theme-quiz"] {
  --dyn-a: rgba(67, 56, 202, 0.42);
  --dyn-b: rgba(30, 58, 138, 0.56);
  --dyn-c: rgba(255, 211, 78, 0.20);
  --dyn-edge: rgba(255, 211, 78, 0.60);
}

.dynamic-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  contain: strict;
}

.dyn-piece {
  position: absolute;
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.85s ease,
              border-color 0.85s ease;
  will-change: transform;
}

/* 1. Sweeping Silk Flag Wing extending from Left */
.dyn-flag-a {
  left: -14%;
  top: -12%;
  width: 58%;
  height: 76%;
  background: linear-gradient(125deg, var(--dyn-a) 0%, var(--dyn-b) 72%, transparent 100%);
  clip-path: polygon(0 0, 86% 0, 100% 42%, 72% 100%, 0 88%);
  border-right: 2px solid var(--dyn-edge);
  animation: dynBreatheA 8s ease-in-out infinite alternate;
}

/* 2. Interlocking Ceremonial Banner Wing extending from Right */
.dyn-flag-b {
  right: -12%;
  bottom: -14%;
  width: 60%;
  height: 74%;
  background: linear-gradient(305deg, var(--dyn-a) 0%, var(--dyn-b) 70%, transparent 100%);
  clip-path: polygon(22% 0, 100% 10%, 100% 100%, 0 100%, 14% 48%);
  border-left: 2px solid var(--dyn-edge);
  animation: dynBreatheB 9s ease-in-out infinite alternate;
}

/* 3. Upper-Right Interlocking Crest Shard */
.dyn-shard-c {
  right: -8%;
  top: -10%;
  width: 44%;
  height: 46%;
  background: linear-gradient(215deg, var(--dyn-c) 0%, var(--dyn-b) 65%, transparent 100%);
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 42% 100%, 0 38%);
}

/* 4. Lower-Left Counter-Locking Ribbon Fold */
.dyn-shard-d {
  left: -8%;
  bottom: -10%;
  width: 46%;
  height: 44%;
  background: linear-gradient(35deg, var(--dyn-c) 0%, var(--dyn-b) 68%, transparent 100%);
  clip-path: polygon(0 18%, 58% 0, 100% 62%, 82% 100%, 0 100%);
}

/* 5 & 6. Two Glowing Metallic Gold Seam Ribbons weaving between the interlocking pieces */
.dyn-sash-1 {
  left: -15%;
  top: 24%;
  width: 130%;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, var(--dyn-edge) 38%, rgba(255, 250, 220, 0.85) 52%, var(--dyn-edge) 66%, transparent 95%);
  opacity: 0.55;
}
.dyn-sash-2 {
  left: -15%;
  bottom: 22%;
  width: 130%;
  height: 2px;
  background: linear-gradient(90deg, transparent 8%, var(--dyn-edge) 44%, transparent 92%);
  opacity: 0.42;
}

/* 5 Harmonious Interlocking Poses — pieces physically slide, jut out, and lock together on every slide change! */
.dynamic-stage.pose-0 .dyn-flag-a  { transform: translate3d(0%, 0%, 0) rotate(-4deg); }
.dynamic-stage.pose-0 .dyn-flag-b  { transform: translate3d(0%, 0%, 0) rotate(3deg); }
.dynamic-stage.pose-0 .dyn-shard-c { transform: translate3d(4%, -4%, 0) rotate(2deg); }
.dynamic-stage.pose-0 .dyn-shard-d { transform: translate3d(-4%, 4%, 0) rotate(-2deg); }
.dynamic-stage.pose-0 .dyn-sash-1  { transform: translate3d(0, 0, 0) rotate(-11deg); }
.dynamic-stage.pose-0 .dyn-sash-2  { transform: translate3d(0, 0, 0) rotate(9deg); }

.dynamic-stage.pose-1 .dyn-flag-a  { transform: translate3d(14%, 6%, 0) rotate(5deg); }
.dynamic-stage.pose-1 .dyn-flag-b  { transform: translate3d(-12%, -8%, 0) rotate(-4deg); }
.dynamic-stage.pose-1 .dyn-shard-c { transform: translate3d(-16%, 10%, 0) rotate(-8deg); }
.dynamic-stage.pose-1 .dyn-shard-d { transform: translate3d(16%, -10%, 0) rotate(6deg); }
.dynamic-stage.pose-1 .dyn-sash-1  { transform: translate3d(0, 40px, 0) rotate(8deg); }
.dynamic-stage.pose-1 .dyn-sash-2  { transform: translate3d(0, -35px, 0) rotate(-12deg); }

.dynamic-stage.pose-2 .dyn-flag-a  { transform: translate3d(-8%, 16%, 0) rotate(-9deg); }
.dynamic-stage.pose-2 .dyn-flag-b  { transform: translate3d(8%, -16%, 0) rotate(8deg); }
.dynamic-stage.pose-2 .dyn-shard-c { transform: translate3d(-6%, 22%, 0) rotate(12deg); }
.dynamic-stage.pose-2 .dyn-shard-d { transform: translate3d(10%, -18%, 0) rotate(-10deg); }
.dynamic-stage.pose-2 .dyn-sash-1  { transform: translate3d(0, -30px, 0) rotate(-16deg); }
.dynamic-stage.pose-2 .dyn-sash-2  { transform: translate3d(0, 28px, 0) rotate(14deg); }

.dynamic-stage.pose-3 .dyn-flag-a  { transform: translate3d(18%, -8%, 0) rotate(9deg); }
.dynamic-stage.pose-3 .dyn-flag-b  { transform: translate3d(-16%, 10%, 0) rotate(-7deg); }
.dynamic-stage.pose-3 .dyn-shard-c { transform: translate3d(-22%, -4%, 0) rotate(-14deg); }
.dynamic-stage.pose-3 .dyn-shard-d { transform: translate3d(20%, 6%, 0) rotate(11deg); }
.dynamic-stage.pose-3 .dyn-sash-1  { transform: translate3d(0, 60px, 0) rotate(13deg); }
.dynamic-stage.pose-3 .dyn-sash-2  { transform: translate3d(0, -50px, 0) rotate(-8deg); }

.dynamic-stage.pose-4 .dyn-flag-a  { transform: translate3d(6%, 12%, 0) rotate(-2deg); }
.dynamic-stage.pose-4 .dyn-flag-b  { transform: translate3d(-6%, -12%, 0) rotate(2deg); }
.dynamic-stage.pose-4 .dyn-shard-c { transform: translate3d(8%, 14%, 0) rotate(6deg); }
.dynamic-stage.pose-4 .dyn-shard-d { transform: translate3d(-8%, -14%, 0) rotate(-6deg); }
.dynamic-stage.pose-4 .dyn-sash-1  { transform: translate3d(0, -15px, 0) rotate(-6deg); }
.dynamic-stage.pose-4 .dyn-sash-2  { transform: translate3d(0, 15px, 0) rotate(6deg); }

@keyframes dynBreatheA {
  0%   { opacity: 0.88; }
  100% { opacity: 1; }
}
@keyframes dynBreatheB {
  0%   { opacity: 0.96; }
  100% { opacity: 0.82; }
}

/* Lighter, snappier card entrances (pure translate3d + opacity, no heavy perspective per card!) */
.reveal .slides section.present .glass-card {
  animation: cardCrispIn 0.56s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
.reveal .slides section.present .glass-card:nth-of-type(2) { animation-delay: 0.06s !important; }
.reveal .slides section.present .glass-card:nth-of-type(3) { animation-delay: 0.12s !important; }
.reveal .slides section.present .glass-card:nth-of-type(4) { animation-delay: 0.18s !important; }

@keyframes cardCrispIn {
  0%   { opacity: 0; transform: translate3d(0, 20px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

.reveal .slides section.present .photo-wrap {
  animation: photoCrispIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
@keyframes photoCrispIn {
  0%   { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* =========================================================================
   FULL-BLEED EDGE-TO-EDGE 13-ASSET SON THUY WORLD (ZERO REPETITION, 60FPS)
   19 overlapping depth-sorted layers covering 100% of the viewport cleanly!
   ========================================================================= */

/* =========================================================================
   UNIFIED ATMOSPHERIC 22-LAYER SON THUY WORLD (Cohesive Cinema Compositing)
   - Mist-feathered mountain bases (zero hard horizontal cuts)
   - Standalone clean Bonsai Pine & Blooming Lotus (zero chopped edges)
   - Aerial-perspective haze layers & chapter-matched lighting harmony
   - Curtain-to-Backdrop reveal (scenery blooms first -> text lands cleanly)
   ========================================================================= */

/* =========================================================================
   DUAL-PLANE 30-LAYER AI-PAINTED SON THUY WORLD (Back z:2 + Surface z:9)
   Rich multi-axis synchronized transitions, 11 unique AI cutouts, 60fps GPU
   ========================================================================= */

body[data-stage-theme="theme-hero"],
body[data-stage-theme="theme-finale"] {
  --sc-sky-top: #52101B; --sc-sky-mid: #962129; --sc-sky-bot: #E3954E;
  --sc-orb-core: #FFF4B0; --sc-orb-mid: #F5B82E; --sc-orb-glow: #FF9436;
  --sc-stars-op: 0.16; --sc-scrim-color: rgba(34, 6, 12, 0.36);
}
body[data-stage-theme="theme-forest"] {
  --sc-sky-top: #105C6B; --sc-sky-mid: #238F96; --sc-sky-bot: #8ADCC6;
  --sc-orb-core: #FFF9CC; --sc-orb-mid: #F7CA4D; --sc-orb-glow: #FFE285;
  --sc-stars-op: 0.0; --sc-scrim-color: rgba(6, 32, 36, 0.34);
}
body[data-stage-theme="theme-victory"] {
  --sc-sky-top: #451220; --sc-sky-mid: #9E2A2B; --sc-sky-bot: #E3A240;
  --sc-orb-core: #FFF4B8; --sc-orb-mid: #F5A623; --sc-orb-glow: #FF7B29;
  --sc-stars-op: 0.25; --sc-scrim-color: rgba(32, 10, 14, 0.36);
}
body[data-stage-theme="theme-maritime"] {
  --sc-sky-top: #0C366B; --sc-sky-mid: #176FA8; --sc-sky-bot: #7CD2FA;
  --sc-orb-core: #FFFBE0; --sc-orb-mid: #FACC48; --sc-orb-glow: #FFE58F;
  --sc-stars-op: 0.12; --sc-scrim-color: rgba(6, 24, 52, 0.34);
}
body[data-stage-theme="theme-modern"] {
  --sc-sky-top: #091542; --sc-sky-mid: #143085; --sc-sky-bot: #2B56C2;
  --sc-orb-core: #FFFCE2; --sc-orb-mid: #F7D358; --sc-orb-glow: #FFE98F;
  --sc-stars-op: 0.94; --sc-scrim-color: rgba(6, 14, 46, 0.36);
}
body[data-stage-theme="theme-cinema"] {
  --sc-sky-top: #160B33; --sc-sky-mid: #351869; --sc-sky-bot: #6B2A6B;
  --sc-orb-core: #FFF8D0; --sc-orb-mid: #F5C542; --sc-orb-glow: #FFD670;
  --sc-stars-op: 0.90; --sc-scrim-color: rgba(16, 6, 36, 0.40);
}
body[data-stage-theme="theme-quiz"] {
  --sc-sky-top: #0C1440; --sc-sky-mid: #1B3182; --sc-sky-bot: #374EB5;
  --sc-orb-core: #FFFCE2; --sc-orb-mid: #F7D358; --sc-orb-glow: #FFE680;
  --sc-stars-op: 0.96; --sc-scrim-color: rgba(8, 14, 48, 0.38);
}

.dynamic-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  contain: strict;
}

.w-layer {
  position: absolute;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transform-origin: center bottom;
}

.w-sky {
  inset: 0;
  background: linear-gradient(180deg, var(--sc-sky-top) 0%, var(--sc-sky-mid) 54%, var(--sc-sky-bot) 100%);
  opacity: 0.96;
  transition: background 1.15s ease;
}
.w-stars {
  inset: 0;
  opacity: var(--sc-stars-op);
  transition: opacity 1.15s ease, transform 1.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.w-stars svg, .w-orb svg { display: block; width: 100%; height: 100%; }
.w-orb {
  left: 50%; top: 50%;
  width: 52vmin; height: 52vmin;
  margin-left: -26vmin; margin-top: -26vmin;
  transform-origin: center center;
  transition: transform 1.28s cubic-bezier(0.16, 1, 0.3, 1) 30ms, opacity 0.95s ease 30ms;
}

.w-far {
  bottom: 10%;
  width: 60%;
  height: auto;
  transition: transform 1.24s cubic-bezier(0.16, 1, 0.3, 1) 60ms, opacity 0.9s ease 60ms;
}
.w-far-1 { left: -14%; }
.w-far-2 { left: 16%; width: 54%; bottom: 12%; }
.w-far-3 { left: 46%; }
.w-far-4 { left: 68%; width: 54%; bottom: 12%; }

.w-cloud, .w-ribbon {
  height: auto;
  transform-origin: center center;
  transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1) 120ms, opacity 0.85s ease 120ms;
}
.w-c-hi-1 { left: -6%; top: 6%; width: 34%; }
.w-c-hi-2 { left: 12%; top: 14%; width: 76%; transition-delay: 160ms; }
.w-c-hi-3 { right: -6%; top: 8%; width: 34%; }

.w-mid {
  bottom: -6%;
  height: auto;
  transition: transform 1.12s cubic-bezier(0.16, 1, 0.3, 1) 110ms, opacity 0.85s ease 110ms;
}
.w-mid-1 { left: -4%; width: 32%; }
.w-mid-2 { left: 16%; width: 66%; bottom: -4%; }
.w-mid-3 { right: -4%; width: 32%; }
.w-mid-4 { right: 12%; width: 52%; bottom: 2%; }

.w-c-mid-1 { left: -14%; bottom: 22%; width: 72%; transition-delay: 190ms; }
.w-c-mid-2 { right: -14%; bottom: 28%; width: 72%; transition-delay: 230ms; }

.w-crane {
  left: 50%; top: 18%;
  width: 17vmin; height: auto;
  margin-left: -8.5vmin;
  transform-origin: center center;
  transition: transform 1.32s cubic-bezier(0.16, 1, 0.3, 1) 240ms, opacity 0.8s ease 220ms;
}
.w-crane-2 { width: 11.5vmin; margin-left: -5.75vmin; transition-delay: 320ms; }
.w-pavilion {
  left: 50%; bottom: -3%;
  width: 54vmin; height: auto;
  margin-left: -27vmin;
  transition: transform 1.10s cubic-bezier(0.16, 1, 0.3, 1) 200ms, opacity 0.85s ease 180ms;
}

.w-fg-mt {
  bottom: -14%;
  width: 34%;
  height: auto;
  transition: transform 1.02s cubic-bezier(0.16, 1, 0.3, 1) 160ms, opacity 0.8s ease 150ms;
}
.w-fg-mt-l { left: -12%; }
.w-fg-mt-r { right: -12%; }
.w-c-fg-l  { left: -10%; bottom: 4%; width: 40%; transition-delay: 260ms; }
.w-c-fg-r  { right: -10%; bottom: 6%; width: 40%; transition-delay: 290ms; }

.w-read-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--sc-scrim-color) 0%, rgba(0, 0, 0, 0.08) 62%, transparent 100%);
  opacity: 0.90;
  transition: opacity 0.55s ease;
}
.dynamic-stage.is-surging .w-read-scrim {
  opacity: 0.04;
}

/* =========================================================================
   SURFACE PERIMETER FOREGROUND PLANE (z-index: 9 — ABOVE slide border!)
   Pinned strictly to safe outer corners/margins so it POPS ON THE SURFACE
   in crisp 3D depth WITHOUT EVER covering any text or slide photo!
   ========================================================================= */
.surface-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
  contain: strict;
}

.sf-piece {
  position: absolute;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.82s ease;
}

.sf-pine-tl   { left: -3.5%; top: -3%;   width: 11.5%; transform-origin: top left;     transition-delay: 110ms; }
.sf-bamboo-tl { left: -3%;   top: -2.5%; width: 11.0%; transform-origin: top left;     transition-delay: 110ms; }
.sf-bamboo-tr { right: -3%;  top: -2.5%; width: 11.0%; transform-origin: top right;    transition-delay: 150ms; }
.sf-pine-tr   { right: -3.5%; top: -3%;  width: 11.5%; transform-origin: top right;    transition-delay: 150ms; }

.sf-lotus-bl  { left: -2.5%;  bottom: -3.5%; width: 11.5%; transform-origin: bottom left;  transition-delay: 200ms; }
.sf-lotus-br  { right: -2.5%; bottom: -3.5%; width: 11.5%; transform-origin: bottom right; transition-delay: 240ms; }

.sf-ribbon-bot {
  left: -8%;
  bottom: -6.5%;
  width: 116%;
  opacity: 0.62;
  transform-origin: center bottom;
  transition-delay: 80ms;
}
.surface-stage.is-surging .sf-ribbon-bot { opacity: 0.92; }

/* =========================================================================
   34-LAYER AI-PAINTED SON THUY WORLD (24 Backdrop + 10 Over-Text Perimeter)
   Directional Slow Cascade + Continuous Living Sway (60fps GPU)
   ========================================================================= */

body[data-stage-theme="theme-hero"],
body[data-stage-theme="theme-finale"] {
  --sc-sky-top: #52101B; --sc-sky-mid: #962129; --sc-sky-bot: #E3954E;
  --sc-orb-core: #FFF4B0; --sc-orb-mid: #F5B82E; --sc-orb-glow: #FF9436;
  --sc-stars-op: 0.16; --sc-scrim-color: rgba(34, 6, 12, 0.38);
}
body[data-stage-theme="theme-forest"] {
  --sc-sky-top: #105C6B; --sc-sky-mid: #238F96; --sc-sky-bot: #8ADCC6;
  --sc-orb-core: #FFF9CC; --sc-orb-mid: #F7CA4D; --sc-orb-glow: #FFE285;
  --sc-stars-op: 0.0; --sc-scrim-color: rgba(6, 32, 36, 0.36);
}
body[data-stage-theme="theme-victory"] {
  --sc-sky-top: #451220; --sc-sky-mid: #9E2A2B; --sc-sky-bot: #E3A240;
  --sc-orb-core: #FFF4B8; --sc-orb-mid: #F5A623; --sc-orb-glow: #FF7B29;
  --sc-stars-op: 0.25; --sc-scrim-color: rgba(32, 10, 14, 0.38);
}
body[data-stage-theme="theme-maritime"] {
  --sc-sky-top: #0C366B; --sc-sky-mid: #176FA8; --sc-sky-bot: #7CD2FA;
  --sc-orb-core: #FFFBE0; --sc-orb-mid: #FACC48; --sc-orb-glow: #FFE58F;
  --sc-stars-op: 0.12; --sc-scrim-color: rgba(6, 24, 52, 0.36);
}
body[data-stage-theme="theme-modern"] {
  --sc-sky-top: #091542; --sc-sky-mid: #143085; --sc-sky-bot: #2B56C2;
  --sc-orb-core: #FFFCE2; --sc-orb-mid: #F7D358; --sc-orb-glow: #FFE98F;
  --sc-stars-op: 0.94; --sc-scrim-color: rgba(6, 14, 46, 0.38);
}
body[data-stage-theme="theme-cinema"] {
  --sc-sky-top: #160B33; --sc-sky-mid: #351869; --sc-sky-bot: #6B2A6B;
  --sc-orb-core: #FFF8D0; --sc-orb-mid: #F5C542; --sc-orb-glow: #FFD670;
  --sc-stars-op: 0.90; --sc-scrim-color: rgba(16, 6, 36, 0.44);
}
body[data-stage-theme="theme-quiz"] {
  --sc-sky-top: #0C1440; --sc-sky-mid: #1B3182; --sc-sky-bot: #374EB5;
  --sc-orb-core: #FFFCE2; --sc-orb-mid: #F7D358; --sc-orb-glow: #FFE680;
  --sc-stars-op: 0.96; --sc-scrim-color: rgba(8, 14, 48, 0.40);
}

.dynamic-stage {
  position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; contain: strict;
}
.fg-over-stage {
  position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; contain: strict;
}

.w-slot {
  position: absolute;
  will-change: transform, opacity;
  pointer-events: none;
  user-select: none;
  transform-origin: center bottom;
  transition: transform 1.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.95s ease;
}
.w-sway {
  display: block; width: 100%; height: auto;
  will-change: transform;
  -webkit-user-drag: none;
  pointer-events: none;
}

@keyframes swayCraneA {
  0%   { transform: translate3d(-8px, 6px, 0) rotate(-3.2deg); }
  50%  { transform: translate3d(12px, -10px, 0) rotate(2.6deg); }
  100% { transform: translate3d(-8px, 6px, 0) rotate(-3.2deg); }
}
@keyframes swayCraneB {
  0%   { transform: translate3d(10px, -6px, 0) rotate(2.4deg); }
  50%  { transform: translate3d(-10px, 9px, 0) rotate(-2.8deg); }
  100% { transform: translate3d(10px, -6px, 0) rotate(2.4deg); }
}
@keyframes swayMtA {
  0%   { transform: translate3d(-4px, 3px, 0) rotate(-0.55deg); }
  50%  { transform: translate3d(5px, -4px, 0) rotate(0.55deg); }
  100% { transform: translate3d(-4px, 3px, 0) rotate(-0.55deg); }
}
@keyframes swayMtB {
  0%   { transform: translate3d(5px, -3px, 0) rotate(0.5deg); }
  50%  { transform: translate3d(-4px, 4px, 0) rotate(-0.5deg); }
  100% { transform: translate3d(5px, -3px, 0) rotate(0.5deg); }
}
@keyframes swayMtSlow {
  0%   { transform: translate3d(-3px, 0, 0); }
  50%  { transform: translate3d(4px, -3px, 0); }
  100% { transform: translate3d(-3px, 0, 0); }
}
@keyframes swayCloudA {
  0%   { transform: translate3d(-16px, -4px, 0); }
  50%  { transform: translate3d(18px, 6px, 0); }
  100% { transform: translate3d(-16px, -4px, 0); }
}
@keyframes swayCloudB {
  0%   { transform: translate3d(16px, 5px, 0); }
  50%  { transform: translate3d(-18px, -5px, 0); }
  100% { transform: translate3d(16px, 5px, 0); }
}
@keyframes swayFloraA {
  0%   { transform: rotate(-2.6deg) translate3d(0, 0, 0); }
  50%  { transform: rotate(2.6deg) translate3d(5px, 4px, 0); }
  100% { transform: rotate(-2.6deg) translate3d(0, 0, 0); }
}
@keyframes swayFloraB {
  0%   { transform: rotate(2.4deg) translate3d(0, 0, 0); }
  50%  { transform: rotate(-2.4deg) translate3d(-5px, 4px, 0); }
  100% { transform: rotate(2.4deg) translate3d(0, 0, 0); }
}
@keyframes swayMoon {
  0%   { transform: scale(1.0); }
  50%  { transform: scale(1.055); }
  100% { transform: scale(1.0); }
}

.sway-crane-a { animation: swayCraneA 5.2s ease-in-out infinite; }
.sway-crane-b { animation: swayCraneB 6.1s ease-in-out infinite; }
.sway-mt-a    { animation: swayMtA 8.4s ease-in-out infinite; transform-origin: center bottom; }
.sway-mt-b    { animation: swayMtB 9.2s ease-in-out infinite; transform-origin: center bottom; }
.sway-mt-slow { animation: swayMtSlow 11s ease-in-out infinite; }
.sway-mt-slow2{ animation: swayMtSlow 13s ease-in-out infinite reverse; }
.sway-cloud-a { animation: swayCloudA 9.5s ease-in-out infinite; }
.sway-cloud-b { animation: swayCloudB 11.2s ease-in-out infinite; }
.sway-flora-a { animation: swayFloraA 4.8s ease-in-out infinite; transform-origin: left center; }
.sway-flora-b { animation: swayFloraB 5.4s ease-in-out infinite; transform-origin: right center; }
.sway-moon    { animation: swayMoon 6.4s ease-in-out infinite; width: 100%; height: 100%; }

.w-sky { inset: 0; background: linear-gradient(180deg, var(--sc-sky-top) 0%, var(--sc-sky-mid) 54%, var(--sc-sky-bot) 100%); opacity: 0.96; transition: background 1.1s ease; }
.w-stars { inset: 0; opacity: var(--sc-stars-op); }
.w-stars svg, .w-orb svg { display: block; width: 100%; height: 100%; }
.w-orb { left: 50%; top: 50%; width: 52vmin; height: 52vmin; margin-left: -26vmin; margin-top: -26vmin; transform-origin: center center; }

.w-far { bottom: 10%; width: 54%; }
.w-far-1 { left: -16%; } .w-far-2 { left: 8%; } .w-far-3 { left: 32%; } .w-far-4 { left: 56%; } .w-far-5 { left: 78%; }

.w-cloud { transform-origin: center center; }
.w-c-hi-1 { left: -8%; top: 6%; width: 32%; }
.w-c-hi-2 { left: 22%; top: 12%; width: 30%; }
.w-c-hi-3 { left: 52%; top: 10%; width: 30%; }
.w-c-hi-4 { right: -8%; top: 7%; width: 32%; }

.w-mid { bottom: -6%; }
.w-mid-1 { left: -6%; width: 30%; }
.w-mid-2 { left: 10%; width: 48%; bottom: 2%; }
.w-mid-3 { left: 35%; width: 28%; bottom: -4%; }
.w-mid-4 { right: 10%; width: 48%; bottom: 1%; }
.w-mid-5 { right: -6%; width: 30%; }

.w-c-mid-1 { left: -4%; bottom: 20%; width: 36%; }
.w-c-mid-2 { left: 32%; bottom: 18%; width: 34%; }
.w-c-mid-3 { right: -4%; bottom: 22%; width: 36%; }

.w-crane-far { left: 50%; top: 22%; width: 12vmin; margin-left: -6vmin; transform-origin: center center; }
.w-pavilion { left: 50%; bottom: -3%; width: 52vmin; margin-left: -26vmin; }

.w-fg-mt { bottom: -14%; width: 33%; }
.w-fg-mt-l { left: -11%; }
.w-fg-mt-r { right: -11%; }

.fg-crag { bottom: -8%; width: 22%; }
.fg-crag-l { left: -5%; }
.fg-crag-r { right: -5%; }

.fg-pine { top: -5%; width: 23%; transform-origin: top center; }
.fg-pine-tl { left: -5%; }
.fg-pine-tr { right: -5%; }

.fg-cloud { bottom: -4%; width: 34%; }
.fg-cloud-bl { left: -9%; }
.fg-cloud-br { right: -9%; }

.fg-lotus { bottom: -7%; width: 24%; }
.fg-lotus-bl { left: -4%; }
.fg-lotus-br { right: -4%; }

.fg-wind-1 { left: 50%; top: -6%; width: 46%; margin-left: -23%; transform-origin: center center; }
.fg-crane-hero { left: 50%; top: 2%; width: 15.5vmin; margin-left: -7.75vmin; transform-origin: center center; }

.w-read-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--sc-scrim-color) 0%, rgba(0,0,0,0.10) 64%, transparent 100%);
  opacity: 0.90;
  transition: opacity 0.55s ease;
}
.dynamic-stage.is-surging .w-read-scrim { opacity: 0.04; }

/* UNCROPPED FULL-VISIBILITY PHOTOS (ZERO clipping / ZERO khuyet anh!) */
.photo-wrap {
  filter: drop-shadow(0 14px 26px rgba(6, 10, 22, 0.72)) !important;
}
.photo-gold-rim,
.photo-inner,
.photo-gold-rim[style],
.photo-inner[style] {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  border-radius: 12px !important;
}
.photo-gold-rim {
  padding: 2px !important;
  background: linear-gradient(135deg, rgba(255, 235, 165, 0.92) 0%, rgba(224, 165, 32, 0.72) 55%, rgba(160, 105, 10, 0.55) 100%) !important;
}
.photo-inner {
  background: rgba(8, 14, 28, 0.55) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.photo-inner img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* SLIDE 17: NEAR-FULLSCREEN DIRECT VIDEO + CLEAN TITLE ONLY */
#slide-17 .s17-title-full {
  position: absolute !important;
  left: 48px !important;
  top: 14px !important;
  width: 1184px !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  margin: 0 !important;
  opacity: 1 !important;
  color: #FFE48F !important;
  -webkit-text-fill-color: #FFE48F !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9) !important;
  z-index: 15 !important;
}
#slide-17 .cinema-screen-max {
  position: absolute !important;
  left: 48px !important;
  top: 66px !important;
  width: 1184px !important;
  height: 618px !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255, 218, 105, 0.78) !important;
  background: #050814 !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.78) !important;
  overflow: hidden !important;
  z-index: 12 !important;
}
#slide-17 .cinema-screen-max video.doc-video-player {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
  display: block !important;
}

/* UNIFIED 6-VARIANT "LEAN-BACK & PULL-AWAY" 3D CINEMA TRANSITIONS */
.reveal:not(.overview) .slides {
  perspective: 1800px !important;
  transform-style: preserve-3d !important;
}
.reveal:not(.overview) .slides > section {
  transition: transform 0.88s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.72s ease !important;
  transform-style: preserve-3d !important;
  backface-visibility: hidden !important;
}
.reveal:not(.overview) .slides > section.present {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) scale(1) !important;
}

.reveal:not(.overview) .slides > section[data-transition="lean-back-left"].past {
  opacity: 0 !important;
  transform: translate3d(-24%, 4%, -220px) rotateX(16deg) rotateY(-14deg) scale(0.84) !important;
}
.reveal:not(.overview) .slides > section[data-transition="lean-back-left"].future {
  opacity: 0 !important;
  transform: translate3d(20%, 6%, -180px) rotateX(-10deg) rotateY(12deg) scale(0.88) !important;
}

.reveal:not(.overview) .slides > section[data-transition="lean-back-right"].past {
  opacity: 0 !important;
  transform: translate3d(24%, 4%, -220px) rotateX(16deg) rotateY(14deg) scale(0.84) !important;
}
.reveal:not(.overview) .slides > section[data-transition="lean-back-right"].future {
  opacity: 0 !important;
  transform: translate3d(-20%, 6%, -180px) rotateX(-10deg) rotateY(-12deg) scale(0.88) !important;
}

.reveal:not(.overview) .slides > section[data-transition="lean-back-up"].past {
  opacity: 0 !important;
  transform: translate3d(0, -18%, -260px) rotateX(22deg) scale(0.82) !important;
}
.reveal:not(.overview) .slides > section[data-transition="lean-back-up"].future {
  opacity: 0 !important;
  transform: translate3d(0, 18%, -180px) rotateX(-14deg) scale(0.88) !important;
}

.reveal:not(.overview) .slides > section[data-transition="lean-back-down"].past {
  opacity: 0 !important;
  transform: translate3d(0, 18%, -250px) rotateX(-20deg) scale(0.82) !important;
}
.reveal:not(.overview) .slides > section[data-transition="lean-back-down"].future {
  opacity: 0 !important;
  transform: translate3d(0, -16%, -180px) rotateX(14deg) scale(0.88) !important;
}

.reveal:not(.overview) .slides > section[data-transition="lean-swing-l"].past {
  opacity: 0 !important;
  transform-origin: 10% 50% !important;
  transform: translate3d(-16%, 2%, -220px) rotateY(26deg) rotateX(10deg) scale(0.84) !important;
}
.reveal:not(.overview) .slides > section[data-transition="lean-swing-l"].future {
  opacity: 0 !important;
  transform-origin: 90% 50% !important;
  transform: translate3d(16%, 2%, -180px) rotateY(-20deg) rotateX(-8deg) scale(0.88) !important;
}

.reveal:not(.overview) .slides > section[data-transition="lean-swing-r"].past {
  opacity: 0 !important;
  transform-origin: 90% 50% !important;
  transform: translate3d(16%, 2%, -220px) rotateY(-26deg) rotateX(10deg) scale(0.84) !important;
}
.reveal:not(.overview) .slides > section[data-transition="lean-swing-r"].future {
  opacity: 0 !important;
  transform-origin: 10% 50% !important;
  transform: translate3d(-16%, 2%, -180px) rotateY(20deg) rotateX(-8deg) scale(0.88) !important;
}

.reveal .slides section.present .glass-card {
  animation: cardCurtainIn 0.62s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both !important;
}
.reveal .slides section.present .glass-card:nth-of-type(2) { animation-delay: 0.38s !important; }
.reveal .slides section.present .glass-card:nth-of-type(3) { animation-delay: 0.46s !important; }
.reveal .slides section.present .glass-card:nth-of-type(4) { animation-delay: 0.54s !important; }
@keyframes cardCurtainIn {
  0%   { opacity: 0; transform: translate3d(0, 26px, 0) scale(0.97); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.reveal .slides section.present .photo-wrap {
  animation: photoCurtainIn 0.66s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both !important;
}
@keyframes photoCurtainIn {
  0%   { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.95); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}


/* === VISIONARY MORPH UPGRADE START === */
/* Sleek Visionary-inspired gradient accent pill behind eyebrow */
.reveal section .eyebrow,
.reveal section .kicker,
.reveal section .part-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 5px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.30) 0%, rgba(139, 26, 26, 0.48) 56%, rgba(27, 20, 56, 0.22) 100%) !important;
  border: 1px solid rgba(255, 211, 78, 0.62) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 245, 200, 0.28) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.14em !important;
  font-weight: 700 !important;
  color: #FFE89E !important;
  width: fit-content;
}

/* Uncropped rectangular gold-framed flying photo ghost */
#photo-morph-layer {
  z-index: 120 !important;
}
.pm-face,
.pm-face-img-wrap,
.pm-overlay-b {
  clip-path: none !important;
  border-radius: 14px !important;
}
.pm-face {
  background: linear-gradient(135deg, #FFF3B0 0%, #FFD34E 48%, #9A6700 100%) !important;
  padding: 3px !important;
}
.pm-face-img-wrap {
  background: rgba(14, 7, 12, 0.94) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-face img,
.pm-overlay-b img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}
.pm-overlay-b {
  background: rgba(14, 7, 12, 0.94) !important;
}

/* Pre-slide staging: hold incoming text cleanly while photo flies & transforms first */
.reveal section.visionary-staging .eyebrow,
.reveal section.visionary-staging .kicker,
.reveal section.visionary-staging h1,
.reveal section.visionary-staging h2,
.reveal section.visionary-staging .gold-divider,
.reveal section.visionary-staging .card,
.reveal section.visionary-staging .glass-card,
.reveal section.visionary-staging .info-card,
.reveal section.visionary-staging .timeline-card,
.reveal section.visionary-staging .stat-card,
.reveal section.visionary-staging .hero-card {
  opacity: 0 !important;
  transform: translate3d(0, 26px, 0) !important;
  transition: none !important;
}

/* Visionary-style staggered editorial text reveal */
@keyframes visEyebrowIn {
  0%   { opacity: 0; transform: translate3d(-26px, 0, 0) scale(0.95); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes visTitleIn {
  0%   { opacity: 0; transform: translate3d(0, 28px, 0); clip-path: inset(0 0 100% 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); clip-path: inset(0 0 0% 0); }
}
@keyframes visDividerIn {
  0%   { opacity: 0; transform: scaleX(0); transform-origin: left center; }
  100% { opacity: 1; transform: scaleX(1); transform-origin: left center; }
}
@keyframes visCardIn {
  0%   { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.985); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.reveal section.present.visionary-reveal .eyebrow,
.reveal section.present.visionary-reveal .kicker {
  animation: visEyebrowIn 0.62s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}
.reveal section.present.visionary-reveal h1,
.reveal section.present.visionary-reveal h2 {
  animation: visTitleIn 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
}
.reveal section.present.visionary-reveal .gold-divider {
  animation: visDividerIn 0.62s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}
.reveal section.present.visionary-reveal .card,
.reveal section.present.visionary-reveal .glass-card,
.reveal section.present.visionary-reveal .info-card,
.reveal section.present.visionary-reveal .timeline-card,
.reveal section.present.visionary-reveal .stat-card,
.reveal section.present.visionary-reveal .hero-card {
  animation: visCardIn 0.64s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both;
}
.reveal section.present.visionary-reveal .card:nth-of-type(2),
.reveal section.present.visionary-reveal .glass-card:nth-of-type(2),
.reveal section.present.visionary-reveal .info-card:nth-of-type(2) {
  animation-delay: 0.40s;
}
.reveal section.present.visionary-reveal .card:nth-of-type(3),
.reveal section.present.visionary-reveal .glass-card:nth-of-type(3),
.reveal section.present.visionary-reveal .info-card:nth-of-type(3) {
  animation-delay: 0.50s;
}
.reveal section.present.visionary-reveal .card:nth-of-type(4),
.reveal section.present.visionary-reveal .glass-card:nth-of-type(4) {
  animation-delay: 0.58s;
}
/* === VISIONARY MORPH UPGRADE END === */
