/* ============================================================
   🌹 INVITACIÓN XV – ESTILOS COMPLETOS (PORTAL + PRINCIPAL OPTIMIZADA)
   ============================================================ */

:root {
  --bg-deep: #0b0818;
  --gold: #c9a24d;
  --gold-light: #f0d9a3;
  --cream: #f4ead2;
  --serif-display: 'Cinzel', serif;
  --serif-body: 'Cormorant Garamond', serif;
  --script: 'Pinyon Script', cursive;
  --border-gold: #b8860b;
  --border-gold-light: #d4af37;
}

/* ===== GPU ACCELERATION BASE ===== */
html, body {
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

*:focus {
  outline: none !important;
}
* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;
  margin: 0;
}
body {
  font-family: var(--serif-body);
  background: var(--bg-deep);
  color: var(--cream);
  position: fixed;
  inset: 0;
  font-size: clamp(16px, 2.2vw, 20px);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg-deep);
  background-image: url('archivos/bella.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center; /* Unificado con el portal */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  will-change: transform;
}
#bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.8s ease;
}

/* ===== ELIMINADO EL CAMBIO EN MÓVIL PARA QUE SEA CONSISTENTE ===== */
/* Ya no hay @media que modifique background-position o size */

/* ===== VIDEOS OPTIMIZADOS ===== */
#video-app, #video-portal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
}
#video-app {
  z-index: 1;
  opacity: 0.7;
  mix-blend-mode: screen;
}
#video-portal {
  z-index: 0;
  opacity: 0.6;
  mix-blend-mode: screen;
}

.gold-text {
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(201, 162, 77, 0.2);
}
.frase-inline, .hint, .portal-caption {
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* ===== ELIMINAR PUNTOS BLANCOS Y BLUR ===== */
.portal-water-top {
  display: none !important;
}

/* ============================================================
   PORTAL
   ============================================================ */
#portal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #0d1f4a 0%, #0a122a 75%);
  transition: opacity 0.7s ease, visibility 0.7s ease;
  will-change: opacity, visibility;
  contain: layout style paint;
}
#portal.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.portal-inner {
  text-align: center;
  padding: 1rem;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
.portal-inner .eyebrow {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--serif-display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 1.2rem;
}
.gate-wrapper {
  position: relative;
  width: 85vw;
  max-width: 450px;
  height: 55vh;
  max-height: 500px;
  margin: 0 auto;
  perspective: 1000px;
  cursor: pointer;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.gate-wrapper.active {
  pointer-events: auto;
}
.gate-wrapper.active .gate-leaf svg {
  animation: gateGlowPulse 2.6s ease-in-out infinite;
}
@keyframes gateGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(201, 162, 77, 0.3)); }
  50% { filter: drop-shadow(0 0 38px rgba(212, 175, 55, 0.5)); }
}
.gate-wrapper::after {
  content: '';
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 150, 0.5) 0%, rgba(212, 175, 55, 0.22) 40%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.gate-wrapper.open::after {
  animation: gateOpenFlash 1.1s ease-out forwards;
}
@keyframes gateOpenFlash {
  0% { opacity: 0; transform: scale(0.85); }
  30% { opacity: 0.85; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.35); }
}

.gate-leaf {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  backface-visibility: hidden;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.gate-leaf svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 20px rgba(201, 162, 77, 0.3));
  paint-order: stroke fill markers;
}
.gate-left { left: 0; transform-origin: left center; }
.gate-right { right: 0; transform-origin: right center; }
.gate-right svg { transform: scaleX(-1); }

.gate-wrapper.open .gate-left {
  animation: closeLeft 0.6s ease reverse forwards;
}
.gate-wrapper.open .gate-right {
  animation: closeRight 0.6s ease reverse forwards;
}
#portal.closing .gate-left {
  animation: closeLeft 0.6s ease forwards;
}
#portal.closing .gate-right {
  animation: closeRight 0.6s ease forwards;
}
@keyframes closeLeft {
  0% { transform: rotateY(-110deg) translateX(-20px); opacity: 0.2; }
  100% { transform: rotateY(0deg) translateX(0); opacity: 1; }
}
@keyframes closeRight {
  0% { transform: rotateY(110deg) translateX(20px); opacity: 0.2; }
  100% { transform: rotateY(0deg) translateX(0); opacity: 1; }
}

