/* =========================================
   ETHEREAL COTTAGECORE DESIGN SYSTEM
========================================= */

:root {
    --bg-paper: #cbd4a3;
    --card-paper: #FBF9E7;
    --primary-sage: #536345;
    --primary-dark: #3c4b2f;
    --secondary-rose: #84514a;
    --text-main: #2c2822;
    --text-sub: #536345;
    --border-paper: rgba(83, 99, 69, 0.28);

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Be Vietnam Pro', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    color: var(--text-main);
    font-family: var(--font-body);
    background-color: transparent !important;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    background-image: url('assets/bg-desktop.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(253, 251, 247, 0.35) 40%, rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
    z-index: -5;
}

.global-paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    opacity: 0.25;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 1. DEKLARASI FONT DARI FILE OTF */
@font-face {
    font-family: 'Melt-Swashes';
    src: url('fonts/Melt-Swashes.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Fifties Movies';
    src: url('fonts/Fifties Movies.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Milky Cream';
    src: url('fonts/Milky Cream.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
/* =========================================
   PETALS
========================================= */

.petals-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 901;
    overflow: hidden;
}

.petal {
    position: fixed;
    width: 16px;
    height: 22px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #f1f5f9);
    border-radius: 50% 10% 50% 50%;
    opacity: 0.85;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.p1  { top: -10%; left: 8%;   scale: 0.9; }
.p2  { top: -10%; left: 18%;  scale: 1.2; }
.p3  { top: -10%; left: 28%;  scale: 0.8; }
.p4  { top: -10%; left: 38%;  scale: 1.1; }
.p5  { top: -10%; left: 48%;  scale: 1.0; }
.p6  { top: -10%; left: 58%;  scale: 0.85; }
.p7  { top: -10%; left: 68%;  scale: 1.3; }
.p8  { top: -10%; left: 78%;  scale: 0.95; }
.p9  { top: -10%; left: 88%;  scale: 1.15; }
.p10 { top: -10%; left: 95%;  scale: 0.75; }

/* =========================================
   SECTIONS
========================================= */

.opening, 
.main-letter-section, 
.journey-section,
.wishes-section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    z-index: 2;
    background: transparent !important;
}

/* =========================================
   SECTION 1: OPENING
========================================= */

.opening {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.love-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: max-content;
    font-size: clamp(28px, 5vw, 60px);
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary-sage);
    pointer-events: none;
}

.split-love {
    position: absolute;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(45px, 10vw, 110px);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-sage);
    pointer-events: none;
    opacity: 0;
}

#transitionEnvelope {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.65);
    z-index: 95;
    width: 480px;
    height: auto;
    opacity: 0;
    pointer-events: none;
}

.intro {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -20px);
    z-index: 10;
    text-align: center;
    color: var(--primary-sage);
    opacity: 0;
}

.intro h1 {
    margin: 5px 0 0;
    font-size: 2.5rem;
    font-family: 'Fifties Movies';
}

.intro p {
    margin: 0;
    font-family: 'Milky Cream';
    font-style: italic;
    font-size: 1rem;
    color: var(--text-sub);
}

.bouquet {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

.flower {
    position: absolute;
    transform-origin: center center;
}

.flower img {
    width: 100%;
    height: auto;
}

.envelope-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

.envelope-wrap.active {
    pointer-events: auto;
}

.envelope {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.envelope:focus,
.envelope:active {
    outline: none !important;
    box-shadow: none !important;
}

.envelope-img {
    width: 480px;
    height: auto;
    display: block;
}

.envelope-img.opened {
    display: none;
}

.hint {
    margin-top: 15px;
    color: var(--primary-sage);
    font-family: 'Milky Cream';
    font-style: italic;
    font-size: 0.9rem;
}

.got-it-card.slide-mode {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(60px, -50%) scale(0.9);
    width: 90%;
    max-width: 380px;
    padding: 35px 25px;
    background-color: var(--card-paper);
    border-radius: 1rem;
    border: 1px solid var(--border-paper);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), inset 0 0 25px rgba(83, 99, 69, 0.08);
    text-align: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

.got-it-card h2 {
    margin: 0 0 12px;
    font-size: 2rem;
    font-family: 'Melt-Swashes';
    color: var(--primary-sage);
    font-style: italic;
}

.got-it-card p {
    margin: 0 0 28px;
    font-size: 1rem;
    color: var(--text-sub);
    line-height: 1.6;
}

.btn-continue {
    background-color: var(--primary-sage);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(83, 99, 69, 0.2);
    transition: all 0.25s ease;
    outline: none;
}

.btn-continue:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(83, 99, 69, 0.3);
}

/* =========================================
   SECTION 2: MAIN LETTER
========================================= */

.main-letter-section {
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 950px;
    width: 100%;
    z-index: 10;
}

.gift-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin-right: -40px;
}

