/* ============================================
   STYLES.CSS — San Antonio de Padua 2026
   Colores, layout y componentes de ESTE proyecto
   ============================================ */

/* ============================================
   VARIABLES DE COLOR — Tema Oaxaqueño Oscuro
   ============================================ */
:root {
  --gold-deep: #b8860b;
  --gold: #d4a437;
  --gold-light: #f4d369;
  --gold-bright: #ffe48c;
  --gold-pale: #f5e8c4;
  --cream: #fff5dd;
  --ivory: #fffdf7;
  --ink: #2a1f0a;
  --dark-bg: #0a0814;
  --dark-bg2: #14102a;
  --dark-bg3: #1f1810;
  --red-flower: #d32f2f;
  --magenta: #c2185b;
  --orange: #ff7043;
  --shadow-warm: rgba(138, 106, 31, 0.25);
}

/* ============================================
   STAGE — Contenedor principal
   ============================================ */
.stage {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--dark-bg);
}

@media (min-width: 500px) and (min-height: 800px) {
  .stage {
    width: 405px;
    height: 720px;
    max-width: 405px;
    max-height: 720px;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  }
}

/* ============================================
   ESCENAS
   ============================================ */
.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 70px 12px 30px;
  transition: opacity 0.7s ease-in-out;
}
.scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* Fondo oscuro (escenas 2-5) */
.scene-dark {
  background:
    radial-gradient(
      ellipse at 20% 30%,
      rgba(233, 30, 99, 0.18) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 70%,
      rgba(255, 112, 67, 0.18) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 100%,
      rgba(212, 164, 55, 0.2) 0%,
      transparent 60%
    ),
    linear-gradient(
      180deg,
      var(--dark-bg) 0%,
      var(--dark-bg2) 50%,
      var(--dark-bg3) 100%
    );
}

/* ============================================
   PROGRESS DOTS
   ============================================ */
.progress-dots {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 100;
}
.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(244, 211, 105, 0.3);
  transition: all 0.3s;
}
.progress-dot.active {
  background: var(--gold-bright);
  width: 18px;
  border-radius: 100px;
  box-shadow: 0 0 8px var(--gold);
}
.progress-dot.completed {
  background: var(--gold);
}

/* ============================================
   BOTÓN DE MÚSICA
   ============================================ */
.music-toggle {
  position: absolute;
  top: 44px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid var(--gold-bright);
  z-index: 200;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.music-toggle:active {
  transform: scale(0.92);
}
.music-toggle svg {
  width: 14px;
  height: 14px;
  fill: var(--gold-bright);
}
.music-toggle.playing {
  background: rgba(201, 162, 74, 0.4);
}
.music-toggle.playing::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-bright);
  opacity: 0.6;
  animation: musicPulse 2s ease-in-out infinite;
}

/* ============================================
   TOUCH ZONES
   ============================================ */
.touch-zone {
  position: absolute;
  top: 44px;
  width: 30%;
  height: calc(100% - 50px);
  z-index: 50;
  cursor: pointer;
}
.touch-prev {
  left: 0;
}
.touch-next {
  right: 0;
}

/* ============================================
   HINT DE NAVEGACIÓN
   ============================================ */
.nav-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: var(--gold-bright);
  font-size: 11px;
  padding: 7px 14px;
  border-radius: 100px;
  z-index: 200;
  letter-spacing: 1px;
  animation: hintShow 4s ease-in-out forwards;
  pointer-events: none;
}

/* ============================================
   BANNER DE FECHA (marco ornamentado)
   ============================================ */
