/* ═══════════════════════════════════════════════════════════════════
   SEKAR ARUM — taman pernikahan yang semerbak, dari pagi hingga malam
   Seluruh bunga dilukis prosedural di kanvas (mawar taman, peony,
   hortensia, ronce melati, eukaliptus, baby's breath), lalu dirangkai
   menjadi gapura, lorong pengantin, dan tirai bunga yang dihidupkan.
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --wine: #6e2b3c;
    --ink: #4a2a33;
    --text: #5d4a4e;
    --dim: #8f7a7e;
    --rose: #b9475b;
    --blush: #e9b9b9;
    --sage: #7f9a7a;
    --gold: #b8935a;
    --gold-l: #ead2a0;
    --cream: #fffaf4;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --script: 'Great Vibes', 'Cormorant Garamond', cursive;
    --sans: 'Jost', system-ui, sans-serif;
    --arab: 'Amiri', serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --sky-a: #a9b4dc;
    --sky-b: #f3cbd2;
    --sky-c: #ffe6d2;
    --tint: #fdeae6;
    --night: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--text);
    background: #f3e3dc; overflow-x: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; height: 100svh; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
.ico { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -.18em; }

/* ── SCENE (tetap di belakang) ───────────────────────────────────── */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #f3e3dc; }
.scene .sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 40%, var(--sky-c) 62%, var(--sky-c) 100%); }
.scene .sun { position: absolute; left: 74%; top: 10%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 252, 238, 1) 0 16%, rgba(255, 236, 205, .7) 30%, rgba(255, 215, 190, .26) 52%, rgba(255, 200, 180, 0) 72%);
    transform: scale(3); opacity: var(--sun, 1); }
