/* ═══════════════════════════════════════════════════════════
   TROPICAL PARADISE — lush jungle greens & a coral-to-gold sunset
   Fonts: Gilda Display (display) · Parisienne (script) · Jost (body)
═══════════════════════════════════════════════════════════ */
:root {
    --bg:           #0e2a21;
    --bg-2:         #0b231c;
    --surface:      #163e31;
    --surface-2:    #1c4a3a;
    --text:         #fbf1e3;
    --muted:        #bcd2c0;
    --accent:       #f58a63;
    --accent-light: #ffc98a;
    --accent-dark:  #e0574f;
    --coral:        #ef6a5a;
    --peach:        #f8a982;
    --gold:         #f7c56a;
    --lagoon:       #2fb3a6;
    --lagoon-light: #8fe3d8;
    --ink:          #0c2a20;
    --hibiscus:     #8e1b35;
    --line:         rgba(248,169,130,.3);
    --line-soft:    rgba(248,169,130,.16);
    --sunset:       linear-gradient(135deg, #ef6a5a 0%, #f58a63 32%, #f8a982 60%, #f7c56a 100%);
    --sunset-text:  linear-gradient(100deg, #ffd58a 0%, #f8a982 38%, #ef6a5a 70%, #f8a982 100%);
    --leaf-r:       34px 8px 34px 8px;
    --display:      'Gilda Display', 'Playfair Display', Georgia, serif;
    --script:       'Parisienne', cursive;
    --sans:         'Jost', system-ui, -apple-system, sans-serif;
    --frame-w:      min(100vw, 640px);
    --pad-section:  calc(var(--frame-w) * .3 + 14px);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}
body.no-scroll { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
main { overflow: hidden; position: relative; }
::selection { background: var(--accent); color: var(--ink); }

/* ── Background: jungle dusk + faint leaf pattern ── */
.jungle-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 90% 45% at 50% -8%, rgba(245,138,99,.14), transparent 70%),
        radial-gradient(ellipse 70% 40% at 100% 100%, rgba(47,179,166,.12), transparent 70%),
        radial-gradient(ellipse 60% 35% at 0% 60%, rgba(247,197,106,.06), transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%238fe3d8' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M18 70Q38 24 86 20Q66 58 18 70ZM18 70L86 20M40 52l6-18M56 40l10-14M34 60l-14-6M48 50l-12-12'/%3E%3Cpath d='M96 148Q104 104 150 92Q138 132 96 148ZM96 148L150 92M112 130l-2-18M126 116l2-16'/%3E%3C/g%3E%3C/svg%3E"),
        var(--bg);
}
.tp-particles {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0; transition: opacity 1.6s ease;
}
.tp-particles.on { opacity: 1; }

/* ── Section frame + injected bingkai (SVG assets) ── */
.section-frame {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding: var(--pad-section) 0;
}
.section-frame-top, .section-frame-bottom {
    position: absolute; left: 0; right: 0; margin: 0 auto;
    width: var(--frame-w); line-height: 0;
    pointer-events: none; user-select: none; z-index: 1;
}
.section-frame-top { top: 0; }
.section-frame-bottom { bottom: 0; }
.section-frame-top img, .section-frame-bottom img { width: 100%; height: auto; display: block; }
.section-frame-top img { transform-origin: 50% 0; animation: swayTop 9s ease-in-out infinite alternate; }
.section-frame-bottom img { transform-origin: 50% 100%; animation: swayBottom 11s ease-in-out infinite alternate; }
@keyframes swayTop {
    0%   { transform: rotate(-.7deg) skewX(.6deg) scale(1.015); }
    100% { transform: rotate(.7deg) skewX(-.6deg) scale(1.015); }
}
@keyframes swayBottom {
    0%   { transform: rotate(.6deg) skewX(-.8deg) scale(1.015); }
    100% { transform: rotate(-.6deg) skewX(.8deg) scale(1.015); }
}
.intro-frame-top, .intro-frame-bottom {
    position: absolute; left: 0; right: 0; margin: 0 auto;
    width: var(--frame-w); height: auto; max-height: 42vh;
    object-fit: cover; pointer-events: none; user-select: none; z-index: 2;
}
.intro-frame-top { top: 0; object-position: top; transform-origin: 50% 0; animation: swayTop 7s ease-in-out infinite alternate; }
.intro-frame-bottom { bottom: 0; object-position: bottom; transform-origin: 50% 100%; animation: swayBottom 8s ease-in-out infinite alternate; }
.intro.opening .intro-frame-top, .intro.opening .intro-frame-bottom { animation: none; }
.divider { display: block; width: min(250px, 74%); height: auto; margin: 0 auto; }

/* ── Container ── */
.container {
    width: 100%; max-width: 760px; margin: 0 auto; padding: 0 1.5rem;
    position: relative; z-index: 2;
}

/* ── Section heading ── */
.section-head { text-align: center; margin-bottom: 2.2rem; }
.eyebrow {
    display: block;
    font-family: var(--script); font-weight: 400;
    font-size: 1.75rem; line-height: 1.1;
    color: var(--lagoon-light); margin-bottom: .1rem;
}
.section-title {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(2.05rem, 8.6vw, 2.9rem);
    line-height: 1.15; letter-spacing: .02em;
    margin-bottom: .8rem;
}
.section-title, .footer-names, .intro-names {
    background: var(--sunset-text);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--peach);
}

/* ════════════════════════════
   BUTTONS
════════════════════════════ */
.btn-sunset {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    position: relative; isolation: isolate;
    padding: 1rem 2.2rem;
    background: var(--sunset); background-size: 160% 160%; background-position: 0% 50%;
    color: var(--ink);
    border: none; border-radius: 999px; cursor: pointer;
    font-family: var(--sans); font-weight: 600;
    font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
    box-shadow: 0 12px 30px rgba(239,106,90,.35), inset 0 1px 0 rgba(255,255,255,.45);
    transition: transform .35s cubic-bezier(.16,1,.3,1), background-position .6s, box-shadow .35s;
}
.btn-sunset::after {
    content: ''; position: absolute; inset: -6px; z-index: -1;
    border-radius: inherit; border: 1px solid rgba(248,169,130,.6);
    animation: ringPulse 2.6s ease-out infinite;
}
@keyframes ringPulse {
    0%   { transform: scale(.94); opacity: .9; }
    100% { transform: scale(1.18, 1.45); opacity: 0; }
}
.btn-sunset:hover { transform: translateY(-2px); background-position: 100% 50%; box-shadow: 0 16px 36px rgba(239,106,90,.45), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-sunset:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.btn-sunset:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.btn-sunset.is-sent { background: linear-gradient(135deg, #2fb3a6, #1f857d); color: #fff; }
.btn-block { width: 100%; }
.btn-block::after { display: none; }

/* ════════════════════════════
   INTRO / COVER
════════════════════════════ */
.intro {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden auto;
}
.intro-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 85% 55% at 50% 40%, rgba(245,138,99,.32), transparent 70%),
        radial-gradient(ellipse 90% 40% at 50% 100%, rgba(47,179,166,.2), transparent 70%),
        linear-gradient(180deg, #0a2119 0%, #0e2a21 50%, #0a2119 100%);
}
.intro-glow {
    position: absolute; left: 50%; top: 34%;
    width: min(130vw, 760px); aspect-ratio: 1;
    margin-left: calc(min(130vw, 760px) / -2); margin-top: calc(min(130vw, 760px) / -2);
    background: radial-gradient(circle, rgba(255,201,138,.32) 0%, rgba(239,106,90,.14) 35%, transparent 62%);
    animation: sunPulse 5s ease-in-out infinite alternate;
}
@keyframes sunPulse {
    0%   { transform: scale(.9); opacity: .7; }
    100% { transform: scale(1.08); opacity: 1; }
}
.intro-content {
    position: relative; z-index: 3;
    width: 100%; max-width: 420px;
    padding: calc(var(--frame-w) * .2) 22px calc(var(--frame-w) * .24); margin: auto;
}
.intro-emblem { position: relative; width: min(60vw, 230px); margin: 0 auto .5rem; }
.intro-ornamen { width: 100%; height: auto; }
.emblem-mono {
    position: absolute; left: 0; right: 0; top: 33%;
    font-family: var(--display); font-size: clamp(1.3rem, 6vw, 1.7rem); letter-spacing: .14em;
    color: #fff7ea; text-shadow: 0 2px 10px rgba(142,27,53,.55);
}
.intro-subtitle {
    font-size: .74rem; font-weight: 500; letter-spacing: .42em; text-transform: uppercase;
    color: var(--muted); margin-bottom: .2rem;
}
.intro-names {
    font-family: var(--script); font-weight: 400;
    font-size: clamp(2.6rem, 12vw, 3.6rem); line-height: 1.15;
    margin-bottom: 1.3rem; overflow-wrap: anywhere; padding: 0 .2em;
}
.intro-names em {
    display: block; font-family: var(--display); font-style: normal;
    font-size: .42em; line-height: 1.2; letter-spacing: .2em;
}
.guest-card {
    margin: 0 auto 1.6rem; padding: 1rem 1.4rem 1.1rem;
    max-width: 320px;
    background: rgba(11,35,28,.62);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border: 1px solid var(--line);
    border-radius: 26px 6px 26px 6px;
}
.to-label { font-size: .86rem; color: var(--muted); }
.guest-name {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(1.3rem, 5.5vw, 1.6rem); line-height: 1.3;
    margin-top: .25rem; color: var(--accent-light);
    overflow-wrap: anywhere;
}

/* leaf curtain */
.leaf-curtain { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.cl { position: absolute; top: var(--top); width: var(--w); opacity: 0; will-change: transform; }
.cl svg { display: block; width: 100%; height: auto; rotate: var(--r); overflow: visible; }
.cl-l { left: -14vw; transform-origin: 0% 50%; }
.cl-r { right: -14vw; transform-origin: 100% 50%; }
.cl-r svg { transform: scaleX(-1); }

/* ════════════════════════════
   NAVIGATION
════════════════════════════ */
nav {
    position: fixed; left: 0; right: 0; margin: 0 auto;
    width: max-content; max-width: calc(100% - 24px);
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateY(140px);
    z-index: 1000; opacity: 0;
    transition: .9s cubic-bezier(.16,1,.3,1);
}
nav.visible { transform: translateY(0); opacity: 1; }
/* lift above the guest QR button (#qr-fab, bottom-right) only when it exists */
body:has(#qr-fab) nav, body.has-qr nav { bottom: calc(84px + env(safe-area-inset-bottom)); }
.nav-inner {
    display: flex; gap: 4px; align-items: center;
    padding: 6px;
    background: rgba(9,30,23,.86);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--line-soft); border-radius: 999px;
    box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
nav a {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
    color: var(--muted); display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: color .3s, background .4s, box-shadow .3s;
}
nav a svg { width: 21px; height: 21px; flex: none; }
nav a.active { color: var(--ink); background: var(--sunset); box-shadow: 0 4px 12px rgba(239,106,90,.35); }
nav a:hover { color: var(--accent-light); }
nav a.active:hover { color: var(--ink); }
nav a:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
/* keep the last block clear of the fixed nav */
main > .footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
body:has(#qr-fab) main > .footer, body.has-qr main > .footer { padding-bottom: calc(168px + env(safe-area-inset-bottom)); }

/* ════════════════════════════
   MUSIC BUTTON
════════════════════════════ */
.music-toggle-btn {
    position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 1001;
    width: 44px; height: 44px; border-radius: 50%;
    border: none; background: var(--sunset); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
    transition: transform .3s;
}
.music-toggle-btn::before {
    content: ''; position: absolute; inset: -5px; border-radius: 50%;
    border: 1.5px dashed rgba(255,201,138,.75);
}
.music-toggle-btn.playing::before { animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-toggle-btn svg { width: 18px; height: 18px; }
.music-toggle-btn:hover { transform: scale(1.06); }
.music-toggle-btn:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 6px; }

/* ════════════════════════════
   HERO — sunset over the lagoon
════════════════════════════ */
.hero {
    align-items: center; padding-left: 16px; padding-right: 16px;
    isolation: isolate; overflow: hidden;
    background: #f9b07c;
    --horizon: 80%;
}
.hero-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-sky {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #d9566a 0%, #e9685f 20%, #f3855f 40%, #f8a46f 58%, #fcc684 72%, #ffdd98 80%);
}
.hero-sun {
    --sun: min(92vw, 400px);
    position: absolute; left: 50%; top: var(--horizon);
    width: var(--sun); height: var(--sun);
    margin-left: calc(var(--sun) / -2); margin-top: calc(var(--sun) / -2);
}
.sun-glow {
    position: absolute; inset: -14%; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,236,170,.95) 0%, rgba(255,200,120,.55) 30%, rgba(255,160,110,.18) 52%, transparent 68%);
    animation: sunPulse 4.5s ease-in-out infinite alternate;
}
.sun-disc {
    position: absolute; inset: 24%; border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, #fff8d8 0%, #ffe49a 38%, #ffc067 78%, #ffa957 100%);
    box-shadow: 0 0 60px rgba(255,214,140,.8);
}
.hero-far {
    position: absolute; left: 0; width: 100%; height: 9%;
    bottom: calc(100% - var(--horizon));
    fill: #a8475c; opacity: .6;
}
.hero-sea {
    position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0; overflow: hidden;
    background: linear-gradient(180deg, #4cc0b0 0%, #2a9a90 22%, #1a6f68 55%, #0e2a21 100%);
}
.hero-sea::before {
    content: ''; position: absolute; left: 50%; top: 0; width: 46%; height: 70%;
    transform: translateX(-50%);
    background: repeating-linear-gradient(180deg, rgba(255,232,170,.85) 0 2px, transparent 2px 8px);
    -webkit-mask: radial-gradient(ellipse 50% 100% at 50% 0%, #000 20%, transparent 75%);
    mask: radial-gradient(ellipse 50% 100% at 50% 0%, #000 20%, transparent 75%);
}
.sea-shimmer {
    position: absolute; top: 0; bottom: 0; left: -60px; width: calc(100% + 120px);
    background: repeating-linear-gradient(100deg, transparent 0 34px, rgba(255,255,255,.12) 34px 40px, transparent 40px 68px);
    -webkit-mask: linear-gradient(180deg, #000, transparent 70%);
    mask: linear-gradient(180deg, #000, transparent 70%);
    animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { transform: translateX(68px); } }
.hero-tree {
    --th: min(50vh, 460px);
    position: absolute; bottom: calc(100% - var(--horizon) - 6%);
    height: var(--th); width: calc(var(--th) * .469);
    color: #123a2d; opacity: .92;
}
.hero-tree-l { left: calc(var(--th) * -.17); }
.hero-tree-r { right: calc(var(--th) * -.17); }

.hero-frame {
    width: min(100%, 420px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    position: relative; z-index: 2;
    padding: .5rem .5rem 1rem;
}
.hero-ornamen { display: block; width: min(46vw, 190px); height: auto; margin: 0 auto .4rem; filter: drop-shadow(0 6px 16px rgba(142,27,53,.25)); }
.hero-content { position: relative; }
.hero-label {
    font-size: .74rem; font-weight: 600; letter-spacing: .42em; text-transform: uppercase;
    color: var(--ink); margin-bottom: .2rem; padding-left: .42em;
}
.hero-names {
    font-family: var(--script); font-weight: 400;
    font-size: clamp(2.9rem, 13.5vw, 4.2rem); line-height: 1.05;
    color: var(--ink);
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: .9rem; overflow-wrap: anywhere;
}
.hero-names .w { display: inline-block; white-space: nowrap; }
.hero-names .ch { display: inline-block; }
.hero-names .amp {
    font-family: var(--display); font-size: .42em; line-height: 1.3;
    color: var(--hibiscus); letter-spacing: .1em;
}
.hero .divider { width: min(220px, 64%); }
.hero-date {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    margin-top: 1rem; color: var(--ink);
}
.hero-date .day { font-family: var(--display); font-size: clamp(2.8rem, 12vw, 3.5rem); line-height: 1; }
.month-year { text-align: left; border-left: 1px solid rgba(12,42,32,.45); padding-left: 1rem; line-height: 1.35; }
.month-year .month { display: block; font-weight: 600; font-size: 1.02rem; letter-spacing: .22em; text-transform: uppercase; }
.month-year .year { font-size: .95rem; letter-spacing: .32em; font-weight: 500; }

/* ════════════════════════════
   QUOTE
════════════════════════════ */
.quote {
    background: radial-gradient(ellipse 85% 45% at 50% 50%, rgba(47,179,166,.14), transparent 72%);
}
.quote > .container { text-align: center; max-width: 600px; }
.vine-draw { display: block; width: min(220px, 70%); height: auto; margin: 0 auto 1.2rem; overflow: visible; }
.quote-text {
    font-family: var(--display); font-size: clamp(1.18rem, 4.8vw, 1.42rem);
    color: var(--text); line-height: 1.7; margin: 0 auto 1.3rem;
}
.quote-text .wd { display: inline-block; }
.quote cite {
    display: block; font-style: normal; font-weight: 600;
    font-size: .8rem; letter-spacing: .34em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 1.3rem;
}

/* ════════════════════════════
   COUPLE
════════════════════════════ */
.couple-flex {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: start; gap: 1rem;
    max-width: 640px; margin: 0 auto;
}
.couple-item { text-align: center; min-width: 0; }
.portrait-sun {
    --ps: 128px;
    width: var(--ps); height: var(--ps); margin: 0 auto 1.3rem;
    border-radius: 50%; position: relative;
    display: flex; align-items: flex-start; justify-content: center;
    background:
        repeating-linear-gradient(180deg, rgba(255,232,170,.5) 0 1.5px, transparent 1.5px 7px) 50% 100% / 40% 34% no-repeat,
        linear-gradient(180deg, #df5c69 0%, #f3855f 36%, #fcc684 62%, #4cc0b0 62.5%, #1a6f68 100%);
    box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px rgba(247,197,106,.55), 0 18px 36px rgba(0,0,0,.35);
}
.portrait-sun::before {
    content: ''; position: absolute; left: 30%; width: 40%; aspect-ratio: 1;
    top: calc(62% - 20%); border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #fff6d0, #ffd27a 60%, #ffb257);
    clip-path: inset(0 0 50% 0);
}
.portrait-sun span {
    position: relative; z-index: 1; margin-top: 14%;
    font-family: var(--display); font-size: 2.6rem; line-height: 1;
    color: #fff7ea; text-shadow: 0 2px 12px rgba(142,27,53,.5);
}
.portrait-leaf { position: absolute; width: 62%; left: -26%; bottom: -12%; rotate: -128deg; z-index: 2; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.couple-item:last-child .portrait-leaf { left: auto; right: -26%; rotate: -52deg; transform: scaleY(-1); }
.name {
    font-family: var(--script); font-weight: 400;
    font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.15;
    color: var(--accent-light);
    margin-bottom: .6rem; overflow-wrap: anywhere;
}
.ampersand {
    font-family: var(--display); font-size: clamp(2rem, 7vw, 2.8rem);
    color: var(--coral); align-self: center; line-height: 1;
    padding-bottom: 3.5rem;
}
.parent { font-size: .96rem; color: var(--muted); line-height: 1.6; }

/* ════════════════════════════
   EVENT
════════════════════════════ */
.countdown-leaf {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem;
    max-width: 400px; margin: 0 auto 2.4rem;
}
.time-box {
    aspect-ratio: 1; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--sunset); color: var(--ink);
    border-radius: 50% 8px 50% 8px;
    box-shadow: 0 10px 24px rgba(239,106,90,.22), inset 0 0 0 1px rgba(255,255,255,.35);
    perspective: 400px;
}
.time-box:nth-child(even) { border-radius: 8px 50% 8px 50%; }
.time-box::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(135deg, transparent 49.4%, rgba(255,255,255,.28) 50%, transparent 50.6%);
}
.time-box:nth-child(even)::before { background: linear-gradient(45deg, transparent 49.4%, rgba(255,255,255,.28) 50%, transparent 50.6%); }
.time-box span {
    display: block; position: relative;
    font-family: var(--display); font-size: clamp(1.5rem, 6.6vw, 2.1rem); line-height: 1.05;
    transform-origin: 50% 0;
}
.time-box label {
    display: block; position: relative; margin-top: .1rem;
    font-size: .6rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: rgba(12,42,32,.78);
}
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.4rem;
}
.leaf-card {
    position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(160deg, rgba(31,84,64,.94) 0%, rgba(17,52,41,.96) 100%);
    border: 1px solid var(--line-soft);
    border-radius: var(--leaf-r);
    box-shadow: 0 22px 44px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
}
.leaf-card::before {
    content: ''; position: absolute; top: -40%; right: -30%; width: 80%; aspect-ratio: 1; z-index: -1;
    background: radial-gradient(circle, rgba(245,138,99,.22), transparent 65%);
    pointer-events: none;
}
.wipe-leaf { position: absolute; left: -60px; top: 100%; width: 120px; margin-top: -60px; z-index: 5; pointer-events: none; opacity: 0; }
.wipe-leaf svg { display: block; width: 100%; height: auto; }
.event-card { text-align: center; padding: 2.1rem 1.5rem 2.2rem; }
.event-icon {
    width: 54px; height: 54px; margin: 0 auto 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sunset); color: var(--ink);
    box-shadow: 0 0 0 5px rgba(245,138,99,.14);
}
.event-icon svg { width: 26px; height: 26px; }
.event-title { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--accent-light); margin-bottom: .7rem; }
.event-date { font-weight: 500; font-size: 1.05rem; color: var(--text); margin-bottom: .55rem; }
.event-time {
    display: inline-block; margin-bottom: .9rem; padding: .28rem 1rem;
    border-radius: 999px; background: rgba(47,179,166,.18); border: 1px solid rgba(143,227,216,.3);
    color: var(--lagoon-light); font-weight: 500; letter-spacing: .1em; font-size: .95rem;
}
.event-location { color: var(--muted); font-size: 1rem; line-height: 1.55; }

/* ════════════════════════════
   MAP
════════════════════════════ */
.map-info {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 1.4rem 1.4rem 1.2rem;
    border-bottom: 1px solid var(--line-soft);
}
.map-detail { display: flex; align-items: flex-start; gap: .75rem; flex: 1; min-width: 180px; }
.map-icon {
    color: var(--ink); flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: var(--sunset);
}
.map-venue { font-family: var(--display); font-size: 1.2rem; color: var(--text); margin-bottom: .15rem; line-height: 1.35; }
.map-address { font-size: .96rem; color: var(--muted); line-height: 1.55; }
.btn-map-nav {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .7rem 1.4rem; border-radius: 999px;
    background: transparent; color: var(--accent-light);
    border: 1px solid var(--accent);
    font-weight: 600; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
    transition: background .3s, color .3s;
}
.btn-map-nav:hover, .btn-map-nav:focus-visible { background: var(--accent); color: var(--ink); outline: none; }
.leaflet-map { width: 100%; height: 260px; display: block; }
.map-embed-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .6rem; height: 180px;
    background: rgba(8,28,22,.45); color: var(--accent-light);
    text-decoration: none; font-weight: 500; letter-spacing: .06em;
    transition: background .3s, color .3s;
}
.map-embed-placeholder:hover { background: var(--accent); color: var(--ink); }

/* ════════════════════════════
   GALLERY
════════════════════════════ */
.gallery-subtitle { text-align: center; color: var(--muted); font-size: 1rem; margin: -1.2rem 0 1.8rem; }
.gallery-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.gallery-featured, .gallery-grid-item, .gallery-extra-item {
    position: relative; overflow: hidden; cursor: pointer;
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    border-radius: 22px 6px 22px 6px;
}
.gallery-featured { aspect-ratio: 3/4; box-shadow: 0 0 0 1px var(--line); }
.gallery-grid-side { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.gallery-grid-item { min-height: 0; border-radius: 14px 4px 14px 4px; }
.gallery-grid-item:nth-child(even) { border-radius: 4px 14px 4px 14px; }
.gallery-extra-item { aspect-ratio: 1; border-radius: 14px 4px 14px 4px; }
.gallery-featured img, .gallery-grid-item img, .gallery-extra-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.gallery-featured:hover img, .gallery-grid-item:hover img, .gallery-extra-item:hover img { transform: scale(1.07); }
.gallery-featured-overlay, .gallery-item-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, transparent 40%, rgba(239,106,90,0));
    transition: background .4s;
}
.gallery-featured:hover .gallery-featured-overlay,
.gallery-grid-item:hover .gallery-item-overlay,
.gallery-extra-item:hover .gallery-item-overlay { background: linear-gradient(180deg, rgba(14,42,33,.1) 30%, rgba(239,106,90,.45)); }
.gallery-featured-overlay svg, .gallery-item-overlay svg { opacity: 0; transition: opacity .3s; }
.gallery-featured:hover svg, .gallery-grid-item:hover svg, .gallery-extra-item:hover svg { opacity: 1; }
.gallery-row-extra {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 110px), 1fr));
    gap: 8px; margin-top: 8px;
}
.gallery-featured.placeholder, .gallery-grid-item.placeholder {
    color: var(--peach); cursor: default;
    background: linear-gradient(160deg, rgba(31,84,64,.9), rgba(17,52,41,.95));
    border: 1px solid var(--line-soft);
}
.gallery-featured.placeholder svg, .gallery-grid-item.placeholder svg { opacity: .55; }

/* Lightbox */
.gallery-lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(6,22,17,.95);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s;
}
.lb-img-wrap { max-width: min(90vw, 600px); max-height: 85vh; display: flex; align-items: center; justify-content: center; }
.lb-img-wrap img {
    max-width: 100%; max-height: 80vh; object-fit: contain;
    border-radius: 22px 6px 22px 6px;
    box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.6);
}
.lb-close, .lb-prev, .lb-next {
    position: fixed; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: rgba(14,42,33,.75); border-radius: 50%;
    color: var(--accent-light); cursor: pointer; transition: background .2s, color .2s;
}
.lb-close { top: 1.25rem; right: 1.25rem; width: 42px; height: 42px; font-size: 1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; }
.lb-prev { left: .75rem; }
.lb-next { right: .75rem; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--accent); color: var(--ink); }
.lb-counter {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    color: var(--accent-light); font-size: .85rem; letter-spacing: .25em;
    padding: 4px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(14,42,33,.75);
}