.date-banner-horizontal {
  position: relative;
  width: 100%;
  flex: 1;
  padding: 18px 10px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 200' preserveAspectRatio='none'><defs><linearGradient id='gradGold' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' stop-color='%23ffe48c'/><stop offset='50%25' stop-color='%23d4a437'/><stop offset='100%25' stop-color='%23b8860b'/></linearGradient></defs><path d='M 0 6 L 50 0 L 100 6 L 100 194 L 50 200 L 0 194 Z' fill='none' stroke='url(%23gradGold)' stroke-width='3' vector-effect='non-scaling-stroke'/></svg>")
      no-repeat center / 100% 100%,
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4));
  background-size:
    100% 100%,
    100% 100%;
  clip-path: polygon(0% 6%, 50% 0%, 100% 6%, 100% 94%, 50% 100%, 0% 94%);
  box-shadow: 0 0 25px rgba(212, 164, 55, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.dbh-day {
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-weight: 700;
  font-size: 11px;
  color: var(--cream);
  letter-spacing: 1.5px;
  background: var(--red-flower);
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.dbh-number {
  font-family: var(--font-yeseva, "Yeseva One", serif);
  font-size: 64px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 0.9;
  margin: 4px 0;
}
.dbh-month {
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-weight: 700;
  font-size: 11px;
  color: var(--cream);
  letter-spacing: 2px;
}
.dbh-time {
  font-family: var(--font-yeseva, "Yeseva One", serif);
  font-size: 20px;
  color: var(--gold-bright);
  line-height: 1;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(201, 162, 74, 0.5);
  width: 80%;
}

/* ============================================
   FILA FECHA + CONTENIDO (layout 2 columnas)
   ============================================ */
.scene2-mid-row {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: stretch;
  margin: 6px 0;
  padding: 0 4px;
  flex-shrink: 0;
}
.scene2-left {
  flex-shrink: 0;
  width: 115px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.scene2-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6px 4px;
  min-width: 0;
}

/* ============================================
   ETIQUETAS DE DÍA
   ============================================ */
.day-tag-big {
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold-bright);
  margin-bottom: 4px;
  background: var(--red-flower);
  padding: 4px 12px;
  border-radius: 100px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* ============================================
   TEXTO LIBRE (nombres sin marcos)
   ============================================ */
.encabezada-label {
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-weight: 700;
  font-size: 13px;
  color: var(--gold-bright);
  letter-spacing: 2.5px;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 1),
    0 0 12px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 1);
}
.encabezada-name {
  font-family: var(--font-edwardian, "Pinyon Script", cursive);
  font-weight: 400;
  font-size: 42px;
  background: linear-gradient(
    135deg,
    var(--gold-bright),
    var(--gold),
    var(--gold-bright)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.05;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 1))
    drop-shadow(0 0 20px rgba(0, 0, 0, 0.7));
  margin-bottom: 4px;
}

.ft-label {
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-weight: 700;
  font-size: 11px;
  color: var(--gold-bright);
  letter-spacing: 3px;
  margin-bottom: 4px;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 1),
    0 0 12px rgba(0, 0, 0, 0.8);
}
.ft-label-italic {
  font-family: var(--font-cormorant, "Cormorant Garamond", serif);
  font-style: italic;
  font-size: 13px;
  color: var(--cream);
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
}
.ft-name {
  font-family: var(--font-edwardian, "Pinyon Script", cursive);
  font-weight: 400;
  font-size: 34px;
  color: var(--cream);
  line-height: 1.1;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 1),
    0 0 20px rgba(0, 0, 0, 0.7);
}
.ft-name-big {
  font-family: var(--font-edwardian, "Pinyon Script", cursive);
  font-weight: 400;
  font-size: 76px;
  background: linear-gradient(
    135deg,
    var(--gold-bright),
    var(--gold-light),
    var(--gold-bright)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 1))
    drop-shadow(0 0 4px rgba(0, 0, 0, 1));
}

/* ============================================
   LISTA DE NOMBRES (scroll automático)
   ============================================ */
.names-container-full {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: rgba(10, 8, 20, 0.85);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 10px 0;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(212, 164, 55, 0.3);
  backdrop-filter: blur(2px);
}
.names-marquee {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-alegreya, "Alegreya", serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--cream);
  animation: marqueeUp 30s linear infinite;
}
.name-item {
  padding: 3px 14px;
  text-align: center;
}
.name-item::before {
  content: "✦";
  color: var(--gold-bright);
  margin-right: 10px;
  font-size: 12px;
}
.names-fade-top,
.names-fade-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
  z-index: 2;
}
.names-fade-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(10, 8, 20, 0.98), transparent);
}
.names-fade-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(10, 8, 20, 0.98), transparent);
}

/* ============================================
   BANNER MUSICAL
   ============================================ */
