/* --- DESIGN SYSTEM & COLOR PALETTE --- */
        :root {
            --ivory: #FDFBF7;
            --cream: #F9F6EE;
            --sage: #A9BCA3;
            --coral: #F5A68D;
            --peach: #FAD6A5;
            --pink: #E5C1C5;
            --gold: #C5A880; 
            --dark: #4A3B32; 

            --font-script: 'Great Vibes', cursive;
            --font-heading: 'Cormorant Garamond', serif;
            --font-body: 'Lora', serif;

            --shadow-sm: 0 4px 10px rgba(74, 59, 50, 0.05);
            --shadow-md: 0 10px 30px rgba(74, 59, 50, 0.08);
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: var(--font-body);
            background-color: var(--ivory);
            color: var(--dark);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
            background-repeat: repeat;
            overflow-x: hidden;
        }

        .lock-scroll {
            overflow: hidden !important;
            height: 100vh !important;
        }

        /* --- TYPOGRAPHY --- */
        h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; color: var(--dark); }
        .font-script { font-family: var(--font-script); font-weight: normal; }
        .font-heading { font-family: var(--font-heading); }
        .font-body { font-family: var(--font-body); }
        .text-gold { color: var(--gold); }
        .text-sage { color: var(--sage); }

        .app-container {
            max-width: 500px;
            margin: 0 auto;
            background-color: var(--ivory);
            position: relative;
            min-height: 100vh;
            box-shadow: var(--shadow-md);
            overflow: hidden;
            background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
        }

        section {
            padding: 60px 24px;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .section-content { position: relative; z-index: 10; width: 100%; }

        .bg-watercolor-sage {
            position: absolute; width: 300px; height: 300px;
            background: radial-gradient(circle, rgba(169,188,163,0.25) 0%, rgba(253,251,247,0) 70%);
            border-radius: 50%; filter: blur(40px); z-index: 0; pointer-events: none;
        }
        .bg-watercolor-pink {
            position: absolute; width: 350px; height: 350px;
            background: radial-gradient(circle, rgba(229,193,197,0.2) 0%, rgba(253,251,247,0) 70%);
            border-radius: 50%; filter: blur(50px); z-index: 0; pointer-events: none;
        }

        /* --- ANIMATIONS --- */
        @keyframes fadeUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
        @keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
        @keyframes scaleIn { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
        
        .anim-fade-up { opacity: 0; animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
        .anim-fade-in { opacity: 0; animation: fadeIn 1.5s ease-out forwards; }
        .anim-scale-in { opacity: 0; animation: scaleIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

        .delay-1 { animation-delay: 0.2s; } .delay-2 { animation-delay: 0.6s; } .delay-3 { animation-delay: 1.0s; }
        .delay-4 { animation-delay: 1.4s; } .delay-5 { animation-delay: 1.8s; } .delay-6 { animation-delay: 2.2s; }

        #cover { position: relative; width: 100%; height: 100vh; padding: 0; overflow: hidden; background-color: var(--ivory); display: block; z-index: 900; }
        .envelope-body {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background-color: #FAF7F2; background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
            z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
            padding-bottom: 8vh; transition: opacity 0.8s ease;
        }
        .envelope-flap {
            position: absolute; top: 0; left: 0; width: 100%; height: 65%;
            background-color: #EFEBE5; background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
            clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
            z-index: 2; display: flex; flex-direction: column; align-items: center; padding-top: 8vh;
            box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .wax-seal {
            position: absolute; top: 65%; left: 50%; transform: translate(-50%, -50%);
            width: 75px; height: 75px; background: radial-gradient(circle at 35% 35%, #e1c072, #b8860b, #6b4d00);
            border-radius: 50%; box-shadow: inset 0 0 4px rgba(0,0,0,0.3), inset 0 0 10px rgba(0,0,0,0.2), 0 8px 12px rgba(74, 59, 50, 0.3);
            z-index: 3; display: flex; align-items: center; justify-content: center; transition: all 0.6s ease;
        }
        .wax-seal::before { content: ''; position: absolute; width: 58px; height: 58px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; }
        .wax-seal svg { width: 30px; height: 30px; fill: none; stroke: #fdf5d3; stroke-width: 1.2; opacity: 0.9; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.4)); }

        .cover-monogram { font-size: 22px; letter-spacing: 8px; color: var(--dark); margin-bottom: 15px; }
        .cover-date { font-size: 11px; letter-spacing: 5px; text-transform: uppercase; color: #665952; margin-bottom: 20px; }
        .cover-names-stack { display: flex; flex-direction: column; align-items: center; margin-top: 5px; }
        .cover-names-stack .name { font-size: 64px; line-height: 0.8; color: var(--dark); }
        .cover-names-stack .name.left { transform: translateX(-30px); }
        .cover-names-stack .name.right { transform: translateX(30px); margin-top: -5px; }
        .cover-names-stack .and { font-size: 24px; margin: 5px 0; color: var(--dark); }
        .body-intro { font-size: 13px; letter-spacing: 4px; text-transform: uppercase; color: var(--dark); margin-bottom: 25px; text-align: center; }

        .btn-outline {
            padding: 12px 32px; background: transparent; color: var(--dark);
            border: 1px solid var(--dark); border-radius: 30px; font-family: var(--font-heading);
            font-size: 12px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; z-index: 10;
        }
        .btn-outline:active { background-color: var(--dark); color: var(--ivory); transform: scale(0.95); }
        .leaf-ornament { width: 120px; height: auto; margin-top: 25px; opacity: 0.6; }

        #cover.opened .envelope-flap { transform: translateY(-100%); }
        #cover.opened .wax-seal { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
        #cover.opened .envelope-body { opacity: 0; }

        .reveal { opacity: 0; transform: translateY(30px); transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
        .reveal.active { opacity: 1; transform: translateY(0); }

        .couple-photo-container { position: relative; width: 220px; height: 300px; margin: 30px auto 40px auto; }
        .couple-photo-frame {
            width: 100%; height: 100%; border-radius: 110px; border: 2px solid var(--gold);
            padding: 8px; box-shadow: var(--shadow-md); position: relative; z-index: 2; background-color: var(--ivory);
        }
        .couple-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 100px; background-color: #EFEBE5; }
        .floral-photo-decor { position: absolute; width: 100px; z-index: 3; pointer-events: none; opacity: 0.9; }
        .floral-photo-decor.top { top: -20px; right: -25px; transform: rotate(15deg); }
        .floral-photo-decor.bottom { bottom: -20px; left: -25px; transform: rotate(-165deg); }
        .couple-name { font-size: 34px; line-height: 1.1; color: var(--dark); margin-bottom: 10px; text-shadow: 1px 1px 1px rgba(253, 251, 247, 0.8); }
        .parents-text { font-size: 13px; color: #665952; line-height: 1.6; margin-bottom: 40px; }
        .parents-text .parents-name { font-family: var(--font-heading); font-size: 15px; color: var(--dark); font-weight: 600; display: block; margin-top: 4px; }
        .floral-divider { margin: 10px 0 30px 0; display: flex; align-items: center; justify-content: center; }

        .date-badge {
            background-color: var(--ivory); border: 1px solid rgba(197, 168, 128, 0.6);
            padding: 30px 40px; border-radius: 12px; box-shadow: var(--shadow-sm); margin: 35px auto; position: relative; max-width: 280px;
        }
        .date-badge::before { content: ''; position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px; border: 1px dashed rgba(197, 168, 128, 0.4); border-radius: 8px; pointer-events: none; }
        .event-date-animation .badge-num, .event-date-animation .badge-month, .event-date-animation .badge-time, .event-date-animation .badge-day { transition: opacity .18s ease, transform .18s ease; }
        .event-date-animation.event-date-rolling .badge-num { animation: eventDatePulse .28s ease-in-out infinite alternate; }
        .event-date-animation.event-date-rolling .badge-month, .event-date-animation.event-date-rolling .badge-time, .event-date-animation.event-date-rolling .badge-day { opacity: .72; }
        @keyframes eventDatePulse { from { transform: translateY(2px) scale(.98); opacity: .78; } to { transform: translateY(-2px) scale(1.02); opacity: 1; } }
        .badge-day { font-size: 14px; letter-spacing: 4px; color: var(--dark); text-transform: uppercase; }
        .badge-num { font-size: 68px; color: var(--gold); line-height: 1; margin: 5px 0 10px 0; font-weight: 400; }
        .badge-month { font-size: 13px; letter-spacing: 3px; color: var(--dark); text-transform: uppercase; margin-bottom: 20px; }
        .badge-time { font-size: 14px; color: var(--sage); font-weight: 600; letter-spacing: 2px; border-top: 1px solid rgba(197, 168, 128, 0.3); padding-top: 15px; }
        .location-venue { font-size: 20px; color: var(--dark); margin-bottom: 8px; }
        .location-address { font-size: 14px; color: #665952; font-style: italic; }

        .countdown-wrapper { display: flex; justify-content: center; gap: 15px; margin-top: 30px; }
        .countdown-item {
            background: rgba(253, 251, 247, 0.8); border: 1px solid rgba(197, 168, 128, 0.5);
            border-radius: 12px; width: 70px; height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
        }
        .countdown-num { font-size: 28px; color: var(--gold); line-height: 1; margin-bottom: 5px; }
        .countdown-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--sage); font-family: var(--font-body); }

        .music-btn {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background-color: var(--sage);
            border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(169, 188, 163, 0.5);
            cursor: pointer; z-index: 999; border: 2px solid var(--ivory); transition: all 0.3s ease;
        }
        .music-btn svg { width: 24px; height: 24px; stroke: var(--ivory); fill: none; stroke-width: 1.5; }
        @keyframes spin-record { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        .music-btn.playing { animation: spin-record 4s linear infinite; }
        .music-btn.paused { animation: none; background-color: var(--coral); }

        .gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; width: 100%; margin-top: 25px; }
        .gallery-item { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid rgba(197, 168, 128, 0.4); box-shadow: var(--shadow-sm); aspect-ratio: 1 / 1; cursor: pointer; }
        .gallery-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
        .gallery-item:hover .gallery-img { transform: scale(1.1); }
        
        .lightbox {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(74, 59, 50, 0.95);
            z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
        }
        .lightbox.active { opacity: 1; pointer-events: auto; }
        .lightbox-content { max-width: 90%; max-height: 80vh; border-radius: 12px; border: 2px solid var(--gold); box-shadow: 0 10px 40px rgba(0,0,0,0.5); transform: scale(0.9); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); object-fit: contain; }
        .lightbox.active .lightbox-content { transform: scale(1); }
        .lightbox-close { position: absolute; top: 20px; right: 20px; background: var(--ivory); color: var(--dark); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: pointer; border: none; box-shadow: var(--shadow-sm); z-index: 10000; font-family: Arial, sans-serif; transition: transform 0.3s ease; }
        .lightbox-close:active { transform: scale(0.9); }

        .rsvp-form { width: 100%; max-width: 400px; margin: 0 auto; text-align: left; }
        .form-group { margin-bottom: 20px; }
        .form-control {
            width: 100%; padding: 14px 16px; border: 1px solid rgba(197, 168, 128, 0.5);
            background-color: rgba(253, 251, 247, 0.8); border-radius: 8px; font-family: var(--font-body); font-size: 14px; color: var(--dark); outline: none; transition: all 0.3s ease;
        }
        .form-control:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(169, 188, 163, 0.2); }
        .form-control::placeholder { color: #999; }
        select.form-control { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A880' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
        .w-full { width: 100%; }
        
        .btn-primary {
            padding: 12px 32px; background-color: var(--sage); color: var(--ivory); border: none; border-radius: 30px; font-family: var(--font-heading);
            font-size: 14px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 15px rgba(169, 188, 163, 0.4); transition: all 0.3s ease; z-index: 10;
        }
        .btn-primary:active { transform: scale(0.95); background-color: #92a88c; }
        .btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

        .guestbook-wrapper {
            width: 100%; max-width: 420px; margin: 0 auto; background-color: rgba(253, 251, 247, 0.6); border: 1px solid rgba(197, 168, 128, 0.3); border-radius: 12px;
            padding: 20px; height: 400px; overflow-y: auto; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); text-align: left; position: relative;
        }
        .guestbook-wrapper::-webkit-scrollbar { width: 6px; } .guestbook-wrapper::-webkit-scrollbar-track { background: transparent; } .guestbook-wrapper::-webkit-scrollbar-thumb { background: rgba(197, 168, 128, 0.5); border-radius: 4px; }
        
        .guest-card { background-color: #FFF; border-radius: 8px; padding: 15px; margin-bottom: 15px; box-shadow: var(--shadow-sm); border-left: 3px solid var(--sage); animation: fadeIn 0.5s ease-out forwards; }
        .guest-card.absent { border-left-color: var(--coral); }
        .guest-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
        .guest-name-badge h4 { font-size: 15px; color: var(--dark); margin: 0 0 4px 0; }
        .badge { font-size: 10px; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
        .badge-hadir { background-color: rgba(169, 188, 163, 0.2); color: #5a7054; } .badge-absen { background-color: rgba(245, 166, 141, 0.2); color: #b86247; }
        .guest-msg-text { font-size: 13px; color: #555; line-height: 1.5; font-style: italic; margin-bottom: 8px; }
        .guest-time { font-size: 10px; color: #aaa; }

        .loading-state, .empty-state, .error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; opacity: 0.6; }
        .spinner { border: 3px solid rgba(197, 168, 128, 0.2); border-top: 3px solid var(--gold); border-radius: 50%; width: 30px; height: 30px; animation: spin-record 1s linear infinite; margin-bottom: 10px; }
/* --- FEATURE TOGGLE / SETTINGS LOADER --- */
.site-loading {
    position: fixed; inset: 0; z-index: 100000;
    background: var(--ivory); opacity: 1; pointer-events: auto;
    transition: opacity .35s ease;
}
.site-loading.ready { opacity: 0; pointer-events: none; }
section[data-feature].feature-disabled { display: none !important; }
.music-btn {
    border: 0;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   ASWIN & SHELINE — COVER SINGLE SOURCE OF TRUTH
   No duplicated cover rules. Full-bleed textile on every device.
   ========================================================= */
html, body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
    overflow-x: hidden;
}

#cover[data-feature="cover"] {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    z-index: 9999;
    display: block;
    background:
        radial-gradient(circle at 50% 44%, rgba(255,255,255,.62), transparent 48%),
        var(--ivory);
    transition: opacity .55s ease, transform .75s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
}

#cover[data-feature="cover"]::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    opacity: .42;
    z-index: 0;
}

/* Full-width textile: never constrained by the invitation content width. */
#cover .adat-band {
    position: absolute;
    left: 0;
    width: 100vw;
    max-width: none;
    margin: 0;
    padding: 0;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

#cover .adat-band-top {
    top: -0.5vh;
    height: 25vh;
    background-image: url('../assets/images/adat-top.png');
}

#cover .adat-band-bottom {
    bottom: -1vh;
    height: 25vh;
    background-image: url('../assets/images/adat-bottom.png');
}

#cover .cover-center {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Transparent layer so the PNG textile remains visible. */
    background: transparent !important;
    z-index: 2;
}

/* The content is narrower than the textile, but never creates a card/border. */
#cover .cover-inner {
    width: min(720px, calc(100vw - 32px));
    height: 100%;
    min-height: 0;
    padding: clamp(120px, 17vh, 170px) 12px clamp(120px, 16vh, 155px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

#cover .cover-monogram {
    position: relative;
    z-index: 20;
    margin: 0 0 clamp(8px, 1.2vh, 14px);
    color: #6c5747;
    font-size: clamp(23px, 2.4vw, 31px);
    line-height: 1;
    letter-spacing: .48em;
    text-shadow: 0 1px 0 #fff, 0 2px 4px rgba(74,59,50,.16);
}

#cover .cover-monogram span {
    margin: 0 .25em;
}

#cover .cover-date {
    position: relative;
    z-index: 20;
    margin: 0 0 clamp(12px, 1.8vh, 20px);
    color: #8d6b43;
    opacity: 1;
    font-size: clamp(11px, 1.1vw, 15px);
    line-height: 1.2;
    letter-spacing: .36em;
    text-shadow: 0 1px 0 rgba(255,255,255,.95);
}

#cover .cover-names-stack {
    position: relative;
    z-index: 20;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#cover .cover-names-stack .name {
    margin: 0;
    color: #69482f;
    font-size: clamp(66px, 8vw, 112px);
    line-height: .82;
    text-shadow:
        0 1px 0 rgba(255,255,255,.98),
        0 3px 0 rgba(255,255,255,.78),
        0 7px 13px rgba(74,50,32,.22);
}

#cover .cover-names-stack .name.left {
    transform: translateX(-3%);
}

#cover .cover-names-stack .name.right {
    transform: translateX(3%);
    margin-top: 4px;
}

#cover .cover-names-stack .and {
    margin: clamp(7px, 1vh, 11px) 0 4px;
    color: #c49b4b;
    font-size: clamp(27px, 3vw, 40px);
    line-height: 1;
    text-shadow: 0 1px 0 #fff, 0 4px 8px rgba(100,70,28,.18);
}

#cover .guest-box {
    position: relative;
    z-index: 30;
    width: min(520px, calc(100vw - 48px));
    margin: clamp(26px, 4vh, 38px) auto 18px;
    padding: 18px 24px 20px;
    border: 1px solid rgba(197,168,128,.68);
    border-radius: 22px;
    background: rgba(255,253,248,.92);
    box-shadow:
        10px 12px 25px rgba(104,83,67,.13),
        -7px -7px 17px rgba(255,255,255,.92),
        inset 1px 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(3px);
}

#cover .guest-label {
    margin: 0 0 5px;
    color: #705b49;
    font-size: 14px;
    text-shadow: 1px 1px 0 #fff;
}

