:root {
    --paper: #fff6ea;
    --paper-2: #fffaf4;
    --ink: #2e2a27;
    --muted: #8d8178;
    --rose: #ff6b9d;
    --deep-rose: #e43f6f;
    --mint: #cde7da;
    --gold: #f4c430;
    --shadow: rgba(0, 0, 0, 0.1);
    --tape: #f8d7a4;
    --tape-2: #f6c1d1;
}

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

body {
    font-family: 'Playfair Display', serif;
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
}

.paper-texture {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.5), transparent 35%),
        repeating-linear-gradient(0deg, rgba(0,0,0,0.02), rgba(0,0,0,0.02) 1px, transparent 1px, transparent 4px);
    pointer-events: none;
    z-index: 0;
}

.scrapbook {
    position: relative;
    z-index: 1;
}

.progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px 14px;
    border-radius: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--ink);
    z-index: 10;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.progress.visible {
    opacity: 1;
    transform: translateY(0);
}

.yes-banner-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 11;
}

.yes-banner {
    position: absolute;
    background: var(--rose);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(255, 107, 157, 0.35);
    opacity: 0;
    letter-spacing: 1px;
    transform: translateY(-10px);
    animation: bannerPop 0.6s ease forwards, bannerBlink 1.2s ease-in-out 0.6s infinite;
}

@keyframes bannerPop {
    0% { transform: translateX(-50%) translateY(-6px) scale(0.96); }
    60% { transform: translateX(-50%) translateY(0) scale(1.04); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes bannerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.panel {
    min-height: 100vh;
    padding: 80px 20px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    scroll-margin-top: 24px;
}

.panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.intro {
    justify-content: center;
    scroll-margin-top: 0;
}

.intro-card {
    position: relative;
    background: var(--paper-2);
    border-radius: 28px;
    padding: 60px 50px;
    box-shadow: 0 30px 80px var(--shadow);
    text-align: center;
    max-width: 720px;
    width: 100%;
}

.intro-title {
    font-size: clamp(2.6rem, 7vw, 5rem);
    color: var(--deep-rose);
    margin-bottom: 20px;
}

.intro-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--muted);
    margin-bottom: 30px;
}

.tape {
    position: absolute;
    width: 110px;
    height: 30px;
    background: var(--tape);
    opacity: 0.8;
    top: -10px;
    border-radius: 6px;
    box-shadow: 0 8px 20px var(--shadow);
}

.tape-left {
    left: 30px;
    transform: rotate(-6deg);
}

.tape-right {
    right: 30px;
    background: var(--tape-2);
    transform: rotate(5deg);
}

.panel-header {
    text-align: center;
    max-width: 720px;
}

.date-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.panel-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--deep-rose);
    margin-bottom: 10px;
}

.panel-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--muted);
}

.collage {
    position: relative;
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.polaroid {
    background: white;
    padding: 14px 14px 20px;
    border-radius: 12px;
    box-shadow: 0 20px 40px var(--shadow);
    transform: rotate(-2deg);
}

.polaroid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
}

.polaroid.wide img {
    height: 300px;
}

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

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

.caption {
    margin-top: 10px;
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: var(--muted);
}

.note-card {
    background: #fffef6;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 16px 32px var(--shadow);
    border: 1px dashed rgba(0,0,0,0.08);
}

.note-card h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    color: var(--deep-rose);
    margin-bottom: 10px;
}

.note-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink);
}

.photo-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.photo-strip img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 18px 30px var(--shadow);
}

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

.grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 14px 24px var(--shadow);
}

.sticker {
    position: absolute;
    width: 110px;
    height: auto;
    z-index: 3;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.12));
    opacity: 0.6;
}

.sticker-sparkle {
    top: -20px;
    right: 10px;
    transform: rotate(6deg);
}

.sticker-heart {
    bottom: -10px;
    left: 10px;
    transform: rotate(-8deg);
}

.sticker-bear {
    right: -10px;
    bottom: -10px;
    transform: rotate(5deg);
}

.sticker-star {
    left: 8px;
    top: 8px;
    transform: rotate(-6deg);
}

.sticker-washi {
    right: 8px;
    top: 8px;
}

.sticker-butterfly {
    left: 30px;
    bottom: -10px;
}

.sticker-flower {
    left: -20px;
    top: 40px;
}

.sticker-doodle {
    right: 30px;
    bottom: -20px;
}

.audio-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 10px 20px var(--shadow);
}

.audio-hint {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted);
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 14px 28px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: 'Playfair Display', serif;
}

.btn.primary {
    background: var(--rose);
    color: white;
    box-shadow: 0 12px 24px rgba(255, 107, 157, 0.35);
}

.btn.primary:hover {
    background: var(--deep-rose);
    transform: translateY(-2px);
}

.btn.ghost {
    background: white;
    color: var(--deep-rose);
    border: 2px solid var(--deep-rose);
}

.btn.outline {
    background: transparent;
    border: 2px dashed var(--muted);
    color: var(--ink);
}

.btn.next {
    background: var(--mint);
    color: var(--ink);
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.question {
    background: linear-gradient(135deg, #ffe6ef 0%, #fff6ea 100%);
}

.question-card {
    background: white;
    padding: 50px;
    border-radius: 28px;
    box-shadow: 0 30px 60px var(--shadow);
    text-align: center;
    position: relative;
}

.sneaky-message {
    display: none;
    margin-top: 18px;
    font-family: 'Space Mono', monospace;
    color: var(--deep-rose);
}

.sneaky-message.visible {
    display: block;
}

.final-message {
    display: none;
    margin-top: 22px;
}

.final-message.visible {
    display: block;
}

.celebration {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9;
}

.celebration.active {
    display: block;
}

.yes-video {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 8;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
}

.yes-video.visible {
    display: flex;
}

.yes-video video {
    width: min(80vw, 720px);
    height: auto;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.yes-after {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    background: white;
    color: var(--deep-rose);
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
    opacity: 0;
    z-index: 12;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.yes-after.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.petal {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--rose);
    border-radius: 50% 0 50% 0;
    opacity: 0.85;
    animation: fall linear infinite;
    top: -10vh;
}

@keyframes fall {
    from {
        transform: translateY(-20vh) rotate(0deg);
        opacity: 0.9;
    }
    to {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .collage {
        grid-template-columns: 1fr;
    }

    .photo-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-strip img:last-child {
        grid-column: 1 / -1;
    }

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

    .question-card {
        padding: 40px 24px;
    }
}

@media (max-width: 600px) {
    .intro-card {
        padding: 50px 30px;
    }

    .panel {
        padding-top: 70px;
    }

    .polaroid img {
        height: 220px;
    }
}