.music-banner {
  margin: 10px auto 0;
  padding: 10px 18px;
  background: linear-gradient(
    135deg,
    var(--magenta),
    var(--red-flower),
    var(--orange)
  );
  border-radius: 100px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  max-width: 360px;
}
.music-banner-text {
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-weight: 700;
  font-size: 11px;
  color: var(--cream);
  letter-spacing: 2px;
  line-height: 1.3;
  text-align: center;
}
.music-banner-text small {
  font-family: var(--font-cormorant, "Cormorant Garamond", serif);
  font-style: italic;
  font-size: 10px;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 3px;
  color: var(--gold-bright);
}

/* ============================================
   ¡NO FALTEN! y BOTÓN UBICACIÓN
   ============================================ */
.no-falten {
  font-family: var(--font-yeseva, "Yeseva One", serif);
  font-size: 22px;
  color: var(--gold-bright);
  letter-spacing: 3px;
  text-shadow:
    0 0 30px rgba(244, 211, 105, 0.9),
    0 0 60px rgba(212, 164, 55, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.8);
  margin-top: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.location-btn {
  position: relative;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border: 2px solid var(--cream);
  border-radius: 100px;
  padding: 10px 20px 10px 42px;
  color: var(--dark-bg);
  font-family: var(--font-cinzel, "Cinzel Decorative", serif);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  box-shadow:
    0 0 30px rgba(232, 201, 122, 0.7),
    0 6px 18px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  z-index: 10;
}
.location-btn:active {
  transform: scale(0.96);
}
.pin-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  z-index: 2;
}
.pin-pulse-ring {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--dark-bg);
  animation: pinRing 1.8s ease-out infinite;
  z-index: 1;
}

/* ============================================
   FLORES EN ESQUINAS
   ============================================ */
.flower-corner {
  position: absolute;
  width: 80px;
  height: 80px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}
.scene.active .flower-corner {
  animation: flowerIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}
.corner-tl {
  top: 45px;
  left: -5px;
}
.corner-tr {
  top: 45px;
  right: -5px;
  transform: scaleX(-1);
}
.corner-bl {
  bottom: 35px;
  left: -5px;
}

.corner-br {
  bottom: 35px;
  right: -5px;
}

.scene.active .corner-tr {
  animation: flowerIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}
.scene.active .corner-bl {
  animation: flowerIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}
.scene.active .corner-br {
  animation: flowerIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.85s forwards;
}

/* ============================================
   PAPEL PICADO (banner superior)
   ============================================ */
.papel-picado {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  z-index: 25;
  display: flex;
  pointer-events: none;
  overflow: hidden;
}

/* ============================================
   ESCENA 1: BIENVENIDA
   ============================================ */
#scene1 {
  background: radial-gradient(
    ellipse at center,
    #fffdf7 0%,
    #f5e8c4 60%,
    #d4b876 100%
  );
  justify-content: center;
  padding: 55px 20px 30px;
}

.santo-hero {
  width: 200px;
  height: 270px;
  margin-bottom: 12px;
  position: relative;
  opacity: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.scene.active .santo-hero {
  animation: santoIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}
.santo-hero::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    circle at center 35%,
    rgba(232, 201, 122, 0.6) 0%,
    rgba(201, 162, 74, 0.3) 30%,
    transparent 60%
  );
  z-index: -1;
  animation: auraPulse 4s ease-in-out infinite;
}

.ornament-top {
  font-family: var(--font-cinzel);
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--gold-deep);
  opacity: 0;
  margin-bottom: 4px;
}
.scene.active .ornament-top {
  animation: fadeUp 1s ease-out 1.8s forwards;
}

.title-festividad {
  font-family: var(--font-cinzel);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 4px;
  opacity: 0;
  margin-bottom: 4px;
}
.scene.active .title-festividad {
  animation: fadeUp 1s ease-out 2s forwards;
}

.title-honor {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: 2px;
  opacity: 0;
  margin-bottom: 6px;
}
.scene.active .title-honor {
  animation: fadeUp 1s ease-out 2.2s forwards;
}

