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

:root {
    color-scheme: only light;
    forced-color-adjust: none;
    background: #f0f8ff;
}

html {
    background: #f0f8ff;
    color-scheme: only light;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f8ff; /* Alice Blue (Biru sangat muda) */
    color: #334e68;
    overflow-x: hidden;
    color-scheme: only light;
}

body.modal-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

body.js-motion .gate-countdown,
body.js-motion .envelope,
body.js-motion .gallery-track,
body.js-motion .wish-text,
body.js-motion .swinging,
body.js-motion .swinging-reverse,
body.js-motion .heart,
body.js-motion .confetti {
    animation: none !important;
}

html,
body {
    max-width: 100%;
    color-scheme: only light;
}

button {
    font-family: inherit;
    color-scheme: only light;
}

input,
textarea,
select {
    color-scheme: only light;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: #0077b6; /* Biru laut cerah */
}

/* --- KUNCI SCROLL --- */
body.locked {
    overflow: hidden !important;
}

body.content-locked main {
    display: none;
}

body:not(.db-ready) main {
    display: none;
}

body.envelope-open .gate-countdown {
    display: none;
}

main {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,0.9), transparent 14rem),
        radial-gradient(circle at 88% 18%, rgba(186,230,253,0.5), transparent 18rem),
        linear-gradient(180deg, #eef9ff 0%, #ffffff 32%, #eef8ff 100%);
}

main > section {
    position: relative;
    isolation: isolate;
}

main > section::before,
main > section::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

main > section::before {
    width: min(34vw, 430px);
    height: min(13vw, 150px);
    border-radius: 999px;
    background: rgba(255,255,255,0.66);
    box-shadow:
        58px -24px 0 rgba(255,255,255,0.54),
        122px 12px 0 rgba(255,255,255,0.38),
        -40px 18px 0 rgba(255,255,255,0.42);
    filter: blur(1px);
    opacity: 0.75;
}

main > section::after {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,119,182,0.18);
    box-shadow:
        80px 36px 0 rgba(135,206,235,0.24),
        160px -18px 0 rgba(255,179,198,0.24),
        260px 44px 0 rgba(0,119,182,0.12);
    animation: skyDust 7s ease-in-out infinite alternate;
}

main > section:nth-child(odd)::before {
    left: -90px;
    top: 52px;
    animation: sectionCloudLeft 18s ease-in-out infinite alternate;
}

main > section:nth-child(even)::before {
    right: -110px;
    top: 70px;
    animation: sectionCloudRight 20s ease-in-out infinite alternate;
}

main > section:nth-child(odd)::after {
    right: 18%;
    top: 26%;
}

main > section:nth-child(even)::after {
    left: 14%;
    top: 22%;
}

/* --- HERO SECTION (FULL SCREEN) --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 34px;
    background: linear-gradient(to bottom, #87ceeb, #f0f8ff);
    padding: 38px 20px;
    position: relative;
    z-index: 100;
    text-align: center;
    isolation: isolate;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
    z-index: -1;
}

.hero::before {
    background:
        radial-gradient(circle at 24% 22%, rgba(255,255,255,0.7), transparent 18%),
        radial-gradient(circle at 72% 18%, rgba(255,179,198,0.22), transparent 22%),
        radial-gradient(circle at 48% 76%, rgba(0,119,182,0.18), transparent 24%);
    animation: skyPulse 9s ease-in-out infinite alternate;
}

.hero::after {
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.28) 48%, transparent 62%);
    transform: translateX(-60%);
    animation: softSweep 6.5s ease-in-out infinite;
}

/* --- BENTUK AMPLOP --- */
.envelope-wrapper {
    position: relative;
    cursor: pointer; /* Kursor berubah jadi jari saat diarahkan */
    text-align: center;
}

.gate-countdown {
    width: min(100%, 760px);
    padding: 118px 28px 30px;
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.76)),
        linear-gradient(145deg, #92d7f4 0%, #dff5ff 52%, #ffffff 100%);
    box-shadow: 0 18px 45px rgba(0,119,182,0.14);
    backdrop-filter: blur(14px);
    animation: panelFloat 5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.gate-countdown h2 {
    position: relative;
    z-index: 2;
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 22px;
    text-shadow: 0 8px 24px rgba(255,255,255,0.86);
}

.gate-countdown .section-kicker,
.countdown-grid,
.countdown-message {
    position: relative;
    z-index: 2;
}

.countdown-sky {
    position: absolute;
    inset: 0;
    height: 142px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.countdown-sky::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(255,255,255,0.78), transparent 10%),
        radial-gradient(circle at 78% 28%, rgba(255,255,255,0.58), transparent 12%),
        linear-gradient(180deg, rgba(135,206,235,0.82), rgba(224,247,255,0));
}

.sky-cloud {
    position: absolute;
    width: 138px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255,255,255,0.86);
    filter: drop-shadow(0 12px 20px rgba(0,119,182,0.12));
    animation: countdownCloud 18s linear infinite;
}

.sky-cloud::before,
.sky-cloud::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: inherit;
}

.sky-cloud::before {
    width: 58px;
    height: 58px;
    left: 22px;
    top: -28px;
}

.sky-cloud::after {
    width: 74px;
    height: 74px;
    right: 18px;
    top: -38px;
}

.cloud-a {
    --cloud-scale: 1;
    left: -160px;
    top: 48px;
    animation-duration: 22s;
}

.cloud-b {
    --cloud-scale: 0.72;
    left: 18%;
    top: 26px;
    opacity: 0.74;
    animation-duration: 28s;
    animation-delay: -10s;
}