.scene .moon { position: absolute; left: 24%; top: 13%; width: 46px; height: 46px; border-radius: 50%; opacity: var(--night, 0);
    background: radial-gradient(circle at 38% 36%, #fffdf4, #f1e6cc 60%, #d9cba8);
    box-shadow: 0 0 40px 14px rgba(255, 244, 214, .35), 0 0 120px 40px rgba(200, 190, 255, .18); }
.dolly { position: absolute; inset: 0; transform-origin: 50% 55%; will-change: transform; }
.lyr { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.lyr canvas { position: absolute; left: 0; top: 0; display: block; }
.lyr.arch { transform-origin: 50% 45%; }
.lyr.fol { transform-origin: 50% 50%; }
/* ayunan bunga (±--a selama --d) dijalankan dari scene.js via Web Animations agar ter-komposit */
.lyr.fol > canvas { transform-origin: var(--ox) var(--oy); transform: rotate(var(--r)); }
.scene .tint { position: absolute; inset: 0; background: var(--tint); mix-blend-mode: multiply; }
.scene .grain { position: absolute; inset: -50%; opacity: .05; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.scene .vig { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 58%, rgba(90, 40, 55, .28) 100%); }
#fxAir { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── HUD ────────────────────────────────────────────────────────── */
.music-toggle-btn {
    position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 1000; width: 44px; height: 44px; padding: 0;
    border-radius: 50%; border: 1px solid rgba(184, 147, 90, .6); cursor: pointer; color: var(--wine);
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 250, 244, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px -10px rgba(110, 43, 60, .45);
}
.music-toggle-btn svg { width: 17px; height: 17px; }
.music-toggle-btn.playing::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(185, 71, 91, .45); animation: ring 2.6s ease-out infinite; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }

.progress { position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 950; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blush), var(--rose), var(--gold-l)); transform-origin: 0 50%; transform: scaleX(0); }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 9800; transform: translate(-50%, 24px);
    padding: 11px 20px; border-radius: 999px; background: rgba(74, 42, 51, .92); color: var(--cream); font-size: 14px; letter-spacing: .02em;
    border: 1px solid rgba(234, 210, 160, .4); opacity: 0; pointer-events: none; transition: all .5s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 26px; border-radius: 999px; cursor: pointer;
    font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
    color: #fffaf4; border: 1px solid rgba(234, 210, 160, .7);
    background: linear-gradient(135deg, #c25e70, #9b3a4f 60%, #b4506a);
    box-shadow: 0 14px 28px -14px rgba(110, 43, 60, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn.line { color: var(--wine); background: rgba(255, 255, 255, .55); border-color: rgba(185, 71, 91, .4); box-shadow: none; }
.btn.light { color: var(--cream); background: rgba(255, 255, 255, .1); border-color: rgba(234, 210, 160, .6); box-shadow: none; }
.btn.wide { width: 100%; }
.btn.loading { opacity: .65; pointer-events: none; }

/* ── COVER ──────────────────────────────────────────────────────── */
.cover { position: fixed; inset: 0; z-index: 2000; overflow: hidden; touch-action: none; cursor: grab;
    background:
        radial-gradient(60% 40% at 50% 48%, #fffaf4 0%, rgba(255, 250, 244, 0) 100%),
        radial-gradient(40% 30% at 20% 30%, rgba(250, 210, 214, .7), transparent 70%),
        radial-gradient(40% 30% at 80% 72%, rgba(246, 214, 196, .7), transparent 70%),
        linear-gradient(170deg, #fbefe9, #f4dcd9 55%, #f2e2d5);
    transition: background-color 1s; }
.cover.dragging { cursor: grabbing; }
.cover.open { background: transparent; transition: opacity 1.4s ease; opacity: 0; }
.cv-flowers { position: absolute; inset: 0; }
.cv-flowers canvas { position: absolute; left: 0; top: 0; transform-origin: var(--ox) var(--oy); transform: rotate(var(--r)) translate(var(--tx, 0), var(--ty, 0)); will-change: transform; }
/* .sw: ayunan rotate ±--a dijalankan dari scene.js (Web Animations, ter-komposit) */
.cover.parting .cv-flowers canvas { animation: none; }
.cover.open .cv-flowers canvas { transition: transform 1.6s cubic-bezier(.6, .02, .2, 1), opacity 1.6s ease, filter 1.6s; opacity: 0; filter: blur(3px); }
.cover:not(.ready) .cv-flowers { opacity: 0; }
.cv-flowers { transition: opacity 1.2s ease; }
.cv-shade { position: absolute; inset: 0; background: radial-gradient(56% 36% at 50% 50%, rgba(255, 250, 244, .92), rgba(255, 250, 244, .55) 60%, transparent); transition: opacity 1s; pointer-events: none; }
.cover.open .cv-shade { opacity: 0; }
.cv-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); color: var(--ink); transition: opacity .7s, transform 1s var(--ease); pointer-events: none; }
.cv-content > * { pointer-events: auto; }
.cover.open .cv-content { opacity: 0; transform: scale(1.06); }
.cv-orn { width: 180px; margin: 0 auto 6px; pointer-events: none !important; }
.cv-lbl { margin: 0 0 10px; font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--rose); font-weight: 500; }
.cv-names { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(54px, 16vw, 88px); line-height: 1.02; color: var(--wine);
    text-shadow: 0 2px 18px rgba(255, 250, 244, .9); }
.cv-names .amp { display: block; font-family: var(--serif); font-style: italic; font-size: .4em; color: var(--gold); margin: 0 0 2px; }
.cv-date { margin: 12px 0 20px; font-family: var(--serif); font-size: 19px; letter-spacing: .2em; color: var(--ink); }
.cv-to { margin: 0 0 22px; padding: 14px 26px; border-radius: 18px; min-width: 220px; max-width: 320px;
    background: rgba(255, 255, 255, .55); border: 1px solid rgba(184, 147, 90, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 18px 34px -24px rgba(110, 43, 60, .6); }
.cv-to span { display: block; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--dim); }
.cv-to b { display: block; margin-top: 2px; font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--wine); word-break: break-word; }
.cv-hint { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 12.5px; letter-spacing: .06em; color: var(--text); }
.cv-hint i { position: relative; width: 34px; height: 2px; background: rgba(185, 71, 91, .25); border-radius: 2px; overflow: hidden; }
.cv-hint i::after { content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: var(--rose); animation: swipe 1.8s ease-in-out infinite; }
/* left -40% → 100% sama dengan geser 140% lebar induk = 350% lebar sendiri (transform, tanpa layout) */
@keyframes swipe { to { transform: translateX(350%); } }
.cv-note { margin: 10px 0 0; font-size: 10.5px; color: var(--dim); }