.saint-name {
  font-family: var(--font-cinzel);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 3px;
  line-height: 1.3;
  opacity: 0;
  background: linear-gradient(
    135deg,
    var(--gold-deep),
    var(--gold),
    var(--gold-deep)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.scene.active .saint-name {
  animation: fadeUp 1.2s ease-out 2.5s forwards;
}

.year {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 34px;
  color: var(--gold-deep);
  letter-spacing: 12px;
  opacity: 0;
  text-shadow: 0 2px 10px rgba(138, 106, 31, 0.4);
  margin-bottom: 8px;
}
.scene.active .year {
  animation: yearReveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) 3s forwards;
}

.invitation-text {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  max-width: 340px;
  margin-top: 8px;
  opacity: 0;
  font-weight: 500;
  text-align: center;
}
.scene.active .invitation-text {
  animation: fadeUp 1s ease-out 4s forwards;
}

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ============================================
   ESCENA 2: CALENDA
   ============================================ */
.castillo-bg {
  position: absolute;
  right: -10px;
  top: 50px;
  bottom: 30px;
  width: 65%;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.scene-dark.active .castillo-bg {
  animation: castilloIn 1.5s ease-out 0.6s forwards;
}

/* Fondo real de cada escena */
#scene2 {
  background: linear-gradient(
    180deg,
    rgba(10, 8, 20, 0.55) 0%,
    rgba(10, 8, 20, 0.65) 40%,
    rgba(10, 8, 20, 0.85) 75%,
    rgba(10, 8, 20, 0.95) 100%
  );
  background-size: cover;
  background-position: center top;
  justify-content: flex-start;
  padding-top: 65px;
}
#scene3,
#scene4,
#scene5 {
  justify-content: flex-start;
  padding-top: 65px;
}

.scene-content-2 {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}

.event-title-top {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 15px;
  color: var(--gold-bright);
  letter-spacing: 3px;
  opacity: 0;
  margin-top: 5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  position: relative;
  z-index: 5;
}
.scene.active .event-title-top {
  animation: fadeUp 0.8s ease-out 0.4s forwards;
}

.event-script-big {
  font-family: var(--font-edwardian);
  font-weight: 400;
  font-size: 84px;
  background: linear-gradient(
    135deg,
    var(--gold-bright),
    var(--gold),
    var(--gold-bright)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  opacity: 0;
  margin-top: -8px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 20px rgba(212, 164, 55, 0.5));
  position: relative;
  z-index: 5;
}
.scene.active .event-script-big {
  animation: scriptIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}

.scene2-text-extra {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-size: 13px;
  color: var(--cream);
  line-height: 1.4;
  margin-top: 6px;
  opacity: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
}
.scene.active .scene2-text-extra {
  animation: fadeUp 0.8s ease-out 1.7s forwards;
}

.companions-label {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 13px;
  color: var(--gold-bright);
  letter-spacing: 3px;
  margin: 8px 0 4px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.6) 30%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0.6) 70%,
    transparent
  );
  padding: 6px 0;
  width: 100%;
  position: relative;
  z-index: 5;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 1);
}
.scene.active .companions-label {
  animation: fadeUp 0.8s ease-out 2s forwards;
}

/* ============================================
   ESCENA 3: PASEO
   ============================================ */
.scene-content-flex {
  position: relative;
  z-index: 5;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
  overflow: hidden;
}

/* ===== ESCENA 3: REGLA ÚNICA LIMPIA ===== */
#scene3 .scene3-mid-row {
  height: 170px;
  min-height: 170px;
  flex-shrink: 0;
}
#scene3 .scene3-mid-row .scene2-left {
  width: 105px;
  height: 100%;
}
#scene3 .scene3-mid-row .date-banner-horizontal {
  height: 100%;
  padding: 10px 8px;
}
#scene3 .scene3-mid-row .dbh-number {
  font-size: 52px;
}
#scene3 .scene3-mid-row .dbh-day {
  font-size: 10px;
  padding: 2px 6px;
}
#scene3 .scene3-mid-row .dbh-month {
  font-size: 10px;
}
#scene3 .scene3-mid-row .dbh-time {
  font-size: 16px;
}
#scene3 .scene3-mid-row .scene2-right {
  height: 100%;
  justify-content: center;
}
#scene3 .scene3-mid-row .encabezada-label {
  font-size: 13px;
}
#scene3 .scene3-mid-row .encabezada-name {
  font-size: 46px;
}

#scene3 .text-stack-s3 {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  padding: 2px 10px;
  overflow: visible;
  min-height: 0;
  gap: 0;
}
#scene3 .free-text-block {
  padding: 1px 0;
  margin: 0;
}
#scene3 .ft-label {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-bottom: 0;
}
#scene3 .ft-name {
  font-size: 20px;
  line-height: 1.1;
}