#cover .guest-name {
    margin: 0;
    color: #654d3e;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.3;
    font-weight: 500;
    text-shadow: 1px 1px 0 #fff;
    white-space: nowrap;
}

#cover #openInvitationBtn {
    position: relative;
    z-index: 35;
    min-width: 290px;
    min-height: 56px;
    padding: 13px 30px;
    border: 1px solid rgba(171,137,91,.82);
    border-radius: 999px;
    background: rgba(255,253,248,.94);
    color: #654d3e;
    box-shadow:
        9px 10px 21px rgba(104,83,67,.14),
        -7px -7px 16px rgba(255,255,255,.96),
        inset 1px 1px 0 rgba(255,255,255,.94);
    text-shadow: 1px 1px 0 #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

#cover #openInvitationBtn:hover {
    transform: translateY(-2px);
}

#cover #openInvitationBtn:active {
    transform: translateY(1px) scale(.985);
    box-shadow: inset 4px 4px 9px rgba(104,83,67,.14), inset -4px -4px 9px rgba(255,255,255,.82);
}

#cover .button-flower {
    color: #8d6c43;
    font-size: 13px;
    margin: 0 7px;
}

#cover .cover-divider {
    position: relative;
    z-index: 20;
    width: 110px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: .7;
}

#cover .cover-divider span {
    flex: 1;
    height: 1px;
    background: #b99869;
}