.gift-png-img {
    width: 100%;
    max-width: 340px;
    height: auto;
    display: block;
    border-radius: 8px;
    transform: rotate(-6deg) translateY(-5px);
    filter: drop-shadow(8px 15px 25px rgba(50, 60, 40, 0.28));
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Animasi Goyang Naik-Turun + Miring */
@keyframes floatAndTilt {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-5deg); /* Naik & Miring Sedikit ke Kiri */
    }
    50% {
        transform: translateY(-14px) rotate(0deg); /* Puncak Naik & Tegak */
    }
    75% {
        transform: translateY(-8px) rotate(5deg);  /* Turun Sedikit & Miring ke Kanan */
    }
    100% {
        transform: translateY(0px) rotate(0deg);   /* Kembali Posisi Awal */
    }
}

/* Penerapan ke Elemen Kado */
.gift-png-img {
    animation: floatAndTilt 2.8s ease-in-out infinite;
    display: block;
    transform-origin: center center; /* Sumbu putar miring tepat di tengah */
}

.gift-png-img:hover {
    transform: rotate(-2deg) scale(1.03);
    filter: drop-shadow(12px 20px 30px rgba(50, 60, 40, 0.35));
}

.letter-paper {
    flex: 1.2;
    background-color: var(--card-paper);
    padding: 35px 30px 35px 45px;
    border-radius: 12px;
    border: 1px solid var(--border-paper);
    box-shadow: 0 15px 35px rgba(80, 75, 60, 0.1), inset 0 0 25px rgba(83, 99, 69, 0.08);
    position: relative;
    z-index: 1;
}

.letter-salutation {
    font-family: 'Melt-Swashes';
    font-size: 1.8rem;
    font-style: italic;
    color: var(--primary-sage);
    display: block;
    margin-bottom: 14px;
}

.letter-body p {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 12px;
}

.letter-closing {
    font-family: var(--font-heading);
    font-style: italic; 
    font-weight: bold;
    color: var(--primary-sage);
    margin-top: 20px;
    font-size: 2rem;
}

.btn-flashback {
    margin-top: 20px;
    background-color: var(--primary-sage);
    color: #ffffff;
    border: none;
    padding: 12px 26px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(83, 99, 69, 0.25);
    transition: all 0.25s ease;
    outline: none;
}

.btn-flashback:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(83, 99, 69, 0.35);
}

/* =========================================
   SECTION 3: OUR LITTLE JOURNEY MAP
========================================= */

.journey-section {
    padding: 60px 20px 40px; /* Ditambah padding atasnya biar turun */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Diubah ke center supaya seimbang di tengah layar */
    min-height: 100vh;
}

.journey-header {
    text-align: center;
    color: var(--primary-sage);
    margin-bottom: 30px; /* Jarak dari judul ke canvas diperbesar */
    z-index: 10;
}

.journey-header h2 {
    font-size: 2.5rem;
    font-family: 'Melt-Swashes';
    font-style: italic;
    margin: 0;
}

.journey-header p {
    margin: 3px 0 0;
    font-family: 'Milky Cream';
    font-style: italic;
    color: var(--text-sub);
    font-size: 1.5rem;
}

.map-full-canvas {
    position: relative;
    width: 100%;
    max-width: 950px;
    height: 480px; /* Tinggi canvas dinaikkan dari 440px agar posisi foto & path bernapas */
    z-index: 10;
    margin: 10px 0 20px; /* Memberi margin atas-bawah */
}

.map-compass {
    position: absolute;
    top: 0px;
    left: 20px;
    opacity: 0.8;
}

.map-path-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.map-node {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
}

/* Penyesuaian Posisi Node Foto (Turun Sejajar Path) */
.node-1 { top: 110px; left: 4%; }
.node-2 { top: 35px;  left: 31%; }
.node-3 { top: 120px; left: 56%; }
.node-4 { top: 30px;  left: 79%; }

.polaroid-card {
    background: var(--card-paper);
    padding: 8px 8px 12px 8px;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), inset 0 0 12px rgba(83, 99, 69, 0.08);
    border: 1px solid var(--border-paper);
    width: 100%;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
}