/* ════════════════════════════
   GIFT SECTION OVERRIDE (dark jungle)
════════════════════════════ */
#gift-section {
    position: relative;
    background:
        radial-gradient(ellipse 75% 40% at 50% 50%, rgba(245,138,99,.1), transparent 70%),
        transparent !important;
    padding: var(--pad-section) 0 !important;
    min-height: auto !important;
    z-index: 2;
}
#gift-section .gs-heading h2 {
    color: var(--accent-light) !important;
    font-family: var(--display) !important; font-weight: 400 !important;
    font-size: clamp(1.7rem, 6.5vw, 2.2rem) !important;
}
#gift-section .gs-heading h2::after { background: var(--accent) !important; width: 60px !important; }
#gift-section .gs-heading p { color: var(--muted) !important; font-family: var(--sans) !important; font-size: 1rem !important; }
#gift-section .gs-sub-label { color: var(--accent) !important; }
#gift-section .gs-bank-card { color: #3d2c1e; }
#gift-section .gs-card, #gift-section .gs-bank-card { border-radius: 22px 6px 22px 6px !important; box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(0,0,0,.3) !important; }

/* ════════════════════════════
   WISHES
════════════════════════════ */
.rsvp-form-container { max-width: 560px; margin: 0 auto 2.4rem; padding: 2rem 1.5rem 1.8rem; }
.input-row { margin-bottom: 1.3rem; }
.input-row > label {
    display: block; margin-bottom: .5rem;
    font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
    color: var(--accent-light);
}
.input-row input[type="text"], .input-row textarea {
    width: 100%; padding: .85rem 1rem;
    background: rgba(6,24,18,.55); color: var(--text);
    border: 1px solid rgba(188,210,192,.22); border-radius: 16px 4px 16px 4px;
    font-family: var(--sans); font-size: 1rem;
    transition: border-color .3s, box-shadow .3s;
}
.input-row input::placeholder, .input-row textarea::placeholder { color: rgba(188,210,192,.6); }
.input-row input:focus, .input-row textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,138,99,.22);
}
.attend-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.attend-opt {
    display: flex; align-items: center; gap: .45rem; cursor: pointer;
    padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(188,210,192,.22);
    font-size: .95rem; color: var(--text);
    transition: border-color .3s, background .3s;
}
.attend-opt:hover { border-color: var(--accent); }
.attend-opt:has(input:checked) { border-color: var(--accent); background: rgba(245,138,99,.16); }
.attend-opt input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; }