.cloud-c {
    --cloud-scale: 0.86;
    left: 68%;
    top: 70px;
    opacity: 0.82;
    animation-duration: 24s;
    animation-delay: -16s;
}

.sky-star {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 16px rgba(255,255,255,0.9);
    animation: twinkle 2.4s ease-in-out infinite;
}

.star-a { left: 18%; top: 26px; }
.star-b { left: 54%; top: 18px; animation-delay: -0.8s; }
.star-c { left: 82%; top: 42px; animation-delay: -1.4s; }

.flying-love {
    position: absolute;
    left: -90px;
    top: 58px;
    width: 78px;
    height: 38px;
    animation: flyingAcross 7.5s cubic-bezier(.42,0,.2,1) infinite;
    filter: drop-shadow(0 10px 16px rgba(2,62,138,0.2));
}

.fly-body {
    position: absolute;
    right: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #0077b6;
    font-size: 1.5rem;
    font-weight: 800;
    animation: flyerBob 1.1s ease-in-out infinite alternate;
}

.fly-trail {
    position: absolute;
    left: 0;
    top: 17px;
    width: 52px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.88), rgba(0,119,182,0.32));
}

.envelope-wrapper.is-waiting {
    cursor: not-allowed;
    filter: grayscale(0.25);
}

.envelope-wrapper.is-waiting .envelope {
    opacity: 0.68;
    transform: scale(0.96);
}

.envelope {
    position: relative;
    width: 300px;
    height: 200px;
    background-color: #7bc0e3; /* Warna dasar amplop biru */
    border-radius: 0 0 10px 10px;
    margin: 0 auto;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    contain: layout;
    will-change: transform;
}

.envelope-wrapper:not(.is-waiting):hover .envelope {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0,119,182,0.26);
}

/* Bagian Kantong Depan Amplop */
.pocket {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    /* Teknik membuat segitiga di CSS */
    border-left: 150px solid #9cd2f0;
    border-right: 150px solid #9cd2f0;
    border-bottom: 100px solid #63b4e0;
    border-top: 100px solid transparent;
    border-radius: 0 0 10px 10px;
    z-index: 3;
    pointer-events: none;
}

/* Tutup Amplop Atas (Flap) */
.flap {
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 100px solid #5aa9d4;
    transform-origin: top; /* Titik putar di atas */
    transition: transform 0.6s ease-in-out, z-index 0.2s;
    z-index: 4;
    pointer-events: none;
}

/* Kertas Surat di Dalam */
.letter {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    min-height: 166px;
    max-height: 184px;
    background: white;
    border-radius: 10px;
    padding: 16px 18px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.9s cubic-bezier(.2,.85,.25,1.15), box-shadow 0.4s ease;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
    will-change: transform;
    overflow: hidden;
}