/* ── MAIN ───────────────────────────────────────────────────────── */
main { position: relative; z-index: 2; }
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center;
    padding: 0 18px calc(8svh + env(safe-area-inset-bottom)); color: var(--ink); position: relative; }
.hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60svh; pointer-events: none;
    background: radial-gradient(70% 52% at 50% 70%, rgba(255, 250, 244, .9), rgba(255, 250, 244, .55) 50%, transparent 75%); }
.hero > * { position: relative; }
.hero .orn-top { width: 190px; margin: 0 auto 2px; }
.hero .lbl { color: var(--rose); }
.hero-names { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(58px, 17vw, 104px); line-height: 1; color: var(--wine); text-shadow: 0 2px 22px rgba(255, 250, 244, .95); }
.hero-names .amp { font-family: var(--serif); font-style: italic; font-size: .38em; color: var(--gold); padding: 0 .2em; }
.hero-date { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 6px; font-family: var(--serif); font-size: 18px; letter-spacing: .14em; color: var(--ink); }
.hero-date i { width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.hero-place { margin: 0 0 22px; font-size: 13px; letter-spacing: .12em; color: var(--text); }
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .4em; text-transform: uppercase; text-decoration: none; color: var(--text); }
.scroll-cue i { width: 1px; height: 42px; background: linear-gradient(var(--rose), transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.sec { position: relative; padding: 16vh 16px; display: flex; justify-content: center; }
.sec:first-of-type { padding-top: 10vh; }
.card {
    position: relative; width: 100%; max-width: 520px; padding: 42px 22px 34px; border-radius: 30px;
    background: linear-gradient(170deg, rgba(255, 252, 248, .92), rgba(252, 240, 236, .86));
    border: 1px solid rgba(255, 255, 255, .8);
    backdrop-filter: blur(10px) saturate(1.15); -webkit-backdrop-filter: blur(10px) saturate(1.15);
    box-shadow: 0 40px 70px -42px rgba(110, 43, 60, .6), 0 2px 0 rgba(255, 255, 255, .6) inset;
}
/* bingkai emas tipis di dalam kartu */
.card::before { content: ''; position: absolute; inset: 9px; border-radius: 23px; border: 1px solid rgba(184, 147, 90, .32); pointer-events: none; }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: soft-light; opacity: .6; overflow: hidden;
    background:
        radial-gradient(22% 16% at 20% 30%, rgba(255, 220, 220, .9), transparent 70%),
        radial-gradient(18% 14% at 74% 18%, rgba(255, 236, 210, .8), transparent 70%),
        radial-gradient(24% 18% at 62% 74%, rgba(255, 220, 230, .7), transparent 70%);
    animation: shimmer 14s ease-in-out infinite alternate; }
@keyframes shimmer { from { background-position: 0 0, 0 0, 0 0; opacity: .45; } to { background-position: 30px 20px, -20px 30px, 20px -24px; opacity: .7; } }
.card > * { position: relative; z-index: 1; }
.card.center { text-align: center; }
.card .orn-corner { position: absolute; z-index: 2; width: 150px; top: -46px; right: -34px; pointer-events: none; }
.card .orn-corner.l { right: auto; left: -40px; top: auto; bottom: -44px; width: 132px; }
.rv.in .orn-corner, .rv.in .p-orn { animation: bloom 1.8s var(--ease) both .2s; }
@keyframes bloom { from { transform: scale(.55) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
.card .orn-corner.ok { filter: drop-shadow(0 10px 14px rgba(110, 43, 60, .22)); }

.sh { text-align: center; margin-bottom: 18px; }
.sh .orn-div { width: 170px; height: 52px; margin: 0 auto 4px; object-fit: contain; }
.sh-no { display: block; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--gold); letter-spacing: .1em; }
.lbl { margin: 0 0 8px; font-size: 11px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--rose); }
.ttl { margin: 0 0 14px; font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 8.6vw, 40px); line-height: 1.12; color: var(--wine); }
.sub { margin: -8px 0 14px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--dim); }
.txt { margin: 0 0 16px; }
.txt.sm { font-size: 14px; }
.arabic { margin: 0 0 10px; font-family: var(--arab); font-size: 23px; line-height: 1.95; color: var(--wine); direction: rtl; }
.arabic.big { font-size: 27px; }

