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

body {
    background-color: #e0e0e0;
    /* Warna latar belakang abu-abu untuk area luar di desktop */
    font-family: 'Inter', sans-serif;
    /* Menggunakan font default yang bersih */
    display: flex;
    justify-content: center;
    /* Memastikan kontainer berada di tengah pada desktop */
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px;
    /* Batas maksimal lebar untuk meniru tampilan mobile */
    background-color: #ffffff;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    /* Efek bayangan agar terlihat seperti layar ponsel di desktop */
    overflow-x: hidden;
    position: relative;
}

.page {
    width: 100%;
    aspect-ratio: 9 / 16;
    height: auto;
    flex-shrink: 0;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Mengatur gambar latar untuk masing-masing halaman */
#page-1 {
    background-image: url('images/1.webp?v=20260914153647');
}

#page-2 {
    background-image: url('images/2.webp?v=20260914153647');
}

#page-3 {
    background-image: url('images/3.webp?v=20260914153647');
}

#page-4 {
    background-image: url('images/4.webp?v=20260914153647');
}

#page-5 {
    background-image: url('images/5.webp?v=20260914153647');
}

#page-6 {
    background-image: url('images/6.webp?v=20260914153647');
}

#page-7 {
    background-image: url('images/7.webp?v=20260914153647');
}

#page-8 {
    background-image: url('images/8.webp?v=20260914153647');
}

#page-9 {
    background-image: url('images/9.webp?v=20260914153647');
}

#page-10 {
    background-image: url('images/10.webp?v=20260914153647');
}

#page-11 {
    background-image: url('images/11.webp?v=20260914153647');
}


/* --- Style Khusus Halaman 1 --- */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
    width: 100%;
}

body.no-scroll .app-container {
    height: 100vh !important;
    overflow: hidden !important;
}

.guest-name-container {
    position: absolute;
    top: 24%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
    z-index: 10;
}

.guest-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin: 0;
}

.btn-open {
    position: absolute;
    bottom: 10%;
    /* Posisinya agak dinaikkan */
    background-color: #61292e !important;
    color: #ffffff !important;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 22px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(54, 5, 10, 0.22);
    transition: background-color 0.4s ease, box-shadow 0.4s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
}

.btn-open:hover {
    background-color: #78333a !important;
    box-shadow: 0 7px 16px rgba(54, 5, 10, 0.3);
    transform: scale(1.05);
}

/* --- Style Khusus Halaman 2 & 11 --- */
.p2-envelope,
.p11-envelope {
    max-width: 85%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

#page-2.active .p2-envelope,
#page-11.active .p11-envelope {
    animation: 
        envelopeFloatIn 3s cubic-bezier(0.16, 1, 0.3, 1) forwards,
        floatAndSway 6s ease-in-out 3s infinite;
}

@keyframes envelopeFloatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes floatAndSway {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-6px) rotate(-1deg);
    }
    50% {
        transform: translateY(0px) rotate(0deg);
    }
    75% {
        transform: translateY(6px) rotate(1deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* --- Style Khusus Halaman 3 (Countdown) --- */
#page-3 {
    overflow: hidden;
}

.page3-asset {
    position: absolute;
    top: -29.5%;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 2;
    pointer-events: none;
}

.countdown-container {
    position: absolute;
    top: 38.7%;
    left: 50%;
    --reveal-x: -50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(3px, 1vw, 5px);
    z-index: 10;
}

.countdown-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 36px;
}

.countdown-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.2rem, 7.1vw, 2rem);
    font-weight: 500;
    color: #ffffff;
    line-height: 1.1;
}

.countdown-colon {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.2rem, 7.1vw, 2rem);
    font-weight: 500;
    color: #ffffff;
    line-height: 1.1;
}

.countdown-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.6rem;
    font-weight: 400;
    color: #ffffff;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.page3-quote {
    position: absolute;
    top: 66.4%;
    left: 50%;
    width: 34%;
    min-height: 0.5%;
    --reveal-x: -50%;
    transform: translateX(-50%);
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6b281f;
    pointer-events: none;
}

.page3-quote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1.22;
    margin: 0;
}

.page3-quote strong {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.6rem;
    font-weight: 800;
    margin-top: 8px;
}

.reveal-on-scroll {
    opacity: 0;
    --reveal-y: 34px;
    transform: translate(var(--reveal-x, 0), var(--reveal-y)) scale(0.98);
    transition:
        opacity 900ms ease,
        transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-from-top {
    --reveal-y: -32px;
    transform: translate(var(--reveal-x, 0), var(--reveal-y)) scale(0.985);
}

.page.active .reveal-on-scroll {
    opacity: 1;
    transform: translate(var(--reveal-x, 0), 0) scale(1);
}

.page.active .reveal-delay-1 {
    transition-delay: 160ms;
}

.page.active .reveal-delay-2 {
    transition-delay: 320ms;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        transition: none;
    }
}

#page-1 { background-image: url('images/canva/slide-01-no-name.webp') !important; }

/* --- Style Khusus Halaman 4 (Bride & Groom) --- */
#page-4 {
    overflow: hidden;
}

.page4-title,
.page4-profile,
.page4-photo,
.page4-fleur {
    position: absolute;
    z-index: 5;
}

.page4-title {
    top: 9.4%;
    left: 50%;
    width: 88%;
    --reveal-x: -50%;
    text-align: center;
    font-family: 'Tangerine', 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 8.5vw, 2.55rem);
    font-weight: 700;
    line-height: 0.9;
    color: #ffffff;
}

.page4-photo {
    width: 40%;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 7px 11px rgba(31, 5, 7, 0.28));
}

.page4-photo-bride {
    top: 21.6%;
    left: 9.5%;
}

.page4-photo-groom {
    top: 67.2%;
    right: 8.1%;
}

.page4-profile {
    color: #ffffff;
    text-align: center;
}