.polaroid-card:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 20;
}

.polaroid-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.polaroid-caption {
    margin-top: 6px;
    color: var(--primary-sage);
}

.polaroid-caption strong { 
    display: block; 
    font-size: 0.82rem; 
    font-family: var(--font-heading); 
    white-space: nowrap;
}

.polaroid-caption span { 
    display: block;
    font-size: 0.68rem; 
    opacity: 0.85; 
    font-style: italic; 
    white-space: nowrap;
}

.tape-dispenser {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 14px;
    background: rgba(245, 235, 215, 0.75);
    border: 1px dashed rgba(160, 140, 110, 0.5);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.tilt-left { transform: rotate(-4deg); }
.tilt-right { transform: rotate(4deg); }

.map-pin {
    margin-top: 6px;
    width: 20px; 
    height: 20px;
    background: var(--primary-sage);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 3;
}

.pin-heart {
    transform: rotate(45deg);
    color: #fff;
    font-size: 8px;
    margin-bottom: 2px;
}

.journey-next-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px; /* Memberi jarak ke tombol bawah */
    padding-bottom: 15px;
    width: 100%;
    z-index: 15;
}

.btn-to-wishes {
    background-color: var(--primary-sage);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(83, 99, 69, 0.25);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-to-wishes:hover {
    background-color: var(--secondary-rose);
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(132, 81, 74, 0.3);
}

.btn-to-wishes:active {
    transform: translateY(-1px);
}

/* =========================================
   SECTION 4: FLOWER CARDS WISHES
========================================= */

.wishes-section {
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.wishes-header {
    text-align: center;
    color: var(--primary-sage);
    margin-bottom: 30px;
    z-index: 10;
}

.wishes-header h2 {
    font-size: 2.5rem;
    font-family: 'Melt-Swashes';
    font-style: italic;
    margin: 0;
}

.wishes-header p {
    margin: 4px 0 0;
   font-family: 'Milky Cream';
    font-style: italic;
    color: var(--text-sub);
    font-size: 1.5rem;
}

/* Container Grid Kartu Bunga */
.wishes-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 950px;
    width: 100%;
    flex-wrap: wrap;
}

/* Styling Kartu Bunga */
.wish-flower-card {
    background: var(--card-paper);
    border-radius: 20px;
    padding: 25px 15px 20px 15px;
    width: 175px;
    height: 245px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), inset 0 0 15px rgba(83, 99, 69, 0.08);
    border: 1px solid var(--border-paper);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.wish-flower-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(83, 99, 69, 0.15);
}

.card-flower-img {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-flower-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-sage);
    text-align: center;
    line-height: 1.2;
}

.wishes-hint {
    margin-top: 25px;
    font-family: 'Milky Cream';
    font-style: italic;
    color: var(--text-sub);
    font-size: 1.1rem;
}

/* =========================================
   MODALS (STORY & WISH)
========================================= */

/* Modal Story */
.story-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.story-card {
    position: relative;
    background: #fbf9f1;
    width: 100%;
    max-width: 580px;
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    border: 1px solid var(--border-paper);
}

.story-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary-sage);
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.story-close:hover {
    color: var(--primary-dark);
    transform: scale(1.15);
}

.story-body {
    display: flex;
    gap: 25px;
    align-items: center;
}

.story-photo-wrapper {
    flex: 0 0 42%;
    background: #ffffff;
    padding: 10px 10px 25px 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transform: rotate(-3deg);
    border-radius: 4px;
}

.story-photo-wrapper img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

.story-content {
    flex: 1;
    color: var(--text-main);
}

.story-content h2 {
    font-size: 1.6rem;
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
    color: var(--primary-sage);
}

.story-date {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin: 0 0 18px 0;
    font-weight: 600;
}

.story-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    white-space: pre-line;
}

/* Modal Wish */
.wish-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.wish-modal-card {
    position: relative;
    background: var(--card-paper);
    width: 100%;
    max-width: 380px;
    padding: 30px 25px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), inset 0 0 20px rgba(83, 99, 69, 0.08);
    border: 1px solid var(--border-paper);
    text-align: center;
}

.wish-close {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    color: var(--primary-sage);
    cursor: pointer;
}

.wish-modal-img {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px auto;
}

.wish-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wish-modal-content h3 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    font-family: var(--font-heading);
    color: var(--primary-sage);
}