.letter h1 {
    font-size: clamp(1.15rem, 4.5vw, 1.46rem);
    color: #0077b6;
    line-height: 1.05;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.letter p {
    font-size: clamp(0.72rem, 2.6vw, 0.86rem);
    color: #475569;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

/* Teks Kedip-Kedip di bawah amplop */
.click-instruction {
    margin-top: 30px;
    color: #023e8a;
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes skyPulse {
    from { transform: scale(1) translateY(0); opacity: 0.72; }
    to { transform: scale(1.08) translateY(-16px); opacity: 1; }
}

@keyframes softSweep {
    0%, 35% { transform: translateX(-70%) rotate(0.01deg); opacity: 0; }
    55% { opacity: 1; }
    100% { transform: translateX(70%) rotate(0.01deg); opacity: 0; }
}

@keyframes panelFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes envelopeBreathe {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
    50% { filter: drop-shadow(0 10px 18px rgba(255,255,255,0.35)); }
}

@keyframes countdownCloud {
    from { transform: translateX(0) scale(var(--cloud-scale, 1)); }
    to { transform: translateX(940px) scale(var(--cloud-scale, 1)); }
}

@keyframes twinkle {
    0%, 100% { transform: scale(0.65); opacity: 0.45; }
    50% { transform: scale(1.25); opacity: 1; }
}

@keyframes flyingAcross {
    0% { transform: translate(-20px, 8px) rotate(-8deg); opacity: 0; }
    8% { opacity: 1; }
    48% { transform: translate(420px, -22px) rotate(7deg); }
    92% { opacity: 1; }
    100% { transform: translate(900px, 10px) rotate(-5deg); opacity: 0; }
}

@keyframes flyerBob {
    from { transform: translateY(-3px) rotate(-4deg); }
    to { transform: translateY(4px) rotate(5deg); }
}

@keyframes sectionCloudLeft {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(42px) translateY(-10px); }
}

@keyframes sectionCloudRight {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(-46px) translateY(12px); }
}

@keyframes skyDust {
    from { transform: translateY(0); opacity: 0.45; }
    to { transform: translateY(-18px); opacity: 0.9; }
}

/* --- ANIMASI KETIKA AMPLOP DIKLIK --- */
.envelope-wrapper.is-opened .flap {
    transform: rotateX(180deg); /* Tutup amplop terbuka ke atas */
    z-index: 1; /* Pindah ke belakang surat */
}

.envelope-wrapper.is-opened .letter {
    transform: translate(-50%, -100px); /* Surat naik ke atas secara estetik */
    z-index: 5; /* Pindah ke paling depan */
    box-shadow: 0 18px 40px rgba(2,62,138,0.16);
}

.envelope-wrapper.is-opened .click-instruction {
    opacity: 0; /* Teks panduan hilang */
}

.section-kicker {
    color: #0284c7;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.soft-button {
    margin-top: 34px;
    padding: 12px 26px;
    border: 0;
    border-radius: 30px;
    background: #0077b6;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,119,182,0.2);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.soft-button:hover {
    background: #023e8a;
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(2,62,138,0.26);
}

.soft-button:active {
    transform: translateY(0) scale(0.98);
}

/* COUNTDOWN */
.countdown-section {
    padding: 85px 20px;
    text-align: center;
    background: linear-gradient(180deg, #f0f8ff, #ffffff);
}

.countdown-section h2 {
    font-size: 2.4rem;
    margin-bottom: 30px;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 18px;
    max-width: 720px;
    margin: 0 auto;
}

.countdown-card {
    min-height: 120px;
    padding: 24px 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(238,248,255,0.96));
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(0,119,182,0.1);
    backdrop-filter: blur(8px);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.countdown-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 46px rgba(0,119,182,0.18);
}

.countdown-card strong {
    display: block;
    color: #023e8a;
    font-size: 2.4rem;
    line-height: 1;
}

.countdown-card span {
    display: block;
    margin-top: 12px;
    color: #5c677d;
    font-weight: 600;
}

.countdown-message {
    margin-top: 22px;
    color: #475569;
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    :root,
    html,
    body {
        color-scheme: only light !important;
        background: #f0f8ff !important;
        color: #334e68 !important;
    }

    .hero {
        background: linear-gradient(to bottom, #87ceeb, #f0f8ff) !important;
    }

    .gate-countdown {
        border-color: rgba(255,255,255,0.75) !important;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.76)),
            linear-gradient(145deg, #92d7f4 0%, #dff5ff 52%, #ffffff 100%) !important;
        box-shadow: 0 18px 45px rgba(0,119,182,0.14) !important;
    }

    .countdown-card {
        background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(238,248,255,0.96)) !important;
        border-color: rgba(255,255,255,0.9) !important;
        box-shadow: 0 16px 34px rgba(0,119,182,0.1) !important;
    }

    .countdown-card strong {
        color: #023e8a !important;
    }

    .countdown-card span,
    .countdown-message,
    .click-instruction {
        color: #5c677d !important;
    }

    .envelope {
        background-color: #7bc0e3 !important;
        box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
    }

    .pocket {
        border-left-color: #9cd2f0 !important;
        border-right-color: #9cd2f0 !important;
        border-bottom-color: #63b4e0 !important;
        border-top-color: transparent !important;
    }

    .flap {
        border-left-color: transparent !important;
        border-right-color: transparent !important;
        border-top-color: #5aa9d4 !important;
    }

    .letter,
    .modal-content,
    .quiz-card,
    .memory-card,
    .reason-card,
    .meter-card {
        background: #ffffff !important;
        color: #334e68 !important;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 60px 20px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 30px auto;
}

.photo-card {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: rotate(-2deg); /* Efek estetik miring */
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* --- GANTI BAGIAN TIMELINE DI CSS KAMU DENGAN INI --- */

.timeline-section {
    padding: 80px 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(238,248,255,0.58)),
        radial-gradient(circle at 50% 120%, rgba(135,206,235,0.22), transparent 42%);
    text-align: center;
    overflow: hidden; /* Mencegah ayunan keluar layar */
}

.timeline-section h2 {
    margin-bottom: 50px;
}

/* Tali Gantungan */
.clothesline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 20px;
}

.clothesline {
    position: absolute;
    top: 25px;
    left: -50vw;
    right: -50vw;
    height: 3px;
    background-color: #b0c4de; /* Warna tali agak keabu-abuan */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1;
}

/* Layout Polaroid */
.polaroid-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.polaroid-item {
    position: relative;
}

/* Gaya Polaroid Ala Instax */
.polaroid {
    border: 1px solid #f0f0f0;
    background: white;
    padding: 15px 15px 35px 15px; /* Bawah lebih lebar */
    border-radius: 2px;
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
    width: 280px;
    text-align: center;
    transform-origin: top center; /* Titik tumpu ayunan di bagian atas */
    cursor: pointer;
    appearance: none;
}

.polaroid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #eee;
}

.polaroid .caption {
    margin-top: 15px;
}

.polaroid .caption h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #0077b6;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.polaroid .caption p {
    font-size: 0.85rem;
    color: #5c677d;
    font-style: italic; /* Font miring agar estetik */
}

/* MOVING GALLERY */
.moving-gallery-section {
    padding: 54px 0;
    overflow: hidden;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.56), rgba(224,247,255,0.72)),
        radial-gradient(circle at 16% 40%, rgba(135,206,235,0.18), transparent 18rem);
    width: 100%;
    margin-left: 0;
    contain: layout paint;
}

.moving-gallery-section h2 {
    font-size: 2.3rem;
    margin-bottom: 10px;
}

.moving-gallery-intro {
    width: min(720px, calc(100% - 32px));
    margin: 0 auto 28px;
    padding: 0 8px;
}

.moving-gallery-intro .section-kicker {
    margin-bottom: 8px;
}

.moving-gallery-intro p:last-child {
    max-width: 520px;
    margin: 0 auto;
    color: #4b5f78;
    font-size: clamp(0.92rem, 2.5vw, 1.05rem);
    font-weight: 700;
    line-height: 1.65;
}

.moving-gallery {
    display: grid;
    gap: var(--gallery-gap, 14px);
    width: 100%;
}

