/* ═══════════════════════════════════════════════════════════════
   AARYA'S BIRTHDAY WEBSITE — Romantic & Elegant Theme
   Color Palette: Deep dark + Gold + Rose
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS CUSTOM PROPERTIES ── */
:root {
    --bg-primary: #08070e;
    --bg-secondary: #0f0e17;
    --bg-card: #141322;
    --bg-card-hover: #1c1a30;

    --gold: #d4a843;
    --gold-light: #f5d77a;
    --gold-dark: #a17c2e;
    --rose: #c9707d;
    --rose-light: #e8a0ab;
    --rose-dark: #8e3a47;
    --pink: #ff6b9d;
    --blush: #ffc2d4;

    --text-primary: #f2ece4;
    --text-secondary: #b8b0a4;
    --text-muted: #7a7268;

    --font-script: 'Cormorant Garamond', Georgia, serif;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    --font-ui: 'Inter', -apple-system, sans-serif;

    --glow-gold: 0 0 20px rgba(255, 236, 179, 0.3), 0 0 60px rgba(255, 236, 179, 0.1);
    --glow-rose: 0 0 20px rgba(201, 112, 125, 0.3), 0 0 60px rgba(201, 112, 125, 0.1);
}

/* ── RESET & BASE ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    color-scheme: dark;
}

html.is-album-scrolling {
    scroll-behavior: auto;
}

html.is-wish-paused,
html.is-birthday-intro-paused {
    overflow: hidden;
    overscroll-behavior: none;
    scroll-behavior: auto;
}

html.is-wish-paused body,
html.is-birthday-intro-paused body {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    touch-action: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    cursor: none; /* Hide default cursor for custom cursor */
}

a, button, .cursor-pointer, .reason-card, .photo-frame {
    cursor: none !important; /* Hide default on interactive elements */
}

/* ── PREMIUM CUSTOM CURSOR ── */
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--gold-light);
    box-shadow: 0 0 10px var(--gold-light);
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 236, 179, 0.4);
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-ring.hovering {
    width: 50px;
    height: 50px;
    background: rgba(255, 236, 179, 0.05);
    border-color: var(--gold-light);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ── GLASSMORPHISM 2.0 (NOISE) ── */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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');
    opacity: 0.04;
    pointer-events: none;
    z-index: 99998;
}

::selection {
    background: var(--rose);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   ENTRANCE SCREEN — V3 Premium Romantic
   ═══════════════════════════════════════════════════════════════ */
#entrance-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: radial-gradient(ellipse at 50% 50%, #1e0a14 0%, #120812 30%, #0a060e 70%, #060408 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    transform: translateZ(0) scale(1);
    transition:
        opacity 850ms cubic-bezier(0.55, 0, 1, 0.45) 150ms,
        transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    perspective: 1000px;
    contain: paint;
    will-change: opacity, transform;
}

#entrance-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 19;
    width: 1px;
    height: min(72vh, 46rem);
    background: linear-gradient(180deg, transparent, rgba(255, 233, 169, 0.82), transparent);
    box-shadow: 0 0 5rem rgba(179, 74, 102, 0.22);
    opacity: 0;
    transform: translate(-50%, -50%) scaleY(0.18);
    transition: opacity 520ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.entrance-transition-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 20;
    display: grid;
    place-items: center;
    width: min(34rem, 82vw);
    opacity: 0;
    transform: translate(-50%, calc(-50% + 0.75rem));
    pointer-events: none;
}

.transition-mark-rule {
    grid-area: 1 / 1;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(234, 210, 139, 0.92), transparent);
    opacity: 0;
    transform: scaleX(0);
}

.transition-mark-copy {
    grid-area: 1 / 1;
    padding: 0.45rem 1.15rem;
    background: #10070d;
    color: rgba(247, 240, 229, 0.82);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    line-height: 1;
    text-transform: uppercase;
}

#entrance-screen.exit {
    opacity: 0;
    transform: translateZ(0) scale(1.035);
    pointer-events: none;
}

#entrance-screen.exit::before {
    opacity: 0.86;
    transform: translate(-50%, -50%) scaleY(1);
}

#entrance-screen.exit .entrance-transition-mark {
    animation: transitionMarkReveal 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#entrance-screen.exit .transition-mark-rule {
    animation: transitionRuleReveal 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes transitionMarkReveal {
    0% { opacity: 0; transform: translate(-50%, calc(-50% + 0.75rem)); }
    34%, 72% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, calc(-50% - 0.5rem)); }
}

@keyframes transitionRuleReveal {
    0% { opacity: 0; transform: scaleX(0); }
    34%, 70% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1.08); }
}

#entrance-screen.is-transitioning .entrance-content {
    opacity: 0;
    transform: translate3d(0, -0.75rem, 0) scale(0.985);
}

#entrance-screen.is-transitioning .star,
#entrance-screen.is-transitioning .aurora-layer,
#entrance-screen.is-transitioning .bokeh-orb,
#entrance-screen.is-transitioning .falling-petal,
#entrance-screen.is-transitioning .dust-particle,
#entrance-screen.is-transitioning .glow-ring,
#entrance-screen.is-transitioning .entrance-name {
    animation-play-state: paused !important;
}

#entrance-screen.hidden {
    display: none;
}

/* ── Stars ── */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: white;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: var(--max-opacity, 0.8); transform: scale(1); }
}

/* ── Aurora / Warm Ambient Light ── */
.aurora-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 70% 60% at 30% 70%, rgba(120, 20, 40, 0.20) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 75% 25%, rgba(180, 130, 50, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 60% 85%, rgba(140, 30, 50, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 40% 50% at 15% 20%, rgba(180, 80, 100, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 90% 90% at 50% 50%, rgba(100, 20, 35, 0.06) 0%, transparent 70%);
    animation: auroraShift 15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes auroraShift {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.8; transform: scale(1); }
}

/* ── Bokeh (Soft Glowing Orbs) ── */
.bokeh-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bokeh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(var(--blur, 8px));
    opacity: 0;
    animation: bokehFloat var(--duration, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes bokehFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
    20% { opacity: var(--max-opacity, 0.4); }
    50% { transform: translateY(var(--drift-y, -30px)) translateX(var(--drift-x, 10px)) scale(1); opacity: var(--max-opacity, 0.4); }
    80% { opacity: var(--max-opacity, 0.4); }
}

/* ── Falling Rose Petals ── */
#petals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

.falling-petal {
    position: absolute;
    top: -50px;
    opacity: 0;
    transform-origin: center center;
    pointer-events: none;
    will-change: transform, opacity; /* Force GPU rendering layer */
}

@keyframes petalFall1 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.6);
        opacity: 0;
    }
    15% { opacity: var(--max-opacity, 0.8); }
    50% { transform: translate3d(40px, 50vh, 0) rotateX(180deg) rotateY(90deg) rotateZ(180deg) scale(0.95); }
    100% {
        transform: translate3d(-20px, 105vh, 0) rotateX(360deg) rotateY(180deg) rotateZ(360deg) scale(0.7);
        opacity: 0;
    }
}

@keyframes petalFall2 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.8);
        opacity: 0;
    }
    15% { opacity: var(--max-opacity, 0.8); }
    50% { transform: translate3d(-50px, 50vh, 0) rotateX(-120deg) rotateY(-180deg) rotateZ(-120deg) scale(0.75); }
    100% {
        transform: translate3d(30px, 105vh, 0) rotateX(-240deg) rotateY(-360deg) rotateZ(-240deg) scale(0.9);
        opacity: 0;
    }
}

@keyframes petalFall3 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.7);
        opacity: 0;
    }
    15% { opacity: var(--max-opacity, 0.8); }
    50% { transform: translate3d(20px, 50vh, 0) rotateX(150deg) rotateY(90deg) rotateZ(90deg) scale(0.85); }
    100% {
        transform: translate3d(60px, 105vh, 0) rotateX(300deg) rotateY(180deg) rotateZ(200deg) scale(0.7);
        opacity: 0;
    }
}

@keyframes petalFall4 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.65);
        opacity: 0;
    }
    15% { opacity: var(--max-opacity, 0.8); }
    50% { transform: translate3d(-30px, 50vh, 0) rotateX(-90deg) rotateY(-180deg) rotateZ(150deg) scale(0.9); }
    100% {
        transform: translate3d(-70px, 105vh, 0) rotateX(-180deg) rotateY(-360deg) rotateZ(320deg) scale(0.75);
        opacity: 0;
    }
}

/* ── Golden Dust Particles ── */
.golden-dust {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.dust-particle {
    position: absolute;
    width: var(--size, 3px);
    height: var(--size, 3px);
    background: radial-gradient(circle, rgba(220, 180, 80, 0.9), rgba(245, 200, 66, 0.4));
    border-radius: 50%;
    opacity: 0;
    animation: dustDrift var(--duration, 6s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes dustDrift {
    0%, 100% { opacity: 0; transform: translateY(0) translateX(0); }
    30% { opacity: var(--max-opacity, 0.6); }
    50% { transform: translateY(var(--dy, -20px)) translateX(var(--dx, 10px)); opacity: var(--max-opacity, 0.6); }
    70% { opacity: var(--max-opacity, 0.6); }
}

/* ── Vignette Overlay ── */
.vignette-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(6, 4, 8, 0.65) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   GLOW RINGS — Animated halos behind the name
   ═══════════════════════════════════════════════════════════════ */
.glow-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 4;
}

.glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid transparent;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.ring-1 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
    border-color: rgba(212, 168, 67, 0.08);
    animation: ringPulse1 5s ease-in-out infinite 1s;
}

.ring-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(180, 80, 100, 0.04) 0%, transparent 70%);
    border-color: rgba(180, 80, 100, 0.06);
    animation: ringPulse2 7s ease-in-out infinite 1.5s;
}

.ring-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.03) 0%, transparent 70%);
    border-color: rgba(212, 168, 67, 0.04);
    animation: ringPulse3 9s ease-in-out infinite 2s;
}

@keyframes ringPulse1 {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}
@keyframes ringPulse2 {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.05); }
}
@keyframes ringPulse3 {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   ENTRANCE CONTENT — Frameless Flowing Layout
   ═══════════════════════════════════════════════════════════════ */
.entrance-content {
    text-align: center;
    z-index: 10;
    position: relative;
    padding: 2rem;
    transition: opacity 420ms ease, transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

/* ── Pre-text "a little something, for you" ── */
.entrance-pretext {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    letter-spacing: 2px;
    color: #fcf4e8; /* Soft pearl */
    margin-bottom: 0.5rem;
    opacity: 0;
    text-shadow: 0 0 15px rgba(255, 236, 179, 0.4);
    animation: pretextReveal 1.5s ease 0.5s forwards;
}

@keyframes pretextReveal {
    0% { opacity: 0; transform: translateY(10px); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ── Name Container ── */
.name-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* ── THE NAME — Big, Bold, VISIBLE ── */
.entrance-name {
    font-family: var(--font-script);
    font-size: clamp(6rem, 20vw, 12rem);
    color: #fcebbb; /* Champagne gold */
    line-height: 1.1;
    position: relative;
    opacity: 0;
    font-weight: normal;
    text-shadow:
        0 0 30px rgba(255, 236, 179, 0.4),
        0 0 60px rgba(255, 236, 179, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.5); /* Clean drop shadow for legibility */
    animation: nameReveal 2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

@keyframes nameReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

/* Continuous glow after reveal */
.entrance-name.glowing {
    opacity: 1; /* CRITICAL FIX: prevents disappearing after reveal animation ends */
    animation: nameGlowBreath 4s ease-in-out infinite;
}

@keyframes nameGlowBreath {
    0%, 100% {
        text-shadow:
            0 0 30px rgba(255, 236, 179, 0.4),
            0 0 60px rgba(255, 236, 179, 0.2),
            0 4px 10px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow:
            0 0 45px rgba(255, 236, 179, 0.7),
            0 0 90px rgba(255, 236, 179, 0.4),
            0 0 150px rgba(255, 236, 179, 0.2),
            0 4px 10px rgba(0, 0, 0, 0.5);
    }
}

/* ── Animated underline below name ── */
.name-underline {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 236, 179, 0.8), transparent);
    margin: -1rem auto 0; /* Pulled up slightly closer to the name */
    width: 0;
    box-shadow: 0 0 10px rgba(255, 236, 179, 0.5);
    animation: underlineExpand 1.5s ease 2s forwards;
}

@keyframes underlineExpand {
    0% { width: 0; opacity: 0; }
    100% { width: 70%; opacity: 1; }
}

/* ── Subtitle ── */
.entrance-subtitle {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    color: #fcf4e8; /* Bright pearl */
    margin-top: 1rem;
    letter-spacing: 1px;
    opacity: 0;
    text-shadow: 0 0 15px rgba(255, 236, 179, 0.3);
    animation: subtitleFadeIn 1.5s ease 1.8s forwards;
}

@keyframes subtitleFadeIn {
    0% { opacity: 0; transform: translateY(12px); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ── Divider with rose ── */
.entrance-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    opacity: 0;
    animation: subtitleFadeIn 1s ease 2.3s forwards;
}

.divider-line {
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 236, 179, 0.5), transparent);
}

.divider-hearts {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heartsBreath 4s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(212, 168, 67, 0.4));
}

@keyframes heartsBreath {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 3px rgba(212, 168, 67, 0.3)); 
    }
    50% { 
        transform: scale(1.1); 
        filter: drop-shadow(0 0 10px rgba(212, 168, 67, 0.6)); 
    }
}

/* ── Typewriter Tagline ── */
.entrance-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.15rem, 3.2vw, 1.45rem);
    color: rgba(252, 244, 232, 0.95);
    min-height: 1.5em;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

.entrance-tagline .typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: rgba(232, 196, 74, 0.6);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s ease-in-out infinite;
}

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

/* ── Entrance invitation — quiet, personal, and unmistakably clickable ── */
.entrance-cta-wrapper {
    position: relative;
    display: inline-grid;
    justify-items: center;
    gap: 0.72rem;
    width: min(31rem, calc(100vw - 2.5rem));
    opacity: 0;
    animation: ctaAppear 1.05s cubic-bezier(0.22, 1, 0.36, 1) 2.8s forwards;
}

.entrance-cta {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    min-height: 6.25rem;
    padding: 0.8rem 0.45rem;
    border: 0;
    background: transparent;
    color: var(--ivory);
    text-align: left;
    cursor: pointer;
    isolation: isolate;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), color 220ms ease;
}

.entrance-cta::before,
.entrance-cta::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(234, 210, 139, 0.72) 18%, rgba(234, 210, 139, 0.72) 82%, transparent);
    opacity: 0.58;
    transform: scaleX(0.86);
    transition: opacity 320ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.entrance-cta::before { top: 0; }
.entrance-cta::after { bottom: 0; }

.cta-seal {
    position: relative;
    display: grid;
    place-items: center;
    width: 4.4rem;
    height: 4.4rem;
    border: 1px solid rgba(234, 210, 139, 0.56);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 241, 202, 0.15), transparent 28%),
        radial-gradient(circle, #4e182c, #1d0a13 72%);
    box-shadow:
        inset 0 0 0 0.42rem rgba(234, 210, 139, 0.035),
        0 0.9rem 2.2rem rgba(0, 0, 0, 0.32);
    transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), border-color 320ms ease, box-shadow 320ms ease;
}

.cta-seal::before {
    content: '';
    position: absolute;
    inset: 0.48rem;
    border: 1px solid rgba(247, 240, 229, 0.13);
    border-radius: inherit;
}

.cta-seal-orbit {
    position: absolute;
    inset: -0.48rem;
    border: 1px solid rgba(234, 210, 139, 0.3);
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: invitationOrbit 8s linear infinite;
}

.cta-seal-orbit::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.16rem;
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 50%;
    background: var(--champagne);
    box-shadow: 0 0 0.7rem rgba(234, 210, 139, 0.72);
}