.page4-profile h3 {
    font-family: 'Tangerine', 'Playfair Display', Georgia, serif;
    font-size: clamp(1.4rem, 4.25vw, 1.3rem);
    font-weight: 700;
    line-height: 0.95;
    margin: 0 0 8px;
}

.page4-profile p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.72rem, 1.9vw, 0.56rem);
    font-weight: 700;
    line-height: 1.16;
    margin: 0;
}

.page4-profile-bride {
    top: 26.7%;
    left: 45.6%;
    width: 43%;
}

.page4-profile-groom {
    top: 63.3%;
    left: 1.8%;
    width: 58%;
}

.page4-instagram {
    width: clamp(14px, 4.1vw, 20px);
    height: clamp(14px, 4.1vw, 20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    color: #ffffff;
    text-decoration: none;
}

.page4-instagram svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page4-fleur {
    top: 48.8%;
    left: 50%;
    width: 18.5%;
    --reveal-x: -50%;
    filter: drop-shadow(0 5px 7px rgba(31, 5, 7, 0.25));
}

.page.active .reveal-delay-3 {
    transition-delay: 480ms;
}

/* --- Style Khusus Halaman 5 (Wedding Event) --- */
#page-5 {
    overflow: hidden;
}

.page5-event-card {
    position: absolute;
    top: 38.5%;
    left: 49.5%;
    width: 58%;
    --reveal-x: -50%;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    color: #3d2f27;
}

.page5-event-card h2.page5-title,
.page5-event-card h2 {
    font-family: 'Tangerine', cursive, 'Playfair Display', Georgia, serif;
    font-size: clamp(2.4rem, 10.5vw, 3.4rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 0 0 18px;
    color: #3d2f27;
    text-align: center;
    white-space: nowrap;
}

.page5-event-block {
    font-family: 'Lora', Georgia, serif;
    --reveal-x: 0;
    line-height: 1.28;
    margin: 0;
    width: 100%;
}

.page5-akad {
    text-align: right;
    margin-bottom: -30px;
    margin-top: 16px;
    padding-right: 10px;
}

.page5-akad h3,
.page5-akad p,
.page5-akad address {
    text-align: right;
}

.page5-reception {
    text-align: left;
    margin-top: 55px;
    padding-left: 13px;
}

.page5-reception h3,
.page5-reception p,
.page5-reception address {
    text-align: left;
}

.page5-event-block h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(1.1rem, 4.4vw, 1.35rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 3px;
    color: #3d2f27;
}

.page5-event-block p {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.1rem, 2.9vw, 0.9rem);
    font-style: normal;
    font-weight: 500;
    line-height: 1.28;
    margin: 0 0 2px;
    color: #3d2f27;
}

.page5-note {
    font-size: clamp(0.7rem, 2.7vw, 0.84rem) !important;
    white-space: nowrap;
}

.page5-event-block strong {
    font-weight: 700;
}

.page5-event-block address {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.1rem, 2.3vw, 0.72rem);
    font-style: normal;
    font-weight: 400;
    line-height: 1.24;
    margin-top: 3px;
    color: #554438;
}


/* --- Tombol Kontrol Musik Floating --- */
.music-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #6E473B;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(110, 71, 59, 0.5);
    z-index: 9998;
    transition: background-color 0.2s, transform 0.2s;
}

.music-btn:hover {
    background-color: #55352A;
    transform: scale(1.1);
}

.music-btn:active {
    transform: scale(0.95);
}

/* Animasi ring berdenyut saat musik playing */
.music-btn.playing::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(110, 71, 59, 0.5);
    animation: musicPulse 1.5s ease-out infinite;
}

@keyframes musicPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}
/* --- Style Halaman 6 (Lokasi Acara) --- */
#page-6 {
    overflow: hidden;
    justify-content: flex-start;
}

#page-6::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 43.7%;
    z-index: 1;
}

.page6-location {
    position: absolute;
    top: 11.8%;
    left: 50%;
    width: 86%;
    --reveal-x: -50%;
    z-index: 5;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(23, 42, 24, 0.34);
}

.page6-title {
    font-family: 'Tangerine', 'Segoe Script', 'Lucida Handwriting', cursive, 'Playfair Display', Georgia, serif;
    font-size: clamp(3.5rem, 10vw, 3rem);
    font-weight: 700;
    line-height: 1.85;
    margin: 0 0 8px;
}

.page6-venue {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.84rem, 3.25vw, 1rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 9px;
}

.page6-address {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.74rem, 2.2vw, 0.68rem);
    font-style: normal;
    font-weight: 700;
    line-height: 1.55;
    margin: 0 auto 22px;
    max-width: 350px;
}

.page6-location .reveal-on-scroll {
    --reveal-x: 0;
}

.btn-page6 {
    background-color: #61292e;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.7rem, 2.8vw, 0.82rem);
    font-weight: 700;
    width: 34%;
    max-width: 136px;
    min-width: 112px;
    min-height: 38px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 7px 16px rgba(54, 5, 10, 0.24);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    letter-spacing: 0;
}

.btn-page6:hover {
    background-color: #78333a;
    box-shadow: 0 9px 18px rgba(54, 5, 10, 0.32);
    transform: scale(1.04);
}

.btn-page6:active {
    transform: scale(0.97);
}

.page6-location-asset {
    position: absolute;
    left: 50%;
    bottom: -0.4%;
    width: 79%;
    max-width: 386px;
    height: auto;
    --reveal-x: -50%;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 11px 13px rgba(38, 2, 6, 0.28));
    transform-origin: 50% 70%;
}

.page.active .page6-location-asset {
    animation: page6AssetSway 3.8s ease-in-out 1s infinite;
}

@keyframes page6AssetSway {
    0%,
    100% {
        transform: translate(-50%, 0) rotate(-2deg);
    }

    50% {
        transform: translate(-50%, -8px) rotate(2.2deg);
    }
}