.free-text-block {
  text-align: center;
  width: 100%;
  opacity: 0;
}
.ft-music {
  font-family: var(--font-edwardian);
  font-weight: 400;
  font-size: 28px;
  color: var(--gold-bright);
  line-height: 1.1;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 1),
    0 0 20px rgba(0, 0, 0, 0.7);
}

/* ============================================
   ESCENA 4: CORONACIÓN
   ============================================ */
.scene4-mid-row {
  height: 260px !important;
  min-height: 260px !important;
  flex-shrink: 0 !important;
}
#scene4 .scene4-mid-row .scene2-left {
  width: 110px !important;
  height: 100% !important;
}
#scene4 .scene4-mid-row .date-banner-horizontal {
  height: 100% !important;
  padding: 14px 10px !important;
}
#scene4 .scene4-mid-row .dbh-number {
  font-size: 56px !important;
}
#scene4 .scene4-mid-row .dbh-day {
  font-size: 10px !important;
}
#scene4 .scene4-mid-row .dbh-month {
  font-size: 10px !important;
}
#scene4 .scene4-mid-row .dbh-time {
  font-size: 18px !important;
}
#scene4 .scene4-mid-row .scene2-right {
  height: 100% !important;
  justify-content: center !important;
}
#scene4 .scene4-mid-row .encabezada-label {
  font-size: 11px !important;
}
#scene4 .scene4-mid-row .encabezada-name {
  font-family: var(--font-edwardian) !important;
  font-weight: 400 !important;
  font-size: 44px !important;
  animation:
    scriptIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 1.3s forwards,
    scriptGlow 3s ease-in-out infinite 5s !important;
}

.crown-decoration.crown-image {
  width: 90px !important;
  height: 85px !important;
  margin: 2px auto !important;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 12px rgba(244, 211, 105, 0.5));
  opacity: 0;
  animation:
    crownAppear 1.5s cubic-bezier(0.22, 1, 0.36, 1) 1.3s forwards,
    crownShine 3s ease-in-out infinite 3s;
}

.text-stack-s4 {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-around !important;
  align-items: center !important;
  width: 100% !important;
  padding: 8px 12px;
  overflow: hidden;
  min-height: 0;
  gap: 6px;
}
#scene4 .text-stack-s4 .free-text-block:nth-of-type(1) {
  animation: fadeUp 0.8s ease-out 1.8s forwards;
}
#scene4 .text-stack-s4 .free-text-block:nth-of-type(2) {
  animation: fadeUp 0.8s ease-out 2.2s forwards;
}
#scene4 .text-stack-s4 .free-text-block:nth-of-type(3) {
  animation: fadeUp 0.8s ease-out 2.6s forwards;
}

.party-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.light-beam {
  position: absolute;
  top: 40%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0;
  mix-blend-mode: screen;
}
.scene.active .light-beam-1 {
  background: radial-gradient(
    circle,
    rgba(233, 30, 99, 0.5) 0%,
    transparent 70%
  );
  left: -100px;
  animation: lightSweep1 8s ease-in-out infinite;
}
.scene.active .light-beam-2 {
  background: radial-gradient(
    circle,
    rgba(0, 188, 212, 0.5) 0%,
    transparent 70%
  );
  right: -100px;
  animation: lightSweep2 10s ease-in-out infinite;
}
.scene.active .light-beam-3 {
  background: radial-gradient(
    circle,
    rgba(156, 39, 176, 0.4) 0%,
    transparent 70%
  );
  left: 30%;
  top: 60%;
  width: 200px;
  height: 200px;
  animation: lightSweep3 12s ease-in-out infinite;
}
.scene.active .light-beam-4 {
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.35) 0%,
    transparent 70%
  );
  right: 20%;
  top: 30%;
  width: 180px;
  height: 180px;
  animation: lightSweep4 9s ease-in-out infinite;
}
.stage-light {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe48c 30%, transparent 70%);
  opacity: 0;
  box-shadow:
    0 0 12px #ffe48c,
    0 0 24px rgba(244, 211, 105, 0.6);
}
.scene.active .stage-light {
  animation: stageBlink 3s ease-in-out infinite;
}

/* ============================================
   ESCENA 5: CIERRE
   ============================================ */