.cta-seal-letter {
    position: relative;
    color: var(--champagne);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1;
}

.cta-copy {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cta-kicker {
    color: rgba(234, 210, 139, 0.58);
    font-family: var(--font-ui);
    font-size: 0.56rem;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-transform: uppercase;
    transition: color 260ms ease;
}

.cta-text {
    overflow: hidden;
    color: var(--ivory);
    font-family: var(--font-heading);
    font-size: clamp(1.42rem, 3vw, 1.72rem);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cta-arrow {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border-left: 1px solid rgba(234, 210, 139, 0.22);
    color: rgba(234, 210, 139, 0.72);
    font-family: var(--font-ui);
    font-size: 1.15rem;
    transition: color 260ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cta-whisper {
    color: rgba(247, 240, 229, 0.42);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-style: italic;
    letter-spacing: 0.055em;
}

@keyframes ctaAppear {
    0% { opacity: 0; transform: translateY(1rem); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes invitationOrbit {
    to { transform: rotate(360deg); }
}

.entrance-cta:hover {
    transform: translateY(-0.22rem);
}

.entrance-cta:hover::before,
.entrance-cta:hover::after,
.entrance-cta:focus-visible::before,
.entrance-cta:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.entrance-cta:hover .cta-seal,
.entrance-cta:focus-visible .cta-seal {
    border-color: rgba(255, 230, 159, 0.88);
    box-shadow:
        inset 0 0 0 0.42rem rgba(234, 210, 139, 0.05),
        0 1.1rem 2.5rem rgba(0, 0, 0, 0.36),
        0 0 2rem rgba(151, 51, 80, 0.16);
    transform: rotate(-4deg) scale(1.04);
}

.entrance-cta:hover .cta-copy,
.entrance-cta:focus-visible .cta-copy {
    transform: translateX(0.22rem);
}

.entrance-cta:hover .cta-kicker,
.entrance-cta:focus-visible .cta-kicker,
.entrance-cta:hover .cta-arrow,
.entrance-cta:focus-visible .cta-arrow {
    color: var(--champagne);
}

.entrance-cta:hover .cta-arrow,
.entrance-cta:focus-visible .cta-arrow {
    transform: translateX(0.24rem);
}

.entrance-cta:active {
    transform: translateY(0) scale(0.99);
}

.entrance-cta:focus-visible {
    outline: 1px solid rgba(255, 230, 159, 0.9);
    outline-offset: 0.55rem;
}

.entrance-cta:disabled {
    cursor: default;
}

@media (prefers-reduced-motion: reduce) {
    .entrance-cta-wrapper { animation-duration: 1ms; animation-delay: 0ms; }
    .cta-seal-orbit { animation: none; }
    .entrance-cta,
    .entrance-cta::before,
    .entrance-cta::after,
    .cta-seal,
    .cta-copy,
    .cta-arrow { transition: none; }
}

/* Keep the complete entrance reachable on short desktop and landscape screens. */
@media (max-height: 700px) and (min-width: 641px) {
    #entrance-screen {
        align-items: flex-start;
        overflow-y: auto;
    }

    .entrance-content {
        margin: auto;
        padding-block: 1.5rem;
    }

    .entrance-pretext { margin-bottom: 0; }
    .name-container { margin-bottom: 0.25rem; }
    .entrance-name { font-size: clamp(4.75rem, 18vh, 7rem); }
    .name-underline { margin-top: -0.6rem; }
    .entrance-subtitle { margin-top: 0.35rem; font-size: 1.1rem; }
    .entrance-divider { margin: 0.6rem 0; transform: scale(0.84); }
    .entrance-tagline { margin-bottom: 1rem; font-size: 1.05rem; }
    .entrance-cta-wrapper { gap: 0.45rem; }
    .entrance-cta { min-height: 5.25rem; }
}

.cta-sparkle {
    animation: sparkleRotate 3s linear infinite;
    position: relative;
    z-index: 1;
}

@keyframes sparkleRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING HEARTS
   ═══════════════════════════════════════════════════════════════ */
#hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    bottom: -50px;
    opacity: 0;
    animation: floatUp var(--duration) ease-in forwards;
    animation-delay: var(--delay);
    filter: blur(var(--blur));
    transform: rotate(var(--rotation));
    will-change: transform, opacity;
}

.ambient-red-heart {
    color: var(--heart-color, #b42346);
    font-family: Georgia, serif;
    line-height: 1;
    text-shadow: 0 0 0.8rem color-mix(in srgb, var(--heart-color, #b42346) 45%, transparent);
}

@keyframes floatUp {
    0% { opacity: 0; transform: translateY(0) rotate(0deg) scale(0.5); }
    10% { opacity: var(--max-opacity, 0.7); }
    90% { opacity: var(--max-opacity, 0.7); }
    100% { opacity: 0; transform: translate3d(var(--heart-drift, 0), -110vh, 0) rotate(var(--rotation, 45deg)) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC TOGGLE
   ═══════════════════════════════════════════════════════════════ */
.music-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(20, 19, 34, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 168, 67, 0.25);
    border-radius: 50px;
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 300ms ease, transform 300ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
    opacity: 0;
    transform: translateY(20px);
}

.music-track { color: var(--ivory); font-size: 0.62rem; letter-spacing: 0.13em; }
.music-status { padding-left: 0.45rem; border-left: 1px solid rgba(234, 210, 139, 0.28); }

.music-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.music-btn:hover {
    border-color: var(--gold);
    background: rgba(20, 19, 34, 0.95);
    box-shadow: var(--glow-gold);
}

.music-btn.playing .music-icon {
    animation: musicBounce 0.6s ease-in-out infinite alternate;
}

@keyframes musicBounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */
#main-content {
    display: none;
    opacity: 0;
    position: relative;
    background: var(--bg-primary);
    transform: translate3d(0, 1rem, 0);
    will-change: opacity, transform;
}

/* Until midnight, the countdown is the entire experience. */
#main-content.is-waiting-for-birthday > section:not(#hero),
#main-content.is-waiting-for-birthday > footer {
    display: none;
}

#main-content.is-waiting-for-birthday #hero {
    min-height: 100svh;
}

#main-content > section:not(#hero),
#main-content > footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 760px;
}

#main-content.preparing,
#main-content.visible {
    display: block;
}

#main-content.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition:
        opacity 880ms ease 100ms,
        transform 1050ms cubic-bezier(0.22, 1, 0.36, 1) 100ms;
}

@media (prefers-reduced-motion: reduce) {
    #entrance-screen,
    #entrance-screen::before,
    .entrance-transition-mark,
    .transition-mark-rule,
    #entrance-screen .entrance-content,
    #main-content {
        transition: none;
        animation: none;
    }
}

/* ── Ambient Background ── */
.main-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ambient-aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 70% 60% at 15% 80%, rgba(120, 20, 50, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 85% 15%, rgba(180, 130, 50, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(100, 20, 40, 0.05) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 70% 90%, rgba(160, 80, 100, 0.06) 0%, transparent 55%);
    animation: ambientShift 25s ease-in-out infinite alternate;
}

@keyframes ambientShift {
    0% { opacity: 0.6; transform: scale(1) rotate(0deg); }
    33% { opacity: 0.9; transform: scale(1.03) rotate(0.5deg); }
    66% { opacity: 0.7; transform: scale(0.98) rotate(-0.3deg); }
    100% { opacity: 1; transform: scale(1.01) rotate(0deg); }
}

.ambient-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ambient-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: ambientFloat var(--dur, 10s) ease-in-out infinite;
    animation-delay: var(--del, 0s);
}

@keyframes ambientFloat {
    0%, 100% { opacity: 0; transform: translateY(0) translateX(0) scale(0.5); }
    30% { opacity: var(--o, 0.3); }
    50% { transform: translateY(var(--dy, -30px)) translateX(var(--dx, 15px)) scale(1); }
    70% { opacity: var(--o, 0.3); }
}

.ambient-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(212, 168, 67, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 168, 67, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, transparent 70%);
}

/* ── Section Shared Styles ── */
section {
    padding: 6rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Animated divider between sections */
#main-content section + section::before {
    content: '';
    display: block;
    width: 150px;
    height: 1px;
    margin: 0 auto 4rem;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.4), transparent);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.15);
    animation: dividerPulse 4s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.5; width: 120px; }
    50% { opacity: 1; width: 180px; }
}

.section-title {
    font-family: var(--font-script);
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    text-align: center;
    color: var(--gold);
    margin-bottom: 0.5rem;
    text-shadow: var(--glow-gold);
    position: relative;
}

#love-letter .section-title {
    font-family: var(--font-heading);
}

/* Shimmer underline on section titles */
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    margin: 0.6rem auto 0;
    animation: shimmerLine 3s ease-in-out infinite;
}

@keyframes shimmerLine {
    0%, 100% { opacity: 0.4; width: 60px; }
    50% { opacity: 1; width: 100px; }
}

.title-decoration {
    font-size: 0.75em;
    vertical-align: middle;
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 3rem;
}


/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Large gradient orb behind hero text */
.hero-glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(600px, 80vw);
    height: min(600px, 80vw);
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(120, 20, 50, 0.15) 0%,
        rgba(180, 80, 100, 0.08) 30%,
        rgba(212, 168, 67, 0.04) 55%,
        transparent 70%
    );
    border-radius: 50%;
    animation: orbBreathe 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes orbBreathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    animation: heroFloat 6s ease-in-out infinite;
    opacity: 0.4;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-30px) translateX(15px); }
    66% { transform: translateY(-15px) translateX(-10px); }
}

.hero-content {
    z-index: 2;
    padding: 2rem;
    position: relative;
}

.hero-greeting {
    font-family: var(--font-ui);
    font-size: clamp(1rem, 3vw, 1.3rem);
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--rose-light);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 10vw, 7rem);
    color: #fcebbb; /* Champagne gold */
    text-shadow:
        0 0 30px rgba(255, 236, 179, 0.4),
        0 0 60px rgba(255, 236, 179, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: heroNameBreath 4s ease-in-out infinite;
}

@keyframes heroNameBreath {
    0%, 100% {
        text-shadow:
            0 0 30px rgba(255, 236, 179, 0.4),
            0 0 60px rgba(255, 236, 179, 0.2),
            0 4px 10px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow:
            0 0 45px rgba(255, 236, 179, 0.6),
            0 0 80px rgba(255, 236, 179, 0.4),
            0 4px 10px rgba(0, 0, 0, 0.5);
    }
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

/* ── Countdown ── */
#countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.countdown-box {
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    min-width: 90px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Animated border glow */
.countdown-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.3), transparent, rgba(201, 112, 125, 0.2), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.countdown-box:hover::before {
    opacity: 1;
}

.countdown-box:hover {
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(212, 168, 67, 0.2), 0 0 60px rgba(212, 168, 67, 0.08);
    transform: translateY(-5px) scale(1.03);
    background: rgba(212, 168, 67, 0.1);
}

.countdown-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
    transition: text-shadow 0.3s ease;
}

.countdown-value.glow {
    text-shadow: 0 0 15px rgba(245, 215, 122, 0.8);
}

.countdown-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.countdown-separator {
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.4;
    font-weight: 300;
    animation: separatorPulse 2s ease-in-out infinite;
}

@keyframes separatorPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.countdown-caption {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════
   LOVE LETTER
   ═══════════════════════════════════════════════════════════════ */
#love-letter {
    padding-top: 4rem;
}

.letter-container {
    max-width: 650px;
    margin: 2rem auto 0;
    perspective: 1000px;
}

.letter-paper {
    background: linear-gradient(135deg, rgba(30, 28, 47, 0.75) 0%, rgba(22, 20, 42, 0.85) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 117, 143, 0.25);
    border-radius: 16px;
    padding: 3.5rem 3rem;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 0 30px rgba(255, 117, 143, 0.15);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.letter-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #ff758f, #d4a843, transparent);
    border-radius: 16px 16px 0 0;
}

.letter-paper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.letter-paper:hover {
    box-shadow: 0 45px 100px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 0 50px rgba(255, 117, 143, 0.3);
    border-color: rgba(255, 117, 143, 0.45);
    transform: translateY(-8px) scale(1.01);
}

.letter-date {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.letter-salutation {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(212, 168, 67, 0.3);
}

.letter-body p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1.25rem;
    text-indent: 2rem;
}

.letter-closing {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--rose-light);
    margin-top: 2rem;
    font-size: 1.05rem;
}

.letter-signature {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    color: var(--gold);
    margin-top: 0.75rem;
    text-shadow: 0 0 15px rgba(212, 168, 67, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   PHOTO GALLERY
   ═══════════════════════════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.photo-frame {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(212, 168, 67, 0.1);
    border-radius: 12px;
    overflow: hidden;
    padding: 0.75rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    will-change: transform;
}

/* Glow overlay on hover */
.photo-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.08), rgba(201, 112, 125, 0.06));
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.photo-frame:hover::after {
    opacity: 1;
}

.photo-frame:hover {
    transform: translateY(-8px) rotate(-1.5deg) scale(1.02);
    border-color: var(--gold);
    box-shadow: 0 15px 40px rgba(212, 168, 67, 0.2), 0 0 60px rgba(212, 168, 67, 0.08);
}

.photo-frame:nth-child(even):hover {
    transform: translateY(-8px) rotate(1.5deg) scale(1.02);
}

.photo-tall {
    grid-row: span 2;
}

.photo-wide {
    grid-column: span 2;
}

.photo-placeholder {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.05), rgba(201, 112, 125, 0.05));
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 150px;
}

.photo-tall .photo-placeholder {
    aspect-ratio: auto;
    height: 100%;
}

.photo-wide .photo-placeholder {
    aspect-ratio: 16/9;
}

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

.placeholder-icon {
    font-size: 2rem;
    opacity: 0.3;
}

.placeholder-text {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.5;
}

.photo-caption {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 0 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   WHY I LOVE YOU — FLIP CARDS
   ═══════════════════════════════════════════════════════════════ */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.reason-card {
    perspective: 800px;
    height: 190px;
    cursor: pointer;
}

.reason-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.reason-card.flipped .reason-inner {
    transform: rotateY(180deg);
}

.reason-front,
.reason-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.reason-front {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
    border: 1px solid rgba(212, 168, 67, 0.15);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.reason-card:hover .reason-front {
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}

.reason-number {
    font-family: var(--font-script);
    font-size: 3.5rem;
    color: var(--gold);
    text-shadow: var(--glow-gold);
    line-height: 1;
}

.reason-back {
    background: linear-gradient(135deg, var(--rose-dark), #5a1e2e);
    border: 1px solid rgba(201, 112, 125, 0.3);
    transform: rotateY(180deg);
}

.reason-back p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   BIRTHDAY CAKE
   ═══════════════════════════════════════════════════════════════ */
.cake-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
}

#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9500;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confettiFall var(--fall-duration, 3s) ease-in forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg) translateX(0); }
    100% { opacity: 0; transform: translateY(100vh) rotate(var(--rotation, 720deg)) translateX(var(--drift, 50px)); }
}

.cake-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2.5rem 0;
}

.cake-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 1.5rem auto;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 168, 67, 0.2);
    overflow: hidden;
}

.cake-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1.2s ease-in-out;
}

.hidden-cake {
    opacity: 0;
}

.blow-btn {
    padding: 1rem 2.5rem;
    font-family: var(--font-ui);
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
}

.blow-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 40px rgba(212, 168, 67, 0.4);
}

.blow-btn.hidden {
    display: none;
}

.cake-message {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    pointer-events: none;
}

.cake-message.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wish-text {
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--gold);
    text-shadow: var(--glow-gold);
}