#cover .cover-divider b {
    color: #9a794e;
    font-weight: 400;
    font-size: 14px;
}

/* Old envelope/wax-seal markup can remain in an older HTML copy without showing. */
#cover .envelope-body,
#cover .envelope-flap,
#cover .wax-seal {
    display: none !important;
}

/* Before opening: ONLY the cover is visible and the page cannot scroll. */
body.lock-scroll {
    overflow: hidden !important;
    height: 100svh !important;
    touch-action: none;
}

body.lock-scroll .app-container > section:not(#cover) {
    visibility: hidden !important;
    pointer-events: none !important;
}

#cover.opening {
    pointer-events: none;
}

#cover.opened {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    visibility: hidden;
    transition: opacity .4s ease, transform .75s cubic-bezier(.4,0,.2,1), visibility 0s linear .8s;
}

@media (max-width: 430px) {
    #cover .adat-band-top {
        top: 0;
        height: 25vh;
    }

    #cover .adat-band-bottom {
        bottom: 0;
        height: 25vh;
    }

    #cover .cover-inner {
        width: 100vw;
        padding: 118px 12px 112px;
    }

    #cover .cover-monogram {
        font-size: 23px;
        letter-spacing: .42em;
        margin-bottom: 10px;
    }

    #cover .cover-date {
        font-size: 10px;
        letter-spacing: .31em;
        margin-bottom: 15px;
    }

    #cover .cover-names-stack .name {
        font-size: clamp(61px, 18vw, 82px);
        line-height: .82;
    }

    #cover .cover-names-stack .name.left {
        transform: translateX(-3%);
    }

    #cover .cover-names-stack .name.right {
        transform: translateX(3%);
        margin-top: 3px;
    }

    #cover .cover-names-stack .and {
        font-size: 28px;
        margin: 8px 0 4px;
    }

    #cover .guest-box {
        width: calc(100vw - 34px);
        margin: 28px auto 18px;
        padding: 17px 12px 18px;
        border-radius: 21px;
    }

    #cover .guest-label {
        font-size: 13px;
    }

    #cover .guest-name {
        font-size: 17px;
    }

    #cover #openInvitationBtn {
        min-width: 235px;
        min-height: 53px;
        padding: 12px 22px;
    }

    #cover .cover-divider {
        margin-top: 13px;
    }
}