.scene5-mid-row {
  height: 210px !important;
  min-height: 210px !important;
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
}
#scene5 .scene5-mid-row .scene2-left {
  width: 110px !important;
  height: 100% !important;
}
#scene5 .scene5-mid-row .date-banner-horizontal {
  height: 100% !important;
  padding: 14px 10px !important;
}
#scene5 .scene5-mid-row .dbh-number {
  font-size: 52px !important;
}
#scene5 .scene5-mid-row .dbh-day {
  font-size: 10px !important;
}
#scene5 .scene5-mid-row .dbh-month {
  font-size: 10px !important;
}
#scene5 .scene5-mid-row .dbh-time {
  font-size: 16px !important;
}
#scene5 .scene5-mid-row .scene2-left::before {
  height: 100% !important;
}

/* Íconos esquinas inferiores escenas 4 y 5 — siempre derechos */
#scene4 .corner-bl,
#scene4 .corner-br,
#scene5 .corner-bl,
#scene5 .corner-br {
  transform: none !important;
  animation: flowerIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards !important;
}

.scene5-right {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  text-align: center !important;
  height: 100% !important;
  padding: 6px 4px !important;
  overflow: hidden;
  gap: 4px;
}
.s5-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  opacity: 1;
}
.s5-small-label {
  font-family: var(--font-cinzel) !important;
  font-size: 10px !important;
  color: var(--gold-bright) !important;
  letter-spacing: 2px !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1) !important;
}
.s5-script-name {
  font-family: var(--font-edwardian) !important;
  font-weight: 400 !important;
  font-size: 42px !important;
  background: linear-gradient(
    135deg,
    var(--gold-bright),
    var(--gold),
    var(--gold-bright)
  ) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 1)) !important;
  margin: 1px 0 !important;
}
.s5-divider {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  flex-shrink: 0;
  opacity: 0.6;
}
.s5-info-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  text-align: center;
  opacity: 1;
}
.s5-time-tag {
  display: inline-block;
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 9px;
  color: var(--cream);
  letter-spacing: 1.5px;
  background: var(--red-flower);
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 2px;
}
.s5-event-label {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 9px;
  color: var(--gold-bright);
  letter-spacing: 1.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 1);
  margin-bottom: 1px;
}
.s5-event-name {
  font-family: var(--font-edwardian);
  font-weight: 400;
  font-size: 22px;
  color: var(--cream);
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
}

.s5-free-block {
  text-align: center;
  padding: 6px 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  width: 100%;
  border-top: 1px solid rgba(212, 164, 55, 0.35);
  margin-top: 4px;
  padding-top: 8px;
}
.s5-free-label {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 13px;
  color: var(--gold-bright);
  letter-spacing: 3px;
  margin-bottom: 4px;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 1),
    0 0 12px rgba(0, 0, 0, 0.8);
}
.s5-free-sub {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-size: 12px;
  color: var(--gold-pale);
  margin-bottom: 2px;
}
.s5-free-role {
  font-family: var(--font-cinzel);
  font-size: 9px;
  color: var(--gold-light);
  letter-spacing: 2px;
  margin-bottom: 1px;
}
.s5-free-name {
  font-family: var(--font-edwardian);
  font-weight: 400;
  font-size: 28px;
  color: var(--cream);
  line-height: 1.1;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 1),
    0 0 20px rgba(0, 0, 0, 0.7);
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.fireworks-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

/* ============================================
   ESCENAS - Fondos con imágenes
   ============================================ */
#scene2 {
  background-image: linear-gradient(
    180deg,
    rgba(10, 8, 20, 0.55) 0%,
    rgba(10, 8, 20, 0.65) 40%,
    rgba(10, 8, 20, 0.85) 75%,
    rgba(10, 8, 20, 0.95) 100%
  );
  background-size: cover;
  background-position: center top;
}

/* Los fondos de escenas 2-5 se inyectan desde app.js con JS */
/* Escena 3 — compactar bloques para que quepan los 5 */
/* Escena 3 — regla única limpia para 5 bloques */
#scene3 .scene3-mid-row {
  height: 160px;
  min-height: 160px;
  flex-shrink: 0;
}
#scene3 .text-stack-s3 {
  overflow: visible;
  gap: 0;
  padding: 2px 10px;
}
#scene3 .free-text-block {
  padding: 1px 0;
  margin: 0;
}
#scene3 .ft-label {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-bottom: 0;
}
#scene3 .ft-name {
  font-size: 34px;
  line-height: 1.1;
}

