/* Colores y tipografías: cambia estos valores y toda la página se actualiza. */
:root {
  color-scheme: light;
  --bg: #f5e6e8;
  --bg-deep: #efd8dc;
  --surface: rgba(255, 255, 255, .52);
  --surface-solid: #fbf3f4;
  --line: rgba(120, 40, 60, .13);
  --ink: #2a1418;
  --muted: #6f565b;
  --wine: #8e0f2f;
  --wine-deep: #670a21;
  --blush: #e8bcc5;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --shadow: 0 18px 44px -22px rgba(103, 10, 33, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), var(--bg-deep)) fixed;
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
h1, h2, h3, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 7.5vw, 2.1rem); line-height: 1.15; }

.eyebrow { font-size: .7rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.eyebrow.small { font-size: .62rem; margin-top: .45rem; }
.center { text-align: center; }
.lede { color: var(--muted); max-width: 32ch; margin: .75rem auto 0; text-wrap: balance; }
.italic { font: italic 400 1.1rem/1.4 var(--serif); }

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 28px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(26px); filter: blur(5px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Corazones flotantes */
.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ambient svg { position: absolute; bottom: -24px; fill: var(--wine); opacity: 0; animation: drift var(--t) linear var(--delay) infinite; }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(-8deg); opacity: 0; }
  15% { opacity: var(--o); }
  85% { opacity: var(--o); }
  100% { transform: translate(var(--x), -105vh) rotate(12deg); opacity: 0; }
}

/* Puertas de entrada */
.gate {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, var(--bg), var(--bg-deep));
  transition: opacity .6s ease;
}
.gate > * { position: relative; }
.gate > .ambient { position: absolute; }
.gate.leaving { opacity: 0; pointer-events: none; }
.envelope { width: min(100%, 380px); padding: 34px 24px 30px; animation: rise 1s var(--ease) both; }
#gate-card.leaving .envelope { transform: translateY(-24px) scale(.97); transition: transform .5s ease; }
.envelope h1 { font-size: 3rem; line-height: 1.1; margin-top: .2rem; }
.rule { display: block; width: 54px; height: 1px; background: var(--wine); opacity: .5; margin: 14px auto; }
.from { font-size: .95rem; }
.from strong { font-weight: 600; }
.dedication { font: italic 400 1.05rem/1.5 var(--serif); margin-top: 16px; text-wrap: balance; }
.hint { color: var(--ink); font-size: .92rem; margin-top: 30px; animation: rise 1s var(--ease) .25s both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

.heart-btn { margin-top: 22px; padding: 10px; animation: rise 1s var(--ease) .4s both; }
.heart-btn svg { display: block; width: 64px; fill: none; stroke: var(--wine); stroke-width: 2.4; overflow: visible; animation: beat 1.5s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } 60% { transform: scale(1); } }

.fill-heart { width: min(58vw, 240px); padding: 0; animation: rise .8s var(--ease) both; }
.fill-heart svg { display: block; width: 100%; overflow: visible; transition: transform .22s var(--ease); }
.fill-heart.pulse svg { transform: scale(1.07); }
.fill-heart .level { fill: var(--wine); transition: transform .5s var(--ease); }
.fill-heart .outline { fill: none; stroke: var(--wine); stroke-width: 1; }
.fill-heart.burst svg { transform: scale(18); transition: transform 1s cubic-bezier(.7, 0, .84, 0); }
.fill-heart.done .outline { fill: var(--wine); transition: fill .25s; }
#gate-heart .hint { transition: opacity .3s; }
#gate-heart.bursting .hint { opacity: 0; }