.gallery-line {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: auto;
    overscroll-behavior-inline: contain;
    cursor: grab;
    scrollbar-width: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 180px;
}

.gallery-line.is-dragging {
    cursor: grabbing;
}

.gallery-line::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    width: max-content;
    gap: var(--gallery-gap, 14px);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.gallery-track-right {
    animation: galleryMoveRight 28s linear infinite;
}

.gallery-track-left {
    animation: galleryMoveLeft 32s linear infinite;
}

.gallery-track-slow {
    animation-duration: 40s;
}

.gallery-line:hover .gallery-track,
.gallery-line:active .gallery-track,
.gallery-line.is-dragging .gallery-track,
.gallery-line:focus-within .gallery-track {
    animation-play-state: paused;
}

body.js-motion .gallery-line:hover .gallery-track,
body.js-motion .gallery-line:active .gallery-track,
body.js-motion .gallery-line.is-dragging .gallery-track,
body.js-motion .gallery-line:focus-within .gallery-track {
    animation-play-state: running;
}

.gallery-marquee-card {
    position: relative;
    flex: 0 0 auto;
    width: var(--gallery-card-width, clamp(128px, 12vw, 190px));
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 0;
    border-radius: var(--gallery-card-radius, 18px);
    background:
        radial-gradient(circle at 50% 35%, rgba(255,255,255,0.9), transparent 36%),
        linear-gradient(145deg, #dff3ff, #ffffff);
    box-shadow: 0 14px 28px rgba(0,119,182,0.11);
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
    transform: translateZ(0);
    contain: layout paint;
    backface-visibility: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

.gallery-marquee-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
    transition: transform 0.35s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.gallery-marquee-card:hover img,
.gallery-marquee-card:focus-visible img {
    transform: scale(1.06);
}

.gallery-marquee-card:hover,
.gallery-marquee-card:focus-visible {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 24px 52px rgba(2,62,138,0.22);
    filter: saturate(1.08);
}

.gallery-marquee-card.missing-gallery-photo::before {
    content: "Foto belum terbaca";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: #0077b6;
    font-weight: 700;
    background: linear-gradient(135deg, #e0f2fe, #ffffff);
    z-index: 1;
}

.moving-gallery.is-empty::before {
    content: "Upload foto dari dashboard untuk menampilkan galeri.";
    display: block;
    max-width: 520px;
    margin: 0 auto;
    padding: 18px 22px;
    border-radius: 18px;
    background: #ffffff;
    color: #0077b6;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(0,119,182,0.08);
}

@keyframes galleryMoveLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes galleryMoveRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

@keyframes noteGlow {
    0%, 100% { box-shadow: 0 12px 28px rgba(0,119,182,0.08); }
    50% { box-shadow: 0 18px 38px rgba(0,119,182,0.16); }
}

.polaroid.missing-photo::before {
    content: "Tambahkan foto di folder";
    display: grid;
    place-items: center;
    width: 100%;
    height: 250px;
    border: 1px dashed #87ceeb;
    border-radius: 2px;
    background: linear-gradient(135deg, #e0f2fe, #ffffff);
    color: #0077b6;
    font-weight: 700;
}

/* Penjepit Kayu */
.pin {
    width: 12px;
    height: 30px;
    background-color: #e6ccb2; /* Warna kayu */
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 3;
}

.pin::before { /* Lubang paku/penjepit */
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #8b5a2b;
    border-radius: 50%;
}

/* --- ANIMASI AYUNAN (SWING) --- */
@keyframes swing {
    0% { transform: rotate(3deg); }
    50% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

@keyframes swing-reverse {
    0% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
    100% { transform: rotate(-3deg); }
}

.swinging {
    animation: swing 4s ease-in-out infinite;
}

.swinging-reverse {
    animation: swing-reverse 5s ease-in-out infinite;
}

/* --- CURHAT SECTION (PESAN UNTUKMU) --- */
.curhat-section {
    padding: 80px 20px;
    text-align: center;
    background-color: #e0f2fe; /* Biru muda yang lebih soft */
    border-top: 2px dashed #bae6fd;
}

.curhat-section h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #0077b6;
}

.curhat-section p {
    color: #475569;
    margin-bottom: 30px;
    font-style: italic;
}

.curhat-box {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Kolom Teks Estetik */
textarea {
    width: 100%;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #bae6fd;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 119, 182, 0.05);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #334e68;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
}

textarea:focus {
    border-color: #0077b6; /* Efek menyala saat diklik */
}

/* Tombol Kirim Pesan */
.curhat-box button {
    padding: 12px 40px;
    background-color: #0077b6;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3);
    transition: all 0.3s ease;
}

.curhat-box button:hover {
    background-color: #023e8a;
    transform: translateY(-3px); /* Efek tombol terangkat */
    box-shadow: 0 8px 20px rgba(0, 119, 182, 0.4);
}

/* --- DETAILED TIMELINE SECTION --- */
.detailed-timeline {
    padding: 80px 20px;
    background:
        linear-gradient(180deg, rgba(240,248,255,0.9), rgba(255,255,255,0.7)),
        radial-gradient(circle at 82% 12%, rgba(255,255,255,0.78), transparent 16rem);
    text-align: center;
}

.detailed-timeline h2 {
    font-size: 2.2rem;
    margin-bottom: 60px;
    color: #0077b6;
}

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

/* Garis vertikal di tengah */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: #87ceeb; /* Biru awan */
    border-radius: 5px;
}

.timeline-block {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Membuat kotak berselang-seling (kiri - kanan) */
.timeline-block:nth-child(even) {
    flex-direction: row-reverse;
}

/* Titik di tengah garis */
.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    width: 22px;
    height: 22px;
    background-color: #ffffff;
    border: 5px solid #0077b6;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 119, 182, 0.4);
}

/* Kotak Cerita */
.timeline-content {
    width: 45%;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    position: relative;
    border-top: 5px solid #0077b6;
}

/* Panah kecil untuk kotak sebelah kiri */
.timeline-block:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -12px;
    border-width: 12px 0 12px 12px;
    border-style: solid;
    border-color: transparent transparent transparent white;
}

/* Panah kecil untuk kotak sebelah kanan */
.timeline-block:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -12px;
    border-width: 12px 12px 12px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: #023e8a;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
}

.timeline-date {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #87ceeb;
    background: #f0f8ff;
    padding: 5px 12px;
    border-radius: 20px;
}

/* LITTLE THINGS */
.little-things {
    padding: 80px 20px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.84), rgba(238,248,255,0.62)),
        radial-gradient(circle at 8% 70%, rgba(186,230,253,0.32), transparent 18rem);
}