.wishes-list { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: .85rem; }
.wish-item {
    display: flex; gap: .9rem; align-items: flex-start;
    padding: 1.05rem 1.1rem 1rem;
    background: linear-gradient(120deg, rgba(31,84,64,.75), rgba(17,52,41,.75));
    border: 1px solid var(--line-soft);
    border-radius: 24px 6px 24px 6px;
}
.wish-avatar {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sunset); color: var(--ink);
    font-family: var(--display); font-size: 1.15rem;
}
.wish-body { flex: 1; min-width: 0; }
.wish-header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.wish-name { font-weight: 600; font-size: 1.02rem; color: var(--accent-light); }
.wish-badge { font-size: .7rem; font-weight: 600; letter-spacing: .06em; padding: 1px 10px; border-radius: 999px; border: 1px solid currentColor; }
.wish-badge.hadir { color: #8fe3d8; background: rgba(47,179,166,.14); }
.wish-badge.tidak { color: #ffb3a8; background: rgba(239,106,90,.14); }
.wish-badge.ragu  { color: #ffd58a; background: rgba(247,197,106,.12); }
.wish-message { font-size: 1rem; color: var(--text); line-height: 1.55; margin-bottom: .3rem; word-break: break-word; }
.wish-time { font-size: .82rem; color: var(--muted); }
.wish-empty { text-align: center; color: var(--muted); padding: 2rem 0; }

/* ════════════════════════════
   FOOTER
════════════════════════════ */
.footer { text-align: center; align-items: center; padding-left: 1.5rem; padding-right: 1.5rem; isolation: isolate; }
.footer-glow {
    position: absolute; left: 50%; bottom: -10%; width: 160%; height: 70%; margin-left: -80%; z-index: 0;
    background: radial-gradient(ellipse 50% 50% at 50% 70%, rgba(245,138,99,.3), rgba(239,106,90,.08) 50%, transparent 72%);
    pointer-events: none;
}
.footer-inner { position: relative; z-index: 2; max-width: 460px; margin: 0 auto; }
.tp-seal {
    width: 86px; height: 86px; margin: 0 auto 1.1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; position: relative;
    background:
        repeating-linear-gradient(180deg, rgba(255,232,170,.55) 0 1.5px, transparent 1.5px 6px) 50% 100% / 46% 32% no-repeat,
        linear-gradient(180deg, #df5c69 0%, #f3855f 40%, #fcc684 66%, #4cc0b0 66.5%, #1a6f68 100%);
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgba(247,197,106,.6);
}
.tp-seal::after {
    content: ''; position: absolute; inset: -11px; border-radius: 50%;
    border: 1px dashed rgba(247,197,106,.45);
}
.tp-seal span { font-family: var(--display); font-size: 1.6rem; color: #fff7ea; letter-spacing: .08em; margin-bottom: 12%; text-shadow: 0 2px 10px rgba(142,27,53,.5); }
.footer-names {
    font-family: var(--script); font-weight: 400;
    font-size: clamp(2.5rem, 11vw, 3.4rem); line-height: 1.15;
    margin-bottom: .9rem; overflow-wrap: anywhere; padding: 0 .2em;
}
.footer-names .amp { display: block; font-family: var(--display); font-size: .45em; line-height: 1.4; }
.footer-copy { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.6rem; }
.footer-credit { margin-top: 2rem; font-size: .8rem; color: var(--muted); opacity: .75; letter-spacing: .04em; }

/* ════════════════════════════
   RESPONSIVE
════════════════════════════ */
@media (max-width: 520px) {
    .container { padding: 0 1.5rem; }
    .couple-flex { gap: .5rem; }
    .portrait-sun { --ps: 104px; }
    .portrait-sun span { font-size: 2.2rem; }
    .ampersand { padding-bottom: 4.5rem; }
    .parent { font-size: .9rem; }
    .countdown-leaf { gap: .5rem; }
    .map-info { flex-direction: column; align-items: stretch; }
    .btn-map-nav { width: 100%; }
    .rsvp-form-container { padding: 1.8rem 1.2rem 1.6rem; }
}
@media (max-width: 360px) {
    .portrait-sun { --ps: 90px; }
}
@media (min-width: 900px) {
    .hero-tree { --th: min(72vh, 640px); }
    .hero-tree-l { left: 6%; }
    .hero-tree-r { right: 6%; }
}

@media (min-aspect-ratio: 4/5) {
    .intro-frame-top, .intro-frame-bottom { max-height: 30vh; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .section-frame-top img, .section-frame-bottom img, .intro-frame-top, .intro-frame-bottom,
    .intro-glow, .sun-glow, .sea-shimmer, .btn-sunset::after, .music-toggle-btn.playing::before { animation: none !important; }
    .btn-sunset::after { display: none; }
    .tp-particles { display: none; }
    nav, nav a { transition: none !important; }
}