.portal-caption {
  margin-top: 1.5rem;
  font-family: var(--serif-display);
  font-size: 1rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.portal-caption.show { opacity: 1; }

/* ============================================================
   OVERLAY DE TRANSICIÓN (portal)
   ============================================================ */
#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, 
    #0a1f3a 0%, 
    #0b2b5a 25%, 
    #0d2a4a 50%, 
    #0b2b5a 75%, 
    #061530 100%
  );
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  pointer-events: none;
  transform: translateZ(0);
  will-change: opacity;
  backface-visibility: hidden;
}
#transition-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.transition-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  transform: translateZ(0);
}

.transition-fondo-salida {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

#transition-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #0a1f3a;
  transform: translateZ(0);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.9s ease, transform 0.9s ease;
}

#transition-video.saliendo {
  opacity: 0;
  transform: translateZ(0) scale(1.04);
}

.transition-text {
  display: none;
}

@keyframes pulseText {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
}

@media (max-width: 768px) {
  .transition-text {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    padding: 0.4rem 1.2rem;
    margin-top: 0.8rem;
  }
}

/* ============================================================
   APP (página principal)
   ============================================================ */
#app {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.8rem 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  text-align: center;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  will-change: opacity;
  contain: layout style paint;
}
#app.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== SECCIONES ===== */
.seccion {
  width: 100%;
  background: rgba(10, 18, 34, 0.55);
  border: 2px solid var(--border-gold);
  border-radius: 24px;
  padding: 1.2rem 1rem;
  margin: 0.4rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.7s ease, transform 0.7s ease;
  position: relative;
  will-change: opacity, transform;
  backface-visibility: hidden;
  contain: layout style paint;
}

/* ===== ADORNOS DORADOS (diamantes) ===== */
.seccion::before {
  content: '✧';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: #d4af37;
  background: transparent;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  z-index: 2;
  line-height: 1;
  pointer-events: none;
}
.seccion h2::after {
  content: '✧';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: #d4af37;
  background: transparent;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  line-height: 1;
}

.seccion.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.seccion:not(.visible) {
  transition: none !important;
  opacity: 0 !important;
  transform: translate3d(0, 30px, 0) !important;
}

#seccion-inicio.visible { transition-delay: 0.05s; }
#seccion-familia.visible { transition-delay: 0.1s; }
#seccion-calendario.visible { transition-delay: 0.2s; }
#seccion-contador.visible { transition-delay: 0.3s; }
#seccion-gustos.visible { transition-delay: 0.35s; }
#seccion-lugares.visible { transition-delay: 0.4s; }
#seccion-itinerario.visible { transition-delay: 0.5s; }
#seccion-libro-firmas.visible { transition-delay: 0.6s; }
#seccion-agradecimientos.visible { transition-delay: 0.7s; }

