:root {
    --cream: #fdf8f1;
    --cream-2: #fffaf4;
    --latte: #d4a373;
    --brown: #7f5539;
    --brown-dark: #5c3d26;
    --soft-pink: #ffccd5;
    --pink-2: #fff0f3;
    --white: #ffffff;
    --note-color: #fff7c8;
    --shadow: rgba(127, 85, 57, 0.18);

    --font-main: "Nunito", sans-serif;
    --font-hand: "Caveat", cursive;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-main);
    color: var(--brown);
    background:
        radial-gradient(circle at 15% 12%, rgba(255, 204, 213, 0.65), transparent 24%),
        radial-gradient(circle at 85% 18%, rgba(212, 163, 115, 0.35), transparent 22%),
        radial-gradient(circle at 50% 90%, rgba(255, 204, 213, 0.45), transparent 28%),
        var(--cream);
    background-attachment: fixed;
    padding: 32px 18px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(127, 85, 57, 0.16) 1.2px, transparent 1.2px);
    background-size: 30px 30px;
    opacity: 0.45;
}

.wireframe-container {
    width: min(940px, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-wrapper {
    width: 100%;
    margin-bottom: 44px;
}

.section-wrapper.hidden,
.hidden {
    display: none !important;
}

.card-section {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 44px;
    text-align: center;
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid rgba(212, 163, 115, 0.72);
    border-radius: 30px;
    box-shadow:
        0 22px 60px var(--shadow),
        6px 6px 0 rgba(212, 163, 115, 0.55);
    backdrop-filter: blur(12px);
}

.card-section::before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -70px;
    top: -70px;
    background: rgba(255, 204, 213, 0.55);
    border-radius: 50%;
}

.card-section::after {
    content: "♡";
    position: absolute;
    left: 24px;
    bottom: 18px;
    font-size: 44px;
    color: rgba(212, 163, 115, 0.24);
    font-family: var(--font-hand);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--brown);
    background: var(--pink-2);
    border: 1px solid rgba(255, 204, 213, 0.95);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(36px, 7vw, 66px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.subtitle {
    max-width: 640px;
    margin: 0 auto 26px;
    color: rgba(127, 85, 57, 0.78);
    font-size: 18px;
    line-height: 1.7;
    font-weight: 700;
}

.bear-illustration-box {
    width: min(250px, 78vw);
    min-height: 160px;
    margin: 18px auto 28px;
    display: grid;
    place-items: center;
}

.bear-illustration-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 16px 22px rgba(127, 85, 57, 0.18));
}

.btn-group {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn {
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    border: 0;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.solid-brown {
    color: var(--white);
    background: linear-gradient(135deg, var(--brown), var(--brown-dark));
    box-shadow: 0 12px 28px rgba(127, 85, 57, 0.24);
}

.solid-brown:hover {
    box-shadow: 0 16px 34px rgba(127, 85, 57, 0.28);
}

.outline-brown {
    color: var(--brown);
    background: rgba(255, 255, 255, 0.82);
    border: 2px solid var(--latte);
}

.long-btn {
    margin-top: 24px;
    padding-inline: 34px;
}

.no-btn {
    position: relative;
    z-index: 3;
}

/* Gallery */
.gallery-layout {
    display: grid;
    grid-template-columns: 1fr 1.05fr 1fr;
    gap: 22px;
    align-items: center;
    margin-top: 32px;
}

.side-polaroids {
    display: grid;
    gap: 22px;
}

.polaroid {
    padding: 12px 12px 28px;
    background: var(--white);
    border: 1px solid rgba(127, 85, 57, 0.1);
    border-radius: 8px;
    box-shadow: 0 16px 28px rgba(127, 85, 57, 0.13);
    transform: rotate(-2deg);
}

.polaroid.rotate-right {
    transform: rotate(2.5deg);
}

.photo-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    background: #f2e8de;
}

.photo-frame img,
.strip-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-frame img[src=""],
.strip-item img[src=""] {
    display: none;
}

.caption {
    margin-top: 12px;
    font-family: var(--font-hand);
    color: var(--brown);
    font-size: 24px;
    line-height: 1.1;
}

.filmstrip {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 18px 12px;
    background: #261b16;
    border-radius: 16px;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08);
}

.filmstrip::before,
.filmstrip::after {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    width: 8px;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.28) 0 8px,
        transparent 8px 16px
    );
}

.filmstrip::before {
    left: 6px;
}

.filmstrip::after {
    right: 6px;
}

.strip-item {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #44332b;
    border: 2px solid rgba(255,255,255,0.12);
}

/* Notes */
.cloud-title-container {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.cloud-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    color: var(--white);
    background: var(--brown);
    font-size: 17px;
    font-weight: 900;
}

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

.note-item {
    position: relative;
    min-height: 120px;
    padding: 28px 22px 22px;
    text-align: left;
    color: #6f4b32;
    background: var(--note-color);
    border-radius: 18px;
    border-left: 5px solid var(--latte);
    box-shadow: 0 12px 24px rgba(127, 85, 57, 0.1);
    font-family: var(--font-hand);
    font-size: 28px;
    line-height: 1.15;
}