.little-things h2 {
    font-size: 2.3rem;
    margin-bottom: 32px;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 950px;
    margin: 0 auto;
}

.memory-card {
    min-height: 150px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #eef8ff);
    border: 1px solid #d7efff;
    box-shadow: 0 12px 30px rgba(0,119,182,0.08);
    text-align: left;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.memory-card:hover {
    transform: translateY(-7px);
    border-color: #87ceeb;
    box-shadow: 0 20px 44px rgba(0,119,182,0.14);
}

.memory-card span {
    display: block;
    color: #0284c7;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.memory-card strong {
    display: block;
    color: #334e68;
    line-height: 1.55;
}

.last-message {
    width: 100%;
    margin-top: 0 !important;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.75);
    color: #023e8a !important;
    font-style: normal !important;
    line-height: 1.5;
}

/* EXTRA SURPRISE SECTIONS */
.wish-jar-section,
.playlist-section,
.love-meter-section,
.memory-map-section,
.quiz-section,
.carousel-section,
.video-section,
.surprise-section {
    padding: 80px 20px;
    text-align: center;
}

.wish-jar-section,
.love-meter-section,
.quiz-section,
.surprise-section {
    background:
        linear-gradient(180deg, rgba(238,248,255,0.84), rgba(255,255,255,0.76)),
        radial-gradient(circle at 78% 22%, rgba(135,206,235,0.18), transparent 18rem);
}

.playlist-section,
.memory-map-section,
.carousel-section,
.video-section {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.82), rgba(240,248,255,0.72)),
        radial-gradient(circle at 18% 20%, rgba(255,255,255,0.8), transparent 16rem);
}

.wish-jar-section h2,
.playlist-section h2,
.love-meter-section h2,
.memory-map-section h2,
.quiz-section h2,
.carousel-section h2,
.video-section h2,
.surprise-section h2 {
    font-size: 2.3rem;
    margin-bottom: 30px;
}

.wish-jar {
    max-width: 620px;
    margin: 0 auto;
}

.jar-button {
    position: relative;
    width: 170px;
    height: 220px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.jar-lid {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 94px;
    height: 24px;
    border-radius: 8px;
    background: #0077b6;
    transform: translateX(-50%);
    box-shadow: 0 8px 18px rgba(0,119,182,0.22);
}

.jar-glass {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 140px;
    height: 178px;
    border: 4px solid rgba(0,119,182,0.28);
    border-radius: 28px 28px 42px 42px;
    background: rgba(255,255,255,0.5);
    transform: translateX(-50%);
    box-shadow: inset 0 0 28px rgba(135,206,235,0.28), 0 18px 34px rgba(0,119,182,0.12);
}

.jar-note {
    position: absolute;
    width: 52px;
    height: 34px;
    border-radius: 8px;
    background: #e0f2fe;
    box-shadow: 0 5px 12px rgba(0,119,182,0.12);
}

.note-one {
    left: 18px;
    top: 76px;
    transform: rotate(-13deg);
}

.note-two {
    right: 18px;
    top: 92px;
    transform: rotate(16deg);
}

.note-three {
    left: 44px;
    bottom: 28px;
    transform: rotate(4deg);
}

.wish-text {
    min-height: 64px;
    max-width: 560px;
    margin: 22px auto 0;
    padding: 18px 22px;
    border-radius: 20px;
    background: #ffffff;
    color: #334e68;
    line-height: 1.7;
    box-shadow: 0 12px 28px rgba(0,119,182,0.08);
    animation: noteGlow 4s ease-in-out infinite;
}

.playlist-list,
.map-board {
    display: grid;
    gap: 18px;
    max-width: 920px;
    margin: 0 auto;
}

.song-card,
.map-pin,
.quiz-card,
.meter-card {
    background: #ffffff;
    border: 1px solid #d7efff;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(0,119,182,0.08);
}

.song-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
    text-align: left;
}

.song-card span,
.map-pin span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0077b6;
    font-weight: 800;
}

.song-card h3,
.map-pin h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-bottom: 6px;
    color: #023e8a;
}

.song-card p,
.map-pin p,
.surprise-section p {
    color: #475569;
    line-height: 1.7;
}

.song-card a {
    color: #ffffff;
    background: #0077b6;
    border-radius: 24px;
    padding: 9px 16px;
    text-decoration: none;
    font-weight: 700;
}

.meter-card,
.quiz-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px;
}