@media (max-width: 380px) {
    .page6-location {
        top: 10.8%;
        width: 90%;
    }

    .page6-address {
        font-size: clamp(0.5rem, 2.25vw, 0.6rem);
        margin-bottom: 18px;
    }

    .page6-location-asset {
        width: 88%;
        bottom: -2.6%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page.active .page6-location-asset {
        animation: none;
    }
}

/* --- Style Halaman 7 (Gallery) --- */
#page-7 {
    overflow: hidden;
}

.page7-gallery {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 49.4%;
}

.page7-gallery-grid {
    --reveal-x: 0;
    width: 84%;
    max-width: 390px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(14px, 4vw, 22px) clamp(13px, 3.8vw, 18px);
}

.page7-gallery-item {
    aspect-ratio: 0.72;
    width: 100%;
    overflow: hidden;
    padding: 0;
    border: none;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(6, 15, 7, 0.34);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page7-gallery-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 18px rgba(6, 15, 7, 0.42);
}

.page7-gallery-item:active {
    transform: scale(0.98);
}

.page7-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.gallery-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(15, 5, 7, 0.78);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.gallery-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-modal-card {
    position: relative;
    width: min(88vw, 410px);
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.gallery-modal-close,
.gallery-modal-nav {
    position: absolute;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(97, 41, 46, 0.88);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gallery-modal-close {
    top: -16px;
    right: -12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    z-index: 2;
}

.gallery-modal-nav {
    top: 50%;
    width: 38px;
    height: 52px;
    border-radius: 24px;
    font-size: 2.1rem;
    transform: translateY(-50%);
    z-index: 2;
}

.gallery-modal-prev {
    left: -17px;
}

.gallery-modal-next {
    right: -17px;
}

.gallery-modal-close:hover,
.gallery-modal-nav:hover {
    background-color: rgba(122, 52, 59, 0.95);
}

.gallery-modal-nav:hover {
    transform: translateY(-50%) scale(1.05);
}

.gallery-modal-counter {
    position: absolute;
    left: 50%;
    bottom: -31px;
    transform: translateX(-50%);
    margin: 0;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

@media (max-width: 380px) {
    .page7-gallery {
        padding-top: 49%;
    }

    .page7-gallery-grid {
        width: 86%;
        gap: 12px 11px;
    }
}



/* --- Style Halaman 10 (Gift Pernikahan) --- */
#page-10 {
    overflow: hidden;
}

.page10-gift-content {
    position: absolute;
    left: 50%;
    top: 9.5%;
    width: 78%;
    --reveal-x: -50%;
    z-index: 8;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(38, 2, 6, 0.32);
}

.page10-title {
    font-family: 'Tangerine', 'Segoe Script', 'Lucida Handwriting', cursive, 'Playfair Display', Georgia, serif;
    font-size: clamp(2.3rem, 9.4vw, 3.05rem);
    font-weight: 700;
    line-height: 0.95;
    margin: 0 0 14px;
}

.page10-intro,
.page10-frame-copy {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 auto;
}

.page10-intro {
    max-width: 340px;
    font-size: 0.75rem;
}

.page10-actions {
    --reveal-x: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    margin-top: 23px;
}

.btn-page10 {
    background-color: #22452d;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.62rem, 2.35vw, 0.74rem);
    font-weight: 700;
    width: clamp(112px, 31vw, 148px);
    min-height: 35px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 69, 45, 0.3);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-page10:hover {
    background-color: #2d5a3b;
    box-shadow: 0 6px 16px rgba(34, 69, 45, 0.4);
    transform: scale(1.03);
}

.btn-page10:active {
    transform: scale(0.98);
}

.page10-frame-copy {
    position: absolute;
    left: 50%;
    top: 66.9%;
    width: 60%;
    max-width: 300px;
    --reveal-x: -50%;
    z-index: 8;
    color: #3b2f28;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.32;
}

/* Modal Gift */
.gift-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gift-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gift-modal-card {
    background-color: #faf6f0;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gift-modal-overlay.active .gift-modal-card {
    transform: scale(1);
}

.gift-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #8C7667;
    transition: color 0.2s;
}

.gift-modal-close:hover {
    color: #4A3525;
}

.gift-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.gift-modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: #4A3525;
    font-weight: 600;
    margin-bottom: 6px;
}

.gift-modal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #8C7667;
    line-height: 1.4;
}

.gift-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar for modal body if height overflows */
.gift-modal-body::-webkit-scrollbar {
    width: 4px;
}
.gift-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.gift-modal-body::-webkit-scrollbar-thumb {
    background: rgba(110, 71, 59, 0.2);
    border-radius: 10px;
}

.bank-account-card {
    background-color: #ffffff;
    border: 1px solid rgba(140, 118, 103, 0.15);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.bank-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed rgba(140, 118, 103, 0.15);
    padding-bottom: 6px;
}

.bank-info-with-logo {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.bank-logo {
    width: 76px;
    height: auto;
    flex: 0 0 auto;
}

.bank-account-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.bank-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6E473B;
    letter-spacing: 0.5px;
}

.account-owner {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    color: #4A3525;
    font-weight: 500;
}

.account-number-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.account-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4A3525;
    letter-spacing: 0.5px;
}

.account-number.address-text {
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    color: #555555;
    letter-spacing: 0;
}

.btn-copy-action {
    background-color: #6E473B;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 12px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-copy-action:hover {
    background-color: #4A3525;
}

.btn-copy-action:active {
    transform: scale(0.95);
}

.flower-modal-card {
    text-align: center;
}