.wish-subtext {
    font-family: var(--font-heading);
    max-width: min(90vw, 48rem);
    margin: 1.35rem auto 0;
    color: var(--ivory);
    font-size: clamp(1.7rem, 4vw, 2.9rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.22;
    text-wrap: balance;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
    animation: none;
}

@keyframes subtextGlow {
    0% { text-shadow: 0 0 20px rgba(255, 236, 179, 0.4); }
    100% { text-shadow: 0 0 35px rgba(255, 236, 179, 0.7); }
}

/* ═══════════════════════════════════════════════════════════════
   VIRTUAL GIFT BOX
   ═══════════════════════════════════════════════════════════════ */
.gift-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.gift-box {
    position: relative;
    width: 200px;
    height: 180px;
    margin-top: 2rem;
    animation: giftWobble 4s ease-in-out infinite;
    cursor: pointer;
}

.gift-box.opened {
    animation: none;
}

@keyframes giftWobble {
    0%, 85%, 100% { transform: rotate(0deg); }
    88% { transform: rotate(-3deg); }
    91% { transform: rotate(3deg); }
    94% { transform: rotate(-2deg); }
    97% { transform: rotate(1deg); }
}

.gift-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 140px;
    background: linear-gradient(135deg, #c9384a, #a12d3d);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, #d4a843, #f5d77a, #d4a843);
}

.gift-ribbon-h {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 30px;
    background: linear-gradient(180deg, #d4a843, #f5d77a, #d4a843);
}

.gift-lid {
    position: absolute;
    top: 0;
    left: -10px;
    width: 220px;
    height: 50px;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.lid-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d94a5d, #b83344);
    border-radius: 8px;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.2);
}

.lid-top::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 28px;
    background: linear-gradient(180deg, #d4a843, #f5d77a, #d4a843);
}

.gift-ribbon-bow {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.bow-loop {
    position: absolute;
    width: 35px;
    height: 28px;
    border: 5px solid var(--gold-light);
    border-radius: 50%;
    top: 0;
    background: transparent;
}

.bow-left {
    left: -30px;
    transform: rotate(-25deg);
}

.bow-right {
    right: -30px;
    transform: rotate(25deg);
}

.bow-knot {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
}

.gift-box.opened .gift-lid {
    transform: translateY(-80px) rotateX(-45deg) scale(0.9);
    opacity: 0;
}

.unwrap-btn {
    padding: 1rem 2.5rem;
    font-family: var(--font-ui);
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--rose), var(--rose-light));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 112, 125, 0.3);
}

.unwrap-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(201, 112, 125, 0.5);
}

.unwrap-btn.hidden {
    display: none;
}

.gift-message {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-width: 450px;
}

.gift-message.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.gift-card {
    background: linear-gradient(135deg, #1e1c2f, #16142a);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.gift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rose), var(--gold), var(--rose));
}

.gift-card-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gift-card-title {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.gift-card-text {
    font-family: var(--font-body);
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.gift-card-from {
    font-family: var(--font-script);
    font-size: 1.3rem;
    color: var(--rose-light);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
#footer {
    text-align: center;
    padding: 4rem 1.5rem;
    border-top: 1px solid rgba(212, 168, 67, 0.08);
}

.footer-hearts {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.footer-text {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-signature {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--gold);
    margin: 0.5rem 0;
}

.footer-year {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.back-to-top {
    padding: 0.6rem 1.5rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    background: transparent;
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
    background: rgba(212, 168, 67, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   SPARKLE CURSOR TRAIL
   ═══════════════════════════════════════════════════════════════ */
.cursor-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 12px;
    animation: sparkleFade 0.8s ease forwards;
}

@keyframes sparkleFade {
    0% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0) translateY(-30px); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    section {
        padding: 4rem 1.25rem;
    }

    /* Entrance responsive */
    .css-rose { display: none; }

    .ornamental-frame {
        padding: 2.5rem 1.75rem;
        margin: 0 1rem;
    }

    .corner-ornament { width: 20px; height: 20px; }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .photo-tall {
        grid-row: span 1;
    }

    .photo-wide {
        grid-column: span 2;
    }

    .reasons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .reason-card {
        height: 160px;
    }

    .countdown-box {
        min-width: 70px;
        padding: 1rem;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .letter-paper {
        padding: 2rem 1.5rem;
    }

    .gift-box {
        transform: scale(0.85);
    }

    .music-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
    }

    .music-status {
        display: none;
    }
}

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

    .photo-wide {
        grid-column: span 1;
    }

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

    .reason-card {
        height: 140px;
    }

    .reason-number {
        font-size: 2.5rem;
    }

    .reason-back p {
        font-size: 0.8rem;
    }

}

/* ── Reduced motion preference ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PURE CSS PHOTOREALISTIC PETALS & HEARTS
   ═══════════════════════════════════════════════════════════════ */

/* Photorealistic Rose Petal */
.real-petal {
    position: relative;
    width: var(--size);
    height: var(--size);
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    border-radius: 0 50% 50% 50%;
    transform: rotate(45deg);
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.4), 
                inset -2px -2px 6px rgba(0,0,0,0.3), 
                2px 5px 10px rgba(0,0,0,0.2);
}

.real-petal.dark-petal {
    background: linear-gradient(135deg, #d90429 0%, #7a0010 100%);
}

/* Photorealistic Elegant Heart */
.real-heart {
    position: relative;
    width: var(--size);
    height: var(--size);
}
.real-heart::before, .real-heart::after {
    content: "";
    position: absolute;
    top: 0;
    width: 52%;
    height: 80%;
    background: linear-gradient(135deg, #ff4d6d 0%, #d90429 100%);
    border-radius: 50px 50px 0 0;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.4);
}
.real-heart.pink-heart::before, .real-heart.pink-heart::after {
    background: linear-gradient(135deg, #ffb3c1 0%, #ff4d6d 100%);
}
.real-heart::before {
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    transform-origin: 50% 100%;
}
.real-heart::after {
    left: 0;
    transform: translateX(50%) rotate(45deg);
    transform-origin: 50% 100%;
}

/* ═══════════════════════════════════════════════════════════════
   INTERACTIVE SCREEN CLICKS - ROMANTIC BURST
   ═══════════════════════════════════════════════════════════════ */

/* Ripple Effect */
.click-ripple {
    position: fixed;
    border-radius: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,182,193,0.8) 0%, rgba(212,168,67,0.4) 40%, rgba(255,255,255,0) 80%);
    box-shadow: 0 0 20px rgba(255,182,193,0.5);
    animation: rippleBurst 1.2s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes rippleBurst {
    0% {
        width: 0px;
        height: 0px;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Particle Burst */
.click-particle {
    position: fixed;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: particleFly 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    pointer-events: none;
    z-index: 10000;
}

@keyframes particleFly {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)) scale(1.5);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TOGETHER COUNTER
   ═══════════════════════════════════════════════════════════════ */
.together-counter {
    margin-top: 3rem;
    text-align: center;
}

.together-divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 112, 125, 0.5), transparent);
    margin: 0 auto 1.5rem;
}

.together-label {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--rose-light);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.together-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.together-box {
    text-align: center;
    padding: 0.6rem 0.8rem;
    min-width: 60px;
}

.together-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--rose-light);
    line-height: 1;
    text-shadow: 0 0 15px rgba(201, 112, 125, 0.3);
}

.together-unit {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.together-sep {
    font-size: 1.2rem;
    color: var(--rose);
    opacity: 0.3;
    font-weight: 300;
    margin-top: -0.8rem;
}

.together-sublabel {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════
   RELATIONSHIP TIMELINE
   ═══════════════════════════════════════════════════════════════ */
#timeline {
    padding-top: 4rem;
}

.timeline {
    position: relative;
    max-width: 750px;
    margin: 2rem auto 0;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(212, 168, 67, 0.2), rgba(212, 168, 67, 0.2), transparent);
    transform: translateX(-50%);
}

.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, var(--gold), var(--rose));
    transform: translateX(-50%);
    transition: height 0.5s ease-out;
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.4), 0 0 30px rgba(212, 168, 67, 0.15);
    z-index: 1;
}

.timeline-event {
    position: relative;
    width: 50%;
    padding: 1.5rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-event.tl-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Alternating left/right layout */
.timeline-event.tl-left {
    padding-right: 3.5rem;
    text-align: right;
}

.timeline-event.tl-right {
    margin-left: 50%;
    padding-left: 3.5rem;
    text-align: left;
}

/* Timeline dots */
.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--bg-primary);
    border: 3px solid var(--gold);
    border-radius: 50%;
    top: 2rem;
    z-index: 2;
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.4);
    transition: all 0.3s ease;
}

.timeline-event.tl-visible .timeline-dot {
    background: var(--gold);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.6), 0 0 40px rgba(212, 168, 67, 0.2);
}

.timeline-event.tl-left .timeline-dot {
    right: -9px;
}

.timeline-event.tl-right .timeline-dot {
    left: -9px;
}

/* Ping animation on special dots */
.dot-ping {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--gold);
    animation: dotPing 2s ease-out infinite;
}

@keyframes dotPing {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Timeline cards */
.timeline-card {
    background: rgba(20, 19, 34, 0.85);
    border: 1px solid rgba(212, 168, 67, 0.12);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep on cards */
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.6s ease;
}

.timeline-card:hover::before {
    left: 200%;
}

.timeline-card:hover {
    border-color: rgba(212, 168, 67, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 168, 67, 0.1);
    transform: translateY(-3px);
}

.tl-card-special {
    border-color: rgba(212, 168, 67, 0.25);
    background: linear-gradient(135deg, rgba(30, 20, 35, 0.9), rgba(40, 20, 30, 0.85));
}

.tl-card-special::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--rose), var(--gold));
    border-radius: 14px 14px 0 0;
}

.tl-date {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: var(--gold);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 400;
}

.tl-title {
    font-family: var(--font-script);
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: var(--text-primary);
    margin: 0.4rem 0 0.6rem;
    line-height: 1.3;
}

.tl-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.tl-emoji {
    display: block;
    font-size: 1.5rem;
    margin-top: 0.75rem;
    filter: drop-shadow(0 0 5px rgba(255, 100, 130, 0.3));
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED REASON CARDS — Shimmer on hover
   ═══════════════════════════════════════════════════════════════ */
.reason-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.reason-card:hover .reason-front::after {
    left: 200%;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED SCROLL REVEAL — Multiple animation types
   ═══════════════════════════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(60px) skewY(3deg);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
}

/* Fade-up with slight scale */
.reveal.reveal-scale {
    transform: translateY(30px) scale(0.96);
}

.reveal.reveal-scale.revealed {
    transform: translateY(0) scale(1);
}

/* Slide from left */
.reveal.reveal-left {
    transform: translateX(-40px);
}

.reveal.reveal-left.revealed {
    transform: translateX(0);
}

/* Slide from right */
.reveal.reveal-right {
    transform: translateX(40px);
}

.reveal.reveal-right.revealed {
    transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED LOVE LETTER
   ═══════════════════════════════════════════════════════════════ */
/* Removed duplicate letter-paper styling to consolidate with main rules */

/* ═══════════════════════════════════════════════════════════════
   ENHANCED FOOTER
   ═══════════════════════════════════════════════════════════════ */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    56% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   DEEP MOBILE POLISH
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Timeline reflow to single column */
    .timeline-event.tl-left,
    .timeline-event.tl-right {
        width: 100%;
        margin-left: 0;
        padding-left: 3rem;
        padding-right: 0.5rem;
        text-align: left;
    }

    .timeline-line,
    .timeline-progress {
        left: 10px;
        transform: none;
    }

    .timeline-event.tl-left .timeline-dot,
    .timeline-event.tl-right .timeline-dot {
        left: 1px;
        right: auto;
    }

    .timeline-card {
        padding: 1.25rem;
    }

    .tl-title {
        font-size: 1.2rem;
    }

    .tl-text {
        font-size: 0.8rem;
    }

    /* Together counter mobile */
    .together-value {
        font-size: 1.4rem;
    }

    .together-box {
        min-width: 50px;
        padding: 0.4rem 0.5rem;
    }

    /* Better touch targets */
    .blow-btn,
    .unwrap-btn {
        padding: 1.1rem 2.5rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .entrance-cta {
        gap: 0.85rem;
        min-height: 5.6rem;
        padding: 0.7rem 0.15rem;
    }

    .cta-seal { width: 3.75rem; height: 3.75rem; }
    .cta-seal-letter { font-size: 1.75rem; }
    .cta-kicker { font-size: 0.5rem; letter-spacing: 0.16em; }
    .cta-text { font-size: 1.28rem; }
    .cta-arrow { width: 2.2rem; height: 2.4rem; }

    /* Section spacing */
    #main-content section + section::before {
        margin: 0 auto 3rem;
    }

    /* Hero mobile */
    .hero-glow-orb {
        width: 90vw;
        height: 90vw;
    }

    /* Gift box scale fix */
    .gift-box {
        transform: scale(0.85);
    }

    .gift-box.opened {
        transform: scale(0.85);
    }
}

@media (max-width: 480px) {
    /* Extra compact timeline */
    .timeline-event.tl-left,
    .timeline-event.tl-right {
        padding-left: 2.5rem;
    }

    .timeline-card {
        padding: 1rem;
    }

    .tl-date {
        font-size: 0.6rem;
    }

    .tl-title {
        font-size: 1.1rem;
    }

    .tl-emoji {
        font-size: 1.2rem;
    }

    /* Together counter compact */
    .together-numbers {
        gap: 0.25rem;
    }

    .together-value {
        font-size: 1.2rem;
    }

    .together-box {
        min-width: 45px;
        padding: 0.3rem 0.4rem;
    }

    .together-sep {
        font-size: 0.9rem;
    }

    /* Countdown compact */
    .countdown-box {
        min-width: 65px;
        padding: 0.9rem 0.7rem;
    }

    .countdown-value {
        font-size: 1.8rem;
    }

    /* Section title compact */
    .section-title::after {
        width: 50px;
    }

    /* Footer safe area */
    #footer {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }

    .music-btn {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .photo-frame:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(212, 168, 67, 0.1);
    }

    .photo-frame:active {
        transform: scale(0.98);
        border-color: var(--gold);
        box-shadow: 0 0 20px rgba(212, 168, 67, 0.2);
    }

    .countdown-box:hover {
        transform: none;
        box-shadow: none;
    }

    .reason-card:hover .reason-front {
        border-color: rgba(212, 168, 67, 0.15);
        box-shadow: none;
    }

    .timeline-card:hover {
        transform: none;
        box-shadow: none;
    }

    .letter-paper:hover {
        transform: none;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(212, 168, 67, 0.1);
    }

    /* Tap feedback for touch */
    .timeline-card:active {
        border-color: rgba(212, 168, 67, 0.3);
        box-shadow: 0 0 20px rgba(212, 168, 67, 0.15);
    }
}

/* Candle-wish fireworks canvas */
#fireworks-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    contain: strict;
    transition: opacity 120ms linear, visibility 0s linear 120ms;
}

#fireworks-canvas.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 120ms linear;
}

/* ── Countdown to Birthday Transitions & Hide states ── */
.hidden-section {
    display: none !important;
}

.hidden-element {
    display: none !important;
    opacity: 0;
    transform: scale(0.9);
}

.visible-birthday-message {
    display: block !important;
    animation: birthdayPopUp 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes birthdayPopUp {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fade-out-countdown {
    animation: fadeOutCountdown 0.8s ease forwards;
}

@keyframes fadeOutCountdown {
    to {
        opacity: 0;
        transform: translateY(-20px);
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        display: none !important;
    }
}

.cursor-pointer {
    cursor: pointer;
}

.countdown-pre-title {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--rose-light);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   EDITORIAL ROMANCE REFINEMENT
   A quieter, candlelit finish for the birthday experience.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --ink: #090609;
    --wine: #2a0b16;
    --ivory: #f7f0e5;
    --champagne: #ead28b;
    --champagne-deep: #b88a35;
    --gift-wine-highlight: #551827;
    --gift-lid-highlight: #702136;
    --gift-wine: #35101d;
    --gift-wine-deep: #210b14;
    --gift-ribbon-pale: #fff0aa;
    --gift-ribbon-light: #e4bd5c;
    --gift-ribbon: #c99734;
    --gift-ribbon-deep: #9b6b1e;

    --envelope-wine-highlight: #601c35;
    --envelope-wine: #501528;
    --envelope-wine-deep: #16080e;
    --letter-paper: #f7eedc;
    --letter-paper-mid: #ead9bb;
    --letter-paper-deep: #dfc9a4;
    --letter-ink: #321722;
    --letter-meta: #542a32;
}

body {
    background:
        radial-gradient(ellipse at 50% -10%, rgba(91, 24, 43, 0.38), transparent 42rem),
        var(--ink);
}

#main-content {
    background:
        radial-gradient(ellipse 90% 40% at 50% 0%, rgba(93, 24, 45, 0.22), transparent 65%),
        radial-gradient(ellipse 55% 34% at 12% 70%, rgba(125, 78, 28, 0.08), transparent 65%),
        var(--ink);
}