.meter-track {
    width: 100%;
    height: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #d7efff;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.08);
}

.meter-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0077b6, #87ceeb, #ffb3c6);
    transition: width 1s ease;
}

.meter-card p,
.quiz-result {
    min-height: 30px;
    margin-top: 18px;
    color: #023e8a;
    font-weight: 700;
}

.map-board {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.map-pin {
    padding: 24px;
    text-align: left;
    position: relative;
}

.map-pin span {
    margin-bottom: 18px;
}

.quiz-card h3 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    color: #023e8a;
}

.quiz-options {
    display: grid;
    gap: 12px;
}

.quiz-options button {
    padding: 14px 18px;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    background: #eef8ff;
    color: #334e68;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quiz-options button:hover {
    background: #dff3ff;
    transform: translateY(-2px);
}

.photo-carousel {
    display: grid;
    grid-template-columns: auto minmax(0, 680px) auto;
    gap: 18px;
    align-items: center;
    justify-content: center;
    max-width: 880px;
    margin: 0 auto;
}

.carousel-button {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #0077b6;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0,119,182,0.18);
}

.carousel-frame {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #d7efff;
    box-shadow: 0 18px 40px rgba(0,119,182,0.1);
}

.carousel-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #e0f2fe;
}

.carousel-frame.missing-carousel-photo::before {
    content: "Foto carousel belum ada. Tambahkan file sesuai nama di folder.";
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 22px;
    color: #0077b6;
    font-weight: 700;
    background: linear-gradient(135deg, #e0f2fe, #ffffff);
}

.carousel-caption {
    padding: 22px;
    text-align: left;
}

.carousel-caption h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.carousel-caption p {
    color: #475569;
    line-height: 1.7;
}

.video-section {
    overflow: hidden;
}

.video-section > p:not(.section-kicker) {
    max-width: 620px;
    margin: -14px auto 28px;
    color: #475569;
    line-height: 1.7;
}

.video-frame {
    width: min(94vw, 860px);
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(224,247,255,0.9), rgba(255,255,255,0.96));
    border: 1px solid rgba(255,255,255,0.86);
    box-shadow: 0 24px 60px rgba(2,62,138,0.16);
}

.video-frame iframe,
.video-frame video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    background: #000;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #0077b6;
    font-weight: 800;
    background:
        radial-gradient(circle at 28% 28%, rgba(255,255,255,0.95), transparent 22%),
        linear-gradient(145deg, #e0f2fe, #ffffff);
}

.surprise-section {
    position: relative;
}

.surprise-modal {
    padding: 44px;
    text-align: center;
}

.surprise-modal h2 {
    font-size: 2.3rem;
    margin-bottom: 16px;
}

.surprise-modal p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 20px;
}

.surprise-modal strong {
    display: block;
    color: #023e8a;
    font-size: 1.1rem;
    line-height: 1.7;
}

.confetti {
    position: fixed;
    top: -20px;
    width: 10px;
    height: 18px;
    pointer-events: none;
    z-index: 500;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    to {
        opacity: 0;
        transform: translateY(105vh) rotate(720deg);
    }
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalRise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 62, 138, 0.46);
    backdrop-filter: blur(7px);
    z-index: 300;
}

.modal.is-open {
    display: grid;
    place-items: center;
    animation: modalFade 0.24s ease both;
}

.modal-content {
    position: relative;
    width: min(92vw, 720px);
    max-height: 88vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(2,62,138,0.28);
    box-sizing: border-box;
    animation: modalRise 0.32s cubic-bezier(.2,.85,.25,1.1) both;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #023e8a;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    z-index: 2;
}

.photo-modal {
    padding: 18px 18px 26px;
    text-align: center;
    margin-inline: auto;
}

.photo-modal img {
    width: 100%;
    height: auto;
    max-height: 58vh;
    object-fit: contain;
    border-radius: 16px;
    background: #e0f2fe;
}

.photo-modal h3 {
    margin-top: 18px;
    font-size: 1.8rem;
}

.photo-modal p {
    margin-top: 8px;
    color: #475569;
    line-height: 1.7;
}

.photo-modal.missing-photo-large::before {
    content: "Foto belum ada. Simpan file sesuai nama yang dipakai di HTML.";
    display: grid;
    place-items: center;
    min-height: 260px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e0f2fe, #ffffff);
    color: #0077b6;
    font-weight: 700;
    padding: 20px;
}

#lightbox.modal {
    width: 100dvw;
    max-width: 100dvw;
    min-height: 100dvh;
    padding: 0;
    overflow: hidden;
}

#lightbox.modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox .photo-modal {
    width: min(86dvw, 360px);
    max-width: min(86dvw, 360px);
    max-height: min(88dvh, 760px);
    margin: 0 auto;
    overflow: hidden auto;
}

#lightboxImage {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.long-letter {
    padding: 42px;
}

.long-letter h2 {
    margin-bottom: 18px;
    font-size: 2rem;
}

.long-letter p {
    color: #475569;
    line-height: 1.9;
    margin-top: 14px;
}

/* ========================================================
   RESPONSIVE DESIGN (UNTUK SEMUA UKURAN HP & TABLET)
   ======================================================== */