.btn-flower-wa {
    background-color: #61292e;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
    min-height: 38px;
    padding: 9px 24px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(54, 5, 10, 0.22);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn-flower-wa:hover {
    background-color: #78333a;
    box-shadow: 0 7px 16px rgba(54, 5, 10, 0.3);
    transform: scale(1.03);
}

.flower-vendor-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6E473B;
    margin-top: 12px;
}

@media (max-width: 380px) {
    .page10-gift-content {
        top: 8.6%;
        width: 82%;
    }

    .page10-title {
        margin-bottom: 11px;
    }

    .page10-intro {
        font-size: 0.75rem;
    }

    .page10-actions {
        gap: 10px;
        margin-top: 18px;
    }

    .page10-frame-copy {
        top: 66.6%;
        width: 63%;
        font-size: 0.75rem;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: rgba(74, 53, 37, 0.95);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Style Halaman 8 (RSVP & Wishes) --- */
#page-8 {
    overflow: hidden;
}

.page8-rsvp-content,
.page8-wishes-content {
    position: absolute;
    z-index: 8;
    color: #ffffff;
    text-align: center;
}

.page8-rsvp-content {
    top: 5.2%;
    left: 55%;
    width: 88%;
    --reveal-x: -50%;
}

.page8-wishes-content {
    top: 62.4%;
    left: 50%;
    width: 78%;
    --reveal-x: -50%;
}

.page8-title {
    font-family: 'Tangerine', 'Segoe Script', 'Lucida Handwriting', cursive, 'Playfair Display', Georgia, serif;
    font-size: clamp(3rem, 13vw, 4rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 0 0 17px;
    text-shadow: 0 2px 6px rgba(43, 4, 7, 0.28);
}

.page8-rsvp-title {
    width: 100%;
    padding-left: 50%;
    margin-bottom: 19.5%;
}

.page8-rsvp-copy {
    width: 56%;
    margin-left: 14%;
    margin-top: 0%;
    color: #372420;
    text-align: center;
}

.page8-rsvp-copy p,
.page8-wishes-copy {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.6rem, 2.05vw, 0.63rem);
    font-weight: 700;
    line-height: 1.28;
    margin: 0px auto 13px;
}

.page8-wishes-copy {
    color: #ffffff;
    max-width: 320px;
    text-shadow: 0 2px 5px rgba(22, 39, 23, 0.34);
}

.btn-page8 {
    background-color: #61292e;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.52rem, 2.1vw, 0.66rem);
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(54, 5, 10, 0.22);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    letter-spacing: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: clamp(76px, 22vw, 106px);
    height: clamp(30px, 7.3vw, 36px);
    z-index: 10;
}

.btn-rsvp-trigger {
    color: #ffffff;
}

.btn-wishes-trigger {
    color: #ffffff;
}

.btn-page8:hover {
    background-color: #78333a;
    box-shadow: 0 7px 16px rgba(54, 5, 10, 0.3);
    transform: scale(1.04);
}

.btn-page8:active {
    transform: scale(0.97);
}

@media (max-width: 380px) {
    .page8-rsvp-content {
        top: 5.4%;
        width: 92%;
    }

    .page8-rsvp-title {
        padding-left: 47%;
        margin-bottom: 18.8%;
    }

    .page8-rsvp-copy {
        width: 59%;
        margin-left: 11.5%;
        
    }

    .page8-wishes-content {
        top: 62%;
        width: 82%;
    }
}

/* --- Style Halaman 9 (Our Love) --- */
#page-9 {
    overflow: hidden;
}

.page9-love-story {
    position: absolute;
    inset: 0;
    z-index: 6;
    color: #ffffff;
    text-align: center;
}

.page9-title {
    position: absolute;
    top: 6.2%;
    left: 50%;
    width: 84%;
    transform: translateX(-50%);
    font-family: 'Tangerine', 'Segoe Script', 'Lucida Handwriting', cursive, 'Playfair Display', Georgia, serif;
    font-size: clamp(2.55rem, 10.6vw, 3.3rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 0;
    color: #3b2c25;
    text-shadow: 0 2px 6px rgba(255, 255, 255, 0.38);
}

.page9-story-frame {
    position: absolute;
    top: 35.4%;
    left: 50%;
    width: 62%;
    max-width: 300px;
    --reveal-x: -50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(4px, 1.2%, 8px);
    min-height: 42%;
    padding: 0 2px;
    text-shadow: 0 2px 5px rgba(38, 2, 6, 0.34);
}

.page9-story-item {
    margin: 0;
}

.page9-story-item h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.12;
    margin: 0 0 2px;
}

.page9-story-item p {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1.18;
    margin: 0;
}

@media (max-width: 380px) {
    .page9-title {
        top: 6.6%;
        font-size: clamp(2.25rem, 10.4vw, 2.8rem);
    }

    .page9-story-frame {
        top: 35.2%;
        width: 66%;
        min-height: 42.5%;
        gap: 4px;
    }

    .page9-story-item h3 {
        font-size: 0.75rem;
    }

    .page9-story-item p {
        font-size: 0.5rem;
        line-height: 1.15;
    }
}

/* Form Styling inside Modals */
.form-group {
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}

.form-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6E473B;
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(140, 118, 103, 0.25);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #4A3525;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #6E473B;
    box-shadow: 0 0 0 3px rgba(110, 71, 59, 0.15);
}

.form-control[readonly] {
    background-color: #f5f1ea;
    color: #8C7667;
    cursor: not-allowed;
    border-color: rgba(140, 118, 103, 0.15);
}

.form-textarea {
    resize: none;
}