@media (min-width: 769px) {
    /* Desktop uses the same portrait composition as mobile, while textile stays full viewport. */
    #cover .cover-inner {
        width: min(720px, 72vw);
        padding-top: clamp(125px, 15vh, 155px);
        padding-bottom: clamp(115px, 14vh, 145px);
    }

    #cover .cover-names-stack .name {
        font-size: clamp(76px, 7.4vw, 112px);
    }

    #cover .guest-box {
        width: min(520px, 50vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    #cover[data-feature="cover"],
    #cover.opened,
    #cover #openInvitationBtn {
        transition-duration: .01ms !important;
    }
}

/* FINAL COVER LAYOUT — one canonical textile rule, no duplicate overrides. */
#cover[data-feature="cover"] { overflow: hidden; }
#cover .cover-center { position:absolute; inset:0; z-index:3; background:transparent !important; }
#cover .cover-inner { position:relative; z-index:4; }
#cover .adat-band {
  position:absolute !important;
  top:auto;
  bottom:auto;
  left:50% !important;
  width:138.7vw !important;
  max-width:none !important;
  height:22vh !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
  object-fit:fill !important;
  object-position:center center !important;
  transform:translateX(-50%) !important;
  z-index:2 !important;
  pointer-events:none !important;
  background:none !important;
}
#cover .adat-band-top { top:-5vh !important; bottom:auto !important; }
#cover .adat-band-bottom { bottom:-5vh !important; top:auto !important; }
#cover .cover-engagement {
  position:relative; z-index:20; margin:0 0 8px; color:#6f4b31;
  font-family:'Cormorant Garamond',serif; font-size:clamp(15px,1.6vw,21px);
  font-weight:600; letter-spacing:.34em; text-transform:uppercase;
}
#cover .cover-names-stack .name.left { order:1; }
#cover .cover-names-stack .and { order:2; }
#cover .cover-names-stack .name.right { order:3; }
#cover .cover-names-stack .name { font-size:clamp(68px,8vw,112px); }
#cover .guest-box { margin-top:clamp(22px,3.2vh,32px); }
.maps-button { display:inline-block; text-decoration:none; margin-top:25px; }
.invite-family-section { padding:72px 24px 76px; text-align:center; }
.invite-family-eyebrow { font-size:13px; letter-spacing:4px; color:var(--sage); margin-bottom:18px; text-transform:uppercase; }
.invite-family-names { color:#654d3e; font-size:clamp(18px,2.2vw,24px); line-height:2; white-space:pre-line; }
#honor .honor-section { padding:72px 24px 76px; text-align:center; }
#honor .honor-names { color:#654d3e; font-size:clamp(18px,2.2vw,24px); line-height:2; letter-spacing:.04em; white-space:pre-line; }
@media (max-width:430px){
  #cover .adat-band { width:138.7vw !important; height:21vh !important; }
  #cover .adat-band-top { top:-3.5vh !important; }
  #cover .adat-band-bottom { bottom:-3.5vh !important; }
  #cover .cover-inner { padding:105px 12px 100px !important; }
  #cover .cover-engagement { font-size:15px; letter-spacing:.28em; margin-bottom:7px; }
  #cover .cover-names-stack .name { font-size:clamp(62px,17vw,82px); }
}
@media (min-width:769px){
  #cover .adat-band { width:138.7vw !important; height:21vh !important; }
  #cover .adat-band-top { top:-4vh !important; }
  #cover .adat-band-bottom { bottom:-4vh !important; }
  #cover .cover-inner { padding-top:120px !important; padding-bottom:105px !important; }
}
@media (prefers-reduced-motion: reduce){
  #cover[data-feature="cover"], #cover.opened, #cover #openInvitationBtn { transition-duration:.01ms !important; }
}

/* FOOTER BRIGHTNESS ONLY - requested fix */
#closing {
    background-color: var(--ivory) !important;
    color: var(--dark) !important;
}
#closing .section-content,
#closing .reveal {
    color: var(--dark) !important;
}
#closing #closing-thanks {
    color: var(--dark) !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.95), 0 2px 3px rgba(74,59,50,.22) !important;
}
#closing #closing-names {
    color: var(--dark) !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.95), 0 2px 3px rgba(74,59,50,.25) !important;
}
#closing #mrbee-credit {
    color: var(--dark) !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.95), 0 2px 3px rgba(74,59,50,.22) !important;
}