.wish-modal-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
}

/* =========================================
   FLOATING MUSIC PLAYER
========================================= */

.music-player-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-paper);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-player-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.music-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary-sage);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.15s ease;
    outline: none;
}

.music-play-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

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

.music-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.music-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.music-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-sage);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-time {
    font-size: 0.65rem;
    color: var(--text-sub);
    font-family: var(--font-body);
    font-weight: 500;
    white-space: nowrap;
}

.music-progress-container {
    width: 100%;
    height: 5px;
    background: rgba(83, 99, 69, 0.18);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.music-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-sage);
    border-radius: 4px;
    transition: width 0.1s linear;
}

/* =========================================
   RESPONSIF LAYAR & BREAKPOINTS
========================================= */

@media (max-width: 984px) {
    .music-player-widget {
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 230px;
        padding: 8px 14px;
    }

    .music-player-widget:hover {
        transform: translate(-50%, -2px);
    }

    .music-play-btn {
        width: 34px;
        height: 34px;
    }
}

/* Khusus Rentang Layar 768px - 799px (Wishes Cards 2x2) */
@media (min-width: 768px) and (max-width: 799px) {
    .wishes-cards-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        max-width: 460px !important;
        margin: 0 auto !important;
        justify-items: center !important;
    }

    .wish-flower-card {
        width: 100% !important;
        max-width: 200px !important;
        height: 220px !important;
    }
}

@media (min-width: 768px) and (max-width: 984px) {
    body::before {
        background-image: url('assets/bg-ipad.webp');
    }

    #transitionEnvelope, .envelope-img { 
        width: 360px; 
    }

    .got-it-card.slide-mode {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(0vw, -50%) scale(0.85);
        width: 85%;
        max-width: 320px;
        padding: 28px 20px;
    }

    .journey-section {
        padding: 80px 20px 40px; /* Makin diturunkan khusus di layar iPad */
        justify-content: center;
    }

    .map-full-canvas {
        height: 420px;
        transform: scale(0.92); /* Sedikit disesuaikan ukurannya agar proporsional */
    }

    .node-1 { top: 95px; }
    .node-2 { top: 25px; }
    .node-3 { top: 105px; }
    .node-4 { top: 20px; }

}

/* Khusus Layar iPad dan Desktop (768px ke atas) */
@media (min-width: 768px) {
    .map-full-canvas {
        margin-bottom: -30px !important; /* Hilangkan jarak kosong di bawah peta */
    }

    .journey-next-container {
        margin-top: -30px !important; /* Narik tombol makin naik mendekati peta */
    }
}

@media (max-width: 767px) {
    body::before {
        background-image: url('assets/bg-mobile.webp');
    }

    .opening {
        flex-direction: column;
        justify-content: center;
    }

    #transitionEnvelope, .envelope-img { 
        width: 280px; 
    }

    .got-it-card.slide-mode {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 88%;
        max-width: 320px;
        padding: 22px 18px;
        margin: 0 auto;
    }

    .got-it-card h2 {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .got-it-card p {
        font-size: 0.88rem;
        margin-bottom: 18px;
    }

    .letter-container {
        flex-direction: column;
        gap: 15px;
    }

    .gift-image-wrapper {
        margin-right: 0;
        margin-bottom: -20px;
    }

    .gift-png-img {
        max-width: 190px;
        transform: rotate(-4deg);
    }

    .letter-paper {
        padding: 25px 20px;
    }

    .journey-section {
        /* Menambah jarak dari atas supaya judul tidak ketutupan header/elemen atas */
        padding-top: 100px !important; 
        position: relative;
        z-index: 2; /* Memastikan judul/bagian ini berada di atas background/elemen penutup */
    }

    /* Jika judul "our little journey" punya class khusus (misal .journey-title) */
    .journey-section h2, 
    .journey-title {
        margin-top: 20px;
        position: relative;
        z-index: 3;
    }

    .journey-header h2 { font-size: 1.8rem; }
    
    .map-full-canvas { 
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .map-path-svg, .map-compass { display: none; }

    .map-node {
        position: relative;
        top: auto !important;
        left: auto !important;
        width: 160px;
    }

    .story-body {
        flex-direction: column;
        text-align: center;
    }

    .story-photo-wrapper {
        width: 75%;
        transform: rotate(0deg);
        margin: 0 auto;
    }

    /* Responsif HP untuk Kartu Bunga */
    .wishes-cards-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .wish-flower-card {
        width: 100%;
        height: 210px;
        padding: 18px 10px;
    }

    .card-flower-img {
        height: 110px;
    }
}

/* =========================================
   PAPER TEXTURE OVERLAY LENGKAP & KONTRAS
========================================= */

.got-it-card.slide-mode,
.letter-paper,
.polaroid-card,
.wish-flower-card,
.wish-modal-card {
    background-color: var(--card-paper) !important;
    background-image: 
        radial-gradient(rgba(83, 99, 69, 0.12) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)' opacity='0.22'/%3E%3C/svg%3E") !important;
    background-size: 12px 12px, auto !important;
}

/* =========================================
   BUTTON FROM WISHES TO CLOSING
========================================= */

.wishes-next-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    z-index: 10;
}