/* Escena 4 — grupos musicales más legible */
#scene4 .ft-music {
  font-size: 35px !important;
  line-height: 1.4 !important;
  word-break: break-word !important;
  padding: 0 8px !important;
  text-align: center !important;
  letter-spacing: 0.5px !important;
}

/* Escena 5 — redistribuir espacio sin botón ubicación */
#scene5 .scene-content-flex {
  justify-content: space-evenly !important;
}
#scene5 .s5-free-block {
  padding: 8px 12px !important;
  margin-top: 35px !important;
}
#scene5 .s5-free-label {
  font-size: 14px !important;
  margin-bottom: 6px !important;
}
#scene5 .s5-free-name {
  font-size: 30px !important;
  line-height: 1.2 !important;
}
#scene5 .no-falten {
  font-size: 26px !important;
  margin-top: 12px !important;
}
#scene5 .s5-script-name {
  font-size: 60px !important;
}

/* Escena 3 — animaciones de entrada para los 5 bloques */
#scene3.active .text-stack-s3 .free-text-block:nth-of-type(1) {
  animation: fadeUp 0.8s ease-out 1.4s forwards;
}
#scene3.active .text-stack-s3 .free-text-block:nth-of-type(2) {
  animation: fadeUp 0.8s ease-out 1.7s forwards;
}
#scene3.active .text-stack-s3 .free-text-block:nth-of-type(3) {
  animation: fadeUp 0.8s ease-out 2s forwards;
}
#scene3.active .text-stack-s3 .free-text-block:nth-of-type(4) {
  animation: fadeUp 0.8s ease-out 2.3s forwards;
}
#scene3.active .text-stack-s3 .free-text-block:nth-of-type(5) {
  animation: fadeUp 0.8s ease-out 2.6s forwards;
}

/* ===== RENDIMIENTO MÓVIL: pausar animaciones en escenas inactivas ===== */
.scene:not(.active) * {
  animation-play-state: paused !important;
}
.scene.active * {
  animation-play-state: running;
}

/* ===== ESCENA 5 FIX FINAL ===== */

/* B2 fecha más ancha y cómoda */
#scene5 .scene5-mid-row .scene2-left {
  width: 120px !important;
}
#scene5 .scene5-mid-row .dbh-number {
  font-size: 48px !important;
}
#scene5 .scene5-mid-row .dbh-day {
  font-size: 9px !important;
  padding: 2px 6px !important;
}
#scene5 .scene5-mid-row .dbh-month {
  font-size: 9px !important;
}
#scene5 .scene5-mid-row .dbh-time {
  font-size: 15px !important;
}

/* Columna derecha más ordenada */
#scene5 .scene5-right {
  justify-content: center !important;
  gap: 6px !important;
}

/* Tag 5:00 AM más visible y bien ubicado */
#scene5 .s5-time-tag {
  font-size: 13px !important;
  padding: 3px 10px !important;
  margin-bottom: 3px !important;
  display: block !important;
}

/* Nombre San Antonio más compacto */
#scene5 .s5-script-name {
  font-size: 45px !important;
  line-height: 0.9 !important;
}

/* Mañanitas label */
#scene5 .s5-event-label {
  font-size: 13px !important;
  letter-spacing: 1px !important;
}

/* Nombre del prof más compacto */
#scene5 .s5-event-name {
  font-size: 22px !important;
  line-height: 1 !important;
}

/* Separador más sutil */
#scene5 .s5-divider {
  margin: 3px 0 !important;
}

/* PROFRES.: más visible */
#scene5 .s5-free-role {
  font-size: 10px !important;
  letter-spacing: 1.5px !important;
  color: var(--gold-bright) !important;
  margin-bottom: 2px !important;
}

/* Nombres mayordomos más grandes */
#scene5 .s5-free-name {
  font-size: 26px !important;
  line-height: 1.1 !important;
}

/* Bloques libres más compactos */
#scene5 .s5-free-block {
  padding: 5px 10px !important;
  margin-top: 3px !important;
}

/* No falten con más espacio */
#scene5 .no-falten {
  font-size: 22px !important;
  margin-top: 8px !important;
  margin-bottom: 6px !important;
}
