/* Live invitation styles. Theme comes from CSS variables set by invite.js. */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--fb); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body:not(.opened) { overflow: hidden; height: 100svh; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; }
svg { stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.pt, svg.orn { stroke: none; }

/* Effects canvas */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- Welcome ---------- */
.wl { position: fixed; inset: 0; z-index: 60; perspective: 1600px; }
.wl > .cv { position: absolute; inset: 0; z-index: 2; transition: opacity .5s ease, transform .9s cubic-bezier(.6,0,.3,1); }
.wl .panel { position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 1; background: var(--bg2); transition: transform 1.2s cubic-bezier(.7,0,.25,1) .35s; }
.wl .panel.l { left: 0; transform-origin: left center; border-right: 1px solid var(--ac); }
.wl .panel.r { right: 0; transform-origin: right center; border-left: 1px solid var(--ac); }
.wl-curtain .panel { background: repeating-linear-gradient(90deg, var(--ac) 0 18px, color-mix(in srgb, var(--ac) 70%, #000) 18px 36px); border: 0; }
.wl-in { animation: wlIn 1.2s cubic-bezier(.2,.7,.2,1) both; }
.wl-in > * { animation: wlIn 1s cubic-bezier(.2,.7,.2,1) both; }
.wl-in > :nth-child(2) { animation-delay: .15s; } .wl-in > :nth-child(3) { animation-delay: .3s; }
.wl-in > :nth-child(4) { animation-delay: .45s; } .wl-in > :nth-child(5) { animation-delay: .6s; } .wl-in > :nth-child(6) { animation-delay: .75s; }
@keyframes wlIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.wl-date { font-family: var(--fd); font-size: 4.8cqw; }
.wl-open { font: 600 4cqw var(--fb); color: var(--bg); background: var(--ac-ink, var(--ac)); border: 0; border-radius: 99px; padding: 3cqw 8cqw; cursor: pointer; margin-top: 2cqw;
  animation: wlIn 1s both .6s, pulse 2.2s ease-in-out infinite 1.6s; }
.wl-open:hover { filter: brightness(1.1); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 50%, transparent); } 50% { box-shadow: 0 0 0 4cqw transparent; } }
.wl-note { font-size: 3cqw; opacity: .7; }
.seal { position: absolute; left: 50%; bottom: 9%; translate: -50% 0; width: 64px; height: 64px; border-radius: 50%; z-index: 2;
  display: grid; place-items: center; font-family: var(--fd); font-size: 26px; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ac) 70%, #fff), var(--ac) 60%, color-mix(in srgb, var(--ac) 60%, #000));
  box-shadow: 0 6px 16px -4px rgba(0,0,0,.4); transition: transform .5s ease, opacity .5s; }

.wl.opening > .cv { opacity: 0; }
.wl-fade.opening > .cv { transform: scale(1.15); }
.wl-fade .panel { display: none; }

/* Envelope opening: seal breaks, flap lifts, the card slides out and grows into the invitation */
.env-wrap { gap: 2cqw; }
.wl-envelope .panel { display: none; }
.env { position: relative; display: block; width: 92cqw; aspect-ratio: 400 / 260; margin: 3cqw 0 1cqw; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1100px; animation: wlIn 1s cubic-bezier(.2,.7,.2,1) both .15s, envBob 3.6s ease-in-out infinite 1.4s; }
.env:focus-visible { outline: 2px solid var(--ac-ink, var(--ac)); outline-offset: 6px; border-radius: 2cqw; }
.env > * { position: absolute; left: 0; right: 0; }
.env-back { inset: 0; border-radius: 2cqw; background: color-mix(in srgb, var(--ac) 34%, var(--bg2)); box-shadow: 0 4cqw 8cqw -4cqw rgba(0,0,0,.45); }
.env-letter { left: 6%; right: 6%; top: 7%; height: 86%; z-index: 1; border-radius: 1.4cqw; background: var(--bg); color: var(--ink); box-shadow: 0 1cqw 3cqw -1cqw rgba(0,0,0,.3);
  display: flex; flex-direction: column; align-items: center; padding-top: 5cqw; gap: 1.2cqw; transition: transform .85s cubic-bezier(.3,.8,.3,1) .8s; }
.env-letter .l-n { font-family: var(--fs); font-size: 7.4cqw; line-height: 1.1; padding: 0 4cqw; }
.env-letter .l-d { font-size: 2.8cqw; letter-spacing: .14em; text-transform: uppercase; color: var(--ac-ink, var(--ac)); font-weight: 600; }
.env-pocket { inset: 0; width: 100%; height: 100%; z-index: 2; border-radius: 2cqw; overflow: hidden; }
.env-pocket path { fill: color-mix(in srgb, var(--ac) 24%, var(--bg2)); stroke: color-mix(in srgb, var(--ink) 14%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.env-pocket .p-bot { fill: color-mix(in srgb, var(--ac) 17%, var(--bg2)); }
.env-flap { top: 0; height: 62%; z-index: 3; transform-origin: top center; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.5,0,.25,1) .3s, z-index 0s .66s; }
.env-flap svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1.2cqw 1.2cqw rgba(0,0,0,.18)); }
.env-flap path { fill: color-mix(in srgb, var(--ac) 42%, var(--bg2)); stroke: color-mix(in srgb, var(--ink) 14%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.env .seal { left: 50%; right: auto; top: 62%; bottom: auto; translate: -50% -50%; width: 15cqw; height: 15cqw; font-size: 6.6cqw; z-index: 4; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ac-ink, var(--ac)) 70%, #fff), var(--ac-ink, var(--ac)) 60%, color-mix(in srgb, var(--ac-ink, var(--ac)) 60%, #000)); }
.env:hover .env-flap { transform: rotateX(14deg); }
@keyframes envBob { 50% { translate: 0 -1.2cqw; } }
.wl-envelope.opening > .cv { opacity: 1; transform: none; }
.wl-envelope.opening .env { animation: none; }
.wl-envelope.opening .seal { transform: scale(1.3); opacity: 0; transition: transform .35s ease, opacity .35s ease; }
.wl-envelope.opening .env-flap { transform: rotateX(178deg); z-index: 0; }
.wl-envelope.opening .env-letter { transform: translateY(-62%); }
.wl-envelope.opening .env-wrap > :not(.env) { opacity: 0; transition: opacity .45s ease; animation: none; }
.wl-envelope.zoom .env-letter { transform: translateY(-62%) scale(1.6); transition: transform .7s cubic-bezier(.6,0,.3,1); }
.wl-envelope.zoom > .cv { opacity: 0; transition: opacity .7s ease .1s; }

/* Cursor trail */
.trail { position: fixed; z-index: 75; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--c); animation: trail .9s cubic-bezier(.2,.6,.4,1) forwards; }
.trail-sparkles { clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.trail-petals { width: 11px; height: 15px; border-radius: 90% 0 90% 0; opacity: .9; }
.trail-hearts { background: none; color: var(--c); width: auto; height: auto; font-size: 18px; line-height: 1; margin: -8px 0 0 -5px; }
@keyframes trail { from { opacity: .95; transform: translate(0, 0) rotate(0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.35); } }
.wl-doors.opening .panel.l { transform: rotateY(105deg); }
.wl-doors.opening .panel.r { transform: rotateY(-105deg); }
.wl-curtain.opening .panel.l { transform: translateX(-92%) scaleX(.3); }
.wl-curtain.opening .panel.r { transform: translateX(92%) scaleX(.3); }
.wl.opening { pointer-events: none; }

/* ---------- Sections ---------- */
.s { position: relative; padding: clamp(64px, 10vw, 112px) 24px; text-align: center; }
.s.alt { background: color-mix(in srgb, var(--bg2) 55%, var(--bg)); }
.s > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.s-head { margin-bottom: 40px; }
.s-head h2 { font-family: var(--fd); font-weight: 400; font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.1; margin: 0 0 12px; }
.s-head p { margin: 14px auto 0; max-width: 46ch; opacity: .85; }
.div { width: 120px; height: 12px; color: var(--ac); display: block; margin: 0 auto; }
h3 { font-family: var(--fd); font-weight: 400; font-size: 1.4rem; margin: 0 0 10px; }

.s-hero { padding: 0; height: 100svh; min-height: 620px; max-width: none; }
.s-hero > .cv { max-width: none; }
.s-hero .cv-frame { animation: float 7s ease-in-out infinite; }
.s-hero .orn { animation: sway 9s ease-in-out infinite; }
.s-hero .cv-btn { cursor: pointer; transition: transform .2s; }
.s-hero .cv-btn:hover { transform: translateY(-2px); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes sway { 0%, 100% { rotate: 0deg; } 50% { rotate: 2deg; } }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; z-index: 3; width: 36px; height: 36px; color: var(--ac); transform: rotate(180deg); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { bottom: 10px; } }
.s-hero .cv-in > * { opacity: 0; transform: translateY(16px); transition: opacity .9s, transform .9s cubic-bezier(.2,.7,.2,1); }
.s-hero.in .cv-in > * { opacity: 1; transform: none; }
.s-hero.in .cv-in > :nth-child(2) { transition-delay: .12s; } .s-hero.in .cv-in > :nth-child(3) { transition-delay: .24s; }
.s-hero.in .cv-in > :nth-child(4) { transition-delay: .36s; } .s-hero.in .cv-in > :nth-child(5) { transition-delay: .48s; }
.s-hero.in .cv-in > :nth-child(6) { transition-delay: .6s; } .s-hero.in .cv-in > :nth-child(7) { transition-delay: .72s; }

/* Reveal styles, picked per template */
.rv { opacity: 0; transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1), filter .9s ease; transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal="up"] .rv { transform: translateY(32px); }
[data-reveal="zoom"] .rv { transform: scale(.88); }
[data-reveal="left"] .rv { transform: translateX(-36px); }
[data-reveal="blur"] .rv { filter: blur(10px); transform: translateY(10px); }
.rv.in { opacity: 1; transform: none; filter: none; }

/* Cards & buttons */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 760px; }
.card { background: color-mix(in srgb, var(--bg) 70%, #fff); border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); border-radius: 18px; padding: 28px 24px; text-align: left; }
body.dark .card { background: color-mix(in srgb, var(--bg2) 80%, #000); }
.card h3 { text-align: center; color: var(--ac-ink, var(--ac)); }
.row { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; }
.row svg { width: 20px; height: 20px; flex: none; color: var(--ac); margin-top: 3px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btns.center { justify-content: center; margin-top: 22px; }
.btn { font: 600 15px var(--fb); background: var(--ac-ink, var(--ac)); color: var(--bg); border: 1px solid var(--ac-ink, var(--ac)); border-radius: 99px; padding: 11px 20px; cursor: pointer; text-decoration: none; display: inline-block; transition: transform .2s, filter .2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); }

/* Countdown */
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 520px; }
.count div { background: var(--ac-ink, var(--ac)); color: var(--bg); border-radius: 16px; padding: 18px 6px; display: flex; flex-direction: column; }
.count b { font-family: var(--fd); font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 400; line-height: 1; display: inline-block; }
.count b.tick { animation: tick .45s ease; }
@keyframes tick { from { transform: translateY(-30%); opacity: .2; } }
.count span { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; }
.begun { grid-column: 1 / -1; font-family: var(--fd); font-size: 1.6rem; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0 auto; position: relative; text-align: left; max-width: 520px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 1px; background: var(--ac); opacity: .5; }
.timeline li { position: relative; padding: 0 0 28px 44px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ac); }
.timeline .y { font-family: var(--fd); color: var(--ac-ink, var(--ac)); font-size: 1.1rem; }
.timeline h3 { margin: 2px 0 4px; font-size: 1.25rem; }
.timeline p { margin: 0; opacity: .85; }
.about { display: grid; gap: 40px; justify-items: center; }
.about .cv-frame { width: min(260px, 70vw); container-type: inline-size; }

/* Program */
.program { list-style: none; padding: 0; margin: 0 auto; max-width: 480px; }
.program li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px dashed color-mix(in srgb, var(--ac) 50%, transparent); text-align: left; align-items: baseline; }
.program time { font-family: var(--fd); color: var(--ac-ink, var(--ac)); font-size: 1.1rem; }

/* Groups and names */
.groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.group { padding: 22px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); }
.group h3 { font-size: 1.1rem; color: var(--ac-ink, var(--ac)); }
.group p { margin: 4px 0; }
.names { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; counter-reset: n; }
.names li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ac) 10%, transparent); text-align: left; counter-increment: n; }
.names li::before { content: counter(n); font-family: var(--fd); color: var(--ac-ink, var(--ac)); min-width: 1.4em; }
.names svg { width: 18px; height: 18px; color: var(--ac); flex: none; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 760px; }
.g-item { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; cursor: zoom-in; background: var(--bg2); }
.g-item:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.g-item > img, .g-item > svg, .g-item > video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.g-item { position: relative; }
.vbadge { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); pointer-events: none; }
.vbadge::after { content: ""; position: absolute; left: 11px; top: 9px; width: 11px; height: 12px; background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.lb-video { aspect-ratio: auto; width: min(92vw, 720px); background: #000; }
.lb-video video { width: 100%; height: auto; max-height: 82vh; object-fit: contain; display: block; }
.g-item:hover > * { transform: scale(1.05); }
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(10,10,14,.88); display: grid; place-items: center; animation: fadeIn .25s; }
.lb-img { width: min(88vw, 520px); aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; }
.lb-img > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.lb-x { top: 16px; right: 16px; } .lb-p { left: 16px; top: 50%; } .lb-n { right: 16px; top: 50%; }
@keyframes fadeIn { from { opacity: 0; } }

/* Video & map */
.video, .map { border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 760px; position: relative; background: var(--bg2); }
.video iframe, .map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map { aspect-ratio: 4 / 3; }
.video-ph > svg, .video-ph > img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.8); }
.play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--ac); color: var(--bg); display: grid; place-items: center; animation: pulse 2.2s infinite; }
.play svg { width: 30px; height: 30px; margin-left: 4px; }
.video-ph small { position: absolute; bottom: 14px; left: 0; right: 0; color: #fff; }

/* Forms */
.form { display: grid; gap: 16px; text-align: left; max-width: 480px; background: color-mix(in srgb, var(--bg) 70%, #fff); padding: 28px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); }
body.dark .form { background: color-mix(in srgb, var(--bg2) 80%, #000); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form textarea { font: 400 16px var(--fb); color: var(--ink); background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 10px; padding: 11px 12px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.pill { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; border: 1px solid color-mix(in srgb, var(--ac) 50%, transparent); border-radius: 99px; padding: 8px 14px; cursor: pointer; }
.pill:has(input:checked) { background: var(--ac-ink, var(--ac)); color: var(--bg); }
.pill input { accent-color: var(--ink); }
.thanks { max-width: 420px; }
.thanks svg { width: 48px; height: 48px; color: var(--ac); fill: color-mix(in srgb, var(--ac) 25%, transparent); }
.pop { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.wall { list-style: none; padding: 0; margin: 28px auto 0; display: grid; gap: 12px; max-width: 520px; }
.wall li { text-align: left; padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--ac) 10%, transparent); }
.wall li p { margin: 0 0 6px; font-style: italic; }
.wall li.hint { background: none; text-align: center; font-size: 14px; opacity: .7; padding: 0; }

/* Attire, FAQ, gifts */
.swatches { display: flex; justify-content: center; gap: 14px; }
.swatches span { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--ac); }
.faq { max-width: 560px; text-align: left; }
.faq details { border-bottom: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--ac); font-size: 1.4rem; line-height: 1; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; opacity: .85; }
.gift { text-align: center; max-width: 480px; }
.gift svg { width: 40px; height: 40px; color: var(--ac); }
/* Ways to send a gift */
.pays { margin-top: 20px; max-width: 760px; }
.pay { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pay h3 { margin: 0; }
.pay-qr { padding: 10px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); border-radius: 14px; background: #fff; cursor: zoom-in; line-height: 0; }
.pay-qr img { width: 168px; height: 168px; object-fit: contain; display: block; }
.pay-name { margin: 0; font-weight: 600; }
.pay-num { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pay-num span { font-family: var(--fb); font-size: 1.15rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pay-num .btn { padding: 6px 14px; font-size: 13px; }
.qr-view figure { margin: 0; display: grid; justify-items: center; gap: 12px; }
.qr-view img { width: min(78vw, 360px); height: auto; background: #fff; padding: 14px; border-radius: 16px; }
.qr-view figcaption { color: #fff; font-weight: 600; }

/* Footer */
.s-foot { background: var(--ink); color: var(--bg); }
.s-foot p { margin: 6px auto; }
.s-foot .tag { color: var(--ac-foot, var(--ac)); }
.mono { font-family: var(--fs); font-size: 3rem; width: 120px; height: 120px; margin: 0 auto 18px; border: 1px solid var(--ac-foot, var(--ac)); border-radius: 50%; display: grid; place-items: center; color: var(--ac-foot, var(--ac)); outline: 1px solid var(--ac-foot, var(--ac)); outline-offset: 6px; }
.tag { color: var(--ac-ink, var(--ac)); font-weight: 600; }
.made { display: inline-block; margin-top: 28px; font-size: 13px; opacity: .65; }

/* Floating buttons */
.fab { position: fixed; right: 16px; z-index: 50; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ac); color: var(--bg); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.fab svg { width: 22px; height: 22px; }
#fab-music { bottom: 74px; }
#fab-music.playing svg { animation: spin 4s linear infinite; }
#fab-top { bottom: 18px; background: var(--bg); color: var(--ac); border: 1px solid var(--ac); }
@keyframes spin { to { transform: rotate(360deg); } }
body:not(.opened) .fab { display: none; }

/* RSVP confetti burst */
.burst { position: fixed; left: 50%; top: 50%; z-index: 90; pointer-events: none; }
.burst i { position: absolute; width: 9px; height: 5px; border-radius: 2px; animation: fly 1.2s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes fly { to { transform: translate(var(--x), var(--y)) rotate(540deg); opacity: 0; } }

@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .g-item:nth-child(6n+1) { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .count { gap: 8px; }
  .count div { padding: 14px 2px; }
}
/* ---------- Extra effects ---------- */
/* Scroll progress, in the template's accent */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--ac); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }
.in-preview .progress { display: none; }
/* Hero parallax: content drifts up and fades as you scroll past, ornaments move faster */
.s-hero .cv-in { translate: 0 calc(var(--hy, 0) * .35px); opacity: calc(1 - var(--hp, 0) * 1.1); }
.s-hero .orn { translate: 0 calc(var(--hy, 0) * -.18px); }
/* Section dividers draw outward from the diamond */
.s-head.rv .div { transform: scaleX(0); transition: transform 1.1s cubic-bezier(.6,0,.2,1) .25s; }
.s-head.rv.in .div { transform: none; }
.s-head.rv .div path:last-child { transform-box: fill-box; transform-origin: center; rotate: -180deg; scale: 0; transition: rotate .9s cubic-bezier(.3,1.4,.5,1) .35s, scale .9s cubic-bezier(.3,1.4,.5,1) .35s; }
.s-head.rv.in .div path:last-child { rotate: 0deg; scale: 1; }
/* Gallery photos settle in with a slight alternating tilt */
.gallery .g-item.rv:nth-child(odd) { rotate: -3deg; }
.gallery .g-item.rv:nth-child(even) { rotate: 3deg; }
.gallery .g-item.rv { transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1), filter .9s ease, rotate 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.gallery .g-item.rv.in { rotate: 0deg; }
/* Tap sparkles */
.spark { position: fixed; width: 8px; height: 8px; margin: -4px 0 0 -4px; pointer-events: none; z-index: 70; border-radius: 50%; background: var(--c); animation: spark .7s cubic-bezier(.2,.7,.3,1) forwards; }
.spark.star { border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); width: 12px; height: 12px; margin: -6px 0 0 -6px; }
@keyframes spark { to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv, .s-hero .cv-in > * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .s-head .div, .s-head .div path, .gallery .g-item { transform: none !important; rotate: none !important; scale: none !important; }
  .s-hero .cv-in, .s-hero .orn { translate: none !important; opacity: 1 !important; }
  .progress, .spark, .trail { display: none; }
}

/* Server errors and missing invitations */
.form-err { margin: 4px 0 0; color: #B42318; font-size: .9rem; font-weight: 500; }
.dark .form-err { color: #FDA29B; }
.s.missing { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; }
.s.missing h2 { margin: 0; }

/* Venue switcher above the map */
.map-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 18px; max-width: 760px; }
.map-tabs button { font: 500 .95rem var(--fb); color: var(--ink); background: transparent; border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); border-radius: 99px; padding: 9px 16px; cursor: pointer; transition: background .2s, color .2s; }
.map-tabs button[aria-pressed="true"] { background: var(--ac-ink, var(--ac)); border-color: var(--ac-ink, var(--ac)); color: var(--bg); }
.map-tabs button:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* ---------- Per-section look set in the editor ---------- */
.s.sec-custom { background: var(--sec-bg, transparent) var(--sec-img, none) center / cover no-repeat; color: var(--ink); }
.s.sec-img { position: relative; isolation: isolate; }
.s.sec-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--sec-bg, var(--bg)) 72%, transparent); }
.s.sec-align .s-head { text-align: inherit; }

/* ---------- Venues: photo, directions QR, parking tips ---------- */
.venue-panel { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.venue-panel[hidden] { display: none; }
.venue-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; display: block; }
.map { position: relative; }
.map-qr { position: absolute; top: 10px; right: 10px; background: #fff; padding: 6px; border-radius: 10px; box-shadow: 0 6px 18px -8px rgba(0,0,0,.35); line-height: 0; }
.map-qr:empty { display: none; }
.map-qr img, .map-qr canvas { width: 84px; height: 84px; }
.venue-addr { margin: 0; opacity: .85; text-align: center; }
.card.tips { text-align: left; }
.card.tips h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card.tips p { margin: 0; white-space: pre-line; }

/* ---------- Edit mode inside the editor ---------- */
.edit-mode .s { outline: 2px dashed transparent; outline-offset: -6px; transition: outline-color .15s; cursor: pointer; }
.edit-mode .s:hover { outline-color: color-mix(in srgb, #9F1239 45%, transparent); }
.edit-mode .s.ed-sel { outline: 2px solid #9F1239; }
.edit-mode [data-edit] { cursor: text; border-radius: 4px; }
.edit-mode [data-edit]:hover { box-shadow: 0 0 0 2px color-mix(in srgb, #9F1239 35%, transparent); }
.edit-mode [data-edit]:empty::before { content: "Click to add text"; opacity: .45; font-style: italic; }
.edit-mode [data-photo] { cursor: pointer; position: relative; }
.edit-mode [data-photo]::after { content: "Change photo"; position: absolute; left: 50%; bottom: 10%; translate: -50% 0; z-index: 3; padding: 6px 12px; border-radius: 99px;
  background: rgba(20, 20, 28, .72); color: #fff; font: 600 12px/1 system-ui, sans-serif; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.edit-mode [data-photo]:hover::after { opacity: 1; }
.edit-mode [contenteditable] { outline: 2px solid #9F1239; outline-offset: 3px; background: color-mix(in srgb, #fff 30%, transparent); }