.note-item::before {
    content: "";
    position: absolute;
    width: 54px;
    height: 18px;
    left: 50%;
    top: -9px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 204, 213, 0.78);
    border-radius: 4px;
}

/* Letter & Music */
.split-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: stretch;
    margin-top: 26px;
}

.notepad {
    position: relative;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(127, 85, 57, 0.12);
    border-radius: 20px;
    box-shadow: 0 18px 38px rgba(127, 85, 57, 0.12);
    overflow: hidden;
}

.notepad-tape {
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 2;
    width: 112px;
    height: 30px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 204, 213, 0.65);
    border-radius: 7px;
}

.notepad-content {
    flex: 1;
    padding: 64px 32px 24px;
    text-align: left;
    color: #5f3e29;
    font-family: var(--font-hand);
    font-size: 29px;
    line-height: 1.34;
    white-space: pre-line;
    background-image: linear-gradient(transparent 96%, rgba(212, 163, 115, 0.18) 4%);
    background-size: 100% 38px;
}

.notepad-footer {
    padding: 0 32px 30px;
    text-align: left;
    color: var(--brown);
    font-family: var(--font-hand);
    font-size: 30px;
}

.player-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fffdfa;
    border: 2px solid var(--soft-pink);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(127, 85, 57, 0.1);
}

.player-card h3 {
    margin-bottom: 18px;
    color: var(--brown);
    font-size: 24px;
    font-weight: 900;
}

.player-disk {
    width: 94px;
    height: 94px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--pink-2), #fff);
    border: 1px solid rgba(255, 204, 213, 0.85);
    box-shadow: inset 0 0 0 8px rgba(255, 204, 213, 0.2);
    font-size: 38px;
    animation: floatDisk 2.8s ease-in-out infinite;
}

@keyframes floatDisk {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-6px) rotate(2deg);
    }
}

.player-card h4 {
    margin-bottom: 6px;
    color: #5f3e29;
    font-size: 18px;
    font-weight: 900;
}

.player-card p {
    margin-bottom: 18px;
    color: rgba(127, 85, 57, 0.58);
    font-size: 14px;
    font-weight: 800;
}

.progress-bar {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0e4da;
}

.progress {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: var(--latte);
    transition: width 0.15s linear;
}

.time-stamp {
    width: 100%;
    margin-top: 7px;
    display: flex;
    justify-content: space-between;
    color: rgba(127, 85, 57, 0.62);
    font-size: 12px;
    font-weight: 900;
}

.player-controls {
    margin: 20px 0;
    display: flex;
    gap: 18px;
    align-items: center;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    color: var(--brown);
    background: #fff2f5;
    cursor: pointer;
    font-size: 17px;
    transition: 0.2s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
}

.play-trigger {
    width: 56px;
    height: 56px;
    color: var(--white);
    background: var(--brown);
    font-size: 20px;
}

.player-badge {
    margin-top: auto;
    padding: 8px 14px;
    color: var(--brown);
    background: #fff0f2;
    border: 1px solid var(--soft-pink);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(127, 85, 57, 0.38);
    backdrop-filter: blur(5px);
}

.modal-card {
    width: min(420px, 100%);
    padding: 34px 26px;
    text-align: center;
    background: var(--white);
    border: 3px solid var(--latte);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    animation: popBounce 0.36s ease;
}

.modal-heart {
    margin-bottom: 12px;
    font-size: 46px;
    animation: heartbeat 1.15s infinite;
}

#modal-message {
    margin-bottom: 24px;
    color: var(--brown);
    font-size: 18px;
    line-height: 1.55;
    font-weight: 900;
}

@keyframes popBounce {
    from {
        opacity: 0;
        transform: scale(0.72);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25%, 65% {
        transform: scale(1.15);
    }
    45% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 820px) {
    body {
        padding: 20px 12px;
    }

    .section-wrapper {
        margin-bottom: 28px;
    }

    .card-section {
        padding: 32px 18px;
        border-radius: 26px;
        box-shadow:
            0 16px 44px var(--shadow),
            4px 4px 0 rgba(212, 163, 115, 0.45);
    }

    .subtitle {
        font-size: 16px;
    }

    .gallery-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .side-polaroids {
        grid-template-columns: repeat(2, 1fr);
    }

    .filmstrip {
        width: min(380px, 100%);
        margin: 0 auto;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .notepad-content {
        font-size: 25px;
    }
}

@media (max-width: 520px) {
    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .side-polaroids {
        grid-template-columns: 1fr;
    }

    .photo-frame {
        aspect-ratio: 4 / 5;
    }

    .bear-illustration-box {
        width: min(220px, 76vw);
    }

    .caption {
        font-size: 22px;
    }

    .note-item {
        font-size: 25px;
    }

    .notepad-content {
        padding-inline: 24px;
        font-size: 24px;
    }

    .notepad-footer {
        padding-inline: 24px;
    }
}