.ayat { margin: 22px 0 0; padding: 22px 18px; border-radius: 22px; background: rgba(255, 255, 255, .62); border: 1px solid rgba(185, 71, 91, .14); }
.ayat .arabic { font-size: 21px; }
.ayat blockquote { margin: 6px 0 10px; font-family: var(--serif); font-style: italic; font-size: 17.5px; line-height: 1.55; color: var(--ink); }
.ayat figcaption { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 500; }

/* mempelai */
.couple { display: grid; gap: 26px; }
.person { text-align: center; }
.portrait { position: relative; width: 172px; height: 218px; margin: 0 auto 18px; }
.portrait .frame { position: absolute; inset: 0; border-radius: 999px 999px 26px 26px; overflow: hidden; border: 5px solid rgba(255, 255, 255, .95);
    outline: 1px solid rgba(184, 147, 90, .55); outline-offset: 5px;
    box-shadow: 0 24px 40px -22px rgba(110, 43, 60, .7); background: linear-gradient(170deg, #f6d5d3, #d68f98); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ini { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--script); font-size: 92px; color: #fffaf4; text-shadow: 0 4px 20px rgba(110, 43, 60, .35); }
.portrait .p-orn { position: absolute; width: 128px; left: -58px; bottom: -40px; pointer-events: none; }
.portrait.b .p-orn { left: auto; right: -58px; transform: scaleX(-1); }
.portrait.b .p-orn.ok { animation-name: bloomFlip; }
@keyframes bloomFlip { from { transform: scaleX(-1) scale(.55) rotate(-14deg); opacity: 0; } to { transform: scaleX(-1); opacity: 1; } }
.person h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.15; color: var(--wine); }
.person .parent { margin: 0; font-size: 14.5px; }
.person .parent b { font-weight: 500; color: var(--ink); }
.couple .and { font-family: var(--script); font-size: 58px; line-height: 1; color: var(--gold); text-align: center; }

/* kisah */
.story { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; text-align: left; }
.story::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(var(--sage), var(--blush), var(--rose)); }
.story li { position: relative; padding: 0 0 22px; }
.story li:last-child { padding-bottom: 0; }
.story li::before { content: ''; position: absolute; left: -26px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #fff7e8 0 18%, transparent 20%), conic-gradient(from 20deg, #f3bcc0, #d97c8a, #f3bcc0, #e795a0, #f3bcc0);
    box-shadow: 0 0 0 4px rgba(233, 185, 185, .3); }
.story .lbl { margin-bottom: 2px; font-size: 10px; }
.story h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--wine); }
.story p { margin: 0; font-size: 14.5px; }

/* countdown — karangan bunga */
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 10px; }
.wreath { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wreath b { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100px; aspect-ratio: 1;
    background-size: 100% 100%; background-repeat: no-repeat;
    font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 6.8vw, 32px); color: var(--wine); }