.btn-submit-gift {
    background-color: #4A3525;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(74, 53, 37, 0.2);
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.btn-submit-gift:hover {
    background-color: #6E473B;
}

.btn-submit-gift:active {
    transform: scale(0.98);
}

/* --- Responsive Desktop scaling system --- */
@media (min-width: 481px) {
    body {
        background-color: #e0e0e0;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden !important; /* Lock body scrolling on desktop */
    }

    .app-container {
        /* Proportional width & height locked to 9:16 ratio */
        width: min(calc(95vh * 9 / 16), 480px) !important;
        height: min(95vh, 853px) !important;
        border-radius: 16px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
        overflow-x: hidden;
        margin: auto;
        display: block;
        scroll-behavior: smooth;
    }

    /* Override scroll lock on desktop app-container */
    body.no-scroll .app-container {
        height: min(95vh, 853px) !important;
        overflow-y: hidden !important;
    }

    .page {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    /* Elegant Custom Scrollbar */
    .app-container::-webkit-scrollbar {
        width: 6px;
    }
    .app-container::-webkit-scrollbar-track {
        background: transparent;
    }
    .app-container::-webkit-scrollbar-thumb {
        background: rgba(110, 71, 59, 0.3);
        border-radius: 10px;
    }
    .app-container::-webkit-scrollbar-thumb:hover {
        background: rgba(110, 71, 59, 0.6);
    }
    .app-container {
        scrollbar-width: thin;
        scrollbar-color: rgba(110, 71, 59, 0.3) transparent;
    }
}


/* Canva Midnight Garden: faithful page backgrounds with functional hotspots */
#page-1 { background-image: url("images/canva/slide-01-clean.webp"); background-size: 100% 100%; }
#page-2 { background-image: url("images/canva/slide-04-curtain.webp"); background-size: 100% 100%; }
#page-3 { background-image: url("images/canva/slide-07.webp"); background-size: 100% 100%; }
#page-4 { background-image: url("images/canva/slide-11.webp"); background-size: 100% 100%; }
#page-5 { background-image: url("images/canva/slide-14.webp"); background-size: 100% 100%; }
#page-6 { background-image: url("images/canva/slide-16.webp"); background-size: 100% 100%; }
#page-7 { background-image: url("images/canva/slide-19.webp"); background-size: 100% 100%; }
#page-8 { background-image: url("images/canva/slide-21.webp"); background-size: 100% 100%; }
#page-9 { background-image: url("images/canva/slide-24.webp"); background-size: 100% 100%; }
#page-10 { background-image: url("images/canva/slide-25.webp"); background-size: 100% 100%; }
#page-11 { background-image: url("images/canva/slide-28.webp"); background-size: 100% 100%; }
#page-1 .guest-name-container, #page-3 .page3-asset, #page-3 .page3-quote,
#page-4 .page4-title, #page-4 .page4-profile, #page-4 .page4-photo, #page-4 .page4-fleur,
#page-5 .page5-event-card, #page-6 .page6-location, #page-6 .page6-location-asset,
#page-7 .page7-gallery, #page-7 .gallery-modal-overlay, #page-8 .page8-rsvp-content, #page-8 .page8-wishes-content,
#page-9 .page9-love-story, #page-10 .page10-gift-content, #page-10 .page10-frame-copy, #page-11 .p11-envelope { display: none !important; }
.canva-hotspot { position: absolute; z-index: 50; display: block; padding: 0; border: 0; border-radius: 0; background: transparent; color: transparent; cursor: pointer; }
#page-1 .btn-open { left: 24%; bottom: 15%; width: 52%; height: 9%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: transparent; font-size: 0; }
#page-3 .countdown-container { top: 39%; left: 19%; width: 62%; padding: 8px 3px; border-radius: 8px; background: #520a10; }
#page-3 .countdown-container > .countdown-col:last-child, #page-3 .countdown-container > .countdown-colon:last-of-type { display: none; }
#page-6 .canva-map-hotspot { left: 30%; top: 35%; width: 40%; height: 7%; }
#page-8 .canva-rsvp-hotspot { left: 31%; top: 30.5%; width: 38%; height: 5%; }
#page-8 .canva-wishes-hotspot { left: 35%; top: 78.5%; width: 30%; height: 5%; }
#page-10 .canva-gift-hotspot { left: 35%; top: 35%; width: 30%; height: 5%; }

/* Smaller live CTA over the cleaned cover art. */
#page-1 .btn-open {
    z-index: 20;
    left: 50%;
    bottom: 10.5%;
    width: 31%;
    height: 3.7%;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    transform: translateX(-50%);
    background: #6b2932 !important;
    box-shadow: none;
    color: #fff !important;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}
#page-1 .btn-open:hover {
    background: #6b2932 !important;
    box-shadow: none;
    transform: translateX(-50%);
}

/* The invitation collage is a separate transparent layer; only this layer sways. */
#page-2 .page2-envelope-sway {
    position: absolute;
    z-index: 2;
    top: 27%;
    left: 0;
    width: 100%;
    height: 66%;
    max-width: none;
    max-height: none;
    object-fit: fill;
    opacity: 1;
    transform-origin: 50% 8%;
}
#page-2.active .page2-envelope-sway {
    animation: page2EnvelopeSway 7s ease-in-out infinite;
}
@keyframes page2EnvelopeSway {
    0%, 100% { transform: rotate(-0.35deg) translateY(0); }
    50% { transform: rotate(0.35deg) translateY(2px); }
}

@media (prefers-reduced-motion: reduce) {
    #page-2.active .page2-envelope-sway { animation: none; }
}