/* REQUESTED TEXT VISIBILITY FIX — ONLY THE SPECIFIED SECTION LABELS */
#couple > .section-content > p.font-heading,
#countdown > .section-content > p.font-heading,
#location > .section-content > p.font-heading,
#guestbook > .section-content > p.font-heading,
#honor #honor-eyebrow,
#invite-family-eyebrow {
    color: #5f493b !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(74,59,50,.18) !important;
}


/* === REQUESTED ONLY: Save The Date & Google Maps blink animation === */
@keyframes mrbee-soft-blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .62;
        transform: scale(1.015);
    }
}

/* Kotak pada menu Save The Date */
#save-date .save-date-box,
#save-date .date-box,
#save-date .event-date-box,
#save-date .date-card {
    animation: mrbee-soft-blink 1.8s ease-in-out infinite;
}

/* Kotak/tombol Buka Google Maps */
#location .maps-box,
#location .map-box,
#location .google-maps-box,
#location .location-map-box {
    animation: mrbee-soft-blink 1.8s ease-in-out infinite;
}

/* Jika elemen Save The Date / Google Maps menggunakan class umum card/button */
#save-date .card,
#save-date .date-card,
#location .card,
#location .google-maps,
#location .maps-button {
    animation: mrbee-soft-blink 1.8s ease-in-out infinite;
}