.ambient-grid { opacity: 0.34; }

section {
    max-width: 1080px;
    padding: clamp(5rem, 10vw, 9rem) 1.5rem;
}

#main-content section + section::before {
    width: 220px;
    margin-bottom: clamp(4rem, 8vw, 6rem);
    background: linear-gradient(90deg, transparent, rgba(234, 210, 139, 0.7), transparent);
    animation: none;
}

#hero {
    min-height: 100svh;
    max-width: none;
    padding: 4rem 1.5rem;
}

#hero::before,
#hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

#hero::before {
    inset: 2.5rem;
    border: 1px solid rgba(234, 210, 139, 0.12);
    clip-path: polygon(0 12%, 12% 0, 88% 0, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0 88%);
}

#hero::after {
    width: min(74rem, 90vw);
    height: 1px;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(234, 210, 139, 0.55), transparent);
}

.hero-content { max-width: 800px; }

.hero-glow-orb {
    width: min(760px, 92vw);
    height: min(760px, 92vw);
    background: radial-gradient(circle, rgba(111, 27, 51, 0.28), rgba(174, 120, 43, 0.08) 42%, transparent 70%);
    animation-duration: 12s;
}

.hero-greeting,
.countdown-kicker {
    font-family: var(--font-ui);
    color: var(--champagne);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.34em;
    text-transform: uppercase;
}

.hero-name {
    color: var(--ivory);
    font-size: clamp(4.8rem, 14vw, 10.5rem);
    letter-spacing: -0.04em;
    text-shadow: 0 0 42px rgba(234, 210, 139, 0.24), 0 20px 48px rgba(0, 0, 0, 0.65);
}

.hero-subtitle {
    max-width: 32rem;
    color: rgba(247, 240, 229, 0.74);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.7;
}

#countdown-pre-content { max-width: 760px; }

.countdown-kicker { margin-bottom: 1.35rem; }

.countdown-pre-title {
    color: var(--ivory);
    font-family: var(--font-heading);
    font-size: clamp(2.7rem, 6vw, 5.4rem);
    font-style: normal;
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 0.95;
    margin-bottom: 1.25rem;
}

.countdown-intro {
    color: rgba(247, 240, 229, 0.65);
    font-size: 1.05rem;
    font-style: italic;
    margin: 0 auto 2.75rem;
}

#countdown { gap: clamp(0.6rem, 1.5vw, 1.1rem); }

.countdown-box {
    min-width: clamp(78px, 11vw, 116px);
    padding: 1.5rem 1.25rem 1.25rem;
    border: 1px solid rgba(234, 210, 139, 0.24);
    border-radius: 2px;
    background: linear-gradient(145deg, rgba(255, 250, 239, 0.06), rgba(74, 14, 30, 0.1));
    box-shadow: inset 0 1px rgba(255,255,255,0.1), 0 18px 36px rgba(0,0,0,0.22);
}

.countdown-box:hover {
    transform: translateY(-5px);
    border-color: var(--champagne);
    background: linear-gradient(145deg, rgba(255, 250, 239, 0.1), rgba(74, 14, 30, 0.16));
}

.countdown-value {
    color: var(--ivory);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 400;
}

.countdown-label { color: rgba(234, 210, 139, 0.68); }
.countdown-separator { color: var(--champagne); font-size: 1.3rem; }
.countdown-caption { color: rgba(247, 240, 229, 0.58); margin-top: 1.3rem; }

.section-title {
    color: var(--ivory);
    font-family: var(--font-heading);
    font-size: clamp(2.7rem, 6vw, 4.8rem);
    font-style: italic;
    font-weight: 300;
    letter-spacing: -0.04em;
    text-shadow: none;
}

#love-letter .section-title { font-family: var(--font-heading); }
.section-title::after { width: 42px; background: var(--champagne); animation: none; }
.title-decoration {
    color: var(--champagne);
    font-family: var(--font-heading);
    font-size: 0.66em;
    padding: 0 0.22em;
}

#love-letter {
    max-width: 1020px;
}

.letter-container {
    max-width: 820px;
    margin-top: 3.5rem;
}

.letter-paper {
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(234, 210, 139, 0.3);
    border-radius: 2px;
    padding: clamp(2.25rem, 6vw, 5.25rem);
    background:
        radial-gradient(circle at 12% 8%, rgba(169, 76, 101, 0.16), transparent 28%),
        radial-gradient(circle at 88% 92%, rgba(212, 168, 67, 0.08), transparent 31%),
        linear-gradient(145deg, rgba(53, 18, 31, 0.98), rgba(20, 8, 14, 0.99) 72%);
    box-shadow:
        0 2.5rem 6rem rgba(0, 0, 0, 0.48),
        inset 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 4rem rgba(0, 0, 0, 0.18);
    transition: transform 320ms ease, border-color 320ms ease, box-shadow 320ms ease;
}

.letter-paper::before {
    top: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    left: 0.8rem;
    z-index: -1;
    height: auto;
    border: 1px solid rgba(234, 210, 139, 0.12);
    border-radius: 0;
    background: none;
}

.letter-paper::after {
    content: 'A';
    top: auto;
    right: -0.05em;
    bottom: -0.28em;
    left: auto;
    z-index: -1;
    width: auto;
    height: auto;
    background: none;
    color: rgba(234, 210, 139, 0.035);
    font-family: var(--font-heading);
    font-size: clamp(15rem, 36vw, 25rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1;
}

.letter-paper:hover {
    border-color: rgba(234, 210, 139, 0.48);
    box-shadow:
        0 3rem 7rem rgba(0, 0, 0, 0.56),
        inset 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 4rem rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
}

.letter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: clamp(2rem, 5vw, 3.25rem);
    border-bottom: 1px solid rgba(234, 210, 139, 0.15);
}

.letter-monogram {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid rgba(234, 210, 139, 0.62);
    border-radius: 50%;
    color: var(--champagne);
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-style: italic;
    line-height: 1;
    box-shadow: inset 0 0 0 0.35rem rgba(234, 210, 139, 0.04);
}

.letter-date {
    display: grid;
    gap: 0.38rem;
    margin: 0;
    color: rgba(234, 210, 139, 0.68);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    line-height: 1.5;
    text-align: right;
    text-transform: uppercase;
}

.letter-date span {
    color: rgba(247, 240, 229, 0.46);
    font-size: 0.61rem;
    letter-spacing: 0.2em;
}

.letter-date time {
    font-variant-numeric: tabular-nums;
}

.letter-salutation,
.letter-signature {
    color: var(--ivory);
    text-shadow: none;
}

.letter-salutation {
    margin: clamp(2.6rem, 7vw, 4.6rem) 0 0;
    font-size: clamp(3rem, 7vw, 5.1rem);
    line-height: 0.98;
    text-align: left;
    text-wrap: balance;
}

.letter-body {
    max-width: 38rem;
    margin-top: clamp(2.2rem, 5vw, 3.2rem);
    text-align: left;
}

.letter-body p {
    margin: 0;
    color: rgba(247, 240, 229, 0.82);
    font-size: clamp(1.05rem, 1.8vw, 1.18rem);
    line-height: 1.82;
    text-indent: 0;
    text-wrap: pretty;
}

.letter-body p + p {
    margin-top: 1.35em;
}

.letter-body p:first-child::first-letter {
    float: left;
    margin: 0.08em 0.12em 0 0;
    color: var(--champagne);
    font-family: var(--font-heading);
    font-size: 3.25em;
    font-style: italic;
    line-height: 0.72;
}

.letter-signoff {
    display: grid;
    justify-items: start;
    max-width: 38rem;
    margin-top: clamp(2.8rem, 7vw, 4.4rem);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(234, 210, 139, 0.17);
    text-align: left;
}

.letter-closing {
    margin: 0;
    color: var(--champagne);
    font-size: 1.06rem;
}

.letter-signature {
    margin: 0.55rem 0 0;
    font-size: clamp(2.5rem, 5vw, 3.6rem);
    line-height: 1;
}

.blow-btn {
    border-radius: 0;
    background: transparent;
    border: 1px solid rgba(234, 210, 139, 0.7);
    color: var(--ivory);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.blow-btn:hover { background: rgba(234, 210, 139, 0.12); box-shadow: 0 0 28px rgba(234, 210, 139, 0.15); }

.footer-hearts {
    color: var(--champagne);
    font-family: var(--font-heading);
    font-size: 3.3rem;
}

@media (max-width: 768px) {
    #hero::before { inset: 1.1rem; }
    #hero::after { bottom: 1.5rem; }
    .countdown-separator { display: none; }
    #countdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 290px; margin-inline: auto; }
    .countdown-box { min-width: 0; }
    .letter-paper { padding: 2.2rem 1.55rem 2.7rem; }
    .letter-paper::before { inset: 0.55rem; }
    .letter-meta { align-items: flex-start; gap: 1rem; padding-bottom: 1.75rem; }
    .letter-monogram { width: 2.65rem; height: 2.65rem; font-size: 1.35rem; }
    .letter-date { gap: 0.2rem; font-size: 0.63rem; letter-spacing: 0.12em; }
    .letter-date span { max-width: 18ch; font-size: 0.55rem; letter-spacing: 0.14em; }
    .letter-salutation { margin-top: 2.5rem; font-size: clamp(3rem, 15vw, 4.2rem); }
    .letter-body { margin-top: 2rem; }
    .letter-body p { font-size: 1.04rem; line-height: 1.72; }
    .letter-signoff { margin-top: 2.8rem; padding-top: 1.25rem; }
    .letter-signature { font-size: 2.65rem; }
}

/* ── Natural rose-petal drift ── */
.rose-petal {
    display: block;
    width: calc(var(--size, 28px) * 0.72);
    height: calc(var(--size, 28px) * 1.2);
    transform: rotate(var(--petal-turn, 0deg));
    filter: drop-shadow(1px 5px 5px rgba(0, 0, 0, 0.25));
}

.rose-petal svg {
    display: block;
    width: 100%;
    height: 100%;
}

.rose-drift { will-change: transform, opacity; }

@keyframes roseDrift1 {
    0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotate(0deg); }
    14% { opacity: var(--max-opacity); }
    48% { transform: translate3d(5vw, 42vh, 0) rotate(95deg); }
    78% { transform: translate3d(-3vw, 74vh, 0) rotate(190deg); opacity: var(--max-opacity); }
    100% { opacity: 0; transform: translate3d(3vw, 112vh, 0) rotate(280deg); }
}

@keyframes roseDrift2 {
    0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotate(20deg); }
    15% { opacity: var(--max-opacity); }
    44% { transform: translate3d(-6vw, 38vh, 0) rotate(-90deg); }
    76% { transform: translate3d(4vw, 76vh, 0) rotate(-190deg); opacity: var(--max-opacity); }
    100% { opacity: 0; transform: translate3d(-2vw, 112vh, 0) rotate(-270deg); }
}

@keyframes roseDrift3 {
    0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotate(-10deg); }
    15% { opacity: var(--max-opacity); }
    46% { transform: translate3d(3vw, 45vh, 0) rotate(125deg); }
    75% { transform: translate3d(-5vw, 77vh, 0) rotate(220deg); opacity: var(--max-opacity); }
    100% { opacity: 0; transform: translate3d(1vw, 112vh, 0) rotate(320deg); }
}

.floating-petal {
    position: absolute;
    top: -50px;
    opacity: 0;
    filter: blur(var(--blur));
    animation: roseDrift1 var(--duration) linear forwards;
    animation-delay: var(--delay);
    will-change: transform, opacity;
}

.preview-birthday {
    display: inline-flex;
    margin-top: 2.2rem;
    padding: 0.76rem 1rem;
    border: 1px solid rgba(234, 210, 139, 0.32);
    background: rgba(234, 210, 139, 0.04);
    color: rgba(247, 240, 229, 0.72);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.preview-birthday:hover {
    border-color: var(--champagne);
    background: rgba(234, 210, 139, 0.11);
    color: var(--ivory);
}

/* ═══════════════════════════════════════════════════════════════
   TIMED PHOTO ALBUM + CINEMATIC LIGHTBOX
   ═══════════════════════════════════════════════════════════════ */
#memory-gallery {
    max-width: 1120px;
}

.memory-kicker,
.memory-meta,
.memory-number {
    color: rgba(234, 210, 139, 0.72);
    font-family: var(--font-ui);
    font-size: 0.67rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.memory-kicker { margin-bottom: 1.15rem; }

.memory-intro {
    max-width: 35rem;
    margin: 1.45rem 0 3.4rem;
    color: rgba(247, 240, 229, 0.63);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
}

.memory-story {
    display: block;
}

.album-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(234, 210, 139, 0.38);
    background: #0a0508;
    box-shadow: 0 2.4rem 6rem rgba(0, 0, 0, 0.48);
}

.album-player::before {
    content: '';
    position: absolute;
    inset: 0.62rem;
    z-index: 8;
    border: 1px solid rgba(247, 240, 229, 0.16);
    pointer-events: none;
}

.album-viewport {
    position: relative;
    min-height: clamp(34rem, 67vw, 45rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, rgba(109, 33, 57, 0.35), transparent 55%),
        #080407;
}

.album-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.985);
    transition:
        opacity 1400ms ease,
        transform 1800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.album-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(5, 2, 4, 0.06) 30%, rgba(5, 2, 4, 0.78) 100%),
        linear-gradient(90deg, rgba(7, 3, 5, 0.26), transparent 48%);
    pointer-events: none;
}

.album-slide.is-active {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.album-photo-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.album-photo-button:focus-visible {
    outline: 2px solid var(--champagne);
    outline-offset: -0.9rem;
}

.memory-photo,
.memory-photo-slot {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-photo {
    transform: scale(var(--photo-scale, 1.015));
    transition: transform 380ms linear;
    will-change: transform;
}

.memory-photo-slot {
    display: grid;
    place-content: center;
    gap: 0.4rem;
    min-height: 100%;
    padding: 1rem;
    background:
        linear-gradient(135deg, transparent 49.7%, rgba(234, 210, 139, 0.12) 50%, transparent 50.3%),
        linear-gradient(45deg, transparent 49.7%, rgba(234, 210, 139, 0.12) 50%, transparent 50.3%),
        radial-gradient(circle at 50% 46%, rgba(121, 31, 53, 0.45), rgba(14, 7, 11, 0.9) 68%);
    color: rgba(247, 240, 229, 0.72);
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
    font-style: italic;
    text-align: center;
}

.memory-photo-slot small {
    color: rgba(234, 210, 139, 0.65);
    font-family: var(--font-ui);
    font-size: 0.54rem;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.photo-lyric-note {
    position: absolute;
    right: clamp(1.4rem, 5vw, 4.8rem);
    bottom: clamp(1.6rem, 5vw, 4.4rem);
    z-index: 4;
    width: min(31rem, calc(100% - 3rem));
    min-height: 10.8rem;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.3rem, 3.4vw, 2.35rem) 1.35rem;
    border: 1px solid rgba(117, 70, 39, 0.32);
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.28), transparent 38%),
        linear-gradient(145deg, rgba(250, 243, 230, 0.97), rgba(224, 205, 175, 0.95));
    color: #421829;
    box-shadow: 0 1.2rem 3.5rem rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.82);
    pointer-events: none;
    transform: translateY(1.2rem) rotate(-0.8deg);
    transition: opacity 700ms ease 400ms, transform 900ms cubic-bezier(0.22, 1, 0.36, 1) 350ms;
}