/* Midnight Garden 11-page flow, arranged like the netty-girri Swiper template. */
.app-container.swiper {
    width: min(53.4375dvh, 480px);
    height: min(95dvh, 853px);
    max-width: 100%;
    margin: auto;
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 18px;
    touch-action: pan-y;
}
.app-container.swiper .swiper-wrapper { width: 100%; height: 100%; }
.app-container.swiper .page.swiper-slide {
    width: 100%; height: 100%; min-height: 0; aspect-ratio: auto;
    flex-shrink: 0; overflow: hidden; background-size: 100% 100%;
    background-position: center; background-repeat: no-repeat;
}
#page-1 { background-image: url('images/canva/slide-01-clean.webp') !important; }
#page-2 { background-image: url('images/canva/slide-02.webp') !important; }
#page-3 { background-image: url('images/canva/slide-07.webp') !important; }
#page-4 { background-image: url('images/canva/slide-11.webp') !important; }
#page-5 { background-image: url('images/canva/slide-14.webp') !important; }
#page-6 { background-image: url('images/canva/slide-16.webp') !important; }
#page-7 { background-image: url('images/canva/slide-19.webp') !important; }
#page-8 { background-image: url('images/canva/slide-21.webp') !important; }
#page-9 { background-image: url('images/canva/slide-24.webp') !important; }
#page-10 { background-image: url('images/canva/slide-25.webp') !important; }
#page-11 { background-image: url('images/canva/slide-28.webp') !important; }
.app-container.swiper .page > * { visibility: hidden !important; }
.app-container.swiper #page-1 .guest-name-container,
.app-container.swiper #page-1 .btn-open,
.app-container.swiper #page-6 .page6-location .btn-page6,
.app-container.swiper #page-8 .btn-rsvp-trigger,
.app-container.swiper #page-8 .btn-wishes-trigger,
.app-container.swiper #page-10 .page10-actions,
.app-container.swiper .page .gift-modal-overlay.active,
.app-container.swiper .toast { visibility: visible !important; }
.app-container.swiper #page-1 .guest-name-container { top: 18%; }
.app-container.swiper #page-1 .btn-open { bottom: 9%; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.app-container.swiper #page-6 .btn-page6 { position:absolute; left:35%; bottom:15%; z-index:12; }
.app-container.swiper #page-8 .btn-rsvp-trigger { position:absolute; left:32%; top:43%; z-index:12; }
.app-container.swiper #page-8 .btn-wishes-trigger { position:absolute; left:32%; top:81%; z-index:12; }
.app-container.swiper #page-10 .page10-actions { position:absolute; left:15%; bottom:18%; width:70%; z-index:12; }
.app-container.swiper .page .gift-modal-overlay.active { position:fixed; z-index:1000; }
.app-container.swiper .toast { position:fixed; z-index:1100; }
@media (max-width: 480px) {
    .app-container.swiper { width:100%; height:100dvh; border-radius:0; }
}
.app-container.swiper #page-1 .guest-name-container,
.app-container.swiper #page-1 .btn-open { display:block !important; }
.app-container.swiper .page .canva-hotspot { display:block !important; visibility:visible !important; }
.app-container.swiper #page-1 .guest-name-container { z-index:15; }
.app-container.swiper #page-1 .btn-open { width:31%; height:3.7%; bottom:10.5%; }

/* Restore working Canva overlays after switching the invitation to Swiper. */
#page-2 { background-image: url('images/canva/slide-04-curtain.webp') !important; }
.app-container.swiper #page-2 .p2-envelope {
    display:block !important; visibility:visible !important; opacity:1;
    position:absolute; z-index:5; top:27%; left:0; width:100%; height:66%;
    max-width:none; max-height:none; object-fit:fill; transform-origin:50% 8%;
}
.app-container.swiper #page-2.active .p2-envelope { animation: page2EnvelopeSway 7s ease-in-out infinite; }
@keyframes page2EnvelopeSway {
    0%,100% { transform:rotate(-.35deg) translateY(0); }
    50% { transform:rotate(.35deg) translateY(2px); }
}

/* The source cover has a printed guest-name placeholder; this opaque pill replaces it. */
.app-container.swiper #page-1 .guest-name-container {
    display:grid !important; visibility:visible !important; place-items:center;
    top:18.1%; left:50%; width:72%; min-height:5.4%; padding:.35em .9em;
    transform:translateX(-50%); border-radius:999px;
    background:#520a10; border:1px solid rgba(255,255,255,.72);
    box-shadow:0 4px 14px rgba(0,0,0,.28);
}
.app-container.swiper #page-1 .guest-name { font-size:clamp(.9rem,4.1vw,1.2rem); line-height:1.2; overflow-wrap:anywhere; }

/* Live three-part countdown covers the fixed Canva numerals; the printed labels remain below it. */
.app-container.swiper #page-3 .countdown-container {
    display:flex !important; visibility:visible !important; z-index:12;
    top:38.4%; left:50%; width:54%; height:6.1%; padding:0;
    transform:translateX(-50%); justify-content:space-between; align-items:center;
    gap:0; border-radius:6px; background:#50090f;
}
.app-container.swiper #page-3 .countdown-col { width:31%; }
.app-container.swiper #page-3 .countdown-num { font-size:clamp(1.45rem,8.2vw,2.25rem); line-height:1; }
.app-container.swiper #page-3 .countdown-colon { font-size:clamp(1.35rem,7vw,2rem); line-height:1; }
.app-container.swiper #page-3 .countdown-label { display:none !important; }
.app-container.swiper #page-3 .countdown-col:nth-of-type(4),
.app-container.swiper #page-3 .countdown-col:nth-of-type(4) + .countdown-colon { display:none !important; }

/* Click targets align with the Instagram glyphs already printed in the couple artwork. */
.app-container.swiper #page-4 .ig-hotspot {
    position:absolute; z-index:30; display:block; visibility:visible; background:transparent;
    width:11%; height:6.3%; border-radius:50%;
}
.app-container.swiper #page-4 .ig-bride { left:67%; top:39%; }
.app-container.swiper #page-4 .ig-groom { left:26%; top:77%; }
.app-container.swiper #page-4 .ig-hotspot:focus-visible,
.app-container.swiper .canva-hotspot:focus-visible { outline:3px solid #fff; outline-offset:2px; }

@media (prefers-reduced-motion: reduce) {
    .app-container.swiper #page-2.active .p2-envelope { animation:none; }
}
.app-container.swiper #page-1 .guest-name-container { top:16.5%; }
.app-container.swiper #page-4 .ig-hotspot { visibility:visible !important; }
.app-container.swiper #page-4 .ig-groom { left:27%; }
.app-container.swiper #page-3 .countdown-col:nth-of-type(3) + .countdown-colon { display:none !important; }

/* Final invitation polish: overlays stay the same size as pages change. */
.app-container.swiper #page-1 .guest-name-container {
    top: 18.2% !important;
    width: 82%; min-height: 0; padding: 0;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.app-container.swiper #page-1 .guest-name {
    color: #fff; font-size: clamp(.72rem, 3.2vw, .96rem); line-height: 1.25;
    text-shadow: 0 1px 5px rgba(0,0,0,.65);
}

