/* Full-width horizontal scan beam; source QR image remains unchanged. */
.qr-scan-window{display:none;position:absolute;inset:6px;z-index:7;overflow:hidden;pointer-events:none;border-radius:8px}
.qr-scan-enabled .qr-scan-window{display:block}
.qr-effect-scan::before{display:none!important}
.qr-scan-enabled .qr-scan-line{display:block;position:absolute;inset:0;width:100%;height:100%;border-radius:0;opacity:1;background:none;box-shadow:none;animation:wedding-qr-sweep 2.4s cubic-bezier(.45,0,.55,1) infinite alternate}
/* A single thin beam spans the QR, not just its two side rails. */
.qr-scan-enabled .qr-scan-line::before{display:none;content:none}
.qr-scan-enabled .qr-scan-line::after{content:"";display:block;position:absolute;left:0;right:0;bottom:0;width:100%;height:2px;border-radius:2px;background:linear-gradient(90deg,transparent 0%,rgba(169,23,43,.12) 8%,rgba(169,23,43,.7) 25%,#dc1829 50%,rgba(169,23,43,.7) 75%,rgba(169,23,43,.12) 92%,transparent 100%);opacity:.65;box-shadow:none;pointer-events:none}
/* Remove all CSS heart decorations, including saved heart-frame selections. */
.clone-qr-visual .qr-heart,.clone-qr-visual .clone-qr-decor,.clone-qr-visual .clone-qr-visual-inner{display:none!important}
.clone-qr-visual .clone-qr-card::before,.clone-qr-visual .clone-qr-card::after{display:none!important;content:none!important}
/* Keep shimmer behind the opaque image, and pulse only the decorative frame. */
.clone-qr-visual.qr-effect-shimmer::after,.clone-qr-visual .qr-heart{z-index:2}
.clone-qr-visual.qr-effect-pulse{animation:none}
.qr-effect-pulse .clone-qr-card{animation:qr-card-pulse 2.35s ease-in-out infinite}
.clone-qr-visual .clone-gift-qr{border-radius:0!important;animation:none!important;transform:none!important;filter:none!important;opacity:1!important}
@keyframes wedding-qr-sweep{0%,5%{transform:translate3d(0,-98%,0);opacity:1}30%,70%{opacity:1}95%,100%{transform:translate3d(0,-2%,0);opacity:1}}
/* CSS-only decorations with a bounded particle count controlled by admin. */
.ambient-fireflies i{top:var(--y);width:5px;height:5px;background:#f6d483;border-radius:50%;box-shadow:0 0 8px 2px #e6b34f77;animation:wedding-firefly var(--speed) ease-in-out infinite alternate;animation-delay:var(--delay)}
@keyframes wedding-firefly{0%{transform:translate3d(0,12px,0);opacity:0}30%{opacity:.65}70%{opacity:.25}100%{transform:translate3d(var(--drift),-60px,0);opacity:.8}}
.ambient-bokeh i{top:var(--y);width:calc(var(--size)*3);height:calc(var(--size)*3);border:1px solid #e4c98f4d;background:radial-gradient(circle at 35% 30%,#fff4ce38,#e4b85f0d);border-radius:50%;animation:wedding-bokeh var(--speed) ease-in-out infinite alternate;animation-delay:var(--delay)}
@keyframes wedding-bokeh{0%{opacity:0;transform:translate3d(0,28px,0) scale(.65)}45%{opacity:.55}100%{opacity:.1;transform:translate3d(var(--drift),-100px,0) scale(1.25)}}
.ambient-gold-dust i{width:3px;height:3px;border-radius:50%;background:#e3be65;box-shadow:0 0 5px #e9c67d66;animation:wedding-dust var(--speed) linear infinite;animation-delay:var(--delay)}
@keyframes wedding-dust{0%{opacity:0;transform:translate3d(0,110vh,0)}25%,60%{opacity:.7}100%{opacity:0;transform:translate3d(var(--drift),-4vh,0)}}
.ambient-lanterns i{width:calc(var(--size)*1.1);height:calc(var(--size)*1.4);background:radial-gradient(ellipse at 50% 30%,#f3ce81,#bc35448c);border:1px solid #e5ba6166;border-radius:35%;box-shadow:0 0 8px #edab4c30;animation:wedding-lantern var(--speed) ease-in-out infinite;animation-delay:var(--delay)}
.ambient-lanterns i::before{content:"";position:absolute;top:-3px;left:22%;right:22%;height:3px;background:#d4b065;border-radius:2px}
.ambient-lanterns i::after{content:"";position:absolute;top:100%;left:50%;height:8px;border-left:1px solid #c39a53}
@keyframes wedding-lantern{0%{opacity:0;transform:translate3d(0,110vh,0) rotate(-10deg)}15%,75%{opacity:.6}50%{transform:translate3d(var(--drift),50vh,0) rotate(8deg)}100%{opacity:0;transform:translate3d(0,-5vh,0) rotate(-10deg)}}
html.wedding-tab-hidden .qr-scan-line,html.wedding-tab-hidden .qr-scan-line::before,html.wedding-tab-hidden #wedding-effects i{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){#wedding-effects{display:none!important}.qr-scan-enabled .qr-scan-window{display:none}.qr-scan-enabled .qr-scan-line{animation:none!important}.motdoi-opening-seal::after{animation:none!important}}

@media(prefers-reduced-motion:reduce){.qr-effect-pulse .clone-qr-card{animation:none!important}}

/* Clean frame without heart ornaments. */
.qr-scan-enabled .clone-qr-card{border-color:rgba(188,28,52,.3);box-shadow:0 0 0 1px #e9c27d55}
.clone-gift-section .clone-gift-thanks,.clone-gift-dialog .clone-gift-thanks{font-family:'Be Vietnam Pro',Arial,sans-serif;font-size:17px!important;line-height:1.65;font-weight:500;font-style:italic;max-width:420px;margin:18px auto 24px;padding:0 8px;border:0;color:var(--site-primary,#7e1518);text-align:center}

/* Soft beam edges include the glow, so no solid ends remain. */
.qr-scan-enabled .qr-scan-line::after{filter:drop-shadow(0 0 2px #d3464d55)}
/* Falling hearts use a stable vector silhouette instead of a platform font. */
#wedding-effects.ambient-hearts i{width:var(--size);height:var(--size);background:#c8294e;border-radius:0;-webkit-mask:url('/assets/heart-petal-v697.svg') center/contain no-repeat;mask:url('/assets/heart-petal-v697.svg') center/contain no-repeat;animation:wedding-heart-petal var(--speed) linear infinite;animation-delay:var(--delay);opacity:0}
#wedding-effects.ambient-hearts i:nth-child(3n){background:#e894a5}
#wedding-effects.ambient-hearts i:nth-child(4n){background:#a5203d}
#wedding-effects.ambient-hearts i::before,#wedding-effects.ambient-hearts i::after{content:none}
@keyframes wedding-heart-petal{0%{opacity:0;transform:translate3d(0,-5vh,0) rotate(-14deg) scale(.85)}10%{opacity:var(--heart-opacity,.4)}35%{transform:translate3d(var(--drift),35vh,0) rotate(16deg) scale(1)}65%{transform:translate3d(calc(var(--drift)*-.4),70vh,0) rotate(-12deg) scale(.92)}88%{opacity:var(--heart-opacity,.4)}100%{opacity:0;transform:translate3d(calc(var(--drift)*.6),110vh,0) rotate(12deg) scale(.85)}}
/* One-time section reveals and interaction feedback, using transform and opacity. */
html[data-wedding-motion="on"].wedding-reveal-ready .clone-reveal{transform:translate3d(0,24px,0) scale(.985);transition:opacity .85s ease,transform .85s cubic-bezier(.2,.75,.2,1)}
html[data-wedding-motion="on"].wedding-reveal-ready .clone-reveal.is-visible{transform:none;will-change:auto}
html[data-wedding-motion="on"] #music-toggle.is-playing{box-shadow:0 0 0 5px #c9a24b20,0 5px 18px #7e151826}
@media(hover:hover){html[data-wedding-motion="on"] #gallery img{transition:transform .55s ease}html[data-wedding-motion="on"] #gallery img:hover{transform:scale(1.035)}}
html[data-wedding-motion="on"] main button:active{translate:0 1px}
/* Opening arrives in perspective; the existing open action, names and audio remain intact. */
html[data-wedding-motion="on"] #wedding-opening{perspective:1200px}
html[data-wedding-motion="on"] #wedding-opening:not(.opening-leave) .motdoi-opening-card{animation:wedding-card-arrive .9s cubic-bezier(.18,.7,.2,1) both;transform-origin:50% 80%}
html[data-wedding-motion="on"] #wedding-opening:not(.opening-leave) .motdoi-opening-names{animation:wedding-names-arrive .8s .15s both}
html[data-wedding-motion="on"] #wedding-opening:not(.opening-leave) .motdoi-opening-seal{animation:wedding-seal-halo 3.2s 1s ease-in-out infinite}
html[data-wedding-motion="on"] #wedding-opening.opening-leave{opacity:1;transform:none;transition:none;animation:wedding-opening-fade .94s ease both}
html[data-wedding-motion="on"] #wedding-opening.opening-leave .motdoi-opening-card{animation:wedding-card-open .92s cubic-bezier(.3,.05,.25,1) both;transform-origin:12% 50%}
@keyframes wedding-card-arrive{from{opacity:0;transform:translate3d(0,26px,0) rotateX(8deg) scale(.96)}to{opacity:1;transform:none}}
@keyframes wedding-names-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes wedding-seal-halo{0%,100%{box-shadow:0 0 0 0 #e6c87e00}50%{box-shadow:0 0 0 8px #e6c87e1a,0 0 22px #c9a24b38}}
@keyframes wedding-opening-fade{0%,45%{opacity:1}100%{opacity:0}}
@keyframes wedding-card-open{0%{opacity:1;transform:none}35%{opacity:1;transform:translate3d(0,-12px,20px) rotateY(-9deg) rotateX(3deg)}100%{opacity:0;transform:translate3d(0,-65px,70px) rotateY(-25deg) rotateX(7deg) scale(1.07)}}
html.wedding-tab-hidden #wedding-opening .motdoi-opening-seal{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){html.wedding-reveal-ready .clone-reveal{opacity:1!important;transform:none!important;transition:none!important}#wedding-opening,#wedding-opening *{animation:none!important;transition:none!important}}

/* Compact circles stay round even in a narrow mobile flex layout. */
#guestbook-inline-signature .sig-progress{height:auto!important;min-height:72px;padding:18px 58px 18px 18px!important;align-items:center;gap:8px}
#guestbook-inline-signature .sig-progress>[data-p]{width:32px!important;height:32px!important;min-width:32px;flex:0 0 32px!important;aspect-ratio:1;border-radius:50%;font-size:14px;line-height:1;display:grid;place-items:center}
#guestbook-inline-signature .sig-progress>i{flex:0 1 24px;max-width:24px;height:2px;margin:0!important}
#guestbook-inline-signature .sig-progress>button{top:18px!important;width:32px!important;height:32px!important;font-size:24px}
html[data-firebase] #guestbook-open::after{display:none!important;content:none!important}
.sig-dialog .sig-bottom-actions{background:transparent!important;background-image:none!important;box-shadow:none;position:static;padding-bottom:8px}
#sig-clear,#sig-next-1,#sig-next-2{background:transparent!important;background-image:none!important;box-shadow:none!important;border:0!important;color:var(--site-primary,#7e1518)}
#sig-clear{color:#49362f}
/* Disable native image drag/callout without intercepting input elsewhere on the page. */
.sig-placement,.sig-placement img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.sig-placement{touch-action:none;overscroll-behavior:contain}
.sig-placement .sig-photo{pointer-events:none;display:block;transform:none!important;filter:none!important;transition:none!important;animation:none!important}
.sig-placement .sig-drag{pointer-events:none;transition:none!important;animation:none!important;filter:none!important;background:transparent;border:1px dashed #a51c20;padding:0}
.sig-placement.is-dragging{cursor:grabbing}
.sig-placement.is-dragging .sig-drag{border-color:transparent}
/* Keep falling decorations out of the signature editor, especially on touch devices. */
body:has(#guestbook-inline-signature:not([hidden])) #wedding-effects,body:has(#clone-guestbook-modal:not([hidden])) #wedding-effects{visibility:hidden}