.album-slide:not(.is-active) .photo-lyric-note {
    opacity: 0;
    transform: translateY(2rem) rotate(-1.8deg);
}

.photo-lyric-note::before,
.photo-lyric-note::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    left: 0.75rem;
    height: 1px;
    background: rgba(93, 43, 53, 0.16);
}

.photo-lyric-note::before { top: 0.72rem; }
.photo-lyric-note::after { bottom: 0.72rem; }

.photo-note-pin {
    position: absolute;
    top: 0.78rem;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe8a3, #9a6722 72%);
    box-shadow: 0 0.18rem 0.35rem rgba(48, 20, 16, 0.4);
    transform: translateX(-50%);
}

.photo-note-chapter,
.photo-note-song {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 0.55rem;
    font-style: normal;
    letter-spacing: 0.18em;
    line-height: 1.5;
    text-transform: uppercase;
}

.photo-note-chapter { color: rgba(77, 29, 45, 0.65); }
.photo-note-song { color: rgba(77, 29, 45, 0.5); }

.album-lyric-line {
    min-height: 2.4em;
    margin: 0.75rem 0 0.8rem;
    color: #421829;
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3.5vw, 2.65rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.04;
    text-wrap: balance;
}

.album-lyric-line.is-instrumental {
    color: rgba(66, 24, 41, 0.62);
    font-size: clamp(1.25rem, 2.6vw, 1.8rem);
}

.album-lyric-line.is-updating {
    animation: lyricLineSettle 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lyricLineSettle {
    from { transform: translateY(0.14rem); }
    to { transform: translateY(0); }
}

.album-frame-count {
    position: absolute;
    top: clamp(1.5rem, 4vw, 3rem);
    right: clamp(1.5rem, 4vw, 3rem);
    z-index: 4;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 239, 194, 0.48);
    border-radius: 50%;
    color: rgba(255, 246, 222, 0.86);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-indent: 0.12em;
    text-shadow: 0 0.1rem 0.8rem rgba(0, 0, 0, 0.8);
}

.album-controls {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.1rem 2rem;
    padding: 1.35rem clamp(1.2rem, 3vw, 2.1rem) 1.55rem;
    border-top: 1px solid rgba(234, 210, 139, 0.25);
    background: linear-gradient(110deg, rgba(48, 15, 28, 0.98), rgba(12, 6, 10, 0.99));
}

.album-playback-copy { min-width: 0; }
.album-track-name,
.album-status,
.album-time { margin: 0; }
.album-track-name { color: rgba(247, 240, 229, 0.9); font-family: var(--font-heading); font-size: 1.05rem; font-style: italic; }
.album-track-name span { padding-inline: 0.35rem; color: var(--champagne); }
.album-status { margin-top: 0.28rem; color: rgba(247, 240, 229, 0.48); font-size: 0.76rem; font-style: italic; }

.album-timeline {
    grid-column: 1 / -1;
    width: 100%;
    height: 2px;
    overflow: hidden;
    background: rgba(234, 210, 139, 0.16);
}

.album-timeline span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #c9953d, #fff0b2);
    box-shadow: 0 0 0.8rem rgba(234, 210, 139, 0.45);
    transform: scaleX(0);
    transform-origin: left;
}

.album-chapters {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.album-chapters button {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 1px solid rgba(234, 210, 139, 0.2);
    border-radius: 50%;
    background: transparent;
    color: rgba(247, 240, 229, 0.42);
    font-family: var(--font-ui);
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 220ms ease, border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.album-chapters button:hover:not(:disabled),
.album-chapters button:focus-visible,
.album-chapters button.is-current {
    border-color: rgba(234, 210, 139, 0.78);
    background: rgba(234, 210, 139, 0.11);
    color: var(--champagne);
    outline: none;
    transform: translateY(-0.15rem);
}

.album-chapters button:disabled { cursor: default; opacity: 0.42; }
.album-time { color: rgba(247, 240, 229, 0.55); font-family: var(--font-ui); font-size: 0.58rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.album-player.is-locked .album-controls { filter: saturate(0.65); }

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* The album is a real document flow: one original photograph per scroll chapter. */
.scroll-photo-story {
    position: relative;
    display: grid;
    gap: clamp(7rem, 16vh, 12rem);
    padding-bottom: clamp(4rem, 9vw, 8rem);
}

.scroll-story-status {
    position: sticky;
    top: 1rem;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.9rem 2rem;
    padding: 1rem clamp(1rem, 2.5vw, 1.6rem) 1.1rem;
    border: 1px solid rgba(234, 210, 139, 0.28);
    background: linear-gradient(110deg, rgba(48, 15, 28, 0.98), rgba(12, 6, 10, 0.99));
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.34);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.scroll-story-copy { min-width: 0; }
.scroll-story-status .album-timeline { grid-column: 1 / -1; }
.scroll-photo-story.is-locked .scroll-story-status { filter: saturate(0.65); }

.scroll-photo-chapter {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.65fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5.5rem);
    min-height: 92vh;
    margin: 0;
    scroll-margin-top: 4rem;
}

.scroll-photo-chapter:nth-of-type(even) {
    grid-template-columns: minmax(16rem, 0.65fr) minmax(0, 1.55fr);
}

.scroll-photo-chapter:nth-of-type(even) .scroll-photo-visual { order: 2; }
.scroll-photo-chapter:nth-of-type(even) .photo-lyric-note { order: 1; transform: rotate(0.65deg); }

.scroll-photo-visual {
    position: relative;
    min-width: 0;
}

.scroll-photo-button {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 18rem;
    align-items: center;
    justify-content: center;
    padding: clamp(0.45rem, 1vw, 0.72rem);
    overflow: hidden;
    border: 1px solid rgba(234, 210, 139, 0.4);
    background: rgba(8, 4, 7, 0.96);
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
    transition: border-color 260ms ease, box-shadow 320ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-photo-button::after {
    content: '';
    position: absolute;
    inset: 0.62rem;
    border: 1px solid rgba(247, 240, 229, 0.12);
    pointer-events: none;
}

.scroll-photo-button:hover,
.scroll-photo-button:focus-visible {
    border-color: rgba(234, 210, 139, 0.86);
    box-shadow: 0 2.6rem 6rem rgba(0, 0, 0, 0.5), 0 0 0 0.35rem rgba(234, 210, 139, 0.04);
    outline: none;
    transform: translateY(-0.3rem);
}

.scroll-photo-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 82vh;
    object-fit: contain;
    object-position: center;
}

.scroll-photo-count {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(255, 239, 194, 0.52);
    border-radius: 50%;
    background: rgba(9, 4, 7, 0.34);
    color: rgba(255, 246, 222, 0.9);
    font-family: var(--font-ui);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-indent: 0.1em;
    backdrop-filter: blur(7px);
}

.scroll-photo-chapter .photo-lyric-note {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    min-height: 12rem;
    opacity: 1;
    transform: rotate(-0.7deg);
    transition: border-color 500ms ease, box-shadow 500ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-photo-chapter.is-current .photo-lyric-note {
    border-color: rgba(154, 103, 34, 0.72);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.46), 0 0 2.4rem rgba(234, 210, 139, 0.1), inset 0 1px rgba(255, 255, 255, 0.84);
    transform: rotate(0) translateY(-0.25rem);
}

.scroll-photo-chapter .album-lyric-line {
    min-height: 3.1em;
    font-size: clamp(1.55rem, 2.5vw, 2.25rem);
}

/* Keep the compositor focused on the page movement during the timed glide. */
html.is-album-scrolling .ambient-aurora,
html.is-page-scrolling .ambient-aurora,
html.is-album-scrolling .ambient-particle,
html.is-page-scrolling .ambient-particle,
html.is-album-scrolling .floating-petal,
html.is-page-scrolling .floating-petal,
html.is-album-scrolling .ambient-red-heart,
html.is-page-scrolling .ambient-red-heart,
html.is-album-scrolling .hero-particle,
html.is-page-scrolling .hero-particle,
html.is-album-scrolling .music-btn.playing .music-icon {
    animation-play-state: paused;
}

html.is-page-scrolling .countdown-box,
html.is-page-scrolling .letter-paper,
html.is-page-scrolling .music-btn,
html.is-page-scrolling .scroll-photo-count,
html.is-page-scrolling .timeline-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html.is-wish-paused .ambient-aurora,
html.is-wish-paused .ambient-particle,
html.is-wish-paused .floating-petal,
html.is-wish-paused .ambient-red-heart,
html.is-wish-paused .hero-particle,
html.is-wish-paused .heart,
html.is-wish-paused .music-icon {
    animation-play-state: paused !important;
}

html.is-wish-paused #confetti-container {
    opacity: 0;
}

html.is-wish-paused #fireworks-canvas.is-active { opacity: 1; }

html.is-wish-paused .music-btn {
    opacity: 0;
    pointer-events: none;
}

html.performance-lite .ambient-aurora,
html.performance-lite .ambient-particle {
    animation: none;
}

html.performance-lite .ambient-red-heart { text-shadow: none; }

html.performance-lite .music-btn,
html.performance-lite .scroll-photo-count,
html.performance-lite .scroll-story-status {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.memory-lightbox {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--ivory);
}

.memory-lightbox::backdrop { background: rgba(4, 2, 5, 0.88); backdrop-filter: blur(11px); }
.lightbox-scrim { position: fixed; inset: 0; cursor: zoom-out; }
.lightbox-panel { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; min-height: 100%; padding: 5.5rem clamp(1rem, 7vw, 7rem) 4rem; }
.lightbox-figure { width: min(76vw, 980px); margin: 0; text-align: center; }
.lightbox-image-wrap { display: grid; place-items: center; max-height: 70vh; opacity: 0; transform: scale(0.965); transition: opacity 300ms ease, transform 380ms cubic-bezier(.2,.75,.2,1); }
.memory-lightbox.is-open .lightbox-image-wrap.is-changing { opacity: 1; transform: scale(1); }
.lightbox-image-wrap .memory-photo,
.lightbox-image-wrap .memory-photo-slot { max-width: 100%; max-height: 70vh; min-height: min(55vh, 34rem); object-fit: contain; }
.lightbox-image-wrap .memory-photo-slot { width: min(75vw, 50rem); }

#lightbox-caption { display: grid; gap: 0.55rem; margin-top: 1.25rem; }
#lightbox-caption span { color: rgba(234, 210, 139, 0.65); font-family: var(--font-ui); font-size: 0.58rem; letter-spacing: 0.2em; }
#lightbox-caption strong { color: rgba(247, 240, 229, 0.76); font-family: var(--font-ui); font-size: 0.65rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; }
#lightbox-caption em { color: var(--ivory); font-family: var(--font-heading); font-size: clamp(1.25rem, 2.8vw, 2rem); }

.lightbox-close,
.lightbox-nav {
    position: fixed;
    z-index: 2;
    border: 1px solid rgba(234, 210, 139, 0.38);
    background: rgba(11, 5, 9, 0.45);
    color: var(--ivory);
    font-family: var(--font-ui);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
}

.lightbox-close { top: 1.5rem; right: 1.5rem; padding: 0.8rem 0.95rem; }
.lightbox-nav { top: 50%; padding: 1rem 0.7rem; writing-mode: vertical-rl; transform: translateY(-50%); }
.lightbox-prev { left: clamp(0.45rem, 2vw, 2rem); }
.lightbox-next { right: clamp(0.45rem, 2vw, 2rem); }
.lightbox-close:hover, .lightbox-close:focus-visible, .lightbox-nav:hover, .lightbox-nav:focus-visible { border-color: var(--champagne); background: rgba(58, 18, 32, 0.76); outline: none; }

@media (max-width: 640px) {
    .scroll-photo-story { gap: 5.5rem; }
    .scroll-story-status { top: 0.45rem; gap: 0.7rem 1rem; padding: 0.85rem 0.9rem 0.95rem; }
    .scroll-story-status .album-track-name { font-size: 0.92rem; }
    .scroll-story-status .album-status { font-size: 0.7rem; }
    .scroll-photo-chapter,
    .scroll-photo-chapter:nth-of-type(even) {
        display: flex;
        min-height: auto;
        flex-direction: column;
        gap: 1.6rem;
    }
    .scroll-photo-chapter:nth-of-type(even) .scroll-photo-visual,
    .scroll-photo-chapter:nth-of-type(even) .photo-lyric-note { order: initial; }
    .scroll-photo-button { min-height: 0; }
    .scroll-photo-image { max-height: none; }
    .scroll-photo-chapter .photo-lyric-note,
    .scroll-photo-chapter:nth-of-type(even) .photo-lyric-note {
        right: auto;
        bottom: auto;
        left: auto;
        width: calc(100% - 1.2rem);
        min-height: 10rem;
        padding: 1.35rem 1.2rem 1.15rem;
        transform: rotate(-0.45deg);
    }
    .scroll-photo-chapter.is-current .photo-lyric-note { transform: rotate(0) translateY(-0.15rem); }
    .scroll-photo-chapter .album-lyric-line { min-height: 2.4em; font-size: clamp(1.55rem, 7.3vw, 2.15rem); }
    .lightbox-figure { width: min(82vw, 680px); }
    .lightbox-nav { bottom: 1.2rem; top: auto; writing-mode: initial; transform: none; padding: 0.8rem; }
    .lightbox-prev { left: calc(50% - 5.8rem); }
    .lightbox-next { right: calc(50% - 5.8rem); }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-photo-button,
    .scroll-photo-chapter,
    .photo-lyric-note,
    .lightbox-image-wrap { transition: none; }
    .album-lyric-line.is-updating { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — WISHES FROM PEOPLE WHO LOVE HER
   ═══════════════════════════════════════════════════════════════ */
#love-voices {
    max-width: 1040px;
    scroll-margin-top: 2rem;
}

.voices-kicker {
    margin-bottom: 1rem;
    color: rgba(234, 210, 139, 0.72);
    font-family: var(--font-ui);
    font-size: 0.67rem;
    letter-spacing: 0.24em;
    text-align: center;
    text-transform: uppercase;
}

#love-voices .section-title {
    max-width: 12ch;
    margin-inline: auto;
    text-wrap: balance;
}

.voices-intro {
    max-width: 35rem;
    margin: 1.45rem auto clamp(3rem, 7vw, 5.2rem);
    color: rgba(247, 240, 229, 0.72);
    font-size: clamp(1.05rem, 2vw, 1.18rem);
    font-style: italic;
    line-height: 1.75;
    text-align: center;
    text-wrap: pretty;
}

.wish-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 3.5vw, 2.3rem);
    align-items: start;
}

.wish-note:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(100%, 31rem);
    justify-self: center;
}

.wish-fold {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    align-items: end;
    gap: 0.4rem 1rem;
    width: 100%;
    min-height: clamp(13.5rem, 22vw, 16.25rem);
    padding: clamp(1.6rem, 4vw, 2.25rem);
    overflow: hidden;
    border: 1px solid rgba(234, 210, 139, 0.42);
    border-radius: 0.2rem;
    background:
        radial-gradient(circle at 20% 10%, rgba(157, 56, 83, 0.32), transparent 35%),
        linear-gradient(145deg, var(--envelope-wine), #260b16 66%, var(--envelope-wine-deep));
    color: var(--ivory);
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 1.6rem 3rem rgba(0, 0, 0, 0.26),
        inset 0 1px rgba(255, 244, 218, 0.08);
    transition:
        border-color 220ms ease,
        box-shadow 220ms ease,
        transform 320ms cubic-bezier(.2,.8,.2,1);
}

.wish-fold::before {
    content: '';
    position: absolute;
    inset: 0.62rem;
    border: 1px solid rgba(247, 240, 229, 0.13);
    border-radius: 0.08rem;
    pointer-events: none;
}

.wish-fold:hover,
.wish-fold:focus-visible,
.wish-note.is-open .wish-fold {
    border-color: rgba(245, 215, 122, 0.86);
    box-shadow:
        0 2rem 4rem rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(245, 215, 122, 0.12),
        0 0 2.8rem rgba(148, 54, 78, 0.1);
    transform: translateY(-0.32rem);
}

.wish-fold:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 0.42rem;
}