.wreath b::before { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffdf9, #fbeee9); box-shadow: inset 0 0 0 1px rgba(184, 147, 90, .3); z-index: -1; }
.wreath b.tick { animation: tick .5s var(--ease); }
@keyframes tick { 0% { transform: scale(1); } 35% { transform: scale(1.06) rotate(-3deg); } 100% { transform: none; } }
.wreath span { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.bigdate { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 9vw, 40px); letter-spacing: .1em; color: var(--wine); }

/* acara */
.events { display: grid; gap: 16px; }
.ev { padding: 22px 18px; border-radius: 22px; background: rgba(255, 255, 255, .66); border: 1px solid rgba(185, 71, 91, .14); text-align: left; }
.ev-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ev-ic { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fffaf4; background: linear-gradient(140deg, #d27384, #9b3a4f); box-shadow: 0 8px 16px -8px rgba(110, 43, 60, .6); }
.ev-ic .ico { width: 22px; height: 22px; }
.ev h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 25px; color: var(--wine); line-height: 1.1; }
.ev .lbl { margin: 0; font-size: 10px; }
.ev dl { margin: 0 0 14px; display: grid; gap: 7px; }
.ev dl div { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.ev dt { color: var(--rose); padding-top: 1px; }
.ev dd { margin: 0; }

/* lokasi */
.map-frame { position: relative; margin: 4px 0 16px; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 20px 34px -24px rgba(110, 43, 60, .7); background: #f6ece6; }
.leaflet-map { width: 100%; height: 100%; }
.map-illu { display: block; width: 100%; height: 100%; position: relative; }
.map-illu svg { width: 100%; height: 100%; display: block; }
.mi-pin { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -100%); color: var(--rose); }
.mi-pin .ico { width: 40px; height: 40px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); }
.loc-name { margin: 0 0 4px; font-family: var(--serif); font-weight: 600; font-size: 23px; color: var(--wine); }
.sa-marker span { display: block; width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--rose); border: 3px solid #fffaf4; box-shadow: 0 6px 12px rgba(0, 0, 0, .3); }

/* galeri */
.gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gal-item { position: relative; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: pointer; aspect-ratio: 3 / 4; background: #f3dcd8; box-shadow: 0 18px 28px -20px rgba(110, 43, 60, .7); }
.gal-item:nth-child(3n+1) { grid-column: span 2; aspect-ratio: 16 / 10; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gal-item:hover img { transform: scale(1.06); }
.gal-item::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.gal-item .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: radial-gradient(circle at 50% 40%, #fffaf4, #f6dcd8 70%, #eec6c4); color: var(--wine); font-family: var(--serif); font-style: italic; font-size: 16px; }
.gal-item .ph img { width: 62%; max-width: 160px; height: auto; object-fit: contain; transform: none !important; }

/* hadiah */
.gift-wrap { width: 100%; max-width: 1080px; margin: 14px auto 0; }
.gift-sec { flex-direction: column; align-items: center; }
.gift #gift-section { background: transparent !important; padding: 0 !important; font-family: var(--sans) !important; }
.gift #gift-section .gs-heading { display: none; }
.gift #gift-section .gs-card, .gift #gift-section .gs-bank-card { border-radius: 22px !important; border: 1px solid rgba(255, 255, 255, .8) !important;
    background: linear-gradient(170deg, rgba(255, 252, 248, .94), rgba(252, 240, 236, .9)) !important; box-shadow: 0 30px 50px -34px rgba(110, 43, 60, .6) !important; }
.gift #gift-section .gs-sbtn, .gift #gift-section .gs-btn-buy, .gift #gift-section .gs-bank-copy { border-radius: 999px !important; background: #a8445a !important; color: #fffaf4 !important; border: 0 !important; letter-spacing: .08em; }
.gift #gift-section .gs-price { color: #8a6a2c !important; }
.gift #gift-section .gs-name, .gift #gift-section .gs-bank-name-text, .gift #gift-section .gs-bank-holder { color: var(--wine) !important; }
.gift #gift-section .gs-dot.taken { background: var(--gold) !important; }
.gift .gs-wrap, .gift .gs-track, .gift .gs-bank-track { max-width: 1080px; margin-left: auto; margin-right: auto; }

/* rsvp */
.rsvp-form { text-align: left; }
.f-l { display: block; margin: 14px 0 6px; font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--rose); }
.f-in { width: 100%; padding: 13px 16px; border-radius: 16px; border: 1px solid rgba(185, 71, 91, .25); background: rgba(255, 255, 255, .8); color: var(--ink);
    font: inherit; font-weight: 400; font-size: 15px; outline: none; transition: border-color .25s, box-shadow .25s; }
.f-in:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(185, 71, 91, .12); }
textarea.f-in { resize: vertical; min-height: 96px; }
.att { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.att label { position: relative; cursor: pointer; }
.att input { position: absolute; inset: 0; opacity: 0; }
.att span { display: block; padding: 11px 4px; border-radius: 14px; text-align: center; font-size: 13px; font-weight: 400; color: var(--ink);
    background: rgba(255, 255, 255, .72); border: 1px solid rgba(185, 71, 91, .22); transition: all .25s; }
.att input:checked + span { color: #fffaf4; background: #a8445a; border-color: #a8445a; }
.att input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsvp-form .btn { margin-top: 20px; }

/* ucapan */
.wishes-list { max-height: 480px; overflow-y: auto; text-align: left; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--blush) transparent; }
.wish-item { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid rgba(185, 71, 91, .13); }
.wish-item:first-child { border-top: 0; padding-top: 4px; }
.wish-item.new { animation: rise .9s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.wish-avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--av, #b9475b); color: #fffaf4; font-family: var(--serif); font-weight: 600; font-size: 19px; text-transform: uppercase; }
.wish-body { flex: 1; min-width: 0; }
.wish-header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.wish-name { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--wine); word-break: break-word; }
.wish-badge { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: rgba(127, 154, 122, .18); color: #4f6d4b; }
.wish-badge.tidak { background: rgba(185, 71, 91, .12); color: #9a3d4f; }
.wish-badge.ragu { background: rgba(184, 147, 90, .18); color: #82652a; }
.wish-message { margin: 4px 0; font-size: 14.5px; line-height: 1.6; word-break: break-word; }
.wish-time { font-size: 11px; color: var(--dim); }
.wish-empty { text-align: center; padding: 22px 0 6px; color: var(--dim); font-family: var(--serif); font-style: italic; font-size: 17px; }
.wish-empty img { width: 100px; margin: 0 auto 6px; }
.wish-empty p { margin: 0; }

/* penutup — taman di bawah bulan */
.finale { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 14vh 18px 12vh; color: var(--cream); position: relative; }
.finale::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 50% at 50% 50%, rgba(30, 20, 45, .5), transparent 75%); }
.finale > * { position: relative; }
.finale .arabic { color: var(--gold-l); }
.finale .lbl { color: var(--gold-l); }
.fin-names { margin: 6px 0 16px; font-family: var(--script); font-weight: 400; font-size: clamp(56px, 16vw, 96px); line-height: 1; color: #fffaf4; text-shadow: 0 4px 26px rgba(20, 10, 30, .5); }
.fin-names .amp { font-family: var(--serif); font-style: italic; font-size: .38em; color: var(--gold-l); padding: 0 .2em; }
.finale .txt { max-width: 440px; color: rgba(255, 250, 244, .88); }
.fam { display: grid; gap: 10px; margin: 6px 0 20px; width: 100%; max-width: 420px; }
.fam p { margin: 0; padding: 14px 16px; border-radius: 18px; font-size: 14px; color: rgba(255, 250, 244, .92);
    background: rgba(255, 250, 244, .08); border: 1px solid rgba(234, 210, 160, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fam span { display: block; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-l); }
.salam { font-family: var(--serif); font-style: italic; font-size: 19px; color: #fbeee0; }
.credit { margin: 22px 0 0; font-size: 11.5px; letter-spacing: .06em; color: rgba(255, 250, 244, .6); }

/* ── reveal: mekar perlahan ────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease), filter 1.2s var(--ease); }
.rv.in { opacity: 1; transform: none; filter: none; }
.rv.d1 { transition-delay: .12s; } .rv.d2 { transition-delay: .24s; } .rv.d3 { transition-delay: .36s; }
img.orn { opacity: 0; transition: opacity .8s; }
img.orn.ok { opacity: 1; }

/* ── lightbox ───────────────────────────────────────────────────── */
.gallery-lightbox { display: none; opacity: 0; transition: opacity .3s; position: fixed; inset: 0; z-index: 9600; background: rgba(40, 20, 28, .94); align-items: center; justify-content: center; }
.lb-img-wrap { max-width: 94vw; max-height: 84vh; }
.lb-img-wrap img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.lb-close, .lb-prev, .lb-next { position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 250, 244, .1); border: 1px solid rgba(234, 210, 160, .45); color: var(--gold-l); font-size: 22px; line-height: 1; }
.lb-close { top: calc(18px + env(safe-area-inset-top)); right: 18px; font-size: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: .3em; color: var(--gold-l); }

body.has-qr .finale { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }

@media (max-width: 559px) {
    .hero-names .amp, .fin-names .amp { display: block; padding: 0; margin: -.1em 0 -.05em; }
}
@media (min-width: 760px) {
    .couple { grid-template-columns: 1fr auto 1fr; align-items: center; }
    .card { padding: 50px 40px 42px; }
    .gal { grid-template-columns: repeat(3, 1fr); }
    .gal-item:nth-child(3n+1) { grid-column: auto; aspect-ratio: 3 / 4; }
    .events { grid-template-columns: 1fr 1fr; }
    .card.wide { max-width: 760px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
    .rv { opacity: 1; transform: none; filter: none; }
}