.btn-to-closing {
    background-color: #526343;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(82, 99, 67, 0.25);
    transition: all 0.3s ease;
}

.btn-to-closing:hover {
    background-color: #39482D;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(57, 72, 45, 0.35);
}

/* =========================================
   SECTION 5: CLOSING PAGE
========================================= */

.closing-section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    /* Ganti lokasi file background sesuai milikmu */
    background-image: url('assets/bg-closing-desktop.webp');
}

.closing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
    z-index: 10;
    padding: 20px;
}

/* Teks Utama */
.closing-header h2 {
    font-family: var(--font-heading);
    color: #526343;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.2;
    margin: 0;
    font-weight: 600;
}

.closing-header .subtitle {
    font-family: var(--font-heading);
    color: #526343;
    font-size: 1.5rem;
    font-style: italic;
    font-weight: bold;
    margin: 10px 0 0 0;
    opacity: 0.9;
}

/* Kartu "I love you" */
.closing-card {
    background-color: #F7F6EB;
    border: 1px solid rgba(82, 99, 67, 0.25);
    border-radius: 50px;
    padding: 16px 60px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06), inset 0 0 15px rgba(82, 99, 67, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)' opacity='0.12'/%3E%3C/svg%3E");
}

.closing-card h3 {
    font-family: "var(--font-heading)";
    color: #526343;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 0;
    font-weight: 800;
}

/* Tombol Read It Again */
.btn-read-again {
    background-color: #526343;
    color: #F7F6EB;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    padding: 10px 24px;
    border: 1px solid #39482D;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.btn-read-again:hover {
    background-color: #39482D;
    transform: scale(1.03);
}

/* Responsive Backgrounds */
@media (min-width: 768px) and (max-width: 984px) {
    .closing-section {
        background-image: url('assets/bg-closing-ipad.webp');
    }
}

@media (max-width: 767px) {
    .closing-section {
        background-image: url('assets/bg-closing-mobile.webp');
    }

    .closing-card {
        padding: 12px 40px;
    }
}


/* Aturan khusus layar HP super kecil (<= 360px) */
@media (max-width: 360px) {
    .got-it-card.slide-mode {
        width: 82% !important;
        max-width: 270px !important;
        padding: 16px 12px !important;
    }

    .got-it-card h2 {
        font-size: 1.25rem !important;
        margin-bottom: 4px !important;
    }

    .got-it-card p {
        font-size: 0.8rem !important;
        margin-bottom: 14px !important;
    }

    .btn-continue {
        padding: 10px 20px !important;
        font-size: 0.8rem !important;
    }
}

/* Styling Tombol Minimize */
.music-minimize-btn {
    background: none;
    border: none;
    color: var(--primary-sage);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.music-minimize-btn:hover {
    background-color: rgba(83, 99, 69, 0.15);
}

/* Tampilan Saat Di-minimize (Berlaku di Semua Size) */
.music-player-widget.minimized {
    width: 48px !important;
    height: 48px !important;
    padding: 5px !important;
    border-radius: 50% !important;
    justify-content: center;
    overflow: hidden;

    /* Menempel di Pojok Kiri Bawah untuk semua layar */
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    left: 20px !important;
    bottom: 20px !important;
    transform: none !important;
    
    cursor: pointer;
}

/* Sembunyikan Info Lagu dan Tombol Minimize saat Minimized */
.music-player-widget.minimized .music-info,
.music-player-widget.minimized .music-minimize-btn {
    display: none !important;
}

/* Sesuaikan Ukuran Tombol Play saat Minimized */
.music-player-widget.minimized .music-play-btn {
    width: 38px;
    height: 38px;
}