.wish-number {
    grid-column: 1 / -1;
    align-self: start;
    color: rgba(234, 210, 139, 0.74);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.wish-to {
    grid-column: 1 / -1;
    align-self: end;
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.2vw, 2.45rem);
    font-style: italic;
    line-height: 1;
}

.wish-from {
    color: rgba(247, 240, 229, 0.62);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    line-height: 1.5;
    text-transform: uppercase;
}

.wish-open {
    position: relative;
    padding-right: 1.2rem;
    color: rgba(245, 215, 122, 0.9);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wish-open::after {
    content: '↗';
    position: absolute;
    right: 0;
    top: -0.06rem;
    font-size: 0.85rem;
    transition: transform 220ms ease;
}

.wish-fold:hover .wish-open::after { transform: translate(0.15rem, -0.15rem); }
.wish-fold[aria-expanded='true'] .wish-open { font-size: 0; }
.wish-fold[aria-expanded='true'] .wish-open::before { content: 'Letter open'; font-size: 0.75rem; }
.wish-fold[aria-expanded='true'] .wish-open::after { content: '↓'; transform: none; }

.wish-message {
    width: min(100%, 51rem);
    min-height: 21rem;
    margin-inline: auto;
    padding: clamp(1.4rem, 4vw, 2.3rem) clamp(1.25rem, 7vw, 4.8rem) clamp(2.3rem, 7vw, 4.8rem);
    overflow: visible;
    border: 1px solid rgba(115, 79, 41, 0.35);
    background:
        radial-gradient(circle at 14% 10%, rgba(124, 74, 31, 0.07), transparent 24%),
        radial-gradient(circle at 86% 92%, rgba(109, 55, 41, 0.06), transparent 27%),
        linear-gradient(145deg, var(--letter-paper), var(--letter-paper-mid) 68%, var(--letter-paper-deep));
    color: var(--letter-ink);
    box-shadow:
        0 2.5rem 5rem rgba(0, 0, 0, 0.32),
        inset 0 0 0 1px rgba(255, 252, 236, 0.56);
}

.wish-message::before,
.wish-message::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.wish-message::before {
    inset: 0.72rem;
    border: 1px solid rgba(84, 41, 40, 0.14);
}

.wish-message::after {
    top: 1.05rem;
    left: 50%;
    width: 2.5rem;
    height: 0.25rem;
    border-block: 1px solid rgba(102, 53, 45, 0.28);
    transform: translateX(-50%);
}

.wish-letter-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(2.3rem, 6vw, 4rem);
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(74, 31, 37, 0.14);
    color: var(--letter-meta);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.wish-close {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: transparent;
    color: var(--letter-meta);
    font: inherit;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.wish-close > span:first-child {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 0;
}

.wish-close:hover { color: #8a2948; }
.wish-close:focus-visible {
    border-radius: 0.1rem;
    outline: 2px solid #7c2944;
    outline-offset: 0.2rem;
}

.wish-letter-body {
    position: relative;
    z-index: 1;
    max-width: 38rem;
    margin-inline: auto;
}

.wish-letter-body p {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-style: italic;
    line-height: 1.78;
    overflow-wrap: anywhere;
    text-wrap: pretty;
    white-space: pre-line;
}

.wish-letter-body p + p { margin-top: 1.15em; }

.wish-message footer {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.12rem;
    max-width: 38rem;
    margin: clamp(2.4rem, 7vw, 4.3rem) auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(44, 19, 32, 0.18);
}

.wish-message footer > span:first-child {
    margin-bottom: 0.2rem;
    color: var(--letter-meta);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
}

.wish-message footer strong {
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.1;
}

.wish-message footer > span:last-child {
    margin-top: 0.35rem;
    color: var(--letter-meta);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.wish-audio {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 2.75rem;
    margin-top: 1.8rem;
    accent-color: #6e1c36;
}

@media (max-width: 640px) {
    .wish-notes { grid-template-columns: 1fr; }
    .wish-note:last-child:nth-child(odd) { grid-column: auto; width: auto; }
    .wish-fold { min-height: 13rem; padding: 1.5rem; }
    .wish-message { min-height: 0; }
    .wish-from { max-width: 17ch; }
}

@media (prefers-reduced-motion: reduce) {
    .wish-fold { transition: none; }
    .wish-fold:hover,
    .wish-fold:focus-visible,
    .wish-note.is-open .wish-fold { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   BIRTHDAY FILM — a quiet cinematic pause after the letter
   ═══════════════════════════════════════════════════════════════ */
#birthday-film {
    max-width: 1040px;
}

.birthday-film-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
    align-items: center;
    gap: clamp(2.5rem, 7vw, 6rem);
    overflow: hidden;
    padding: clamp(2rem, 6vw, 5rem);
    border: 1px solid rgba(234, 210, 139, 0.28);
    background:
        radial-gradient(circle at 82% 22%, rgba(133, 39, 67, 0.3), transparent 34%),
        linear-gradient(145deg, rgba(42, 13, 25, 0.96), rgba(8, 5, 8, 0.99));
    box-shadow: 0 34px 76px rgba(0, 0, 0, 0.42);
}

.birthday-film-shell::before {
    content: '';
    position: absolute;
    inset: 0.7rem;
    border: 1px solid rgba(247, 240, 229, 0.08);
    pointer-events: none;
}

.birthday-film-copy {
    position: relative;
    z-index: 1;
}

.birthday-film-kicker {
    margin-bottom: 1.15rem;
    color: rgba(234, 210, 139, 0.74);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.birthday-film-copy .section-title {
    max-width: 11ch;
    font-size: clamp(2.5rem, 5vw, 4.35rem);
    line-height: 0.98;
    text-wrap: balance;
}

.birthday-film-intro {
    max-width: 30rem;
    margin-top: 1.7rem;
    color: rgba(247, 240, 229, 0.68);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.75;
}

.birthday-film-status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.7rem;
    color: rgba(234, 210, 139, 0.72);
    font-family: var(--font-ui);
    font-size: 0.61rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.birthday-film-status::before {
    content: '';
    width: 0.42rem;
    height: 0.42rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
}

.birthday-film-shell.is-playing .birthday-film-status::before {
    background: var(--champagne);
    box-shadow: 0 0 0.8rem rgba(234, 210, 139, 0.52);
}

.birthday-film-frame {
    position: relative;
    z-index: 1;
    width: min(100%, 25rem);
    justify-self: center;
    padding: 0.55rem;
    border: 1px solid rgba(234, 210, 139, 0.4);
    background: rgba(5, 3, 5, 0.92);
    box-shadow: 0 2rem 4.5rem rgba(0, 0, 0, 0.52), 0 0 2rem rgba(119, 29, 54, 0.12);
    transition: border-color 320ms ease, box-shadow 320ms ease, transform 320ms ease;
}

.birthday-film-frame::before {
    content: '';
    position: absolute;
    inset: -0.48rem;
    border: 1px solid rgba(247, 240, 229, 0.08);
    pointer-events: none;
}

.birthday-film-shell.is-playing .birthday-film-frame {
    border-color: rgba(245, 215, 122, 0.76);
    box-shadow: 0 2.2rem 5rem rgba(0, 0, 0, 0.58), 0 0 2.8rem rgba(201, 112, 125, 0.18);
    transform: translateY(-0.2rem);
}

.birthday-film-video {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    border: 0;
    background: #030203;
    object-fit: contain;
}

@media (max-width: 760px) {
    .birthday-film-shell {
        grid-template-columns: 1fr;
        gap: 2.6rem;
        padding-inline: clamp(1.25rem, 6vw, 2rem);
    }

    .birthday-film-copy { text-align: center; }
    .birthday-film-copy .section-title,
    .birthday-film-intro { margin-inline: auto; }
    .birthday-film-frame { width: min(100%, 22rem); }
}

@media (prefers-reduced-motion: reduce) {
    .birthday-film-frame { transition: none; }
    .birthday-film-shell.is-playing .birthday-film-frame { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 4 — PRIVATE VOICE NOTE
   ═══════════════════════════════════════════════════════════════ */
#voice-note { max-width: 960px; }

.voice-note-shell {
    position: relative;
    isolation: isolate;
    min-height: 35rem;
    padding: clamp(2.2rem, 7vw, 5.4rem);
    overflow: hidden;
    border: 1px solid rgba(234, 210, 139, 0.4);
    background:
        radial-gradient(circle at 64% 3%, rgba(127, 34, 59, 0.54), transparent 42%),
        radial-gradient(circle at 8% 100%, rgba(184, 138, 53, 0.08), transparent 34%),
        linear-gradient(145deg, rgba(49, 11, 25, 0.97), rgba(10, 5, 8, 0.99) 76%);
    box-shadow: 0 2.8rem 7rem rgba(0, 0, 0, 0.48);
}

.voice-note-shell::before,
.voice-note-shell::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.voice-note-shell::before {
    z-index: -1;
    inset: 0.75rem;
    border: 1px solid rgba(247, 240, 229, 0.11);
}

.voice-note-shell::after {
    z-index: -2;
    top: -8rem;
    right: -7rem;
    width: 24rem;
    height: 24rem;
    border: 1px solid rgba(234, 210, 139, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 3.8rem rgba(234, 210, 139, 0.025),
        0 0 0 7.6rem rgba(234, 210, 139, 0.018);
}

.voice-note-heading-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(234, 210, 139, 0.16);
}

.voice-note-kicker,
.voice-note-date {
    margin: 0;
    color: rgba(234, 210, 139, 0.72);
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.22em;
    line-height: 1.5;
    text-transform: uppercase;
}

.voice-note-date {
    color: rgba(247, 240, 229, 0.38);
    letter-spacing: 0.15em;
    white-space: nowrap;
}

.voice-note-shell .section-title {
    position: relative;
    max-width: 43rem;
    margin: 0;
    font-size: clamp(3rem, 7.3vw, 5.15rem);
    line-height: 0.98;
    text-align: left;
    text-wrap: balance;
}

.voice-note-shell .section-title::after {
    width: 3.6rem;
    height: 1px;
    margin: 1.7rem 0 0;
    background: linear-gradient(90deg, var(--champagne), transparent);
}

.voice-note-intro {
    position: relative;
    max-width: 34rem;
    margin-top: 1.15rem;
    color: rgba(247, 240, 229, 0.57);
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.65;
}

.voice-note-seal {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.95rem;
    width: min(100%, 30rem);
    min-height: 4.6rem;
    margin-top: clamp(2.25rem, 5vw, 3.25rem);
    padding: 0.7rem 0.85rem 0.7rem 0.72rem;
    border: 1px solid rgba(234, 210, 139, 0.48);
    border-radius: 0.45rem;
    background: linear-gradient(100deg, rgba(234, 210, 139, 0.09), rgba(234, 210, 139, 0.025));
    color: var(--ivory);
    text-align: left;
    cursor: pointer;
    transition: transform 220ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.voice-note-seal:hover {
    transform: translateY(-2px);
    border-color: rgba(234, 210, 139, 0.8);
    background: linear-gradient(100deg, rgba(234, 210, 139, 0.15), rgba(234, 210, 139, 0.045));
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.22);
}

.voice-note-seal:focus-visible,
.voice-play:focus-visible,
.voice-waveform-stage:focus-within {
    outline: 2px solid var(--champagne);
    outline-offset: 4px;
}

.voice-note-seal-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(37, 16, 13, 0.32);
    border-radius: 50%;
    background: linear-gradient(145deg, #efd884, #ae7627);
    color: #25100d;
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-style: italic;
    line-height: 1;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.38), 0 0 0 0.35rem rgba(234, 210, 139, 0.055);
}

.voice-note-seal-copy {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
}

.voice-note-seal-copy strong {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    line-height: 1.35;
    text-transform: uppercase;
}

.voice-note-seal-copy small {
    overflow: hidden;
    color: rgba(247, 240, 229, 0.48);
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-style: italic;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-note-seal-arrow {
    color: var(--champagne);
    font-family: var(--font-ui);
    font-size: 1.15rem;
    transition: transform 220ms ease;
}

.voice-note-seal[aria-expanded='true'] .voice-note-seal-copy strong {
    font-size: 0;
}

.voice-note-seal[aria-expanded='true'] .voice-note-seal-copy strong::after {
    content: 'Close the voice note';
    font-size: 0.72rem;
}

.voice-note-seal[aria-expanded='true'] .voice-note-seal-copy small {
    font-size: 0;
}

.voice-note-seal[aria-expanded='true'] .voice-note-seal-copy small::after {
    content: 'Keep it close, or open it again';
    font-size: 0.94rem;
}

.voice-note-seal[aria-expanded='true'] .voice-note-seal-arrow {
    transform: rotate(90deg);
}

.voice-note-player-panel {
    position: relative;
    max-width: 43rem;
    margin-top: 2rem;
    animation: voicePanelReveal 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes voicePanelReveal {
    from { opacity: 0; transform: translateY(-0.65rem); }
    to { opacity: 1; transform: translateY(0); }
}

.voice-note-player {
    position: relative;
    display: grid;
    gap: 1.4rem;
    padding: clamp(1.25rem, 3.8vw, 2rem);
    border: 1px solid rgba(234, 210, 139, 0.2);
    background:
        linear-gradient(120deg, rgba(247, 240, 229, 0.055), transparent 55%),
        rgba(6, 3, 5, 0.36);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.voice-note-player::after {
    content: '';
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 1.4rem;
    height: 1.4rem;
    border-right: 1px solid rgba(234, 210, 139, 0.24);
    border-bottom: 1px solid rgba(234, 210, 139, 0.24);
    pointer-events: none;
}

.voice-note-player-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
}

.voice-note-recording-mark {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(234, 210, 139, 0.27);
    border-radius: 50%;
}

.voice-note-recording-mark > span {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #d88476;
    box-shadow: 0 0 0 0 rgba(216, 132, 118, 0.25);
}

.voice-note-shell.is-playing .voice-note-recording-mark > span {
    animation: voiceRecordingPulse 1.8s ease-out infinite;
}

@keyframes voiceRecordingPulse {
    65%, 100% { box-shadow: 0 0 0 0.65rem rgba(216, 132, 118, 0); }
}

.voice-note-player-eyebrow,
.voice-note-status,
.voice-note-time,
.voice-note-listening-note {
    margin: 0;
}

.voice-note-player-eyebrow {
    color: rgba(234, 210, 139, 0.8);
    font-family: var(--font-ui);
    font-size: 0.63rem;
    letter-spacing: 0.16em;
    line-height: 1.45;
    text-transform: uppercase;
}

.voice-note-status {
    margin-top: 0.15rem;
    color: rgba(247, 240, 229, 0.57);
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.45;
}

.voice-note-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(247, 240, 229, 0.54);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.voice-waveform-stage {
    --voice-progress: 0%;
    position: relative;
    height: 6rem;
    border-top: 1px solid rgba(234, 210, 139, 0.12);
    border-bottom: 1px solid rgba(234, 210, 139, 0.12);
    cursor: pointer;
}

.voice-waveform-stage::after {
    content: '';
    position: absolute;
    z-index: 2;
    top: 0.65rem;
    bottom: 0.65rem;
    left: var(--voice-progress);
    width: 1px;
    background: rgba(247, 240, 229, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-0.5px);
    transition: left 80ms linear, opacity 180ms ease;
}

.voice-note-shell.is-playing .voice-waveform-stage::after {
    opacity: 1;
}

.voice-waveform {
    position: absolute;
    inset: 0.65rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.09rem, 0.35vw, 0.2rem);
    overflow: hidden;
}

.voice-waveform span {
    flex: 1 1 2px;
    min-width: 1px;
    max-width: 3px;
    height: max(0.34rem, var(--bar-height));
    border-radius: 999px;
    background: rgba(201, 112, 125, 0.38);
    opacity: 0.72;
    transform-origin: center;
    transition: background 180ms ease, opacity 180ms ease;
}

.voice-waveform span.is-played {
    background: linear-gradient(180deg, #f0dc9d, #bd8737);
    opacity: 1;
}

.voice-waveform.is-playing span {
    animation: voiceWave 880ms ease-in-out infinite alternate;
    animation-delay: var(--bar-delay);
}

@keyframes voiceWave {
    from { transform: scaleY(0.72); }
    to { transform: scaleY(1.04); }
}

.voice-progress {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.voice-note-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.voice-play {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 3.25rem;
    padding: 0.45rem 1rem 0.45rem 0.45rem;
    border: 1px solid rgba(234, 210, 139, 0.55);
    border-radius: 999px;
    background: transparent;
    color: var(--ivory);
    font-family: var(--font-ui);
    font-size: 0.64rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.voice-play:hover {
    border-color: var(--champagne);
    background: rgba(234, 210, 139, 0.1);
}

.voice-play-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--champagne);
    box-shadow: 0 0 0 0.32rem rgba(234, 210, 139, 0.065);
}

.voice-play-icon::before {
    content: '';
    width: 0;
    height: 0;
    margin-left: 0.16rem;
    border-top: 0.34rem solid transparent;
    border-bottom: 0.34rem solid transparent;
    border-left: 0.55rem solid #2a1110;
}

.voice-play.is-playing .voice-play-icon::before {
    width: 0.55rem;
    height: 0.7rem;
    margin-left: 0;
    border: 0;
    background: linear-gradient(90deg, #2a1110 0 34%, transparent 34% 66%, #2a1110 66%);
}

.voice-note-listening-note {
    color: rgba(247, 240, 229, 0.42);
    font-size: 0.91rem;
    font-style: italic;
}

@media (max-width: 640px) {
    #voice-note { padding-inline: 1rem; }

    .voice-note-shell {
        min-height: 0;
        padding: 2rem 1.25rem 2.35rem;
    }

    .voice-note-shell::before { inset: 0.45rem; }
    .voice-note-shell::after { top: -9rem; right: -10rem; }
    .voice-note-heading-line { gap: 0.75rem; padding-bottom: 1rem; }
    .voice-note-kicker { max-width: 13rem; font-size: 0.59rem; letter-spacing: 0.17em; }
    .voice-note-date { font-size: 0.56rem; letter-spacing: 0.1em; }
    .voice-note-shell .section-title { font-size: clamp(2.65rem, 12.5vw, 3.65rem); line-height: 1.02; }
    .voice-note-shell .section-title::after { margin-top: 1.35rem; }
    .voice-note-intro { font-size: 1rem; }

    .voice-note-seal {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.75rem;
        width: 100%;
        min-height: 4.75rem;
        padding-right: 0.75rem;
    }

    .voice-note-seal-mark { width: 2.8rem; height: 2.8rem; }
    .voice-note-seal-copy strong { font-size: 0.65rem; letter-spacing: 0.11em; }
    .voice-note-seal-copy small { font-size: 0.86rem; }
    .voice-note-seal[aria-expanded='true'] .voice-note-seal-copy strong::after { font-size: 0.65rem; }
    .voice-note-seal[aria-expanded='true'] .voice-note-seal-copy small::after { font-size: 0.86rem; }
    .voice-note-player-panel { margin-top: 1.25rem; }
    .voice-note-player { gap: 1.15rem; padding: 1.15rem 1rem 1.25rem; }
    .voice-note-player-heading { grid-template-columns: auto minmax(0, 1fr); }
    .voice-note-time { grid-column: 2; margin-top: -0.22rem; }
    .voice-waveform-stage { height: 5.25rem; }
    .voice-waveform { gap: 0.09rem; }
    .voice-note-actions { align-items: flex-start; flex-direction: column; }
    .voice-play { min-height: 3.4rem; }
    .voice-note-listening-note { padding-left: 0.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    .voice-note-seal,
    .voice-note-seal-arrow,
    .voice-waveform-stage::after { transition: none; }
    .voice-note-player-panel { animation: none; }
    .voice-note-shell.is-playing .voice-note-recording-mark > span,
    .voice-waveform.is-playing span { animation: none; }
}

/* ── Focused polish: readable headings and correct pointer behavior ── */
.section-title, .countdown-pre-title, .hero-name { text-wrap: balance; }

@media (pointer: coarse), (hover: none) {
    body, a, button, .cursor-pointer, .reason-card, .photo-frame { cursor: auto !important; }
    .cursor-dot, .cursor-ring { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 6 — BIRTHDAY RITUAL + TYPOGRAPHY LOCK
   ═══════════════════════════════════════════════════════════════ */
.entrance-name,
.hero-name,
.countdown-pre-title,
.section-title,
.letter-salutation,
.letter-signature,
.wish-text,
.wish-subtext,
.album-lyric-line {
    font-family: var(--font-heading);
}

.entrance-name,
.hero-name,
.countdown-pre-title,
.section-title,
.letter-salutation,
.letter-signature,
.wish-subtext,
.album-lyric-line {
    font-style: italic;
    font-weight: 300;
}

.hero-name {
    display: grid;
    gap: 0.04em;
    font-size: clamp(3.1rem, 9vw, 7.4rem);
    line-height: 0.9;
}

.hero-name span,
.hero-name strong { display: block; font: inherit; }
.hero-name strong { color: var(--champagne); font-size: 1.15em; }

#hero.birthday-active {
    min-height: auto;
    align-items: flex-start;
    overflow: visible;
    padding-block: clamp(5rem, 9vw, 8rem);
}

#hero.birthday-active .hero-content { width: min(100%, 900px); }

.candle-ritual {
    display: grid;
    width: 100%;
    min-height: 100svh;
    align-content: center;
    justify-items: center;
    gap: clamp(0.8rem, 2.2vh, 1.4rem);
    padding-block: clamp(1rem, 4vh, 2.6rem);
}

.candle-ritual .cake-container { margin: 0; }

.wish-instruction {
    max-width: 32rem;
    margin: 0 auto;
    color: rgba(247, 240, 229, 0.7);
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-style: italic;
    line-height: 1.55;
}

.cake-image.is-extinguished { opacity: 0; }

.candle-smoke {
    position: absolute;
    z-index: 3;
    top: 12%;
    left: 50%;
    width: 4rem;
    height: 8rem;
    pointer-events: none;
    transform: translateX(-50%);
}

.candle-smoke span {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0.55rem;
    height: 1.45rem;
    border-radius: 50%;
    background: rgba(219, 214, 207, 0.42);
    filter: blur(5px);
    opacity: 0;
    transform: translateX(-50%);
}

.candle-smoke.is-visible span {
    animation: candleSmoke 2.6s ease-out var(--smoke-delay) forwards;
}

@keyframes candleSmoke {
    0% { opacity: 0; transform: translate(-50%, 0) scale(0.45); }
    18% { opacity: 0.5; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--smoke-drift)), -6.5rem) scale(2.4); }
}

.confetti-piece { border-radius: 1px; box-shadow: 0 0 6px rgba(234, 210, 139, 0.14); }
.rose-confetti { border-radius: 70% 18% 70% 18%; }
.champagne-confetti { width: 3px; }

@keyframes confettiFall {
    0% { opacity: 0; transform: translate3d(0, -2vh, 0) rotate(0deg); }
    12% { opacity: 0.86; }
    75% { opacity: 0.76; }
    100% { opacity: 0; transform: translate3d(var(--drift, 50px), 102vh, 0) rotate(var(--rotation, 540deg)); }
}

.cake-message.visible .wish-subtext { animation: birthdayWishIn 900ms cubic-bezier(.2,.75,.2,1) both; }

.replay-birthday {
    min-height: 44px;
    margin-top: 1.3rem;
    padding: 0.68rem 0.95rem;
    border: 1px solid rgba(234, 210, 139, 0.32);
    background: transparent;
    color: rgba(247, 240, 229, 0.76);
    font-family: var(--font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.replay-birthday:hover,
.replay-birthday:focus-visible {
    border-color: var(--champagne);
    background: rgba(234, 210, 139, 0.1);
    color: var(--ivory);
    outline: none;
}

@keyframes birthdayWishIn {
    from { opacity: 0; transform: translateY(0.8rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .hero-name { font-size: clamp(2.9rem, 15vw, 5.2rem); }
    .cake-image-wrapper { width: min(82vw, 320px); height: min(82vw, 320px); }
}

@media (prefers-reduced-motion: reduce) {
    .candle-smoke.is-visible span,
    .cake-message.visible .wish-subtext { animation-duration: 1ms; }
}

/* ═══════════════════════════════════════════════════════════════
   ENVELOPE OPENING REFINEMENT
   ═══════════════════════════════════════════════════════════════ */
.wish-note {
    position: relative;
    display: grid;
    align-content: start;
    perspective: 1100px;
    scroll-margin-top: 1.5rem;
    transition: width 420ms ease;
}

.wish-note.is-open {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
}

.wish-fold {
    z-index: 3;
    overflow: visible;
    isolation: isolate;
    transform-style: preserve-3d;
}

.wish-fold::before { z-index: 5; }

.wish-envelope-lining {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(34deg, transparent 49.6%, rgba(234, 210, 139, 0.16) 50%, transparent 50.4%),
        linear-gradient(-34deg, transparent 49.6%, rgba(234, 210, 139, 0.16) 50%, transparent 50.4%),
        linear-gradient(to top, rgba(12, 4, 8, 0.3), transparent 54%);
    pointer-events: none;
}

.wish-paper-edge {
    position: absolute;
    z-index: 2;
    top: 0.8rem;
    left: 50%;
    width: calc(100% - 3rem);
    height: 46%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(88, 52, 35, 0.25);
    background:
        linear-gradient(rgba(92, 50, 38, 0.06) 1px, transparent 1px),
        #efe0c5;
    background-size: 100% 1.45rem;
    color: rgba(66, 31, 35, 0.62);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    transform: translateX(-50%);
    transition: transform 620ms cubic-bezier(.18,.78,.18,1), opacity 260ms ease;
    pointer-events: none;
}

.wish-flap {
    position: absolute;
    z-index: 4;
    inset: -1px -1px auto;
    height: 61%;
    border: 1px solid rgba(234, 210, 139, 0.38);
    background:
        radial-gradient(circle at 50% 5%, rgba(151, 51, 80, 0.24), transparent 38%),
        linear-gradient(165deg, var(--envelope-wine-highlight), #2a0c1a 76%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    backface-visibility: hidden;
    transition: transform 780ms cubic-bezier(.18,.78,.18,1), filter 320ms ease;
    pointer-events: none;
}

.wish-seal,
.wish-number,
.wish-to,
.wish-from,
.wish-open { position: relative; z-index: 6; }

.wish-seal {
    display: grid;
    place-items: center;
    position: absolute;
    top: 51%;
    left: 50%;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid rgba(255, 244, 202, 0.56);
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 28%, #f0d983, #bd8a31 50%, #7b4d17 100%);
    color: #32121c;
    font-family: var(--font-ui);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 0 0.4rem rgba(234, 210, 139, 0.05),
        0 0.5rem 1rem rgba(0, 0, 0, 0.4),
        inset 0 1px rgba(255, 249, 220, 0.75);
    transition: opacity 260ms ease 80ms, transform 420ms cubic-bezier(.2,.8,.2,1) 80ms;
}

.wish-seal::before {
    content: '';
    position: absolute;
    inset: 0.3rem;
    border: 1px dashed rgba(77, 43, 17, 0.42);
    border-radius: inherit;
}

.wish-number,
.wish-to,
.wish-from,
.wish-open { transition: opacity 260ms ease, transform 420ms cubic-bezier(.2,.8,.2,1); }

.wish-note.is-open .wish-fold {
    width: min(100%, 35rem);
    min-height: 12.5rem;
    justify-self: center;
    transform: translateY(0);
}
.wish-note.is-open .wish-flap { transform: rotateX(-178deg); filter: brightness(0.68); }
.wish-note.is-open .wish-paper-edge { opacity: 0; transform: translate(-50%, 2.7rem); }
.wish-note.is-open .wish-seal { opacity: 0; transform: translate(-50%, -90%) scale(0.72); }
.wish-note.is-open .wish-number,
.wish-note.is-open .wish-to,
.wish-note.is-open .wish-from { opacity: 0.14; transform: translateY(-0.35rem); }

.wish-message {
    position: relative;
    z-index: 2;
    margin-top: -3.35rem;
    opacity: 0;
    transform: translateY(-4.5rem) rotateX(-5deg) scale(0.96);
    transform-origin: top center;
    transition: opacity 300ms ease, transform 680ms cubic-bezier(.18,.78,.18,1);
    will-change: transform, opacity;
}

.wish-note.is-open .wish-message {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
    transition-delay: 220ms;
}

@media (max-width: 640px) {
    .wish-note.is-open { grid-column: auto; }
    .wish-note.is-open .wish-fold { min-height: 11.25rem; }
    .wish-message { margin-top: -2.6rem; }
    .wish-paper-edge { width: calc(100% - 2.25rem); }
}

/* ═══════════════════════════════════════════════════════════════
   CODE-DRAWN BIRTHDAY CAKE — NO GENERATED CAKE IMAGES
   ═══════════════════════════════════════════════════════════════ */
.birthday-cake {
    position: relative;
    width: 0px;
    height: 430px;
    display: flex;
    justify-content: center;
    filter: drop-shadow(0 32px 32px rgba(0, 0, 0, 0.42));
}

.cake-glow {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 50%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 210, 139, 0.22), transparent 68%);
    transform: translateX(-50%);
    animation: cakeGlow 2.8s ease-in-out infinite alternate;
    transition: opacity 450ms ease;
}

@keyframes cakeGlow {
    to { opacity: 0.62; transform: translateX(-50%) scale(1.08); }
}

.cake-candle {
    position: absolute;
    z-index: 12;
    top: 48px;
    left: 50%;
    width: 18px;
    height: 102px;
    border: 1px solid rgba(115, 69, 24, 0.45);
    border-radius: 7px 7px 2px 2px;
    background: repeating-linear-gradient(-36deg, #f3df9f 0 8px, #bf8d38 9px 13px);
    box-shadow: inset 3px 0 rgba(255,255,255,0.24), 0 8px 15px rgba(0, 0, 0, 0.25);
    transform: translateX(-50%);
}

.cake-flame-button {
    position: absolute;
    z-index: 3;
    top: -58px;
    left: 50%;
    width: 64px;
    height: 70px;
    padding: 0;
    border: 0;
    border-radius: 50% 50% 42% 42%;
    background: transparent;
    cursor: pointer;
    transform: translateX(-50%);
    -webkit-tap-highlight-color: transparent;
}

.cake-flame-button::after {
    position: absolute;
    inset: 4px 6px;
    border: 1px solid transparent;
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.cake-flame-button.is-ready::after {
    animation: flameInvitation 2.2s ease-in-out infinite;
}

.cake-flame-button:hover .cake-flame,
.cake-flame-button:focus-visible .cake-flame {
    filter: drop-shadow(0 0 11px #fff1a6) drop-shadow(0 0 30px rgba(231, 134, 36, 0.88));
}

.cake-flame-button:focus-visible {
    outline: 1px solid rgba(255, 244, 202, 0.92);
    outline-offset: 3px;
}

.cake-flame-button:disabled { cursor: default; }

@keyframes flameInvitation {
    0%, 100% { border-color: transparent; transform: scale(0.82); opacity: 0; }
    45% { border-color: rgba(234, 210, 139, 0.5); transform: scale(1); opacity: 0.7; }
}

.candle-wick {
    position: absolute;
    top: -11px;
    left: 50%;
    width: 2px;
    height: 13px;
    border-radius: 2px;
    background: #241311;
    transform: translateX(-50%);
}

.cake-flame {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 24px;
    height: 43px;
    border-radius: 58% 42% 56% 44% / 72% 70% 30% 28%;
    background: radial-gradient(circle at 50% 70%, #fff7c7 0 14%, #f6c95f 32%, #e78624 68%, rgba(139,38,63,0.15) 76%);
    filter: drop-shadow(0 0 8px #f6c95f) drop-shadow(0 0 22px rgba(231, 134, 36, 0.72));
    transform: translateX(-50%) rotate(3deg);
    transform-origin: 50% 100%;
    animation: candleFlicker 850ms ease-in-out infinite alternate;
}

@keyframes candleFlicker {
    50% { transform: translateX(-50%) rotate(-4deg) scale(.93, 1.08); }
    100% { transform: translateX(-50%) rotate(5deg) scale(1.04, .96); }
}

.cake-top {
    position: absolute;
    z-index: 7;
    top: 137px;
    left: 50%;
    width: 225px;
    height: 54px;
    border: 1px solid rgba(234, 210, 139, 0.32);
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 30%, #941f43, #5e112b 70%);
    transform: translateX(-50%);
    box-shadow: inset 0 12px 15px rgba(255,255,255,0.07);
}

.cake-tier {
    position: absolute;
    left: 50%;
    border: 1px solid rgba(234, 210, 139, 0.28);
    border-radius: 10px 10px 24px 24px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.08), transparent 15% 82%, rgba(0,0,0,0.22)),
        linear-gradient(180deg, #7f1738, #4c0d23);
    transform: translateX(-50%);
    box-shadow: inset 0 -15px 24px rgba(29, 4, 14, 0.32), 0 11px 16px rgba(0,0,0,0.2);
}

.cake-tier::after {
    content: '';
    position: absolute;
    inset: 12px 12% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(234, 210, 139, 0.54), transparent);
}

.cake-tier-one { z-index: 6; top: 157px; width: 220px; height: 74px; }
.cake-tier-two { z-index: 5; top: 220px; width: 274px; height: 87px; }
.cake-tier-three { z-index: 4; top: 296px; width: 326px; height: 104px; }

.cake-plate {
    position: absolute;
    z-index: 3;
    top: 383px;
    left: 50%;
    width: 356px;
    height: 35px;
    border: 2px solid rgba(234, 210, 139, 0.62);
    border-radius: 50%;
    background: linear-gradient(180deg, #795623, #2b1a10);
    transform: translateX(-50%);
    box-shadow: 0 15px 26px rgba(0,0,0,0.35), inset 0 5px rgba(255,255,255,0.12);
}

.cake-rose {
    position: absolute;
    z-index: 10;
    width: 34px;
    height: 34px;
    border: 2px solid rgba(234, 210, 139, 0.16);
    border-radius: 48% 52% 46% 54%;
    background:
        radial-gradient(circle at 48% 50%, #270612 0 12%, transparent 13%),
        conic-gradient(from 15deg, #a92950, #5d0d29, #bc355c, #68102e, #a92950);
    box-shadow: inset 0 0 0 7px rgba(44, 4, 18, 0.22), 0 5px 9px rgba(0,0,0,0.28);
}

.rose-one { top: 142px; left: 88px; }
.rose-two { top: 146px; right: 106px; transform: scale(.82); }
.rose-three { top: 237px; left: 59px; transform: scale(1.08); }
.rose-four { top: 277px; right: 47px; transform: scale(.9); }
.rose-five { top: 340px; left: 109px; transform: scale(.78); }

.cake-gold-leaves span {
    position: absolute;
    z-index: 9;
    width: 13px;
    height: 25px;
    border-radius: 90% 10% 90% 10%;
    background: linear-gradient(135deg, #f2d983, #9c6f23);
    box-shadow: 0 0 7px rgba(234, 210, 139, 0.24);
}

.cake-gold-leaves span:nth-child(1) { top: 185px; right: 82px; transform: rotate(38deg); }
.cake-gold-leaves span:nth-child(2) { top: 250px; left: 86px; transform: rotate(-46deg) scale(.8); }
.cake-gold-leaves span:nth-child(3) { top: 302px; right: 87px; transform: rotate(52deg) scale(.9); }
.cake-gold-leaves span:nth-child(4) { top: 350px; right: 125px; transform: rotate(22deg) scale(.72); }
.cake-gold-leaves span:nth-child(5) { top: 202px; left: 108px; transform: rotate(-18deg) scale(.66); }

.birthday-cake.is-blown .cake-flame {
    animation: candleOut 240ms ease-in forwards;
}

.birthday-cake.is-blown .cake-flame-button { pointer-events: none; }

.birthday-cake.is-blown .cake-glow { opacity: 0; animation: none; }

@keyframes candleOut {
    to { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.2, .7) rotate(15deg); }
}

.birthday-cake .candle-smoke {
    z-index: 15;
    top: 0;
    left: 50%;
    width: 5rem;
    height: 7.5rem;
}

@media (max-width: 430px) {
    .birthday-cake {
        margin-bottom: -72px;
        transform: scale(.8);
        transform-origin: top center;
    }
}

@media (max-height: 720px) {
    .candle-ritual { gap: 0.55rem; padding-block: 0.75rem; }
    .birthday-cake {
        margin-bottom: -82px;
        transform: scale(.78);
        transform-origin: top center;
    }
}

/* Phone-friendly rendering: preserve the atmosphere while avoiding costly filters. */
@media (max-width: 767px) {
    .bokeh-orb,
    .floating-petal,
    .ambient-red-heart,
    .ambient-particle { filter: none; }

    .entrance-cta,
    .music-btn,
    .countdown-box,
    .scroll-photo-count,
    .scroll-story-status,
    .memory-lightbox::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }

    .birthday-cake { filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.34)); }
    .cake-flame { filter: drop-shadow(0 0 5px #f6c95f); }
    .confetti-piece { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    .wish-note,
    .wish-flap,
    .wish-paper-edge,
    .wish-seal,
    .wish-number,
    .wish-to,
    .wish-from,
    .wish-open,
    .wish-message,
    .cake-glow,
    .cake-flame,
    .cake-flame-button::after { transition: none; animation-duration: 1ms; }
}

/* ═══════════════════════════════════════════════════════════════
   BIRTHDAY REVEAL — keep the heading and cake in one held frame
   ═══════════════════════════════════════════════════════════════ */
#hero.birthday-active {
    min-height: 100svh;
    align-items: center;
    overflow: hidden;
    padding: clamp(0.8rem, 2.5vh, 1.8rem) clamp(1rem, 4vw, 2rem);
}

#hero.birthday-active .hero-content {
    width: min(100%, 900px);
    padding-block: 0;
}

#hero.birthday-active #birthday-message {
    width: 100%;
}

#hero.birthday-active .hero-greeting {
    margin: 0 0 clamp(0.2rem, 0.8vh, 0.45rem);
}

#hero.birthday-active .hero-name {
    margin: 0 0 clamp(0.4rem, 1.2vh, 0.8rem);
    font-size: clamp(3.2rem, min(7vw, 9.5vh), 6.4rem);
    line-height: 0.84;
}

#hero.birthday-active .hero-subtitle {
    margin: 0 auto clamp(0.5rem, 1.5vh, 0.9rem);
    font-size: clamp(0.95rem, min(1.8vw, 2.2vh), 1.16rem);
    line-height: 1.42;
}

#hero.birthday-active .candle-ritual {
    min-height: 0;
    align-content: start;
    gap: clamp(0.35rem, 1vh, 0.7rem);
    padding-block: 0;
}

#hero.birthday-active .wish-instruction {
    font-size: clamp(0.98rem, min(1.8vw, 2.2vh), 1.18rem);
    line-height: 1.35;
}

#hero.birthday-active .birthday-cake {
    margin-bottom: -77px;
    transform: scale(0.82);
    transform-origin: top center;
}

.cake-container.is-ready,
.cake-container.is-ready .birthday-cake {
    cursor: pointer;
}

.cake-container.is-ready:hover .cake-glow {
    opacity: 0.9;
}

.cake-container.wish-made,
.cake-container.wish-made .birthday-cake {
    cursor: default;
}

@media (max-width: 430px) {
    #hero.birthday-active {
        padding-inline: 0.75rem;
    }

    #hero.birthday-active .hero-content {
        padding-inline: 0.5rem;
    }

    #hero.birthday-active .hero-name {
        font-size: clamp(2.75rem, 13vw, 4rem);
    }

    #hero.birthday-active .birthday-cake {
        margin-bottom: -120px;
        transform: scale(0.72);
    }
}

@media (max-height: 760px) {
    #hero.birthday-active {
        padding-block: 0.55rem;
    }

    #hero.birthday-active .hero-name {
        font-size: clamp(2.7rem, min(6.2vw, 8.2vh), 4.7rem);
    }

    #hero.birthday-active .hero-subtitle {
        margin-bottom: 0.35rem;
        line-height: 1.3;
    }

    #hero.birthday-active .birthday-cake {
        margin-bottom: -138px;
        transform: scale(0.68);
    }
}

