/* Refinamiento móvil: tarjetas compactas sin escalar toda la página. */
/* Contener los adornos y el ancho del documento sin bloquear el zoom. */
html,body,#invitation{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
.hero{overflow:hidden}
.section,.section>*{min-width:0}
.section{max-width:100%}
.hero>.names,.hero>.full-names,.hero>.intro{max-width:100%;overflow-wrap:break-word}
.parents-grid>div,.countdown>div{min-width:0;overflow-wrap:break-word}
.countdown{grid-template-columns:repeat(4,minmax(0,1fr))}
.music-player input[type=range]{min-width:0;max-width:100%;margin-inline:0}
@supports(overflow:clip){
 html,body,#invitation{overflow-x:clip}
 .hero{overflow:clip}
 body.locked,body.modal-open{overflow:hidden}
}
dialog#lightbox{inset:0;width:100%;max-width:100%;margin:0}
.envelope-back{z-index:0}.envelope-letter{z-index:2;transition:transform .65s .45s}.envelope-left,.envelope-right,.envelope-bottom{z-index:3}.envelope-flap{z-index:4;transition:transform .45s,z-index 0s .22s}.envelope.open .envelope-flap{z-index:1}.envelope.open .envelope-letter{transform:translateY(-92px)}
.welcome{padding:1.25rem;overflow-y:auto;min-height:100svh}.welcome h1{text-align:center;max-width:100%;line-height:1.3}.welcome.opened{pointer-events:none}.envelope{flex-shrink:0}
.timeline{align-items:stretch;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)}
.event-card{display:flex;flex-direction:column;align-items:center;min-width:0;height:100%}.event-card p{max-width:100%;overflow-wrap:break-word}.event-card .soft-button{margin-top:auto}.event-card p:last-of-type{margin-bottom:1.5rem}.timeline-line{height:75%;align-self:center}.event-card .icon-orb{flex-shrink:0}
.gallery-toggle{border:1px solid var(--sage-light);border-radius:99px;padding:.65rem 1rem;margin:0 0 1.4rem;background:transparent;color:var(--sage-deep);font:500 .8rem Montserrat;min-height:44px;cursor:pointer}
.gallery{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,clamp(85px,13vw,150px));grid-auto-rows:auto;gap:12px}
.gallery .photo{min-width:0;min-height:0;opacity:1;transform:none;border-radius:18px;transition:opacity .7s,transform .7s;isolation:isolate}
.gallery .photo:nth-child(1){grid-area:1/1/3/3}.gallery .photo:nth-child(2){grid-area:1/3/2/5}.gallery .photo:nth-child(3){grid-area:2/3/3/4}.gallery .photo:nth-child(4){grid-area:2/4/3/5}.gallery .photo:nth-child(5){grid-area:3/1/4/2}.gallery .photo:nth-child(6){grid-area:3/2/4/3}.gallery .photo:nth-child(7){grid-area:3/3/5/5}.gallery .photo:nth-child(8){grid-area:4/1/5/3}
.gallery.changing .photo{opacity:0;transform:scale(.95)}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--gold);outline-offset:4px}.mute{min-width:44px;min-height:44px}.track-meta input{min-height:24px}.track-title{overflow-wrap:anywhere}.music-status{font-size:.8rem;line-height:1.5}.music-status a{color:inherit}
dialog#lightbox{overflow:hidden;height:100dvh;touch-action:none}#zoomStage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}#lightboxImage{max-width:88vw;max-height:78dvh;object-fit:contain;user-select:none;touch-action:none;transform-origin:center;will-change:transform;cursor:grab}#lightboxImage:active{cursor:grabbing}dialog button{z-index:2;min-width:44px;min-height:44px}.zoom-controls{position:absolute;z-index:3;bottom:max(48px,env(safe-area-inset-bottom));display:flex;gap:8px}.zoom-controls button{position:static;font-size:1.3rem}.zoom-controls #resetZoom{width:72px;font-size:.85rem}.zoom-hint{position:absolute;bottom:8px;max-width:90%;color:white;font-size:.75rem;pointer-events:none}.modal-open{overflow:hidden}
@media(max-width:700px){
 .section{padding:3rem 1rem}.hero{padding-top:3rem;min-height:auto}.names{font-size:clamp(3.25rem,13vw,5rem)}.welcome h1{font-size:clamp(3rem,12vw,5rem)}.full-names{font-size:1.12rem}.hero-photo{width:min(100%,390px);height:clamp(260px,93vw,430px);margin:1rem auto}.intro{font-size:1.12rem;line-height:1.5;max-width:390px}.script-title{font-size:clamp(2.25rem,9vw,3.5rem);line-height:1.2;margin-bottom:1.3rem}.eyebrow{font-size:.75rem;letter-spacing:.14em}.date-pill{gap:.55rem;font-size:1.4rem}.date-pill small{font-size:.75rem;padding:.4rem .6rem;letter-spacing:.1em}
 .glass-card{padding:1.6rem 1rem;border-radius:24px}.glass-card h2,.soft-card h2{font-size:2rem}.parents-grid{gap:1rem;margin-top:1rem}.parents-grid p{font-size:1.1rem}.parents-grid h3{font-size:.75rem}.parents-grid .divider{width:50%;margin:auto}.section-icon,.line-icon svg{width:32px;height:32px}
 .timeline{grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr);gap:0}.event-card{padding:1.2rem .65rem;border-radius:24px 8px 24px 8px;box-shadow:5px 5px 14px #d8d0c5,-5px -5px 14px #fff}.event-card:nth-child(3){border-radius:8px 24px 8px 24px}.event-card h3{font-size:1.1rem;letter-spacing:.04em;line-height:1.2}.event-card p{font-size:.875rem;line-height:1.45;margin:.6rem 0}.event-card time{font-size:1rem;margin:.8rem 0 .3rem}.icon-orb{width:48px;height:48px}.icon-orb svg{width:26px;height:26px}.event-card .soft-button{padding:.55rem .4rem;font-size:.75rem;letter-spacing:0;gap:.2rem;min-height:44px;box-shadow:3px 3px 8px #a6aa9c,-3px -3px 8px #fff}.event-card .soft-button svg{width:14px;flex-shrink:0}.timeline-line{height:75%}
 .details-section{gap:1.3rem}.soft-card{width:100%;max-width:420px;justify-self:center;padding:1.6rem 1.2rem;border-radius:24px}.soft-card>p{font-size:1rem;line-height:1.5;margin:.8rem auto}.soft-card .note{font-size:.875rem}.dress-figures{margin:1rem}.mini-envelope svg{width:40px;height:40px}
 .countdown{max-width:420px;gap:.5rem}.countdown div{padding:.8rem .15rem;border-radius:12px}.countdown strong{font-size:clamp(1.6rem,7vw,2.3rem)}.countdown span{font-size:.65rem;letter-spacing:.02em}.music-player{max-width:420px;padding:.65rem;margin-top:1.5rem;border-radius:16px}.track-title{font-size:.8rem}.track-meta small{font-size:.75rem}.gallery{gap:7px;grid-template-rows:repeat(4,clamp(72px,23vw,125px))}.gallery .photo{border-radius:12px}.closing-section{min-height:570px}.closing-card{padding:2rem 1.3rem;border-radius:24px}.verse{font-size:1.7rem}.zoom-hint{font-size:.75rem;text-align:center}
}
@media(max-width:349px){.timeline{grid-template-columns:minmax(0,1fr);grid-template-rows:1fr 28px 1fr}.timeline-line{height:20px}.event-card{max-width:280px;width:100%;justify-self:center}.event-card .soft-button{margin-top:1rem}.music-player{gap:.25rem}.mute{min-width:36px}.date-pill{gap:.3rem}}
@media(max-height:560px) and (orientation:landscape){.welcome{justify-content:flex-start}.welcome h1{font-size:3rem}.envelope{margin-top:.5rem;transform:scale(.8);margin-bottom:-15px}.welcome-leaves{display:none}}
@media(prefers-reduced-motion:reduce){.gallery.changing .photo{opacity:1;transform:none}}