/* === REQUESTED ONLY: delayed slow falling heart ornaments on opening === */
#open-fall-ornaments {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
}

#open-fall-ornaments.falling {
    opacity: 1;
    visibility: visible;
}

#open-fall-ornaments .open-fall-ornament {
    position: absolute;
    top: -28px;
    left: var(--fall-left);
    color: var(--fall-color);
    font-family: Georgia, "Times New Roman", serif;
    font-size: var(--fall-size);
    line-height: 1;
    font-weight: 700;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(74, 59, 50, .16);
    transform: translate3d(0, -30px, 0) rotate(0deg);
}

#open-fall-ornaments.falling .open-fall-ornament {
    animation: open-heart-fall var(--fall-duration) ease-in var(--fall-delay) both;
}

@keyframes open-heart-fall {
    0% {
        opacity: 0;
        transform: translate3d(0, -30px, 0) rotate(0deg);
    }
    8% {
        opacity: .9;
    }
    35% {
        opacity: .85;
    }
    72% {
        opacity: .72;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--fall-drift), 112vh, 0) rotate(var(--fall-rotate));
    }
}

@media (prefers-reduced-motion: reduce) {
    #open-fall-ornaments.falling .open-fall-ornament {
        animation: none;
        opacity: 0;
    }
}


/* === REQUESTED ONLY: Premium Gallery + Digital Gift + mobile couple name === */
.gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.gallery-item {
    border-radius: 18px;
    border: 1px solid rgba(197,168,128,.48);
    box-shadow: 0 10px 30px rgba(74,59,50,.10);
    background: var(--ivory);
}
.gallery-item.gallery-featured {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}
.gallery-item::after {
    content: "View";
    position: absolute;
    left: 14px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(253,251,247,.82);
    color: var(--dark);
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(6px);
    transition: .3s ease;
}
.gallery-item:hover::after,
.gallery-item:focus-within::after {
    opacity: 1;
    transform: translateY(0);
}