/* ═══════════════════════════════════════════════════════════════
   KEEPSAKE LETTER — layered stationery with real paper structure
   ═══════════════════════════════════════════════════════════════ */
.letter-container {
    position: relative;
    isolation: isolate;
    max-width: 850px;
    padding: clamp(0.35rem, 1.2vw, 0.8rem);
}

.letter-container::before,
.letter-container::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(234, 210, 139, 0.19);
    background:
        repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
        linear-gradient(145deg, #35101f, #16090f 76%);
    box-shadow: 0 1.8rem 4.5rem rgba(0, 0, 0, 0.34);
    pointer-events: none;
}

.letter-container::before {
    z-index: -2;
    inset: 1.1rem -0.4rem -0.65rem 1.25rem;
    transform: rotate(1.15deg);
}

.letter-container::after {
    z-index: -1;
    inset: 0.45rem 1rem -0.25rem -0.35rem;
    border-color: rgba(201, 112, 125, 0.18);
    transform: rotate(-0.65deg);
}

.letter-paper {
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(234, 210, 139, 0.42);
    border-radius: 0;
    background:
        repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(4deg, rgba(0, 0, 0, 0.012) 0 1px, transparent 1px 9px),
        radial-gradient(circle at 11% 7%, rgba(184, 75, 105, 0.19), transparent 24%),
        radial-gradient(circle at 92% 88%, rgba(212, 168, 67, 0.1), transparent 29%),
        linear-gradient(142deg, #421324, #260c17 48%, #16090f 100%);
    box-shadow:
        0 3.4rem 7.5rem rgba(0, 0, 0, 0.58),
        inset 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 5rem rgba(0, 0, 0, 0.22);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.letter-paper::before {
    content: '';
    position: absolute;
    z-index: 4;
    inset: clamp(0.55rem, 1.5vw, 0.9rem);
    height: auto;
    border: 1px solid rgba(234, 210, 139, 0.16);
    background: none;
    box-shadow: inset 0 0 0 1px rgba(247, 240, 229, 0.025);
    pointer-events: none;
}

.letter-paper::after {
    content: '';
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: 0;
    width: clamp(4rem, 10vw, 6.5rem);
    height: clamp(4rem, 10vw, 6.5rem);
    background:
        linear-gradient(315deg, rgba(9, 4, 7, 0.58) 0 47%, rgba(234, 210, 139, 0.18) 48%, rgba(98, 30, 51, 0.96) 50% 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    filter: drop-shadow(-0.45rem -0.45rem 0.8rem rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

.letter-creases {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.letter-creases span {
    position: absolute;
    right: 1rem;
    left: 1rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(247, 240, 229, 0.045) 18%, rgba(0, 0, 0, 0.22) 50%, rgba(247, 240, 229, 0.035) 82%, transparent);
    box-shadow: 0 1px rgba(255, 255, 255, 0.018), 0 -1px rgba(0, 0, 0, 0.16);
}

.letter-creases span:first-child { top: 34%; }
.letter-creases span:last-child { top: 67%; }

.letter-meta,
.letter-salutation,
.letter-body,
.letter-signoff {
    position: relative;
    z-index: 2;
}

.letter-meta {
    padding-bottom: clamp(2rem, 5vw, 3.25rem);
    border-bottom: 3px double rgba(234, 210, 139, 0.2);
}

.letter-monogram {
    position: relative;
    width: 3.65rem;
    height: 3.65rem;
    border: 1px solid rgba(255, 232, 165, 0.62);
    background:
        radial-gradient(circle at 34% 28%, rgba(218, 113, 137, 0.7), transparent 23%),
        radial-gradient(circle at 48% 48%, #8d2a47, #521428 68%, #280a15);
    color: #fff1c1;
    box-shadow:
        0 0.55rem 1.1rem rgba(0, 0, 0, 0.34),
        inset 0 0 0 0.28rem rgba(255, 225, 151, 0.08),
        inset 0 0.1rem rgba(255, 255, 255, 0.2);
    transform: rotate(-5deg);
}

.letter-monogram::before {
    content: '';
    position: absolute;
    inset: 0.32rem;
    border: 1px dashed rgba(255, 237, 184, 0.4);
    border-radius: 50%;
}

.letter-date span {
    color: rgba(247, 240, 229, 0.54);
}

.letter-salutation {
    padding-bottom: 0.2rem;
}

.letter-body {
    max-width: 42rem;
    padding: 0.15rem 0 0.3rem clamp(1.25rem, 3vw, 2.2rem);
    background:
        linear-gradient(to right, rgba(201, 112, 125, 0.28), rgba(201, 112, 125, 0.28)) 0.65rem 0 / 1px 100% no-repeat,
        repeating-linear-gradient(to bottom, transparent 0 calc(1.95rem - 1px), rgba(234, 210, 139, 0.105) calc(1.95rem - 1px) 1.95rem);
}

.letter-body p {
    font-size: clamp(1.05rem, 1.8vw, 1.18rem);
    line-height: 1.95rem;
}

.letter-body p + p {
    margin-top: 1.95rem;
}

.letter-signoff {
    max-width: 42rem;
    border-top: 3px double rgba(234, 210, 139, 0.18);
}

.letter-signature {
    position: relative;
    padding-bottom: 0.5rem;
}

.letter-signature::after {
    content: '';
    position: absolute;
    right: -1.2rem;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(234, 210, 139, 0.7), transparent);
    transform: rotate(-1.4deg);
    transform-origin: left;
}

.letter-paper:hover {
    border-color: rgba(234, 210, 139, 0.52);
    box-shadow:
        0 3.7rem 8rem rgba(0, 0, 0, 0.62),
        inset 0 1px rgba(255, 255, 255, 0.11),
        inset 0 0 5rem rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .letter-container { padding: 0.25rem; }
    .letter-container::before { inset: 0.8rem -0.2rem -0.4rem 0.55rem; }
    .letter-container::after { inset: 0.35rem 0.5rem -0.2rem -0.15rem; }
    .letter-monogram { width: 3rem; height: 3rem; }
    .letter-body {
        padding-left: 1.2rem;
        background:
            linear-gradient(to right, rgba(201, 112, 125, 0.24), rgba(201, 112, 125, 0.24)) 0.45rem 0 / 1px 100% no-repeat,
            repeating-linear-gradient(to bottom, transparent 0 calc(1.82rem - 1px), rgba(234, 210, 139, 0.095) calc(1.82rem - 1px) 1.82rem);
    }
    .letter-body p { line-height: 1.82rem; }
    .letter-body p + p { margin-top: 1.82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .letter-paper { transition: none; }
    .letter-paper:hover { transform: none; }
}