.tap-heart { position: fixed; z-index: 30; width: 16px; fill: var(--wine); pointer-events: none; animation: tapUp .95s ease-out forwards; }
@keyframes tapUp {
  from { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  to { transform: translate(calc(-50% + var(--x)), calc(-50% - 80px)) scale(1.15); opacity: 0; }
}

/* Página */
.page { width: 100%; max-width: 520px; margin: 0 auto; animation: fadeIn 1s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.section { padding: 60px 16px 0; }
.section h2 { margin-top: 10px; }

.hero { position: relative; height: 66svh; min-height: 440px; overflow: hidden; color: #fff; border-radius: 0 0 28px 28px; }
.hero img { position: absolute; inset: -8% 0 auto; width: 100%; height: 116%; object-fit: cover; animation: heroZoom 2.4s var(--ease) both; will-change: transform; }
@keyframes heroZoom { from { scale: 1.14; } to { scale: 1; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(30, 5, 12, .82)); }
.hero-back { position: absolute; z-index: 2; top: max(14px, env(safe-area-inset-top)); left: 14px; display: inline-flex; align-items: center; gap: 3px; min-height: 44px; padding: 8px 16px 8px 10px; border-radius: 99px; background: rgba(30, 10, 15, .5); color: #fff; font-size: .84rem; font-weight: 500; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s, background .2s; animation: rise 1s var(--ease) .7s both; }
.hero-back:active { transform: scale(.96); background: rgba(30, 10, 15, .7); }
.hero-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-text { position: absolute; z-index: 1; inset: auto 16px 30px; text-align: center; }
.hero-text > * { animation: rise 1.1s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .15s; }
.hero-text > :nth-child(3) { animation-delay: .3s; }
.hero-text > :nth-child(4) { animation-delay: .45s; }
.hero .eyebrow { color: rgba(255, 255, 255, .85); }
.hero h1 { font-size: 3rem; line-height: 1.1; margin-top: .2rem; }
.hero-sign { font: italic 400 1.1rem var(--serif); margin-top: .2rem; }
.hero-date { margin-top: 12px; }

/* Canción */
#songs-title { margin: 10px auto 0; max-width: 16em; }
.songs-stage { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 24px -8px 0; touch-action: pan-y; }
.song-arrow { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--wine); transition: background .2s, transform .2s; }
.song-arrow:active { background: rgba(142, 15, 47, .12); transform: scale(.92); }
.song-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.song-arrow.next svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(5px); } }
.song-name { margin-top: 18px; font: 400 1.35rem/1.2 var(--serif); }
.song-dots { justify-content: center; margin-top: 12px; }
.song-hint { margin-top: 10px; color: var(--muted); font-size: .84rem; }
.disc-wrap { position: relative; flex: 0 1 min(58vw, 250px); aspect-ratio: 1; }
.disc { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; box-shadow: 0 22px 46px -18px rgba(60, 5, 20, .55); animation: spin 14s linear infinite paused; }
.disc.playing { animation-play-state: running; }
.disc img { width: 100%; height: 100%; object-fit: cover; }
.disc-wrap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: repeating-radial-gradient(circle, transparent 0 7px, rgba(255, 255, 255, .06) 7px 8px); }
@keyframes spin { to { transform: rotate(360deg); } }
.disc-btn {
  position: absolute; z-index: 1; top: 50%; left: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  display: grid; place-items: center; border-radius: 50%; background: var(--wine); color: #fff;
  box-shadow: 0 0 0 8px rgba(142, 15, 47, .2); transition: transform .25s var(--ease);
}
.disc-btn:active { transform: scale(.92); }
.disc-btn svg, .round-play svg { width: 30px; height: 30px; fill: currentColor; grid-area: 1 / 1; transition: opacity .2s, transform .2s; }
.i-pause { opacity: 0; transform: scale(.6); }
.playing > .i-pause { opacity: 1; transform: none; }
.playing > .i-play { opacity: 0; transform: scale(.6); }
.eq { position: absolute; z-index: 1; left: 50%; bottom: 17%; display: flex; gap: 3px; align-items: flex-end; height: 18px; transform: translateX(-50%); opacity: 0; transition: opacity .3s; }
.eq.on { opacity: 1; }
.eq i { width: 3px; height: 100%; background: #fff; border-radius: 2px; transform-origin: bottom; animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.55s; }
.eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.spotify { margin-top: 18px; }
.spotify-frame { min-height: 152px; }
.spotify iframe { display: block; border: 0; border-radius: 22px; width: 100%; }
.spotify-empty { display: flex; align-items: center; justify-content: center; min-height: 112px; padding: 18px 22px; border: 1px dashed rgba(142, 15, 47, .35); border-radius: 22px; color: var(--muted); font-size: .92rem; text-wrap: balance; }
/* Galería */
.gallery { display: flex; gap: 12px; margin: 24px -16px 0; padding: 4px 12%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; aspect-ratio: 3 / 4; border-radius: 34px; overflow: hidden; scroll-snap-align: center; box-shadow: var(--shadow); transform: scale(.93); opacity: .72; transition: transform .55s var(--ease), opacity .55s; }
.slide.active { transform: none; opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide span { position: absolute; top: 14px; right: 14px; padding: 2px 10px; border-radius: 99px; background: rgba(30, 10, 15, .5); color: #fff; font-size: .72rem; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gallery-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.gallery-nav button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.gallery-nav button:active { background: var(--surface); }
.gallery-nav button:disabled { opacity: .25; cursor: default; }
.gallery-nav svg { width: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dots { display: flex; gap: 6px; }
.dots i { width: 6px; height: 4px; border-radius: 4px; background: var(--blush); transition: width .35s var(--ease), background .35s; }
.dots i.on { width: 20px; background: var(--wine); }

/* Carta */
.letter > .eyebrow { margin-bottom: 20px; }
.letter p:not(.eyebrow) { font: italic 400 1.14rem/1.62 var(--serif); margin-bottom: 1.15em; }
.letter .sign { font-size: 1.3rem; margin-bottom: .6em; }

/* Línea de tiempo */
.counter { display: flex; flex-direction: column; align-items: center; margin-top: 26px; padding: 26px 16px 22px; }
.counter strong { font: 400 3.4rem/1 var(--serif); color: var(--wine); font-variant-numeric: tabular-nums; }
.counter .eyebrow { margin-top: 8px; color: var(--ink); }
.counter small { color: var(--muted); margin-top: 2px; font-size: .84rem; }
.origin { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; }
.origin svg { flex: none; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.timeline { position: relative; margin-top: 28px; padding-left: 22px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 1.5px; }
.timeline::before { background: var(--line); }
.timeline::after { background: var(--wine); transform-origin: top; transform: scaleY(var(--p, 0)); }
.moment { position: relative; margin-bottom: 14px; }
.moment::before { content: ""; position: absolute; z-index: 1; left: -22px; top: 24px; width: 10px; height: 10px; border-radius: 50%; background: var(--wine); transform: scale(0); transition: transform .55s var(--ease) .25s; }
.moment.in::before { transform: scale(1); }
.moment .card { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 16px 14px; border-radius: 22px; }
.moment img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; }
.moment time { display: block; font-size: .78rem; letter-spacing: .03em; color: var(--muted); }
.moment h3 { font-size: 1.25rem; line-height: 1.2; margin: 2px 0 6px; }
.moment p { font-size: .9rem; line-height: 1.45; color: #4d383c; }
.moment-open { width: 100%; text-align: left; transition: transform .25s var(--ease), background .25s; }
.moment-open:active { transform: scale(.98); background: rgba(255, 255, 255, .75); }
.moment-open img { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 3.5px var(--wine); animation: ring 2.2s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 6px rgba(142, 15, 47, .3); } }
.moment-cue { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin-top: 10px; padding: 5px 13px 5px 10px; border-radius: 99px; background: var(--wine); color: #fff; font-size: .8rem; }
.moment-cue b { font-weight: 500; }
.moment-cue svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Visor de fotos de cada momento */
.viewer { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 0 max(14px, env(safe-area-inset-bottom)); background: #1d0a10; color: #fff; animation: fadeIn .35s ease both; transition: opacity .3s; }
.viewer.leaving { opacity: 0; }
.viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 16px 12px; }
.viewer-head .eyebrow { color: rgba(255, 255, 255, .7); letter-spacing: .14em; }
.viewer-head h2 { font-size: 1.55rem; margin-top: 2px; }
#viewer-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
#viewer-close:active { background: rgba(255, 255, 255, .25); }
.viewer svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.viewer button:focus-visible, .viewer-track:focus-visible { outline-color: #fff; }
.viewer-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; scroll-snap-align: center; scroll-snap-stop: always; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 18px; animation: viewerIn .6s var(--ease) both; }
@keyframes viewerIn { from { opacity: 0; transform: scale(.93) translateY(14px); } }
.viewer-hint { text-align: center; font-size: .84rem; color: rgba(255, 255, 255, .78); margin-top: 10px; transition: opacity .3s; }
.viewer-hint.gone { opacity: 0; }
.viewer-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 2px; font-size: .86rem; font-variant-numeric: tabular-nums; }
.viewer-nav button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: opacity .25s; }
.viewer-nav button:disabled { opacity: .25; cursor: default; }

/* Audios */
#voices-title { margin-left: auto; margin-right: auto; max-width: 15em; }
.voices { display: flex; gap: 12px; margin: 24px -16px 0; padding: 4px 28px 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 28px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.voices::-webkit-scrollbar { display: none; }
.voice { flex: 0 0 100%; padding: 20px 18px; scroll-snap-align: center; scroll-snap-stop: always; }
#voice-nav { margin-top: 0; }
.voice-head { display: flex; align-items: center; gap: 12px; }
.round-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wine); color: #fff; }
.round-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.round-icon.soft { width: 52px; height: 52px; background: rgba(142, 15, 47, .1); }
.round-icon.soft svg { fill: var(--wine); stroke: none; }
.voice-from { font-weight: 500; line-height: 1.3; }
.wave-bars { display: flex; align-items: center; justify-content: space-between; height: 72px; margin: 14px 0; cursor: pointer; touch-action: pan-y; }
.wave-bars i { width: 3px; min-height: 4px; border-radius: 3px; background: rgba(103, 60, 70, .32); transform: scaleY(.15); transition: background .2s, transform .7s var(--ease); transition-delay: 0s, var(--d, 0ms); }
.voice.in .wave-bars i { transform: none; }
.wave-bars i.on { background: var(--wine); }
.voice-controls { display: flex; align-items: center; gap: 12px; }
.round-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wine); color: #fff; transition: transform .2s; }
.round-play:active { transform: scale(.92); }
.round-play svg { width: 22px; height: 22px; }
.track { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.track span { display: block; height: 100%; width: 100%; background: var(--wine); transform: scaleX(0); transform-origin: left; }
.voice-controls time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Mapa */
.map-wrap { position: relative; margin-top: 24px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); isolation: isolate; }
#map { height: 340px; background: #e9dcd8; }
#map .leaflet-tile-pane { filter: sepia(.28) saturate(.82) hue-rotate(-12deg); }
.map-chip { position: absolute; z-index: 800; left: 50%; bottom: 24px; transform: translateX(-50%); white-space: nowrap; padding: 6px 14px; border-radius: 99px; background: rgba(30, 15, 18, .85); color: #fff; font-size: .78rem; pointer-events: none; }
.map-chip:not(:disabled) { pointer-events: auto; min-height: 40px; padding: 8px 18px; background: var(--wine); font-size: .84rem; font-weight: 500; }
.map-fallback { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; color: var(--muted); }
.pin { background: none; border: 0; }
.pin b {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; rotate: -45deg;
  background: var(--wine); border: 2px solid #fff; box-shadow: 0 6px 12px rgba(60, 5, 20, .35);
  transition: background .25s, scale .3s var(--ease); animation: pinDrop .75s var(--ease) both; animation-delay: var(--d);
}
.pin b span { rotate: 45deg; color: #fff; font: 600 .85rem var(--sans); }
.pin.active b { background: var(--wine-deep); scale: 1.2; }
@keyframes pinDrop { from { translate: 0 -46px; opacity: 0; } }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 10px 14px; font: 500 .85rem/1.35 var(--sans); }
.leaflet-container a.leaflet-popup-close-button { display: none; }
.leaflet-bar a { color: var(--ink) !important; }
.places { margin-top: 16px; display: grid; gap: 12px; }
.place { display: grid; grid-template-columns: 34px 1fr; gap: 12px; width: 100%; padding: 15px 14px; text-align: left; border: 1px solid transparent; transition: border-color .3s, transform .3s var(--ease), background .3s; }
.place:active { transform: scale(.985); }
.place.active { border-color: var(--wine); background: rgba(255, 255, 255, .72); }
.place .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--wine); color: #fff; font: 600 .82rem var(--sans); }
.place h3 { display: inline; font-size: 1.1rem; margin-right: 8px; }
.place .when { display: inline-block; padding: 1px 9px; border-radius: 99px; background: rgba(142, 15, 47, .1); color: var(--wine); font-size: .72rem; vertical-align: 2px; }
.place p { font-size: .9rem; line-height: 1.42; color: #4d383c; margin-top: 5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.place.active p { -webkit-line-clamp: unset; }
.place small { display: block; margin-top: 6px; color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cierre */
.closing-words { padding-top: 72px; }
.closing-words p { font: italic 400 1.14rem/1.62 var(--serif); margin-bottom: 1.15em; }
.closing-words .closing-final { font: 400 2.4rem/1.15 var(--serif); color: var(--wine); text-align: center; margin: 1.1em 0 0; }
.closing { position: relative; margin-top: 40px; min-height: 92svh; display: flex; align-items: flex-end; justify-content: center; text-align: center; overflow: hidden; }
.closing-photo { position: absolute; inset: 0; }
.closing-photo img { width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 42%, transparent 88%); mask-image: linear-gradient(180deg, transparent, #000 12%, #000 42%, transparent 88%); }
.closing-text { position: relative; z-index: 1; padding: 0 16px 44px; }
.closing-text h2 { margin-top: 6px; font-size: 2.2rem; }
.closing-text p:not(.eyebrow) { font: italic 400 1.1rem var(--serif); margin: 6px 0 14px; }
.mini-heart { width: 26px; fill: var(--wine); animation: beat 1.5s ease-in-out infinite; }

/* Última sorpresa */
.surprise-wrap { padding-top: 40px; padding-bottom: 70px; }
.surprise { display: flex; flex-direction: column; align-items: center; padding: 28px 22px 30px; text-align: center; }
.surprise h2 { font-size: 1.65rem; text-transform: uppercase; letter-spacing: .02em; margin: 16px 0 8px; }
.surprise > p:not(.italic) { color: var(--muted); }
.surprise .italic { margin-top: 4px; text-wrap: balance; }
.cta { position: relative; overflow: hidden; margin-top: 24px; min-height: 52px; padding: 12px 28px; border-radius: 99px; background: linear-gradient(135deg, var(--wine), var(--wine-deep)); color: #fff; font-weight: 500; box-shadow: 0 14px 26px -12px rgba(103, 10, 33, .75); transition: transform .2s var(--ease); }
.cta:active { transform: scale(.96); }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35), transparent 70%); transform: translateX(-120%); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 55%, 100% { transform: translateX(120%); } }

.overlay { position: fixed; inset: 0; z-index: 25; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; background: linear-gradient(180deg, var(--bg), var(--bg-deep)); animation: fadeIn .55s ease both; transition: opacity .45s; }
.overlay.leaving { opacity: 0; }
.overlay > .ambient { position: fixed; }
.quiz-stage, .win { position: relative; width: min(100%, 420px); text-align: center; }
.quiz-stage .lede { font-size: .92rem; }
.steps { display: flex; justify-content: center; gap: 6px; margin: 20px 0 22px; }
.steps i { width: 7px; height: 5px; border-radius: 5px; background: var(--blush); transition: width .35s var(--ease), background .35s; }
.steps i.done { background: var(--wine); }
.steps i.on { width: 22px; background: var(--wine); }
.question { padding: 24px 18px 20px; text-align: left; animation: slideQ .55s var(--ease) both; }
@keyframes slideQ { from { opacity: 0; transform: translateX(34px); } }
.question h2 { font-size: 1.65rem; margin: 10px 0 20px; }
.option { display: block; width: 100%; min-height: 50px; padding: 12px 18px; margin-top: 10px; border-radius: 26px; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, .35); transition: background .3s, color .3s, opacity .3s, transform .2s; animation: rise .5s var(--ease) both; }
.option:active { transform: scale(.98); }
.option.right { background: var(--wine); color: #fff; border-color: var(--wine); transform: scale(1.02); animation: none; }
.option.wrong { opacity: .45; animation: shake .4s ease; }
.option-gap { margin-top: 10px; }
.option.fleeing { position: fixed; z-index: 35; margin: 0; background: var(--surface-solid); box-shadow: var(--shadow); text-align: center; touch-action: none; animation: none; transition: left .3s var(--ease), top .3s var(--ease), transform .2s; }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.quiz-nav button { display: inline-flex; align-items: center; gap: 4px; min-height: 46px; padding: 8px 16px; border-radius: 99px; font-size: .92rem; font-weight: 500; transition: opacity .25s, transform .2s, background .25s; }
.quiz-nav button:active { transform: scale(.96); }
.quiz-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiz-back { padding-left: 8px !important; color: var(--ink); }
.quiz-next { background: var(--wine); color: #fff; }
.quiz-next:disabled { background: var(--blush); color: var(--muted); cursor: not-allowed; transform: none !important; }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.feedback { min-height: 2em; margin-top: 18px; font: italic 400 1.2rem/1.3 var(--serif); text-wrap: balance; }
.win { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.win-text { animation: rise 1s var(--ease) both; transition: transform .8s var(--ease); }
.win-text h2 { font-size: 2.4rem; }
.win-text p { color: var(--muted); margin-top: 8px; text-wrap: balance; }
.win-text .win-italic { font: italic 400 1.15rem/1.3 var(--serif); color: var(--ink); margin-top: 6px; }
.ticket {
  width: 100%; padding: 8px; background: var(--surface-solid); border-radius: 26px; box-shadow: var(--shadow);
  -webkit-mask: radial-gradient(circle 15px at 0 50%, #0000 97%, #000), radial-gradient(circle 15px at 100% 50%, #0000 97%, #000);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 15px at 0 50%, #0000 97%, #000), radial-gradient(circle 15px at 100% 50%, #0000 97%, #000);
  mask-composite: intersect;
  opacity: 0; transform: translateY(40px) scale(.9) rotate(-2deg);
  transition: opacity .8s var(--ease), transform .9s cubic-bezier(.2, 1.3, .4, 1);
}
.ticket.show { opacity: 1; transform: none; }
.ticket-inner { padding: 26px 34px; border: 1.5px dashed rgba(142, 15, 47, .4); border-radius: 20px; text-align: center; }
.scissors { width: 22px; fill: none; stroke: var(--wine); stroke-width: 1.7; stroke-linecap: round; }
.ticket-inner .eyebrow { margin-top: 8px; }
.ticket-text { font: 400 1.5rem/1.3 var(--serif); margin: 12px 0 8px; text-wrap: balance; }
.ticket-when { font-weight: 600; font-size: .98rem; }
.ticket-address { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.ticket-note { font: italic 400 1.08rem/1.4 var(--serif); color: var(--wine); margin: 12px 0 14px; text-wrap: balance; }
.ghost { min-height: 44px; padding: 8px 22px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); opacity: 0; transition: opacity .6s .5s; }
.ticket.show + .ghost { opacity: 1; }
.burst-heart { position: fixed; z-index: 40; left: 50%; top: 42%; fill: var(--wine); pointer-events: none; animation: burst 1.7s var(--ease) var(--delay) both; }
@keyframes burst {
  from { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ambient { display: none; }
}