/* Transiciones de entrada para elementos internos */
.seccion h2,
.seccion .seccion-subtitulo,
.seccion .detalle-card,
.seccion .familia-grupo,
.seccion .clock .unit,
.seccion .calendario-container,
.seccion .calendario-eventos,
.seccion .itinerario-lista,
.seccion .btn-mapa,
.seccion .libro-firmas-contenido,
.seccion .agradecimientos-contenido {
  opacity: 0;
  transform: translate3d(0, 15px, 0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.seccion.visible h2 { transition-delay: 0.1s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .seccion-subtitulo { transition-delay: 0.15s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .detalle-card { transition-delay: 0.2s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .familia-grupo { transition-delay: 0.25s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .clock .unit { transition-delay: 0.2s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .calendario-container { transition-delay: 0.2s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .calendario-eventos { transition-delay: 0.25s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .itinerario-lista { transition-delay: 0.2s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .btn-mapa { transition-delay: 0.3s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .libro-firmas-contenido { transition-delay: 0.2s; opacity: 1; transform: translate3d(0, 0, 0); }
.seccion.visible .agradecimientos-contenido { transition-delay: 0.2s; opacity: 1; transform: translate3d(0, 0, 0); }

#seccion-inicio.visible #app-top,
#seccion-inicio.visible #app-mid {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#seccion-inicio.visible #app-top { transition-delay: 0.05s; }
#seccion-inicio.visible #app-mid { transition-delay: 0.1s; }

/* ===== TÍTULOS (más pequeños) ===== */
.seccion h2 {
  font-family: var(--serif-display);
  text-align: center;
  font-size: clamp(1.1rem, 2.8vw, 1.5rem); /* reducido */
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fae3a0;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  margin: 0 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.2);
  position: relative;
}

/* ===== SUBTÍTULO GENERAL (se usa en varias secciones) ===== */
.seccion-subtitulo {
  font-family: var(--script);
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  text-align: center;
  color: #e0cfa0;
  margin: -0.2rem 0 0.8rem;
  opacity: 0.9;
  letter-spacing: 0.05em;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* ===== SUBTÍTULO DEL CONTADOR (más grande un 25%) ===== */
#seccion-contador .seccion-subtitulo {
  font-size: clamp(1.25rem, 3.5vw, 1.625rem);
}

/* ===== SUBTÍTULO DE FAMILIA (mismo tamaño que el del contador) ===== */
#seccion-familia .seccion-subtitulo {
  font-size: clamp(1.25rem, 3.5vw, 1.625rem);
}

#app:not(.show) .seccion,
#app:not(.show) #app-mid,
#app:not(.show) #app-top {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#app:not(.show) .seccion {
  transition-delay: 0.1s, 0.1s;
}
#app:not(.show) #app-mid {
  transition-delay: 0.05s, 0.05s;
}
#app:not(.show) #app-top {
  transition-delay: 0s, 0s;
}
#app:not(.show) .btn-mapa {
  transition-delay: 0.2s, 0.2s;
}

html.sin-reja #app {
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: none !important;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
#app-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 560px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  gap: 0.8rem;
  padding: 0 0.5rem 2rem;
  flex-shrink: 0;
}

#app-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.2rem;
  margin-bottom: 0.1rem;
  flex-shrink: 0;
}
#app-top .eyebrow {
  flex: 1;
  text-align: center;
  font-family: var(--serif-display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 1.2rem;
  color: #d4af37 !important;
}

/* ===== BOTONES SIN HOVER ===== */
.top-btn {
  background: none;
  border: 1.5px solid #d4af37;
  color: #f0d9a3;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background: rgba(201, 162, 77, 0.08);
  min-width: 40px;
  height: 40px;
  color: #d4af37 !important;
  transition: none;
}
#music-toggle svg { width: 24px; height: 24px; stroke: #d4af37; }

.gold-btn {
  border-color: #d4af37 !important;
  color: #d4af37 !important;
}
.gold-btn svg {
  stroke: #d4af37 !important;
}

/* ===== GIF CENTRAL (centrado y sin desplazamiento) ===== */
#oval-wrap {
  width: clamp(150px, 26cqw, 200px);
  height: clamp(210px, 38cqw, 290px);
  margin: 0 auto; /* centrado horizontal */
  margin-bottom: 0.1rem;
  margin-top: 0.9rem;
  position: relative;
  animation: ovalFlotar 4.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes ovalFlotar {
  0%, 100% { transform: translateY(-10px); }
  50% { transform: translateY(14px); }
}
.oval-mask {
  width: 100%;
  height: 100%;
  border-radius: 50% / 60%;
  overflow: hidden;
  border: 4px solid #d4af37;
  box-shadow: 0 0 30px rgba(201, 162, 77, 0.4);
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gif-central {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===== NOMBRE ARCOÍRIS ===== */
h1#nombre-hero {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(6.975rem, 22.5cqw, 8.775rem);
  line-height: 1.1;
  margin: 0.05rem 0;
  cursor: pointer;
  background: linear-gradient(90deg, #ff0000, #ff8800, #ffd700, #00ff00, #0088ff, #8800ff, #ff0000);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowMove 4s linear infinite;
  user-select: none;
  will-change: background-position;
}
@keyframes rainbowMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.frase-inline {
  font-style: italic;
  font-size: clamp(1.55rem, 4.2cqw, 1.8rem);
  margin: 0.05rem 0;
  color: #d4af37 !important;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  animation: none !important;
}

/* ===== HINT FINAL (más grande un 25%) ===== */
.hint-final {
  font-family: var(--script);
  font-size: clamp(1.5rem, 3.75vw, 1.875rem);
  color: #fae3a0;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  margin: 0.4rem 0 0.2rem;
  opacity: 0.9;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  /* Sin animación */
}

/* ============================================================
   CALENDARIO
   ============================================================ */
.calendario-container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 400px;
  margin: 0 auto 0.6rem;
  font-family: var(--serif-body);
  font-size: clamp(0.8rem, 1.8vw, 1rem);
}
.calendario-container .dia-nombre {
  font-weight: 600;
  color: #d4af37;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0;
  text-align: center;
}
.calendario-container .dia {
  background: rgba(10, 18, 34, 0.5);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 0.2rem 0;
  text-align: center;
  color: #f0e0c0;
  transition: none;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}
.calendario-container .dia.especial {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  transform: scale(1.05);
  font-weight: 700;
  color: #ffd700;
}
.calendario-container .dia.dia-10 {
  border-color: #ff69b4;
  background: rgba(255, 105, 180, 0.2);
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.5), inset 0 0 20px rgba(255, 105, 180, 0.2);
  transform: scale(1.08);
}
.calendario-container .dia.dia-10 .rosa {
  display: inline-block;
  animation: flotarRosa 2s ease-in-out infinite;
  will-change: transform;
}
@keyframes flotarRosa {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(15deg); }
}

/* ============================================================
   EVENTOS DEL CALENDARIO (tamaños aumentados un 50% respecto al original)
   ============================================================ */
.calendario-evento {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: rgba(10, 18, 34, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  color: #f0e0c0;
}

.calendario-evento .evento-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.6rem;
}

.calendario-evento .btn-agregar {
  font-family: var(--serif-display);
  font-size: clamp(0.9rem, 2vw, 1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0d9a3;
  background: rgba(201, 162, 77, 0.1);
  padding: 0.5rem 2rem;
  border-radius: 30px;
  border: 1.5px solid rgba(201, 162, 77, 0.35);
  cursor: pointer;
  transition: none;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ============================================================
   ITINERARIO (texto aumentado un 25%)
   ============================================================ */
.itinerario-dia {
  margin-bottom: 1rem;
}
.itinerario-dia-titulo {
  font-family: var(--serif-display);
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fae3a0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
  text-align: center;
}
.itinerario-lista {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 350px;
  margin: 0 auto;
}
.itinerario-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  font-family: var(--serif-body);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem); /* 25% más grande */
  color: #f0e0c0;
  transition: none;
}
.itinerario-hora {
  font-weight: 600;
  color: #d4af37;
}
.itinerario-evento {
  text-align: right;
  color: #fae3a0;
}

/* ============================================================
   RELOJ
   ============================================================ */
.clock {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.6rem;
}
.clock .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(ellipse at 30% 30%, rgba(30, 50, 80, 0.6), rgba(10, 18, 34, 0.8));
  border: 2px solid var(--border-gold);
  border-radius: 16px;
  padding: 0.6rem 0.2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  position: relative;
  flex: 1;
  min-width: 60px;
  text-align: center;
}
.clock .unit .circle-wrap {
  position: relative;
  width: 60px;
  height: 60px;
}
.clock .unit .circle-wrap svg {
  transform: rotate(-90deg);
  width: 60px;
  height: 60px;
}
.clock .unit .circle-wrap .bg-circle {
  fill: none;
  stroke: rgba(212, 175, 55, 0.2);
  stroke-width: 5;
}
.clock .unit .circle-wrap .progress-circle {
  fill: none;
  stroke: #d4af37;
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
  transition: stroke-dashoffset 0.3s ease;
}
.clock .unit .num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fae3a0 !important;
  font-size: clamp(1.2rem, 3vw, 1.6rem) !important;
  font-weight: 700;
  text-shadow: 0 0 15px #d4af37 !important;
  display: block;
  line-height: 1;
}
.clock .unit .lbl {
  color: #d4af37 !important;
  font-size: clamp(0.5rem, 1.2vw, 0.7rem) !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-top: 0.1rem;
}
.clock .unit::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 15%;
  width: 70%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  border-radius: 2px;
  opacity: 0.6;
}