.gift-section { padding: 76px 24px 82px; text-align: center; }
.gift-eyebrow { font-size:13px; letter-spacing:4px; color:var(--sage); margin-bottom:12px; text-transform:uppercase; }
.gift-title { font-size:42px; color:var(--gold); margin-bottom:14px; }
.gift-intro { max-width:520px; margin:0 auto 26px; color:#665952; line-height:1.7; font-size:13px; }
.gift-card {
    width:100%;
    max-width:430px;
    margin:14px auto;
    padding:26px 22px;
    background:rgba(253,251,247,.82);
    border:1px solid rgba(197,168,128,.45);
    border-radius:18px;
    box-shadow:0 12px 32px rgba(74,59,50,.09);
}
.gift-icon { font-size:27px; color:var(--coral); margin-bottom:8px; }
.gift-label { font-family:var(--font-heading); letter-spacing:3px; text-transform:uppercase; font-size:11px; color:var(--sage); margin-bottom:12px; }
.gift-bank-name { font-family:var(--font-heading); font-size:20px; color:var(--dark); font-weight:600; }
.gift-account-name { margin-top:7px; color:#665952; font-size:13px; }
.gift-account-number { margin-top:8px; font-family:var(--font-heading); font-size:19px; letter-spacing:2px; color:var(--dark); }
.gift-copy-btn { margin-top:16px; cursor:pointer; }
.gift-qris-wrap { margin:12px auto; width:190px; min-height:30px; display:flex; align-items:center; justify-content:center; }
.gift-qris-wrap img { display:block; width:190px; height:190px; object-fit:contain; border-radius:10px; background:#fff; }
.gift-qris-card { display:none; }

@media (max-width:430px) {
    #couple .couple-name {
        white-space: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        font-size: clamp(17px, 5.25vw, 25px) !important;
        letter-spacing: -0.015em;
        line-height: 1 !important;
    }
    .gallery-grid { gap:12px; }
    .gallery-item.gallery-featured { aspect-ratio: 4 / 3; }
    .gift-title { font-size:36px; }
}

/* === WEDDING SECTIONS + THEME COLORS === */
.wedding-event-section,.wedding-schedule-section,.live-youtube-section{padding:76px 24px 82px;text-align:center;}
.wedding-eyebrow{font-size:13px;letter-spacing:4px;color:var(--sage);margin-bottom:10px;text-transform:uppercase;}
.wedding-title{font-size:42px;color:var(--gold);margin-bottom:24px;}
.wedding-event-card{width:100%;max-width:460px;margin:0 auto;padding:30px 22px;background:rgba(255,255,255,.52);border:1px solid rgba(197,168,128,.42);border-radius:20px;box-shadow:0 14px 38px rgba(74,59,50,.10);}
.wedding-day{font-family:var(--font-heading);font-size:13px;letter-spacing:3px;text-transform:uppercase;color:var(--sage);}
.wedding-date{font-family:var(--font-script);font-size:32px;color:var(--gold);margin:8px 0;}
.wedding-time{font-family:var(--font-heading);font-size:15px;color:var(--dark);margin-bottom:18px;}
.wedding-venue{font-family:var(--font-heading);font-size:20px;color:var(--dark);margin-bottom:8px;}
.wedding-address{font-family:var(--font-body);font-size:13px;line-height:1.7;color:#665952;margin-bottom:18px;}
.wedding-maps{display:inline-flex;}
.schedule-list{width:100%;max-width:540px;margin:0 auto;text-align:left;}
.schedule-item{display:grid;grid-template-columns:125px 1fr;gap:16px;align-items:start;padding:18px 0;border-bottom:1px solid rgba(197,168,128,.32);}
.schedule-item:first-child{border-top:1px solid rgba(197,168,128,.32);}
.schedule-time{font-family:var(--font-heading);font-size:12px;letter-spacing:1.5px;color:var(--gold);font-weight:600;}
.schedule-desc{font-family:var(--font-body);font-size:14px;color:var(--dark);line-height:1.55;}
.live-intro{max-width:500px;margin:0 auto 22px;color:#665952;line-height:1.7;}
.youtube-live-wrap{width:100%;max-width:760px;margin:0 auto 20px;aspect-ratio:16/9;overflow:hidden;border-radius:18px;border:1px solid rgba(197,168,128,.42);box-shadow:0 14px 38px rgba(74,59,50,.10);background:#000;}
.youtube-live-wrap iframe{width:100%;height:100%;border:0;}
.live-youtube-button{display:inline-flex;}
@media(max-width:430px){
  .wedding-title{font-size:36px;}
  .wedding-event-card{padding:26px 18px;}
  .schedule-item{grid-template-columns:92px 1fr;gap:10px;}
  .schedule-time{font-size:10px;letter-spacing:1px;}
  .schedule-desc{font-size:13px;}
}


/* === OPTIONAL COUPLE PROFILE === */
.couple-profile-section{padding:78px 24px 84px;text-align:center;overflow:hidden;}
.couple-profile-eyebrow{font-size:13px;letter-spacing:4px;color:var(--sage);margin-bottom:10px;text-transform:uppercase;}
.couple-profile-title{font-size:42px;color:var(--gold);margin-bottom:30px;}
.couple-profile-grid{width:100%;max-width:980px;margin:0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;}
.couple-profile-card{padding:26px 20px 30px;background:rgba(255,255,255,.58);border:1px solid rgba(197,168,128,.42);border-radius:24px;box-shadow:0 14px 38px rgba(74,59,50,.10);}
.couple-profile-photo-wrap{position:relative;width:min(100%,300px);aspect-ratio:4/5;margin:0 auto 24px;overflow:hidden;border:2px solid var(--gold);border-radius:150px 150px 22px 22px;padding:7px;background:var(--ivory);box-shadow:var(--shadow-md);}
.couple-profile-photo{display:none;width:100%;height:100%;object-fit:cover;border-radius:140px 140px 15px 15px;background:#eee8df;}
.couple-profile-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:140px 140px 15px 15px;background:linear-gradient(145deg,rgba(126,154,132,.18),rgba(217,130,116,.15));font-family:var(--font-script);font-size:96px;color:var(--gold);}
.couple-profile-info{max-width:430px;margin:0 auto;}
.couple-profile-name{font-size:34px;line-height:1.12;color:var(--dark);margin:0 0 12px;text-shadow:1px 1px 1px rgba(253,251,247,.8);}
.couple-profile-child-of{font-size:13px;color:#665952;margin:0 0 5px;}
.couple-profile-parents{font-size:15px;line-height:1.55;color:var(--dark);font-weight:600;margin:0 auto 18px;}
.couple-profile-socials{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;min-height:30px;}
.couple-profile-social{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:7px 12px;border:1px solid rgba(197,168,128,.55);border-radius:999px;color:var(--dark);font-family:var(--font-heading);font-size:11px;letter-spacing:1.2px;text-decoration:none;background:rgba(253,251,247,.72);transition:transform .2s ease,background .2s ease;}
.couple-profile-social:hover{transform:translateY(-2px);background:var(--cream);}
.couple-profile-social:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
@media (max-width:700px){
  .couple-profile-section{padding:68px 18px 76px;}
  .couple-profile-title{font-size:38px;}
  .couple-profile-grid{grid-template-columns:1fr;gap:24px;max-width:520px;}
  .couple-profile-card{padding:22px 16px 26px;}
  .couple-profile-photo-wrap{width:min(78vw,280px);margin-bottom:20px;}
  .couple-profile-name{font-size:clamp(25px,7.2vw,32px);}
}

/* === DIGITAL GUEST QR / CHECK-IN === */
.guest-qr-section{padding:72px 20px 78px;text-align:center;overflow:hidden;}
.guest-qr-eyebrow{font-size:12px;letter-spacing:3px;color:var(--sage);margin-bottom:10px;text-transform:uppercase;}
.guest-qr-title{font-size:40px;color:var(--gold);margin-bottom:10px;}
.guest-qr-intro{max-width:440px;margin:0 auto 22px;color:#665952;font-size:13px;line-height:1.7;}
.guest-qr-card{width:min(100%,330px);margin:0 auto;padding:24px;background:rgba(255,255,255,.62);border:1px solid rgba(197,168,128,.48);border-radius:22px;box-shadow:0 14px 38px rgba(74,59,50,.10);}
.guest-qr-code{width:220px;height:220px;margin:0 auto 15px;display:flex;align-items:center;justify-content:center;background:#fff;padding:5px;border-radius:12px;}
.guest-qr-code img{display:block;width:220px!important;height:220px!important;}
.guest-qr-name{margin:0;font-family:var(--font-heading);font-size:17px;font-weight:600;color:var(--dark);}
.guest-qr-no-guest{display:none!important;}

/* === TEMPLATE SYSTEM / ADDITIVE ONLY ===
   Template classes are applied per section from Firestore. Existing markup and
   content remain untouched; styles only enhance layout presentation. */
section[data-template]{--template-radius:18px;--template-line:1px solid rgba(197,168,120,.35);}
.template-style-classic .section-content{max-width:680px;}
.template-style-classic .section-content h2{letter-spacing:.01em;}
.template-style-floral .section-content{max-width:720px;}
.template-style-floral .section-content::before{content:"❀";display:block;color:var(--coral);font-size:22px;opacity:.8;margin-bottom:6px;}
.template-style-floral .section-content::after{content:"❀";display:block;color:var(--sage);font-size:18px;opacity:.7;margin-top:14px;}
.template-style-luxury .section-content{max-width:720px;border:var(--template-line);border-radius:var(--template-radius);padding:26px 20px;box-shadow:0 12px 30px rgba(74,59,50,.08);}
.template-style-luxury .section-content h2{letter-spacing:.025em;}
.template-style-editorial .section-content{max-width:760px;text-align:left;}
.template-style-editorial .section-content>p:first-child{text-align:left;}
.template-style-editorial .section-content>h2{font-size:clamp(38px,8vw,64px)!important;line-height:1;}
.template-style-editorial section{}
.template-style-minimal .section-content{max-width:640px;}
.template-style-minimal .section-content>p:first-child{letter-spacing:3px!important;font-size:11px!important;}
.template-style-minimal .section-content>h2{margin-bottom:24px!important;}
.template-style-watercolor .section-content{max-width:720px;padding:22px 18px;}
.template-style-watercolor .section-content::before{content:"";position:absolute;inset:-12px -8px;background:radial-gradient(circle at 15% 15%,rgba(169,188,163,.22),transparent 35%),radial-gradient(circle at 85% 75%,rgba(229,193,197,.24),transparent 38%);border-radius:40%;z-index:-1;pointer-events:none;}
.template-style-nusantara .section-content{max-width:720px;border-top:1px solid var(--gold);border-bottom:1px solid var(--gold);padding:22px 12px;}
.template-style-nusantara .section-content>p:first-child{letter-spacing:5px!important;}
.template-style-dark{background:#302721!important;color:#f7f0e5;}
.template-style-dark .section-content h1,.template-style-dark .section-content h2,.template-style-dark .section-content h3,.template-style-dark .section-content p,.template-style-dark .section-content span,.template-style-dark .section-content strong{color:#f7f0e5;}
.template-style-dark .section-content{max-width:720px;border:1px solid rgba(197,168,120,.55);padding:24px 18px;border-radius:18px;background:rgba(38,30,25,.32);}
.template-style-dark .text-gold{color:#e2c58d!important;}
/* Section-specific layout accents */
#couple.template-style-editorial .couple-photo-container{margin-left:0;margin-right:auto;}
#couple.template-style-minimal .couple-photo-frame{box-shadow:none;border:0;}
#couple-profile.template-style-editorial .couple-profile-grid{align-items:stretch;}
#event.template-style-luxury .event-card,#countdown.template-style-luxury .countdown-card{box-shadow:0 14px 34px rgba(74,59,50,.1);}
#gallery.template-style-editorial .gallery-grid{align-items:stretch;}
#rsvp.template-style-luxury .rsvp-form{box-shadow:0 14px 34px rgba(74,59,50,.1);}
#location.template-style-floral .location-card::before{content:"✿";display:block;color:var(--coral);font-size:20px;margin-bottom:6px;}
#closing.template-style-luxury .section-content{padding-top:34px;padding-bottom:34px;}
@media(max-width:520px){
  .template-style-luxury .section-content{padding:20px 14px;}
  .template-style-editorial .section-content{padding-left:4px;padding-right:4px;}
  .template-style-nusantara .section-content{padding-left:6px;padding-right:6px;}
}