/* Slide 2: fixed natural box dimensions prevent the old hidden-state scale from leaking on swipe. */
.app-container.swiper #page-2 .p2-envelope {
    top: 31%; left: 7%; width: 86%; height: 57%;
    opacity: 1; transform: rotate(0deg) translateY(0) scale(1);
    transform-origin: 50% 8%;
}
.app-container.swiper #page-2.active .p2-envelope {
    animation: page2EnvelopeSway 4.6s ease-in-out infinite !important;
}
@keyframes page2EnvelopeSway {
    0%, 100% { transform: rotate(-.38deg) translateY(0) scale(1); }
    50% { transform: rotate(.38deg) translateY(2px) scale(1); }
}

/* Countdown: four compact live values, including seconds. */
.app-container.swiper #page-3 .countdown-container {
    top: 38.5%; left: 50%; width: 72%; height: 7%; padding: 2px 4px;
    display: flex !important; visibility: visible !important; justify-content: space-around;
    align-items: center; gap: 0; transform: translateX(-50%);
    border-radius: 4px; background: #50090f; z-index: 12;
}
.app-container.swiper #page-3 .countdown-col {
    display: flex !important; width: 22%; flex: 1 1 22%; align-items: center;
}
.app-container.swiper #page-3 .countdown-num {
    font-family: Lora, Georgia, serif; font-size: clamp(.85rem, 4.2vw, 1.2rem);
    font-weight: 500; line-height: 1.05;
}
.app-container.swiper #page-3 .countdown-label {
    display: block !important; font-family: Lora, Georgia, serif;
    font-size: clamp(.36rem, 1.65vw, .5rem); line-height: 1.1;
}
.app-container.swiper #page-3 .countdown-colon {
    display: block !important; font-size: clamp(.65rem, 3vw, .85rem); line-height: 1;
}

/* Spin only the record surface in the location illustration; keep the gramophone still. */
.app-container.swiper #page-6 .page6-location-asset {
    display: block !important; visibility: visible !important;
    animation: none !important; transform: translateX(-50%); z-index: 4;
}
.app-container.swiper #page-6 .location-vinyl-spin {
    z-index: 5; clip-path: ellipse(14.5% 6.5% at 60% 43%);
    transform-origin: 60% 43%;
}
.app-container.swiper #page-6.active .location-vinyl-spin {
    animation: vinylSpin 7s linear infinite !important;
}
@keyframes vinylSpin {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

/* Clickable photo areas match the nine photographs printed on the Canva gallery slide. */
.app-container.swiper #page-7 .page7-gallery {
    display: block !important; visibility: visible !important; position: absolute;
    inset: 0; padding: 0; z-index: 20;
}
.app-container.swiper #page-7 .page7-gallery-grid { display: contents; }
.app-container.swiper #page-7 .page7-gallery-item {
    display: block !important; visibility: visible !important; position: absolute;
    width: 27.2%; height: 20.2%; padding: 0; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; opacity: 0; cursor: zoom-in;
}
.app-container.swiper #page-7 .page7-gallery-item img { display: none; }
.app-container.swiper #page-7 .page7-gallery-item:nth-child(3n + 1) { left: 5.2%; }
.app-container.swiper #page-7 .page7-gallery-item:nth-child(3n + 2) { left: 36.6%; }
.app-container.swiper #page-7 .page7-gallery-item:nth-child(3n) { left: 67.8%; }
.app-container.swiper #page-7 .page7-gallery-item:nth-child(-n + 3) { top: 25.1%; }
.app-container.swiper #page-7 .page7-gallery-item:nth-child(n + 4):nth-child(-n + 6) { top: 50.4%; }
.app-container.swiper #page-7 .page7-gallery-item:nth-child(n + 7) { top: 73.5%; }
.gallery-modal-overlay {
    background: rgba(0,0,0,.82); opacity: 0; pointer-events: none;
}
.gallery-modal-card {
    width: min(88vw, 410px); height: auto; max-height: 78vh;
    aspect-ratio: .757; overflow: hidden; background: #150f0d;
}
.gallery-modal-image {
    position: absolute; max-width: none; max-height: none; border-radius: 0;
    object-fit: fill; box-shadow: none;
}
.gallery-modal-close { top: 8px; right: 8px; }
.gallery-modal-prev { left: 8px; }
.gallery-modal-next { right: 8px; }
.gallery-modal-counter { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); color: #fff; z-index: 3; }

/* Thank You page uses the matching Zainab and Amir envelope cutout over Canva slide 29. */
#page-11 { background-image: url('images/canva/slide-29.webp') !important; }
.app-container.swiper #page-11 .p11-envelope {
    display: block !important; visibility: visible !important; opacity: 1 !important;
    position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    object-fit: fill; transform: scale(.82) rotate(0deg) translateY(0);
    transform-origin: 50% 62%;
}
#page-1 { background-image: url('images/canva/slide-01-no-name.webp') !important; }
.app-container.swiper #page-11.active .p11-envelope {
    animation: thankYouEnvelopeSway 4.6s ease-in-out infinite !important;
}
@keyframes thankYouEnvelopeSway {
    0%, 100% { transform: scale(.82) rotate(-.38deg) translateY(0); }
    50% { transform: scale(.82) rotate(.38deg) translateY(2px); }
}
@media (prefers-reduced-motion: reduce) {
    .app-container.swiper #page-2.active .p2-envelope,
    .app-container.swiper #page-6.active .location-vinyl-spin,
    .app-container.swiper #page-11.active .p11-envelope { animation: none !important; }
}