#contador-mensaje {
  font-family: var(--script);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  text-align: center;
  color: #fae3a0;
  margin-top: 0.6rem;
  opacity: 0.9;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  transition: opacity 0.5s ease;
}

/* ============================================================
   TARJETAS DE LUGARES
   ============================================================ */
.detalle-card {
  background: rgba(10, 18, 34, 0.55);
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  padding: 1rem 1.2rem 0.8rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
}
.detalle-card .icono {
  width: 34px;
  height: 34px;
  margin: 0 auto 0.2rem;
  color: #d4af37;
  display: block;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.3));
}
.detalle-card h3 {
  font-family: var(--serif-display);
  text-align: center;
  font-size: clamp(0.95rem, 2.3vw, 1.1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
  color: #fae3a0;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}
.detalle-info {
  text-align: center;
  margin-bottom: 0.6rem;
}
.detalle-info .hora {
  font-family: var(--serif-body);
  font-weight: 600;
  font-size: clamp(1.08rem, 2.64vw, 1.32rem);
  color: #fae3a0;
  background: rgba(212, 175, 55, 0.08);
  padding: 0.1rem 1rem;
  border-radius: 20px;
  display: inline-block;
  border: 1px solid rgba(212, 175, 55, 0.12);
}
.detalle-info .lugar {
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  font-weight: 500;
  margin: 0.2rem 0 0.1rem;
  color: #e0d0b0;
  word-wrap: break-word;
}
.detalle-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}
.detalle-botones .btn-mapa {
  margin: 0;
}

/* ============================================================
   BOTONES ESTILO MAPA (unificados)
   ============================================================ */
.btn-mapa {
  display: block;
  width: fit-content;
  margin: 0.4rem auto 0;
  font-family: var(--serif-display);
  font-size: clamp(0.9rem, 2vw, 1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f0d9a3;
  background: rgba(201, 162, 77, 0.1);
  padding: 0.5rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  border: 1.5px solid rgba(201, 162, 77, 0.35);
  box-shadow: 0 0 15px rgba(212,175,55,0.08);
  transition: none;
  cursor: pointer;
  text-align: center;
}
/* Botón "Conoce mis gustos" con el mismo estilo que los demás */
#btn-abrir-gustos {
  width: auto !important;
  margin: 0.4rem auto 0 !important;
  font-size: clamp(0.9rem, 2vw, 1rem) !important;
  padding: 0.5rem 2rem !important;
  border: 1.5px solid rgba(201, 162, 77, 0.35) !important;
  background: rgba(201, 162, 77, 0.1) !important;
  box-shadow: 0 0 15px rgba(212,175,55,0.08) !important;
}

/* ============================================================
   FAMILIA
   ============================================================ */
.familia-grupo {
  background: rgba(10, 18, 34, 0.5);
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  padding: 0.8rem 1rem 0.6rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
}
.familia-titulo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}
.familia-titulo .corona {
  font-size: 1.2rem;
  color: #d4af37;
  opacity: 0.6;
}
.familia-grupo h3 {
  font-family: var(--serif-display);
  text-align: center;
  font-size: clamp(0.95rem, 2.3vw, 1.1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
  color: #fae3a0;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.15);
  padding-bottom: 0.3rem;
}
.familia-nombres {
  text-align: center;
  margin: 0.4rem 0 0.2rem;
}
.familia-nombres p {
  margin: 0.1rem 0;
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  color: #f0e0c0;
  font-weight: 500;
}
.familia-nombres .tratamiento {
  font-size: 0.75rem;
  font-family: var(--serif-display);
  color: #d4af37;
  opacity: 0.6;
  margin-right: 0.2rem;
}
.familia-detalle {
  text-align: center;
  font-family: var(--serif-body);
  font-style: italic;
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  color: #e0cfa0;
  opacity: 0.8;
  margin: 0.2rem 0 0;
  border-top: 1px solid rgba(212, 175, 55, 0.08);
  padding-top: 0.3rem;
}

/* ============================================================
   LIBRO DE FIRMAS
   ============================================================ */
.libro-firmas-contenido {
  text-align: center;
  padding: 0.5rem 0;
}
.libro-firmas-texto {
  font-family: var(--serif-body);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.8;
  color: #f0e0c0;
  margin: 0.6rem 0;
}
.libro-firmas-contenido .btn-mapa {
  display: inline-block;
}

/* ============================================================
   AGRADECIMIENTOS
   ============================================================ */
.agradecimientos-contenido {
  text-align: center;
  padding: 0.5rem 0;
}
.agradecimientos-texto {
  font-family: var(--serif-body);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.8;
  color: #f0e0c0;
  margin: 0.6rem 0;
}
.agradecimientos-firma {
  margin-top: 1.2rem;
  font-family: var(--script);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: #fae3a0;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}
.agradecimientos-firma .firma-nombre {
  display: block;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: #d4af37;
  user-select: none;
}
.agradecimientos-firma .firma-rol {
  display: block;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-family: var(--serif-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e0cfa0;
  opacity: 0.7;
  margin-top: -0.2rem;
}

/* ===== "No faltes" aumentado un 30% ===== */
.agradecimientos-no-faltes {
  font-family: var(--script);
  font-size: clamp(1.56rem, 3.9vw, 2.08rem);
  text-align: center;
  color: #fae3a0;
  margin-top: 0.2rem;
}

/* ============================================================
   SEPARADOR CON DIAMANTE
   ============================================================ */
.divider-thin {
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, #fae3a0, #d4af37, transparent);
  margin: 1.2rem 0 1.4rem;
  border-radius: 2px;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.15);
  position: relative;
}
.divider-thin::before {
  content: '✧';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  padding: 0 8px;
  color: #d4af37;
  font-size: 1.2rem;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  line-height: 1;
}

/* ============================================================
   MODAL COLLAGE
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 10, 25, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-gustos-card {
  max-width: 650px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.2rem;
}
.modal-gustos-card h2,
.modal-gustos-card .modal-subtitle,
.modal-gustos-card .btn-cerrar-collage {
  flex-shrink: 0;
}

.modal-card {
  width: 100%;
  background: radial-gradient(ellipse at 50% 30%, #1c2a44, #0d1424 80%);
  border: 3px solid #b8860b;
  border-radius: 30px;
  padding: 2rem 1.6rem;
  position: relative;
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
@media (pointer: coarse) {
  .modal-card {
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.2), 0 0 0 6px rgba(26, 42, 70, 0.5), 0 0 50px rgba(184, 134, 11, 0.12), inset 0 0 60px rgba(25, 50, 100, 0.15);
  }
}
.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  border: 1.5px solid #b8860b;
  color: #fae3a0;
  cursor: pointer;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  line-height: 1;
  opacity: 0.8;
}
.modal-close:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #ffffff;
  opacity: 1;
  transform: rotate(90deg);
}

.modal-card h2 {
  font-family: var(--serif-display);
  text-align: center;
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fae3a0;
  text-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
  margin: 0 0 1.1rem;
  padding-bottom: 1rem;
  position: relative;
}
.modal-card h2::before {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.35) 20%,
    rgba(212, 175, 55, 0.35) 42%,
    transparent 46%,
    transparent 54%,
    rgba(212, 175, 55, 0.35) 58%,
    rgba(212, 175, 55, 0.35) 80%,
    transparent 100%);
}
.modal-card h2::after {
  content: '✧';
  position: absolute;
  bottom: 0.05rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: #d4af37;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}
.modal-subtitle {
  font-family: var(--serif-body);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 500;
  text-align: center;
  color: #e0cfa0;
  margin: 0 0 1rem;
  opacity: 0.9;
  letter-spacing: 0.05em;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* ===== COLLAGE ===== */
.collage-container {
  flex: 1;
  min-height: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 0.5rem 0;
  background: transparent;
  border: 3px solid #b8860b;
  border-radius: 16px;
}
.collage-container .collage-item {
  position: absolute;
  display: block;
  pointer-events: none;
  opacity: 1;
  object-fit: contain;
  border-radius: 10px;
  -webkit-user-select: none;
  user-select: none;
}

.modal-gustos-card::-webkit-scrollbar {
  display: none;
}
.modal-gustos-card {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.btn-cerrar-collage {
  margin: 1rem auto 0;
  display: block;
}

/* ============================================================
   PAUSAR ANIMACIONES AL ABRIR EL MODAL (el contador NO se pausa)
   ============================================================ */
body.modal-open #oval-wrap,
body.modal-open h1#nombre-hero,
body.modal-open .calendario-container .dia.dia-10 .rosa,
body.modal-open .gate-wrapper.active .gate-leaf svg,
body.modal-open .frase-inline,
body.modal-open .hint-final {
  animation-play-state: paused !important;
}

/* También detener transiciones que puedan estar activas */
body.modal-open .seccion.visible * {
  transition: none !important;
}

/* ============================================================
   RESPONSIVE Y MEJORAS MÓVIL
   ============================================================ */
@media (pointer: coarse) {
  .hint-final {
    /* sin animación */
  }
  .calendario-container .dia.dia-10 .rosa {
    animation-duration: 3s !important;
  }
  #app-inner {
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 400px) {
  #app { padding: 0.3rem 0.6rem 0; }
  #app-inner { gap: 0.6rem; padding: 0 0.2rem 2rem; }
  h1#nombre-hero { font-size: clamp(6.075rem, 22.5cqw, 7.2rem); }
  .frase-inline { font-size: clamp(1.3rem, 3.8cqw, 1.5rem); }
  #app-top .eyebrow { font-size: 1rem; }
  .top-btn { font-size: 1.1rem; min-width: 32px; height: 32px; }
  .seccion { padding: 1rem 0.8rem; }
  .clock .unit .circle-wrap { width: 45px; height: 45px; }
  .clock .unit .circle-wrap svg { width: 45px; height: 45px; }
  .calendar-style .num { font-size: 1rem !important; }
  .calendar-style .unit { padding: 0.3rem 0.1rem; min-width: 35px; }
  .detalle-card, .familia-grupo { padding: 1rem 1.1rem 0.9rem; margin-bottom: 1.3rem; }
  .detalle-info { margin-bottom: 0.7rem; }
  .familia-nombres { margin: 0.5rem 0 0.35rem; }
  .divider-thin { margin: 1.1rem 0 1.3rem; }
  .calendario-container { gap: 2px; font-size: 0.7rem; }
  .calendario-evento { flex-wrap: wrap; gap: 0.2rem; justify-content: center; }
  .itinerario-item { font-size: clamp(1rem, 2.2vw, 1.2rem); }
  .detalle-botones { flex-direction: column; align-items: center; }
  .modal-gustos-card { padding: 1.2rem 0.8rem; }
  .collage-container { aspect-ratio: 4/3; }
}
@media (min-width: 768px) {
  #app { padding: 0.6rem 2rem 0; }
  #app-inner { max-width: 640px; gap: 1rem; padding: 0 0.5rem 3rem; }
  #oval-wrap { width: clamp(200px, 22vh, 300px); height: clamp(280px, 32vh, 420px); }
  h1#nombre-hero { font-size: clamp(8.4375rem, 16.875vh, 12.375rem); }
  .frase-inline { font-size: clamp(1.7rem, 3vh, 2.2rem); }
  .hint-final { font-size: clamp(1.5rem, 3.75vw, 1.875rem); }
  .seccion { padding: 1.5rem 1.5rem; }
}
@media (min-width: 768px) and (max-height: 900px) {
  #app-mid { gap: 0.6rem; }
  #oval-wrap { width: clamp(180px, 20vh, 260px); height: clamp(250px, 30vh, 360px); }
  h1#nombre-hero { font-size: clamp(7.875rem, 15.75vh, 11.8125rem); }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: rgba(201, 162, 77, 0.3); border-radius: 3px; }

@media (hover: none) and (pointer: coarse) {
  .gate-wrapper.active .gate-leaf svg { animation-duration: 1.8s; }
  #oval-wrap { animation-duration: 4s; }
  h1#nombre-hero { animation-duration: 2.5s; }
  .calendario-container .dia.dia-10 .rosa { animation-duration: 3s; }
}