@media screen and (max-width: 768px) {
    
    /* 1. Hero Section (Sambutan) */
    .hero h1 {
        font-size: 2.2rem; /* Font dikecilin biar gak nabrak pinggir layar HP */
        padding: 0 15px;
    }
    .hero p {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    .hero {
        min-height: 100svh;
        gap: 18px;
        justify-content: center;
        padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    }

    main > section::before {
        width: 220px;
        height: 72px;
        opacity: 0.45;
    }

    main > section::after {
        opacity: 0.5;
        transform: scale(0.75);
    }

    main > section:nth-child(odd)::before {
        left: -130px;
    }

    main > section:nth-child(even)::before {
        right: -145px;
    }

    .gate-countdown {
        width: min(100%, 480px);
        padding: 76px 16px 18px;
        border-radius: 20px;
    }

    .countdown-sky {
        height: 96px;
    }

    .flying-love {
        animation-duration: 6.8s;
    }

    .sky-cloud {
        width: 108px;
        height: 34px;
    }

    .envelope {
        width: 235px;
        height: 157px;
    }

    .pocket {
        border-left-width: 117.5px;
        border-right-width: 117.5px;
        border-bottom-width: 78.5px;
        border-top-width: 78.5px;
    }

    .flap {
        border-left-width: 117.5px;
        border-right-width: 117.5px;
        border-top-width: 78.5px;
    }

    .letter {
        width: 202px;
        min-height: 122px;
        max-height: 138px;
        padding: 9px 12px;
        border-radius: 9px;
        overflow: hidden;
    }

    .letter h1 {
        font-size: clamp(0.98rem, 5.8vw, 1.24rem);
        line-height: 1.02;
        margin-bottom: 6px;
        overflow-wrap: anywhere;
    }

    .letter p {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: clamp(0.66rem, 3.1vw, 0.76rem);
        line-height: 1.3;
        padding: 0;
    }

    .envelope-wrapper.is-opened .letter {
        transform: translate(-50%, -92px);
    }

    .click-instruction {
        margin-top: 16px;
        font-size: 0.9rem;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .countdown-card {
        min-height: 88px;
        padding: 16px 10px;
        border-radius: 18px;
    }

    .countdown-card strong {
        font-size: clamp(1.65rem, 10vw, 2.1rem);
    }

    .countdown-card span {
        margin-top: 8px;
        font-size: 0.9rem;
    }

    .gate-countdown h2 {
        font-size: clamp(1.45rem, 8vw, 2.1rem);
        margin-bottom: 16px;
        line-height: 1.08;
    }

    .gate-countdown .section-kicker {
        margin-bottom: 8px;
        font-size: 0.76rem;
    }

    .countdown-message {
        margin-top: 16px;
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .modal {
        padding: 0;
        place-items: center;
        width: 100%;
        height: 100dvh;
        overflow: hidden;
    }

    .modal-content {
        width: min(88vw, 360px);
        max-width: min(88vw, 360px);
        max-height: 88dvh;
        border-radius: 18px;
        overflow-x: hidden;
    }

    .photo-modal {
        padding: 14px 14px 22px;
        margin: auto;
    }

    #lightbox .photo-modal {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: min(82dvw, 340px);
        max-width: min(82dvw, 340px);
        max-height: 86dvh;
        margin: 0 auto;
    }

    .photo-modal img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 58dvh;
        object-fit: contain;
        border-radius: 14px;
        margin: 0 auto;
    }

    .photo-modal h3 {
        margin-top: 16px;
        font-size: clamp(1.25rem, 7vw, 1.65rem);
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .photo-modal p {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 1.45rem;
    }

    #lightbox .modal-close {
        top: 6px;
        right: 6px;
    }

    /* 2. Timeline Polaroid Gantung */
    .polaroid-wrapper {
        gap: 30px; 
        flex-direction: column; /* Bikin polaroidnya berjejer ke bawah, bukan ke samping */
        align-items: center;
    }
    .polaroid {
        width: 85%; /* Menyesuaikan lebar HP */
        max-width: 260px;
    }
    .clothesline {
        top: 20px; /* Nyesuain letak tali di HP */
    }

    /* 3. Detailed Timeline (Jejak Langkah) */
    .timeline-container::before {
        left: 20px; /* Garis vertikal pindah ke kiri */
    }
    .timeline-dot {
        left: 20px; /* Titik pindah ke kiri */
        width: 18px;
        height: 18px;
    }
    .timeline-block {
        margin-bottom: 40px;
    }
    .timeline-block, .timeline-block:nth-child(even) {
        flex-direction: column !important;
        align-items: flex-end; /* Semua kotak didorong ke kanan garis */
    }
    .timeline-content {
        width: calc(100% - 60px); /* Lebar kotak dimaksimalkan untuk HP */
        padding: 20px;
    }
    /* Mindahin semua panah kotak cerita ke sisi kiri */
    .timeline-block:nth-child(odd) .timeline-content::before,
    .timeline-block:nth-child(even) .timeline-content::before {
        left: -12px;
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    /* 4. Curhat Section (Pesan Untukmu) */
    .curhat-section h2 {
        font-size: 1.8rem;
    }
    .curhat-box {
        width: 100%;
        padding: 0 10px;
    }
    textarea {
        padding: 15px;
        font-size: 0.95rem;
    }

    .little-things h2,
    .countdown-section h2,
    .moving-gallery-section h2,
    .wish-jar-section h2,
    .playlist-section h2,
    .love-meter-section h2,
    .memory-map-section h2,
    .quiz-section h2,
    .carousel-section h2,
    .video-section h2,
    .surprise-section h2 {
        font-size: 1.9rem;
    }

    .long-letter {
        padding: 34px 22px;
    }

    .song-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .song-card span {
        margin: 0 auto;
    }

    .photo-carousel {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
    }

    .carousel-button {
        width: 42px;
        height: 42px;
        font-size: 1.7rem;
    }

    .carousel-caption {
        padding: 18px;
    }

    .meter-card,
    .quiz-card,
    .surprise-modal {
        padding: 24px 18px;
    }

    .moving-gallery-section {
        padding: 42px 0;
    }

    .moving-gallery {
        gap: var(--gallery-gap, 10px);
    }

    .gallery-track {
        gap: var(--gallery-gap, 10px);
    }

    .gallery-marquee-card {
        width: var(--gallery-card-width, 128px);
        border-radius: var(--gallery-card-radius, 14px);
    }

    .video-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    .video-frame {
        width: min(96vw, 430px);
        border-radius: 18px;
    }
}

@media screen and (max-width: 380px), screen and (max-height: 760px) {
    .hero {
        gap: 12px;
        padding: 10px 12px;
    }

    .gate-countdown {
        padding: 58px 13px 14px;
        border-radius: 18px;
    }

    .countdown-sky {
        height: 76px;
    }

    .countdown-grid {
        gap: 9px;
    }

    .countdown-card {
        min-height: 74px;
        padding: 12px 8px;
        border-radius: 16px;
    }

    .countdown-card strong {
        font-size: clamp(1.45rem, 9vw, 1.85rem);
    }

    .countdown-card span,
    .countdown-message,
    .click-instruction {
        font-size: 0.8rem;
    }

    .gate-countdown h2 {
        font-size: clamp(1.22rem, 7vw, 1.72rem);
        margin-bottom: 12px;
    }

    .countdown-message {
        margin-top: 12px;
    }

    .envelope {
        width: 205px;
        height: 137px;
    }

    .pocket {
        border-left-width: 102.5px;
        border-right-width: 102.5px;
        border-bottom-width: 68.5px;
        border-top-width: 68.5px;
    }

    .flap {
        border-left-width: 102.5px;
        border-right-width: 102.5px;
        border-top-width: 68.5px;
    }

    .letter {
        width: 176px;
        min-height: 106px;
        max-height: 118px;
        padding: 8px 10px;
    }

    .letter h1 {
        font-size: clamp(0.9rem, 5.4vw, 1.08rem);
        margin-bottom: 5px;
    }

    .letter p {
        font-size: clamp(0.58rem, 2.9vw, 0.68rem);
        line-height: 1.24;
    }
}

/* SKY BACKGROUND */
.sky-bg{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:-1;
    overflow:hidden;
}

#skyCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.cloud{
    position:absolute;
    width:180px;
    height:60px;
    background:rgba(255,255,255,0.7);
    border-radius:50px;
    filter: blur(2px);
}

.cloud::before,
.cloud::after{
    content:'';
    position:absolute;
    background:inherit;
    border-radius:50%;
}

.cloud::before{
    width:70px;
    height:70px;
    top:-30px;
    left:20px;
}

.cloud::after{
    width:90px;
    height:90px;
    top:-40px;
    right:20px;
}

.c1{
    top:10%;
    left:-200px;
    animation:moveCloud 35s linear infinite;
}

.c2{
    top:30%;
    left:-250px;
    animation:moveCloud 45s linear infinite;
}

.c3{
    top:60%;
    left:-220px;
    animation:moveCloud 55s linear infinite;
}

@keyframes moveCloud{
    from{transform:translateX(0);}
    to{transform:translateX(140vw);}
}

/* HEARTS */
.heart{
    position:fixed;
    color:#4da6ff;
    font-size:20px;
    animation:floatUp 3s linear forwards;
    pointer-events:none;
}

@keyframes floatUp{
    from{
        opacity:1;
        transform:translateY(0) scale(1);
    }
    45%{
        opacity:0.9;
        transform:translateY(-95px) translateX(16px) scale(1.35);
    }
    to{
        opacity:0;
        transform:translateY(-220px) translateX(-10px) scale(1.9) rotate(12deg);
    }
}

/* LOVE REASONS */
.love-reasons{
    padding:80px 20px;
    text-align:center;
    background:
        linear-gradient(180deg, rgba(238,248,255,0.92), rgba(255,255,255,0.66)),
        radial-gradient(circle at 28% 34%, rgba(255,255,255,0.9), transparent 13rem),
        radial-gradient(circle at 75% 44%, rgba(186,230,253,0.32), transparent 18rem);
    backdrop-filter: blur(10px);
}

.love-reasons::before {
    top: 48px !important;
}

.love-reasons::after {
    content: "♡";
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow:
        120px 70px 0 rgba(0,119,182,0.14),
        -80px 120px 0 rgba(135,206,235,0.26),
        240px 135px 0 rgba(255,179,198,0.22);
    color: rgba(0,119,182,0.16);
    font-size: 3rem;
    right: 20%;
    top: 30%;
    animation: skyDust 6s ease-in-out infinite alternate;
}

.reason-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    max-width:900px;
    margin:auto;
    margin-top:40px;
}

.reason-card{
    background:white;
    padding:25px;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,119,182,0.1);
    position: relative;
    overflow: hidden;
    transition:.3s;
}

.sky-reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
    filter: blur(5px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(.2,.85,.25,1), filter 0.75s ease;
}

.sky-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.reason-card::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(120deg, transparent, rgba(135,206,235,0.18), transparent);
    transform:translateX(-110%);
    transition:transform .7s ease;
}

.reason-card:hover{
    transform:translateY(-10px) scale(1.03);
}

.reason-card:hover::before{
    transform:translateX(110%);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