/* Cascade overrides for the latest refinements. */
.app-container.swiper #page-2.active .p2-envelope {
    animation: page2EnvelopeSway 3.2s ease-in-out infinite !important;
}
.app-container.swiper #page-3 .countdown-container {
    top: 38.1%; height: 8.8%; padding: 2px 3px;
    justify-content: space-between;
}
.app-container.swiper #page-3 .countdown-colon { display: none !important; }
.app-container.swiper #page-3 .countdown-col {
    display: flex !important; flex: 0 0 25%; width: 25%;
    flex-direction: column; align-items: center; justify-content: center;
    min-width: 0; white-space: nowrap;
}
.app-container.swiper #page-3 .countdown-num {
    font-size: clamp(.8rem, 3.8vw, 1.05rem); line-height: 1.05;
}
.app-container.swiper #page-3 .countdown-label {
    display: block !important; font-size: clamp(.35rem, 1.5vw, .46rem);
    line-height: 1.1; white-space: nowrap;
}
/* Return to the original gentle sway of the full location illustration. */
.app-container.swiper #page-6 .page6-location-asset {
    display: block !important; visibility: visible !important;
    clip-path: none; transform-origin: 50% 70%;
}
.app-container.swiper #page-6.active .page6-location-asset {
    animation: page6AssetSway 3.8s ease-in-out 1s infinite !important;
}

/* Page 2 envelope motion follows Ranisa–Khairul's float-in and continuous sway. */
.app-container.swiper #page-2 .p2-envelope {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
}
.app-container.swiper #page-2.active .p2-envelope {
    animation: envelopeFloatIn 1.2s cubic-bezier(.16, 1, .3, 1) both,
               page2EnvelopeSway 3.2s ease-in-out 1.2s infinite !important;
}
@keyframes envelopeFloatIn {
    from { opacity: 0; transform: translateY(28px) rotate(0deg) scale(1); }
    to { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}
@keyframes page2EnvelopeSway {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-6px) rotate(-1deg) scale(1); }
    50% { transform: translateY(0) rotate(0deg) scale(1); }
    75% { transform: translateY(6px) rotate(1deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .app-container.swiper #page-2.active .p2-envelope { animation: none !important; }
}

/* Countdown labels stay crisp over the labels baked into the Canva artwork. */
.app-container.swiper #page-3 .countdown-container {
    top: 37.7%; height: 9.5%;
    opacity: 1 !important; transition: none !important; will-change: auto;
    background: #50090f !important;
    transform: translateX(-50%) !important;
    align-items: center;
}
.app-container.swiper #page-3 .countdown-col:nth-of-type(4) {
    display: flex !important; visibility: visible !important;
}
.app-container.swiper #page-3 .countdown-col:nth-of-type(4) .countdown-label {
    display: block !important; visibility: visible !important;
}
/* Keep the location artwork still when its slide becomes active. */
.app-container.swiper #page-6 .page6-location-asset {
    opacity: 1 !important; transform: translateX(-50%) !important;
    animation: none !important; transition: none !important;
}

/* Keep countdown values stacked above their labels, with only colon separators added. */
.app-container.swiper #page-3 .countdown-container {
    left: 50%; width: 82%; height: 9.5%;
    display: grid !important;
    grid-template-columns: 23% 2.66% 23% 2.66% 23% 2.66% 23%;
    justify-content: center; align-items: center; gap: 0;
    white-space: nowrap; overflow: hidden;
}
.app-container.swiper #page-3 .countdown-col {
    display: flex !important; flex: none; flex-direction: column;
    align-items: center; justify-content: center; gap: 0;
    width: 100%; min-width: 0; white-space: nowrap;
}
.app-container.swiper #page-3 .countdown-num {
    font-size: clamp(.8rem, 3.8vw, 1.05rem); line-height: 1.05;
}
.app-container.swiper #page-3 .countdown-label {
    display: block !important; font-size: clamp(.35rem, 1.5vw, .46rem);
    line-height: 1.1; white-space: nowrap; margin-top: 1px;
}
.app-container.swiper #page-3 .countdown-colon {
    display: flex !important; align-items: center; justify-content: center;
    font-size: clamp(.58rem, 2.7vw, .78rem); line-height: 1;
}
.app-container.swiper #page-3 .countdown-container > .countdown-colon {
    display: flex !important; visibility: visible !important;
}
.app-container.swiper #page-3 .countdown-col:nth-of-type(3) + .countdown-colon {
    display: block !important; visibility: visible !important;
}

/* Layar HP diisi penuh. Dulu container dikunci rasio 9:16, sehingga di HP yang lebih
   tinggi dari 9:16 menyisakan band abu-abu body di atas dan bawah slide. */
@media (max-width: 480px) {
    body {
        align-items: stretch;
        background-color: #e0e0e0;
        min-height: 100vh;
    }
    body.no-scroll {
        height: 100vh !important;
    }
    .app-container.swiper,
    body.no-scroll .app-container.swiper {
        width: 100%;
        height: 100vh !important;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 0;
        margin: 0;
    }
}
@supports (height: 100dvh) {
    @media (max-width: 480px) {
        body {
            min-height: 100dvh;
        }
        body.no-scroll {
            height: 100dvh !important;
        }
        .app-container.swiper,
        body.no-scroll .app-container.swiper {
            width: 100%;
            height: 100dvh !important;
        }
    }
}
