/* =====================================================================
   MIDNIGHT GALLERY — a cinematic memorial experience
   Deep gallery dark + golden volumetric light + glassmorphism + depth
   ===================================================================== */

@font-face { font-family: 'NavbarFont'; src: url('../assets/fonts/navbar_font.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TimerFont'; src: url('../assets/fonts/timer_font.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'ParagraphFont'; src: url('../assets/fonts/paragraph_font.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TreeHoleFont'; src: url('../assets/fonts/treehole_font.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'OtherFont'; src: url('../assets/fonts/other_font.ttf') format('truetype'); font-display: swap; }

:root {
    /* ---- deep gallery base ---- */
    --bg-0: #0a070d;
    --bg-1: #100b14;
    --bg-2: #17101c;
    --bg-3: #1e1622;

    /* ---- warm light spectrum ---- */
    --gold: #E8C58C;
    --gold-bright: #F6DEAE;
    --gold-deep: #C79A55;
    --champagne: #D4AF76;
    --rose: #E7A9B2;
    --mocha: #C9ABA4;
    --lavender: #C9B8E6;
    --sky: #A9C6E6;

    /* ---- text on dark ---- */
    --text: #F1E8DD;
    --text-2: #C7B9AE;
    --text-3: #8E8079;
    --text-faint: #5f554f;

    /* ---- glass ---- */
    --glass: rgba(255, 255, 255, 0.045);
    --glass-2: rgba(255, 255, 255, 0.075);
    --glass-3: rgba(255, 255, 255, 0.11);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-bright: rgba(232, 197, 140, 0.32);
    --glass-hi: rgba(255, 255, 255, 0.55);

    /* ---- legacy aliases (keep admin.css + JS inline styles working) ---- */
    --color-text: var(--text);
    --color-text-secondary: var(--text-2);
    --color-text-muted: var(--text-3);
    --color-champagne: var(--champagne);
    --color-champagne-light: var(--gold-bright);
    --color-mocha: var(--mocha);
    --color-mocha-dark: #b59a93;
    --color-cream: rgba(255, 255, 255, 0.06);
    --color-bg-base: var(--bg-1);
    --color-glass: var(--glass);
    --color-glass-strong: var(--glass-2);
    --color-glass-border: var(--glass-border);

    --carousel-height: 280px;
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;

    --shadow-soft: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 18px 60px rgba(0, 0, 0, 0.45);
    --shadow-ambient: 0 40px 90px -20px rgba(0, 0, 0, 0.7);
    --glow-gold: 0 0 70px rgba(232, 197, 140, 0.22);
    --glow-gold-strong: 0 0 100px rgba(232, 197, 140, 0.38);
    --glow-rose: 0 0 60px rgba(231, 169, 178, 0.22);
    --inner-hi: inset 0 1px 0 rgba(255, 255, 255, 0.14);

    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) { :root { --carousel-height: 380px; } }
@media (min-width: 1024px) { :root { --carousel-height: 440px; } }

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
    margin: 0;
    color: var(--text);
    font-family: 'OtherFont', -apple-system, "PingFang SC", sans-serif;
    line-height: 1.75;
    overflow-x: clip;
    min-height: 100vh;
    background: var(--bg-0);
    position: relative;
    width: 100%;
    max-width: 100%;
}

body.is-preloading {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

::selection { background: rgba(232, 197, 140, 0.25); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold-deep), var(--mocha)); border-radius: 6px; }

/* ===================================================================
   BACKDROP — multi-layer cinematic stage
   =================================================================== */
.stage-backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.bg-gradient-mesh {
    position: absolute; inset: -10%;
    background:
        radial-gradient(60% 50% at 18% 12%, rgba(199, 154, 85, 0.16) 0%, transparent 60%),
        radial-gradient(55% 50% at 85% 20%, rgba(201, 184, 230, 0.12) 0%, transparent 60%),
        radial-gradient(60% 55% at 75% 80%, rgba(231, 169, 178, 0.12) 0%, transparent 62%),
        radial-gradient(70% 60% at 20% 85%, rgba(169, 198, 230, 0.10) 0%, transparent 60%),
        linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 45%, #0c0810 70%, var(--bg-2) 100%);
}

.aurora-blobs { position: absolute; inset: 0; overflow: hidden; }
/* Low-power glow: the radial gradients already fade softly to transparent, so we
   lean on a much smaller blur (≈half the old radius → ~4× less texture memory) and
   bake the remaining softness into the gradient falloff. Alpha is nudged up to keep
   the screen-blended glow reading the same. `will-change: transform` promotes each
   blob once so the drift animation is a cheap compositor transform. */
.blob { position: absolute; border-radius: 50%; will-change: transform; transform: translateZ(0); mix-blend-mode: screen; }
.blob-1 { width: 44vmax; height: 44vmax; top: -12%; left: -10%; background: radial-gradient(circle, rgba(232, 197, 140, 0.34) 0%, transparent 72%); filter: blur(44px); animation: drift-1 19s ease-in-out infinite; }
.blob-2 { width: 40vmax; height: 40vmax; top: 12%; right: -14%; background: radial-gradient(circle, rgba(201, 184, 230, 0.30) 0%, transparent 74%); filter: blur(48px); animation: drift-2 23s ease-in-out infinite; }
.blob-3 { width: 34vmax; height: 34vmax; top: 44%; left: 3%; background: radial-gradient(circle, rgba(169, 198, 230, 0.26) 0%, transparent 74%); filter: blur(44px); animation: drift-3 21s ease-in-out infinite; }
.blob-4 { width: 38vmax; height: 38vmax; top: 58%; right: -4%; background: radial-gradient(circle, rgba(231, 169, 178, 0.30) 0%, transparent 74%); filter: blur(46px); animation: drift-4 25s ease-in-out infinite; }
.blob-5 { width: 30vmax; height: 30vmax; bottom: 2%; left: 18%; background: radial-gradient(circle, rgba(212, 175, 118, 0.26) 0%, transparent 74%); filter: blur(42px); animation: drift-5 17s ease-in-out infinite; }
.blob-6 { width: 32vmax; height: 32vmax; bottom: -8%; right: 12%; background: radial-gradient(circle, rgba(201, 171, 164, 0.22) 0%, transparent 74%); filter: blur(44px); animation: drift-6 27s ease-in-out infinite; }

/* Pause every ambient CSS animation when the tab is backgrounded (set by JS). */
body.ambient-paused .blob,
body.ambient-paused .light-rays,
body.ambient-paused .star,
body.ambient-paused .particle,
body.ambient-paused .deco-orb,
body.ambient-paused .deco-ring { animation-play-state: paused !important; }

/* Mobile: fewer heavy layers. */
@media (max-width: 767px) {
    .blob-5, .blob-6, .light-rays { display: none; }
    .blob { filter: blur(32px); }
}

@keyframes drift-1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(8vw,12vh) scale(1.08); } 66% { transform: translate(-5vw,6vh) scale(0.95); } }
@keyframes drift-2 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-10vw,8vh) scale(0.92); } 66% { transform: translate(4vw,-6vh) scale(1.06); } }
@keyframes drift-3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(12vw,-10vh) scale(1.1); } }
@keyframes drift-4 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-8vw,-12vh) scale(1.05); } 66% { transform: translate(6vw,5vh) scale(0.93); } }
@keyframes drift-5 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6vw,-8vh) scale(1.08); } }
@keyframes drift-6 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(10vw,-5vh) scale(0.95); } 66% { transform: translate(-4vw,8vh) scale(1.04); } }

/* volumetric light rays from top */
.light-rays {
    position: absolute; top: -20%; left: 50%; width: 140vw; height: 90vh;
    transform: translateX(-50%) rotate(8deg);
    background:
        repeating-linear-gradient(95deg,
            transparent 0px, transparent 60px,
            rgba(232, 197, 140, 0.05) 70px, transparent 110px,
            transparent 180px);
    mask-image: radial-gradient(60% 80% at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(60% 80% at 50% 0%, #000 0%, transparent 75%);
    mix-blend-mode: screen;
    animation: ray-sway 16s ease-in-out infinite;
    opacity: 0.7;
}
@keyframes ray-sway { 0%,100% { transform: translateX(-50%) rotate(8deg); } 50% { transform: translateX(-48%) rotate(11deg); } }

/* drifting star/dust field */
.starfield { position: absolute; inset: 0; }
.star { position: absolute; border-radius: 50%; background: #fff; opacity: 0; animation: twinkle linear infinite; will-change: opacity, transform; }
@keyframes twinkle {
    0% { opacity: 0; transform: translateY(0) scale(0.6); }
    25% { opacity: var(--star-opacity, 0.7); }
    75% { opacity: var(--star-opacity, 0.7); }
    100% { opacity: 0; transform: translateY(-22px) scale(1); }
}

/* vignette + film grain */
.vignette {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(0,0,0,0.45) 100%),
        radial-gradient(100% 120% at 50% 110%, rgba(0,0,0,0.35) 0%, transparent 50%);
}
.noise-overlay {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* cursor glow */
.cursor-glow {
    position: fixed; width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 197, 140, 0.10) 0%, transparent 65%);
    pointer-events: none; z-index: 9998; transform: translate(-50%, -50%);
    transition: opacity 0.4s ease; will-change: left, top; mix-blend-mode: screen;
}

/* floating particles */
.particle-container { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.particle { position: absolute; border-radius: 50%; opacity: 0; animation: particle-float linear infinite; }
@keyframes particle-float {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* top scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9997; background: transparent; }
.scroll-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--rose)); box-shadow: 0 0 12px rgba(232,197,140,0.6); transition: width 0.1s linear; }

/* ===================================================================
   NAVBAR
   =================================================================== */
#navbar { padding: 0.9rem 1rem; }
.nav-shell {
    max-width: 980px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 1.25rem;
    background: rgba(18, 12, 22, 0.55);
    backdrop-filter: blur(26px) saturate(1.5);
    -webkit-backdrop-filter: blur(26px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: var(--shadow-soft), var(--inner-hi);
}
#navbar.scrolled .nav-shell { background: rgba(14, 9, 17, 0.78); border-color: var(--glass-border-bright); }

.nav-brand { color: var(--gold); letter-spacing: 0.32em; font-size: 0.62rem; opacity: 0.85; white-space: nowrap; }
.nav-links { flex: 1; }
.nav-links ul { display: flex; justify-content: center; gap: 0.2rem; list-style: none; margin: 0; padding: 0; }
.mobile-section-label, .mobile-menu-toggle, .mobile-nav-panel { display: none; }

.font-nav { font-family: 'NavbarFont', sans-serif; font-size: 0.74rem; padding: 6px 8px; color: var(--text-2); transition: all 0.4s var(--ease-smooth); letter-spacing: 0.06em; }
.font-timer { font-family: 'TimerFont', 'Courier New', monospace; }
.font-paragraph { font-family: 'ParagraphFont', serif; }
.font-tree-hole { font-family: 'TreeHoleFont', cursive; }
.font-other { font-family: 'OtherFont', sans-serif; }

@media (min-width: 768px) { .font-nav { font-size: 0.84rem; padding: 6px 12px; } .nav-brand { font-size: 0.7rem; } }

.nav-link { position: relative; display: inline-block; }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
    background: linear-gradient(90deg, var(--gold-bright), var(--rose));
    transition: all 0.5s var(--ease-smooth); border-radius: 2px; transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(232,197,140,0.5);
}
.nav-link:hover { color: var(--gold-bright); }
.nav-link:hover::after { width: 80%; }

#music-toggle {
    width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center;
    color: rgba(238, 233, 223, 0.42); background: rgba(7, 5, 10, 0.22);
    border: 1px solid rgba(255,255,255,0.07);
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease-smooth), box-shadow 0.4s ease;
    border-radius: 50%; position: relative; flex-shrink: 0;
}
#music-toggle:hover, #music-toggle:focus-visible {
    color: #fff; border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.1); transform: scale(1.08); box-shadow: 0 0 20px rgba(255,255,255,0.14);
}
#music-toggle.is-playing {
    color: #fff; border-color: rgba(255,255,255,0.34); background: rgba(255,255,255,0.12);
}
#music-toggle.is-playing i, #music-toggle.is-playing svg { animation: spin-slow 6s linear infinite; }
#music-toggle.needs-gesture, .page-music-toggle.needs-gesture {
    color: var(--gold-bright); border-color: rgba(232,197,140,.42);
    animation: music-attention 1.8s ease-in-out infinite;
}
@keyframes spin-slow { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes music-attention {
    0%,100% { box-shadow: 0 10px 28px rgba(0,0,0,.24), 0 0 0 rgba(232,197,140,0); }
    50% { box-shadow: 0 10px 28px rgba(0,0,0,.24), 0 0 24px rgba(232,197,140,.25); }
}

.page-sound-resume {
    position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 260;
    display: inline-flex; align-items: center; gap: .55rem; min-height: 2.8rem;
    padding: 0 1rem; color: var(--gold-bright); border: 1px solid rgba(232,197,140,.34);
    border-radius: 999px; background: rgba(12,8,15,.82);
    backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 14px 42px rgba(0,0,0,.4), 0 0 28px rgba(232,197,140,.14);
    transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
    transition: opacity .28s ease, transform .35s var(--ease-smooth);
}
.page-sound-resume.is-visible { opacity: 1; transform: translate(-50%,0); pointer-events: auto; }
.page-sound-resume svg { width: 1rem; height: 1rem; }

@media (max-width: 767px) {
    #navbar { padding: 0.55rem 0.65rem; }
    .nav-shell {
        position: relative; min-height: 3.35rem; padding: 0.35rem 0.38rem 0.35rem 0.85rem;
        gap: 0.35rem; border-radius: 18px;
        background: rgba(14, 9, 17, 0.68);
        backdrop-filter: blur(18px) saturate(1.32);
        -webkit-backdrop-filter: blur(18px) saturate(1.32);
        border-color: rgba(255,255,255,0.14);
        box-shadow: 0 12px 34px rgba(0,0,0,0.34), inset 0 1px rgba(255,255,255,0.1);
    }
    .nav-brand {
        max-width: 5.8rem; overflow: hidden; font-size: 0.58rem; letter-spacing: 0.18em;
    }
    .nav-links { display: none; }
    .mobile-section-label {
        display: block; flex: 1; min-width: 0; padding: 0 0.35rem;
        color: var(--text-2); font-size: 0.75rem; letter-spacing: 0.08em; text-align: right;
        overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    }
    #music-toggle { width: 2.55rem; height: 2.55rem; margin-left: 0; padding: 0; }
    .mobile-menu-toggle {
        width: 2.55rem; height: 2.55rem; flex: 0 0 2.55rem;
        align-items: center; justify-content: center; color: var(--text-2);
        border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
        background: rgba(255,255,255,0.045);
        transition: color .3s ease, background .3s ease, transform .35s var(--ease-smooth);
    }
    .mobile-menu-toggle { display: inline-flex; }
    .mobile-menu-toggle.is-open {
        color: #fff; background: rgba(255,255,255,0.11); transform: rotate(90deg);
    }
    .mobile-nav-panel {
        position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0;
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; padding: 0.65rem;
        border: 1px solid var(--glass-border); border-radius: 18px;
        background: rgba(14, 9, 17, 0.97); box-shadow: 0 18px 45px rgba(0,0,0,0.44);
        opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
        transform-origin: top; transition: opacity .25s ease, transform .35s var(--ease-smooth), visibility .25s;
    }
    .mobile-nav-panel.is-open {
        opacity: 1; visibility: visible; transform: translateY(0) scale(1);
    }
    .mobile-nav-panel .nav-link {
        min-width: 0; min-height: 3rem; display: flex; align-items: center; gap: 0.6rem;
        padding: 0 0.75rem; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px;
        color: var(--text-2); background: rgba(255,255,255,0.035); font-size: 0.74rem;
    }
    .mobile-nav-panel .nav-link::after { display: none; }
    .mobile-nav-panel .nav-link:active {
        color: #fff; background: rgba(232,197,140,0.12); transform: scale(.98);
    }
    .mobile-nav-panel svg {
        width: 1rem; height: 1rem; flex: 0 0 auto; color: var(--gold);
    }
}

/* ===================================================================
   SIDE SECTION DOTS
   =================================================================== */
.section-dots {
    position: fixed; right: 1.4rem; top: 50%; transform: translateY(-50%);
    z-index: 45; display: none; flex-direction: column; gap: 1.1rem; align-items: center;
}
@media (min-width: 1024px) { .section-dots { display: flex; } }
.section-dots .dot {
    width: 10px; height: 10px; border-radius: 50%; position: relative;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.4s var(--ease-smooth);
}
.section-dots .dot::before {
    content: attr(data-label);
    position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px);
    font-family: 'OtherFont', sans-serif; font-size: 0.65rem; letter-spacing: 0.2em; color: var(--text-2);
    white-space: nowrap; opacity: 0; transition: all 0.35s var(--ease-smooth); pointer-events: none;
}
.section-dots .dot:hover { transform: scale(1.3); }
.section-dots .dot:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
.section-dots .dot.active {
    background: linear-gradient(var(--gold-bright), var(--rose));
    border-color: transparent; box-shadow: 0 0 14px rgba(232,197,140,0.7); transform: scale(1.25);
}

/* ===================================================================
   CINEMATIC LOADER
   =================================================================== */
#loader-wrapper {
    background: radial-gradient(120% 100% at 50% 30%, #160f1b 0%, #0a070d 70%);
    display: flex; justify-content: center; align-items: center;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    transition: opacity 1.1s var(--ease-cinematic), visibility 1.1s;
}
.loader-inner {
    display: flex; flex-direction: column; align-items: center;
    width: min(86vw, 360px); text-align: center;
}
.loader-ring {
    width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    position: relative; margin-bottom: 2rem;
}
.loader-ring::before, .loader-ring::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    border: 1px solid transparent; border-top-color: rgba(232,197,140,0.7); border-right-color: rgba(231,169,178,0.4);
    animation: ring-spin 2.4s linear infinite;
}
.loader-ring::after { inset: 10px; animation-duration: 1.8s; animation-direction: reverse; border-top-color: rgba(201,184,230,0.6); }
@keyframes ring-spin { to { transform: rotate(360deg); } }
.loader-heart { width: 30px; height: 30px; color: var(--gold-bright); animation: heartbeat 1.4s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(232,197,140,0.7)); }
@keyframes heartbeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.loader-title {
    color: var(--gold); letter-spacing: 0; font-size: 1rem; margin-bottom: 1.35rem;
    opacity: 0.82; text-shadow: 0 0 30px rgba(232,197,140,0.4);
}
.loader-progress-panel { width: 100%; }
.loader-percent {
    color: #f4e8cf; font-size: clamp(2.3rem, 9vw, 3.25rem); font-weight: 300;
    line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums;
    text-shadow: 0 0 34px rgba(232,197,140,.2);
}
.loader-status {
    min-height: 1.4rem; margin-top: .72rem; color: rgba(238,233,223,.74);
    font-size: .82rem; line-height: 1.4; letter-spacing: 0;
}
.loader-track {
    width: 100%; height: 3px; margin-top: 1.15rem; border-radius: 999px;
    background: rgba(255,255,255,0.09); overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.34);
}
#progress-bar {
    height: 100%; width: 0%; border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--rose));
    background-size: 200% 100%; animation: shimmer 2s ease infinite;
    transition: width .28s var(--ease-smooth);
    box-shadow: 0 0 18px rgba(232,197,140,0.56);
}
.loader-transfer {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 1.15rem; margin-top: .62rem; color: rgba(238,233,223,.42);
    font-size: .68rem; line-height: 1.4; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.loader-transfer span:last-child { color: rgba(232,197,140,.7); }
.loader-entry-actions {
    display: flex; flex-direction: column; align-items: center; gap: .72rem; margin-top: 1.65rem;
}
.loader-sound-start, .loader-treehole-start {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 2.75rem; padding: 0 1.1rem;
    color: var(--gold-bright); border: 1px solid rgba(232,197,140,.32);
    border-radius: 999px; background: rgba(255,255,255,.055);
    box-shadow: 0 12px 38px rgba(0,0,0,.28), 0 0 28px rgba(232,197,140,.1);
    transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--ease-smooth);
}
.loader-sound-start {
    animation: loader-sound-pulse 2.2s ease-in-out infinite;
}
.loader-treehole-start {
    min-height: 2.35rem; padding: 0 .95rem; color: rgba(238,233,223,.66);
    border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.025);
    box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: .78rem;
}
.loader-sound-start[hidden], .loader-treehole-start[hidden] { display: none; }
.loader-sound-start:hover, .loader-sound-start:focus-visible,
.loader-treehole-start:hover, .loader-treehole-start:focus-visible {
    color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.12); transform: translateY(-2px);
}
.loader-sound-start:disabled, .loader-treehole-start:disabled { cursor: wait; opacity: .54; transform: none; }
.loader-sound-start.is-starting, .loader-treehole-start.is-starting { opacity: 1; }
.loader-sound-start.is-starting svg, .loader-treehole-start.is-starting svg { animation: heartbeat .8s ease-in-out infinite; }
.loader-sound-start svg, .loader-treehole-start svg { width: 1rem; height: 1rem; }
@keyframes loader-sound-pulse {
    0%,100% { box-shadow: 0 12px 38px rgba(0,0,0,.28), 0 0 20px rgba(232,197,140,.08); }
    50% { box-shadow: 0 12px 38px rgba(0,0,0,.28), 0 0 34px rgba(232,197,140,.22); }
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 480px) {
    .loader-inner { width: min(82vw, 320px); }
    .loader-ring { width: 84px; height: 84px; margin-bottom: 1.65rem; }
    .loader-title { margin-bottom: 1.15rem; }
    .loader-transfer { font-size: .65rem; }
}

/* ===================================================================
   SECTION HEADS
   =================================================================== */
main { position: relative; z-index: 3; }

.section-head { text-align: center; position: relative; z-index: 5; margin-bottom: 3rem; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.section-eyebrow {
    font-size: 0.66rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold);
    opacity: 0.8; padding-left: 0.42em;
}
.section-eyebrow::before { content: '✦ '; color: var(--rose); }
.section-title {
    font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.1; color: var(--text);
    background: linear-gradient(120deg, #fff 0%, var(--gold-bright) 45%, var(--rose) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 30px rgba(232,197,140,0.25));
    letter-spacing: 0.02em;
}

/* ===================================================================
   HERO / TIMER
   =================================================================== */
#timer-section {
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 6rem 1.5rem 4rem; position: relative; overflow: hidden;
}
.hero-stage { position: relative; width: 100%; max-width: 760px; transform-style: preserve-3d; z-index: 4; }
.hero-content { position: relative; z-index: 6; will-change: transform; }

.timer-big-date {
    position: absolute; font-family: 'TimerFont', monospace; font-size: clamp(7rem, 30vw, 26rem);
    color: transparent; -webkit-text-stroke: 1px rgba(232, 197, 140, 0.07);
    letter-spacing: 0.05em; pointer-events: none; user-select: none;
    top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; z-index: 1;
}

.timer-deco-text { font-size: 0.66rem; letter-spacing: 0.46em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.6rem; opacity: 0.85; }
.timer-main-label { font-size: 1.05rem; color: var(--text-2); margin-bottom: 2rem; letter-spacing: 0.08em; }
.timer-sub { margin-top: 2.4rem; font-size: 0.82rem; letter-spacing: 0.2em; color: var(--text-3); }

#timer {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 0.5rem 0.6rem;
}
.time-unit { display: flex; align-items: flex-end; gap: 0.35rem; }
.time-card {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.6em; padding: 0.28em 0.32em 0.32em;
    font-size: 2rem; color: var(--gold-bright); line-height: 1;
    background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
    border: 1px solid var(--glass-border); border-radius: 16px;
    box-shadow: var(--shadow-soft), var(--inner-hi), inset 0 -10px 24px rgba(0,0,0,0.25);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    text-shadow: 0 0 28px rgba(232,197,140,0.5);
    overflow: hidden;
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-smooth);
}
.time-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 45%; background: linear-gradient(rgba(255,255,255,0.18), transparent); pointer-events: none; }
.time-card.tick { animation: card-tick 0.6s var(--ease-spring); }
@keyframes card-tick {
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-3px) scale(1.06); box-shadow: var(--shadow-elevated), var(--glow-gold), var(--inner-hi); }
    100% { transform: translateY(0) scale(1); }
}
.time-label { font-family: 'OtherFont', sans-serif; font-style: normal; font-size: 0.8rem; color: var(--text-3); padding-bottom: 0.35rem; letter-spacing: 0.05em; }
.time-sep { width: 1px; height: 2.4rem; margin: 0 0.2rem; align-self: center; background: linear-gradient(transparent, rgba(232,197,140,0.4), transparent); }

@media (min-width: 768px) {
    .time-card { font-size: 3.4rem; border-radius: 20px; min-width: 2.4em; }
    .time-label { font-size: 1rem; }
    .timer-main-label { font-size: 1.3rem; }
    .time-sep { height: 4rem; }
}
@media (min-width: 1024px) { .time-card { font-size: 4rem; } }

.scroll-indicator {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    color: var(--text-3); opacity: 0.6; animation: float-down 3s ease-in-out infinite;
    transition: opacity 0.6s ease; z-index: 7;
}
.scroll-indicator span { font-size: 0.58rem; letter-spacing: 0.34em; text-transform: uppercase; }
.scroll-indicator svg { width: 16px; height: 16px; stroke: currentColor; }
@keyframes float-down { 0%,100% { transform: translateX(-50%) translateY(0); opacity: 0.5; } 50% { transform: translateX(-50%) translateY(10px); opacity: 0.9; } }

/* ===================================================================
   MOMENTS / GALLERY — pinned, scroll-driven
   =================================================================== */
#moments-section { position: relative; }

.sound-hint-badge {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.2rem;
    background: var(--glass-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border); border-radius: 999px; font-size: 0.72rem; color: var(--text-2);
    letter-spacing: 0.1em; box-shadow: var(--shadow-soft), var(--inner-hi); animation: pulse-badge 3.4s ease-in-out infinite;
}
.sound-hint-badge i { color: var(--gold); }
@keyframes pulse-badge { 0%,100% { opacity: 0.8; box-shadow: var(--shadow-soft), var(--inner-hi); } 50% { opacity: 1; box-shadow: var(--shadow-soft), var(--inner-hi), 0 0 26px rgba(232,197,140,0.18); } }

/* tall driver — its height is set by JS to create the scroll distance */
#moments-scroll { position: relative; width: 100%; }

/* the stage that "sticks" to the viewport while the driver scrolls past */
#moments-pin {
    --cover-stage-presence: 0;
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden;
    contain: paint;
    isolation: isolate;
    background:
        radial-gradient(55% 42% at 50% 54%, rgba(232,197,140,0.075), transparent 72%),
        linear-gradient(180deg, rgba(10,7,13,0.02), rgba(10,7,13,0.16));
}

.moments-head { margin: 0; position: absolute; top: clamp(3.2rem, 7.5vh, 5.5rem); left: 50%; transform: translateX(-50%); width: 100%; z-index: 120; pointer-events: none; }

/* the visible band rows scroll through — sits BELOW the title so they never overlap */
#moments-stage {
    position: absolute; left: 0; right: 0;
    top: clamp(11rem, 24vh, 16rem);
    bottom: clamp(4.5rem, 11vh, 6rem);
    overflow: hidden; z-index: 1;
}
.moments-chapter-word {
    position: absolute; z-index: 0; left: 50%; top: 52%;
    width: 100%; padding: 0 1rem; overflow: hidden;
    color: transparent; -webkit-text-stroke: 1px rgba(232,197,140,.075);
    font-size: clamp(4rem, 18vw, 13rem); line-height: 1; text-align: center; white-space: nowrap;
    transform: translate(-50%, -50%); opacity: .75; pointer-events: none;
}
.moments-chapter-word.is-changing { animation: chapter-word-in .75s var(--ease-smooth); }
@keyframes chapter-word-in {
    from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
}

.moment-group {
    position: absolute; left: 0; top: 0; width: 100%;
    display: flex; align-items: center; justify-content: center;
    visibility: hidden;
    pointer-events: none;
    contain: layout style;
    transform: translate3d(0, 120vh, 0);
}
.moment-group.is-near {
    visibility: visible;
    pointer-events: auto;
    will-change: transform, opacity;
}
.moment-strip {
    display: flex; align-items: center; gap: 16px;
    padding: 0 1.5vw;
    transform: translate3d(100vw, 0, 0);
    transform-style: preserve-3d;
}
.moment-group.is-near .moment-strip { will-change: transform; }
@media (min-width: 768px) { .moment-strip { gap: 28px; } }

/* Every frame shares one rail; depth comes only from its distance to centre. */
.moment-frame {
    --distance-scale: .9;
    --distance-opacity: .7;
    --frame-shift: 0px;
    --frame-rotate-y: 0deg;
    --frame-depth: 0px;
    --frame-lift: 0px;
    flex-shrink: 0; position: relative; padding: 4px;
    border-radius: 20px;
    transform: translate3d(var(--frame-shift), var(--frame-lift), var(--frame-depth)) rotateY(var(--frame-rotate-y)) scale(var(--distance-scale));
    transform-origin: center center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    contain: layout style;
    overflow: visible;
    opacity: var(--distance-opacity);
}
.moment-frame::after {
    content: ''; position: absolute; z-index: 2; pointer-events: none; inset: 4px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,.13), transparent 25%, transparent 78%, rgba(232,197,140,.06));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.moment-photo {
    position: relative; z-index: 1;
    display: block; width: auto; height: clamp(160px, 26vh, 270px);
    border-radius: 16px; object-fit: cover;
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 12px 28px rgba(0,0,0,.34);
    -webkit-user-drag: none; user-select: none;
    cursor: pointer;
    transform: translateZ(0);
}
.moment-reflection { display: none; }
.cover-sound-toggle { display: none; }
.moment-frame.is-featured::after { box-shadow: inset 0 0 0 1px rgba(246,222,174,.28); }
.moment-frame:hover { opacity: 1; }
@media (min-width: 768px) { .moment-photo { height: clamp(200px, 31vh, 330px); } }

/* active group label + progress + hint */
.moments-progress, .moments-scroll-hint { z-index: 120; pointer-events: none; }
.moment-caption {
    position: absolute; z-index: 125; left: 50%; bottom: 2.8rem;
    display: flex; align-items: flex-start; gap: .85rem;
    width: min(36rem, calc(100vw - 2rem)); min-height: 3.4rem;
    padding: .75rem 1rem; border-left: 1px solid rgba(232,197,140,.48);
    color: var(--text-2); background: linear-gradient(90deg, rgba(10,7,13,.62), transparent);
    transform: translateX(-50%) translateY(8px); opacity: 0; pointer-events: none;
    transition: opacity .45s ease, transform .55s var(--ease-smooth);
}
.moment-caption.has-content { opacity: 1; transform: translateX(-50%) translateY(0); }
.moment-caption-number { flex: 0 0 auto; color: var(--gold); font-size: .62rem; letter-spacing: .14em; }
.moment-caption-copy { min-width: 0; display: grid; gap: .15rem; }
.moment-caption-copy strong { color: var(--text); font-size: .72rem; font-weight: 400; letter-spacing: .08em; }
.moment-caption-copy p {
    margin: 0; color: var(--text-2); font-size: .78rem; line-height: 1.6;
    display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.moments-progress {
    position: absolute; bottom: clamp(2.2rem, 6vh, 3.2rem); left: 50%; transform: translateX(-50%);
    width: min(220px, 60vw); height: 2px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden;
}
.moments-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--rose)); box-shadow: 0 0 12px rgba(232,197,140,0.6); }
.moments-scroll-hint {
    position: absolute; bottom: clamp(1rem, 3.2vh, 1.6rem); left: 50%; transform: translateX(-50%);
    font-size: 0.6rem; letter-spacing: 0.24em; color: var(--text-3); text-transform: uppercase;
    opacity: 0.7; animation: float-down 3s ease-in-out infinite;
}

/* While the pinned gallery is active, spend the frame budget on photographs. */
body.gallery-focus .stage-backdrop .blob,
body.gallery-focus .stage-backdrop .light-rays,
body.gallery-focus .stage-backdrop .star,
body.gallery-focus .particle {
    animation-play-state: paused !important;
}
body.gallery-focus .particle-container { opacity: 0; }
body.gallery-focus #cursor-glow { opacity: 0.35 !important; }
body.gallery-focus #moments-pin .deco-orb { display: none; }
.sound-hint-badge.is-hidden {
    opacity: 0 !important;
    transform: translateY(-6px);
    animation: none;
}

body.gallery-lite.gallery-focus .stage-backdrop .light-rays,
body.gallery-lite.gallery-focus .stage-backdrop .starfield,
body.gallery-lite.gallery-focus .particle-container { display: none; }
body.gallery-lite .moment-photo { box-shadow: 0 10px 22px rgba(0,0,0,0.34); }

@media (max-width: 767px), (prefers-reduced-motion: reduce) {
    .sound-hint-badge {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(28,21,31,0.88);
        animation: none;
    }
    .moment-frame { border-radius: 18px; }
    .moment-frame::after, .moment-photo { border-radius: 14px; }
    .moment-caption { bottom: 5.2rem; padding: .6rem .75rem; }
    .moments-chapter-word { font-size: clamp(3.8rem, 21vw, 7rem); opacity: .55; }
}

@media (max-width: 767px) {
    #moments-pin::before {
        content: ''; position: absolute; z-index: 0; pointer-events: none;
        left: -12%; right: -12%; top: 20%; height: 64%;
        background:
            radial-gradient(ellipse 62% 46% at 50% 46%,
                rgba(5,5,8,.68) 0%,
                rgba(7,6,10,.54) 47%,
                rgba(9,7,12,.24) 72%,
                transparent 100%);
        opacity: calc(var(--cover-stage-presence) * .96);
        transform: scale(calc(.94 + var(--cover-stage-presence) * .06));
        transition: opacity 160ms linear, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    #moments-pin::after {
        content: ''; position: absolute; z-index: 0; pointer-events: none;
        left: -4%; right: -4%; top: 55%; height: 27%;
        background:
            radial-gradient(ellipse 64% 70% at 50% 0%,
                rgba(0,0,0,.46) 0%,
                rgba(0,0,0,.22) 54%,
                transparent 100%);
        transform: perspective(500px) rotateX(58deg) scaleX(.96);
        transform-origin: top center;
        opacity: calc(var(--cover-stage-presence) * .72);
        transition: opacity 180ms linear;
    }
    #moments-stage {
        top: clamp(10.5rem, 21vh, 12rem);
        bottom: clamp(6rem, 13vh, 7.5rem);
        perspective: 1200px;
        perspective-origin: 50% 44%;
    }
    .cover-sound-toggle {
        position: absolute; z-index: 130; right: .85rem; top: clamp(10.8rem, 21.5vh, 12.3rem);
        width: 2.35rem; height: 2.35rem; display: inline-flex; align-items: center; justify-content: center;
        color: rgba(255,255,255,.72); background: rgba(8,8,10,.62);
        border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
        box-shadow: 0 8px 20px rgba(0,0,0,.24);
        transition: color 180ms ease, background 180ms ease, opacity 180ms ease;
    }
    .cover-sound-toggle:active { color: #fff; background: rgba(255,255,255,.12); }
    .cover-sound-toggle.is-muted { color: rgba(255,255,255,.34); opacity: .72; }
    .moment-group {
        height: 100%;
        transform-style: preserve-3d;
        touch-action: pan-y;
    }
    .moment-strip {
        position: absolute; inset: 0;
        display: block; padding: 0;
        perspective: 1200px; perspective-origin: 50% 44%;
        transform-style: preserve-3d;
    }
    .moment-frame {
        --cover-x: 0px;
        --cover-z: -200px;
        --cover-rotate: 70deg;
        --cover-scale: .82;
        --cover-opacity: 0;
        position: absolute; left: 50%; top: 43%;
        padding: 3px;
        visibility: hidden; pointer-events: none;
        opacity: var(--cover-opacity);
        transform:
            translateX(var(--cover-x))
            translate3d(-50%, -50%, var(--cover-z))
            rotateY(var(--cover-rotate))
            scale(var(--cover-scale));
        transform-origin: center center;
        transition:
            transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 220ms ease-out;
        will-change: transform, opacity;
    }
    #moments-stage.is-cover-rapid .moment-frame {
        transition:
            transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 160ms ease-out;
    }
    .moment-frame.is-cover-entry-ready {
        opacity: 0 !important;
        transform:
            translateX(var(--cover-entry-x, 180px))
            translate3d(-50%, -50%, -100px)
            rotateY(var(--cover-entry-rotate, -70deg))
            scale(.9) !important;
    }
    .moment-frame.is-cover-entry-playing {
        visibility: visible;
        pointer-events: auto;
    }
    .moment-frame.is-cover-visible {
        visibility: visible;
        pointer-events: auto;
    }
    .moment-photo {
        height: clamp(150px, 23vh, 194px);
        max-width: 60vw;
        object-fit: contain;
        border-radius: 14px;
        background: rgba(7,7,8,.9);
        border-color: rgba(255,255,255,.14);
        box-shadow: 0 15px 28px rgba(0,0,0,.48);
    }
    .moment-frame.is-cover-near .moment-reflection {
        display: block;
        position: absolute; z-index: 0; pointer-events: none;
        left: 3px; top: calc(100% + 7px);
        width: calc(100% - 6px); height: calc(100% - 6px);
        object-fit: contain; border-radius: 14px;
        transform: scaleY(-1) translateZ(0); transform-origin: center center;
        opacity: .3;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.86), rgba(0,0,0,.28) 46%, transparent 82%);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.86), rgba(0,0,0,.28) 46%, transparent 82%);
    }
    .moment-frame.is-focus .moment-photo {
        border-color: rgba(255,255,255,.28);
        box-shadow: 0 18px 34px rgba(0,0,0,.56);
    }
    .moment-frame::after {
        inset: 3px;
        background: linear-gradient(155deg, rgba(255,255,255,.17), transparent 28%, transparent 82%);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }
    .moment-caption {
        bottom: 5.4rem;
        background: linear-gradient(90deg, rgba(10,7,13,.76), rgba(10,7,13,.28), transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .moment-frame {
        --distance-scale: 1 !important;
        --distance-opacity: 1 !important;
        --frame-rotate-y: 0deg !important;
        --frame-depth: 0px !important;
        --frame-lift: 0px !important;
    }
    .future-memory-frame { transition: none; }
}

#to-be-continued {
    font-size: 1.15rem; color: var(--gold); letter-spacing: 0.3em; margin-top: 4.5rem;
    text-shadow: 0 0 30px rgba(232,197,140,0.35);
    transition: opacity 1.2s ease;
}

/* ===================================================================
   ARTICLE / LETTER
   =================================================================== */
#paragraph-section {
    padding: 8rem 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; position: relative;
}
.letter-shell {
    position: relative; max-width: 44rem; width: 100%;
    background: linear-gradient(160deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
    backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border: 1px solid var(--glass-border); border-radius: var(--radius-xl);
    padding: 3.4rem 1.8rem; z-index: 1;
    box-shadow: var(--shadow-ambient), var(--inner-hi), 0 0 120px rgba(232,197,140,0.08);
}
.letter-shell::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(232,197,140,0.4), transparent 40%, transparent 70%, rgba(231,169,178,0.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.letter-corner { position: absolute; width: 30px; height: 30px; opacity: 0.6; }
.letter-corner-tl { top: 16px; left: 16px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.letter-corner-br { bottom: 16px; right: 16px; border-bottom: 1px solid var(--rose); border-right: 1px solid var(--rose); }
@media (min-width: 768px) { .letter-shell { padding: 5rem 4rem; max-width: 48rem; } }

#paragraph-content { position: relative; z-index: 2; }
.paragraph-article { padding: 1.5rem 0; }
.paragraph-article + .paragraph-article { margin-top: 2.5rem; border-top: 1px solid rgba(232,197,140,0.18); padding-top: 3rem; }

.paragraph-title-line {
    margin-bottom: 2.6rem; text-align: center; font-family: 'TreeHoleFont', cursive;
    font-size: 2rem; line-height: 1.4; letter-spacing: 0.04em;
    background: linear-gradient(120deg, var(--gold-bright), var(--rose));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(232,197,140,0.3));
}
@media (min-width: 768px) { .paragraph-title-line { font-size: 2.5rem; } }
.paragraph-blank-line { min-height: 1.2rem; }

.paragraph-article p:not(.paragraph-title-line):not(.paragraph-blank-line) {
    font-family: 'ParagraphFont', serif; font-size: 1rem; line-height: 2.2; color: var(--text);
    margin: 0.2rem 0; text-shadow: 0 1px 20px rgba(0,0,0,0.3);
}
@media (min-width: 768px) { .paragraph-article p:not(.paragraph-title-line):not(.paragraph-blank-line) { font-size: 1.1rem; line-height: 2.3; } }

.paragraph-line, .quote-line {
    opacity: 0; transform: translateY(26px); filter: blur(8px);
    transition: opacity 0.9s var(--ease-cinematic), transform 0.9s var(--ease-smooth), filter 0.8s ease;
}
.paragraph-line.visible, .quote-line.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ===================================================================
   LOVE MUSEUM ENTRY
   =================================================================== */
#museum-entry-section {
    min-height: auto; padding: 5rem 1.5rem 2.8125rem; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: visible;
}
.museum-entry-ticket {
    position: relative; z-index: 2; display: grid; justify-items: center; align-content: center; gap: 1rem;
    width: min(46rem, 100%); min-height: 19rem; padding: 3rem 5rem 3rem 3rem; overflow: hidden;
    border: 1px solid rgba(232,197,140,.32); border-radius: var(--radius-sm);
    color: var(--text); text-align: center; text-decoration: none;
    background:
        linear-gradient(90deg, transparent calc(100% - 4rem), rgba(232,197,140,.1) calc(100% - 4rem)),
        linear-gradient(150deg, rgba(43,54,48,.94), rgba(16,13,18,.96));
    box-shadow:
        0 30px 72px -28px rgba(0,0,0,.78),
        0 0 72px rgba(48,69,61,.24),
        0 1px 0 rgba(255,255,255,.045);
}
.museum-entry-ticket::before {
    content: ""; position: absolute; inset: .7rem; pointer-events: none;
    border: 1px solid rgba(232,197,140,.16); border-radius: 4px;
}
.museum-entry-ticket::after {
    content: ""; position: absolute; top: 0; bottom: 0; right: 4rem;
    border-left: 1px dashed rgba(232,197,140,.35);
}
.museum-ticket-side {
    position: absolute; right: 1.35rem; top: 50%; color: var(--gold); font-size: .56rem; letter-spacing: .25em;
    writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
}
.museum-entry-kicker { color: var(--gold); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; }
.museum-entry-title { font-size: clamp(3rem, 9vw, 5.5rem); line-height: 1; color: var(--gold-bright); }
.museum-entry-copy { max-width: 28rem; color: var(--text-2); line-height: 1.9; letter-spacing: .06em; }
.museum-entry-stub { display: inline-flex; align-items: center; gap: .65rem; margin-top: .3rem; color: var(--gold); font-size: .7rem; letter-spacing: .16em; }
.museum-entry-ticket { transition: transform .55s var(--ease-smooth), border-color .55s ease, box-shadow .55s ease; }
.museum-entry-ticket:hover {
    transform: translateY(-6px) rotate(-.35deg); border-color: var(--gold);
    box-shadow:
        0 38px 86px -28px rgba(0,0,0,.82),
        0 0 92px rgba(48,69,61,.34),
        0 0 42px rgba(232,197,140,.1);
}

/* ===================================================================
   TRAVEL MEMORIES ENTRY
   =================================================================== */
#travel-entry-section {
    position: relative; min-height: auto; display: grid; place-items: center;
    padding: 2.8125rem 1rem; overflow: visible;
}
.travel-entry-pass {
    position: relative; z-index: 3; width: min(58rem,100%); min-height: 23rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3.5rem 2rem; overflow: hidden; text-align: center; color: var(--text); text-decoration: none;
    border: 1px solid rgba(232,197,140,.24); border-radius: var(--radius-md);
    background:
        linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.018)),
        repeating-linear-gradient(0deg,transparent 0 7px,rgba(255,255,255,.012) 7px 8px);
    box-shadow:
        0 30px 72px -28px rgba(0,0,0,.76),
        0 0 72px rgba(232,197,140,.16),
        inset 0 1px rgba(255,255,255,.08);
    backdrop-filter: blur(20px) saturate(1.16); -webkit-backdrop-filter: blur(20px) saturate(1.16);
    transition: transform .55s var(--ease-smooth), border-color .4s ease, box-shadow .45s ease;
}
.travel-entry-pass::before {
    content: ''; position: absolute; inset: .75rem; pointer-events: none;
    border: 1px dashed rgba(232,197,140,.16); border-radius: calc(var(--radius-md) - 5px);
}
.travel-entry-pass::after {
    content: 'OUR ROUTE'; position: absolute; right: -2.25rem; bottom: 2rem;
    width: 10rem; padding: .45rem 0; color: rgba(232,197,140,.42);
    border-block: 1px solid rgba(232,197,140,.2); font-family: 'OtherFont',sans-serif;
    font-size: .6rem; letter-spacing: .28em; transform: rotate(-8deg);
}
.travel-entry-pass:hover {
    transform: translateY(-6px) rotate(.25deg); border-color: rgba(232,197,140,.48);
    box-shadow:
        0 38px 86px -28px rgba(0,0,0,.82),
        0 0 96px rgba(232,197,140,.28),
        0 0 48px rgba(231,169,178,.1),
        inset 0 1px rgba(255,255,255,.1);
}
.travel-entry-route {
    display: flex; align-items: center; width: min(20rem,72%); margin-bottom: 1.5rem; color: var(--gold);
}
.travel-entry-route span {
    flex: 1; height: 1px; margin: 0 .65rem;
    background: repeating-linear-gradient(90deg,var(--gold-deep) 0 6px,transparent 6px 11px);
    transition: transform .6s var(--ease-smooth);
}
.travel-entry-pass:hover .travel-entry-route span { transform: scaleX(1.08); }
.travel-entry-route svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.travel-entry-kicker { color: var(--gold); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; }
.travel-entry-title { margin-top: .8rem; color: var(--gold-bright); font-size: clamp(3.4rem,10vw,6.2rem); line-height: 1; }
.travel-entry-copy { max-width: 32rem; margin-top: 1rem; color: var(--text-2); line-height: 1.9; letter-spacing: .06em; }
.travel-entry-action {
    display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.4rem;
    color: var(--gold-bright); font-size: .75rem; letter-spacing: .08em;
}
.travel-entry-action svg { width: 1rem; height: 1rem; transition: transform .35s var(--ease-smooth); }
.travel-entry-pass:hover .travel-entry-action svg { transform: translateX(4px); }

/* ===================================================================
   FUTURE ENTRY
   =================================================================== */
#future-entry-section {
    min-height: auto; padding: 2.8125rem 1.5rem 5rem; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: visible;
}
.future-entry-link {
    width: min(42rem, 100%); min-height: 21rem; position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
    text-align: center; color: var(--text); text-decoration: none;
    background: linear-gradient(160deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
    border: 1px solid var(--glass-border); border-radius: var(--radius-xl);
    box-shadow:
        0 30px 72px -28px rgba(0,0,0,.76),
        0 0 78px rgba(231,169,178,.14),
        var(--inner-hi);
    backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
    padding: 3.4rem 1.8rem; overflow: hidden; transition: transform 0.55s var(--ease-smooth), border-color 0.55s ease, box-shadow 0.55s ease;
}
.future-entry-link::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(169,198,230,0.38), transparent 36%, transparent 65%, rgba(232,197,140,0.42));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.future-entry-link::after {
    content: ''; position: absolute; width: 18rem; height: 18rem; border-radius: 50%;
    right: -7rem; bottom: -8rem; background: radial-gradient(circle, rgba(169,198,230,0.18), transparent 68%);
    pointer-events: none; transition: transform 0.7s var(--ease-smooth), opacity 0.7s ease;
}
.future-entry-link:hover {
    transform: translateY(-6px); border-color: var(--glass-border-bright);
    box-shadow:
        0 38px 86px -28px rgba(0,0,0,.82),
        0 0 98px rgba(231,169,178,.25),
        0 0 46px rgba(169,198,230,.11),
        var(--inner-hi);
}
.future-entry-link:hover::after { transform: scale(1.14) translate(-1rem, -1rem); opacity: 0.9; }
.future-entry-kicker {
    color: var(--gold); font-size: 0.68rem; letter-spacing: 0.42em; text-transform: uppercase; opacity: 0.86;
}
.future-entry-title {
    font-size: clamp(2.6rem, 9vw, 4.8rem); line-height: 1.05;
    background: linear-gradient(120deg, #fff 0%, var(--gold-bright) 48%, var(--sky) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 28px rgba(232,197,140,0.26));
}
.future-entry-copy {
    max-width: 28rem; color: var(--text-2); font-size: 0.96rem; line-height: 2; letter-spacing: 0.06em;
}
.future-entry-action {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    min-height: 3rem; margin-top: 0.5rem; padding: 0 1.35rem; border-radius: var(--radius-sm);
    color: #221913; background: linear-gradient(135deg, var(--gold-deep), var(--gold-bright) 58%, var(--rose));
    font-weight: 600; letter-spacing: 0.06em; box-shadow: 0 10px 34px rgba(232,197,140,0.26);
}
.future-entry-action i { transition: transform 0.4s var(--ease-smooth); }
.future-entry-link:hover .future-entry-action i { transform: translateX(4px); }

@media (min-width: 641px) {
    .museum-entry-ticket,
    .travel-entry-pass,
    .future-entry-link {
        width: min(48rem, calc(100% - 3rem));
    }

    .museum-entry-title,
    .travel-entry-title,
    .future-entry-title {
        font-size: clamp(4.4rem, 6vw, 5.2rem);
        line-height: 1;
    }
}

/* ===================================================================
   FUTURE PAGE
   =================================================================== */
.future-page { min-height: 100vh; }
.future-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 2.4rem);
}
.future-back {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.7rem; padding: 0 0.9rem;
    color: var(--text-2); text-decoration: none; border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); background: rgba(14, 9, 17, 0.68);
    backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
    box-shadow: var(--shadow-soft); transition: all 0.35s var(--ease-smooth);
}
.future-back:hover { color: var(--gold-bright); border-color: var(--glass-border-bright); transform: translateY(-2px); }
.future-top-title { color: var(--gold); letter-spacing: 0.32em; font-size: 0.68rem; opacity: 0.84; }
.future-top-actions, .museum-top-actions {
    display: inline-flex; align-items: center; gap: .55rem;
}
.page-music-toggle {
    display: inline-grid; place-items: center; flex: 0 0 auto;
    width: 2.7rem; height: 2.7rem; padding: 0;
    color: rgba(238,233,223,.5);
    border: 1px solid rgba(255,255,255,.13); border-radius: 50%;
    background: rgba(14,9,17,.58);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 10px 28px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.08);
    transition: color .24s ease, background .24s ease, border-color .24s ease, transform .28s var(--ease-smooth);
}
.page-music-toggle:hover, .page-music-toggle:focus-visible, .page-music-toggle.is-playing {
    color: #fff; border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.11);
}
.page-music-toggle:active { transform: scale(.92); }
.page-music-toggle.is-unavailable { opacity: .38; cursor: not-allowed; }
.page-music-toggle svg { width: 1.05rem; height: 1.05rem; }
.future-main { position: relative; z-index: 3; }
.future-hero {
    min-height: 92vh; padding: 8rem 1.5rem 4rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; overflow: hidden; text-align: center;
}
.future-hero-inner { position: relative; z-index: 3; width: min(48rem, 100%); }
.future-page .future-hero-inner.revealed { transform: translateY(-5.1rem); }
.future-title {
    margin-top: 1rem; font-size: clamp(3.4rem, 12vw, 7rem); line-height: 1;
    background: linear-gradient(120deg, #fff 0%, var(--gold-bright) 44%, var(--sky) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 34px rgba(232,197,140,0.28));
}
.future-subtitle { margin-top: 1.2rem; color: var(--text-2); font-size: 1rem; letter-spacing: 0.12em; }
.future-memory-strip {
    position: absolute; left: 50%; bottom: clamp(2rem, 7vh, 4.5rem); z-index: 2;
    width: min(68rem, calc(100vw - 2rem)); height: clamp(7.2rem, 18vw, 12rem);
    transform: translateX(-50%); pointer-events: none;
}
.future-memory-frame {
    position: absolute; left: calc(50% - 4rem); top: calc(50% - 4.5rem);
    width: clamp(5.8rem, 13vw, 8.4rem); aspect-ratio: 4 / 5; overflow: hidden;
    border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.16);
    box-shadow: var(--shadow-soft), 0 0 34px rgba(232,197,140,0.08);
    transform: translate3d(
        calc((var(--i) - 3.5) * clamp(3.8rem, 9vw, 6.8rem) + var(--gather-x, 0px)),
        var(--gather-y, 0px),
        0
    ) rotate(0deg) scale(0.88);
    opacity: 0;
    transition: transform 980ms cubic-bezier(.16, 1.18, .3, 1), opacity 420ms ease;
    transition-delay: var(--scatter-delay, 0ms);
}
.future-memory-strip.is-scattered .future-memory-frame {
    transform: translate3d(calc((var(--i) - 3.5) * clamp(3.8rem, 9vw, 6.8rem)), 0, 0)
        rotate(calc((var(--i) - 3.5) * 2deg)) scale(1);
    opacity: 0.34;
}
.future-memory-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.85); }
@media (prefers-reduced-motion: reduce) {
    .future-memory-frame { transition: none; }
}
.future-board {
    padding: 4rem 1.5rem 8rem; width: min(72rem, 100%); margin: 0 auto; position: relative;
}
.future-board-head {
    display: flex; align-items: end; justify-content: space-between; gap: 1.5rem;
    text-align: left; margin-bottom: 3rem;
}
.future-add-plan, .future-detail-action, .future-form-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 2.85rem; padding: 0 1rem; border-radius: var(--radius-sm);
    border: 1px solid rgba(232,197,140,.3);
    transition: transform .3s var(--ease-smooth), color .25s ease, background .25s ease, border-color .25s ease;
}
.future-add-plan, .future-detail-action {
    color: #241b15; background: linear-gradient(135deg, var(--gold-deep), var(--gold-bright) 62%, var(--rose));
    box-shadow: 0 10px 28px rgba(232,197,140,.2);
}
.future-add-plan:hover, .future-detail-action:hover { transform: translateY(-2px); }
.future-add-plan svg, .future-detail-action svg { width: 1rem; height: 1rem; }
.future-plan-grid {
    display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 720px) {
    .future-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
    .future-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.future-plan-card {
    min-height: 15.5rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.4rem;
    width: 100%; text-align: left; color: inherit; cursor: pointer;
    padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--glass-border);
    background: linear-gradient(160deg, rgba(255,255,255,0.078), rgba(255,255,255,0.025));
    box-shadow: var(--shadow-soft), var(--inner-hi); backdrop-filter: blur(20px) saturate(1.25);
    -webkit-backdrop-filter: blur(20px) saturate(1.25);
    transform-style: preserve-3d;
    transition: transform 0.45s var(--ease-smooth), opacity .28s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}
.future-plan-card:hover {
    transform: translateY(-4px); border-color: var(--glass-border-bright); box-shadow: var(--shadow-elevated), var(--glow-gold), var(--inner-hi);
}
.future-plan-card.is-done {
    border-color: rgba(134, 239, 172, 0.22);
    background: linear-gradient(160deg, rgba(134,239,172,0.095), rgba(255,255,255,0.025));
}
.future-plan-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }
.future-plan-card.is-originating {
    opacity: 0; transform: perspective(900px) rotateY(84deg) scale(.94); pointer-events: none;
}
.future-plan-cover {
    width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border); box-shadow: var(--shadow-soft);
}
.future-plan-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
    color: var(--gold); font-size: 0.68rem; letter-spacing: 0.12em;
}
.future-plan-meta span {
    min-height: 1.85rem; display: inline-flex; align-items: center; padding: 0 0.65rem;
    border-radius: 999px; border: 1px solid rgba(232,197,140,0.22); background: rgba(232,197,140,0.08);
}
.future-plan-title { font-size: 2rem; line-height: 1.25; color: var(--gold-bright); text-shadow: 0 0 22px rgba(232,197,140,0.18); }
.future-plan-note { color: var(--text-2); line-height: 1.95; letter-spacing: 0.04em; }
.future-plan-date {
    color: var(--text-3); font-size: 0.76rem; letter-spacing: 0.08em; border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.8rem;
}
.future-plan-open {
    display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2);
    font-size: .72rem; letter-spacing: .08em;
}
.future-plan-open svg { width: .9rem; height: .9rem; transition: transform .3s var(--ease-smooth); }
.future-plan-card:hover .future-plan-open svg { transform: translate(2px,-2px); }
.future-empty {
    grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 2rem 0;
}
body.future-modal-open { overflow: hidden; }
.future-plan-modal {
    position: fixed; inset: 0; z-index: 200;
    display: grid; place-items: center; padding: 1rem;
    perspective: 1200px;
}
.future-plan-modal[hidden] { display: none; }
.future-plan-modal-backdrop {
    position: absolute; inset: 0; background: rgba(5,4,8,.18);
    backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0);
    opacity: 0; transition: opacity .3s ease, backdrop-filter .35s ease;
}
.future-plan-modal.is-open .future-plan-modal-backdrop {
    opacity: 1; backdrop-filter: blur(16px) saturate(.9); -webkit-backdrop-filter: blur(16px) saturate(.9);
}
.future-plan-detail {
    --origin-x: 0px; --origin-y: 0px; --origin-scale-x: .7; --origin-scale-y: .7;
    position: relative; z-index: 1; width: min(42rem, calc(100vw - 2rem));
    height: min(43rem, calc(100svh - 2rem)); min-height: 34rem;
    border: 1px solid rgba(255,255,255,.17); border-radius: var(--radius-md);
    background: linear-gradient(150deg, rgba(31,23,34,.98), rgba(11,9,15,.98));
    box-shadow: 0 28px 90px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.08);
    overflow: hidden; opacity: 0; transform-style: preserve-3d;
    transform: translate3d(var(--origin-x), var(--origin-y), 0)
        rotateY(-84deg) scale(var(--origin-scale-x), var(--origin-scale-y));
    transition: transform 380ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
}
.future-plan-modal.is-open .future-plan-detail {
    opacity: 1; transform: translate3d(0,0,0) rotateY(0) scale(1);
}
.future-plan-close {
    position: absolute; z-index: 5; top: 1rem; right: 1rem;
    width: 2.55rem; height: 2.55rem; display: grid; place-items: center;
    color: var(--text-2); border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
    background: rgba(255,255,255,.055); transition: color .25s ease, background .25s ease, transform .3s ease;
}
.future-plan-close:hover { color: #fff; background: rgba(255,255,255,.12); transform: rotate(90deg); }
.future-plan-close svg { width: 1rem; height: 1rem; }
.future-detail-flipper {
    position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
    transition: transform 420ms cubic-bezier(.2,.8,.2,1);
}
.future-detail-flipper.is-editing { transform: rotateY(180deg); }
.future-detail-flipper.no-transition { transition: none; }
.future-detail-face {
    position: absolute; inset: 0; overflow-y: auto; padding: clamp(2rem, 5vw, 3.6rem);
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.future-detail-view {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.5rem;
}
.future-detail-meta { display: flex; gap: .55rem; padding-right: 3rem; }
.future-detail-meta span {
    min-height: 1.9rem; display: inline-flex; align-items: center; padding: 0 .7rem;
    color: var(--gold); font-size: .68rem; letter-spacing: .1em;
    border: 1px solid rgba(232,197,140,.25); border-radius: 999px; background: rgba(232,197,140,.07);
}
.future-detail-view h2 { color: var(--gold-bright); font-size: clamp(2.5rem, 8vw, 4.4rem); line-height: 1.1; }
.future-detail-view > p {
    max-width: 34rem; color: var(--text-2); font-size: 1rem; line-height: 2; letter-spacing: .04em;
    white-space: pre-wrap;
}
.future-detail-facts {
    width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem;
}
.future-detail-facts div { padding: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.future-detail-facts dt { color: var(--text-3); font-size: .68rem; margin-bottom: .35rem; }
.future-detail-facts dd { color: var(--text-2); font-size: .82rem; }
.future-detail-form { transform: rotateY(180deg); display: flex; flex-direction: column; gap: 1rem; }
.future-form-heading { padding-right: 3rem; }
.future-form-heading h2 { margin-top: .35rem; color: var(--gold-bright); font-size: 2.1rem; }
.future-field { display: grid; gap: .42rem; color: var(--text-2); font-size: .72rem; }
.future-field input, .future-field select, .future-field textarea {
    width: 100%; color: var(--text-1); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-sm); background: rgba(255,255,255,.055);
    padding: .8rem .9rem; outline: none; resize: vertical;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.future-field input:focus, .future-field select:focus, .future-field textarea:focus {
    border-color: rgba(232,197,140,.58); background: rgba(255,255,255,.08);
    box-shadow: 0 0 0 3px rgba(232,197,140,.1);
}
.future-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.future-form-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: auto; }
.future-form-secondary { color: var(--text-2); background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.12); }
.future-form-secondary:hover { color: #fff; background: rgba(255,255,255,.1); }
.future-detail-action:disabled { opacity: .55; cursor: wait; transform: none; }
.future-detail-action.is-saving svg { animation: spin-slow 1s linear infinite; }
.future-toast {
    position: fixed; z-index: 230; left: 50%; bottom: 1.5rem; max-width: calc(100vw - 2rem);
    padding: .75rem 1rem; color: #1d1712; background: var(--gold-bright);
    border-radius: var(--radius-sm); box-shadow: 0 14px 42px rgba(0,0,0,.35);
    opacity: 0; transform: translate(-50%, 1rem); pointer-events: none;
    transition: opacity .25s ease, transform .3s var(--ease-smooth);
}
.future-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.future-toast.is-error { color: #fff; background: #9f4554; }
@media (max-width: 640px) {
    .future-top-title { display: none; }
    .future-top-actions { margin-left: auto; }
    .museum-entry-ticket { min-height: 18rem; padding: 2.5rem 4rem 2.5rem 1.5rem; }
    .travel-entry-pass { min-height: 20rem; padding: 3rem 1.2rem; }
    .future-entry-link { min-height: 19rem; padding: 3rem 1.4rem; }
    #museum-entry-section { padding: 4rem .75rem 3.75rem; }
    #travel-entry-section { padding: 3.75rem .75rem; }
    #future-entry-section { padding: 3.75rem .75rem 4rem; }
    .future-page .future-hero-inner.revealed { transform: translateY(-3.2rem); }
    .future-memory-strip { opacity: 0.55; }
    .future-plan-card { min-height: 13.5rem; }
    .future-board-head { align-items: stretch; flex-direction: column; text-align: center; }
    .future-add-plan { align-self: center; }
    .future-plan-detail { height: calc(100svh - 1rem); min-height: 0; width: calc(100vw - 1rem); }
    .future-detail-face { padding: 4.2rem 1.2rem 1.2rem; }
    .future-detail-view { justify-content: flex-start; }
    .future-detail-view h2 { font-size: 2.7rem; }
    .future-detail-facts, .future-form-row { grid-template-columns: 1fr; }
    .future-form-actions { position: sticky; bottom: 0; padding-top: .7rem; background: linear-gradient(transparent, rgba(13,10,16,.98) 30%); }
}
@media (prefers-reduced-motion: reduce) {
    .future-plan-detail, .future-detail-flipper, .future-plan-card { transition-duration: .01ms !important; }
}

/* ===================================================================
   TREE HOLE
   =================================================================== */
#tree-hole-section {
    padding: 8rem 1rem 9rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    min-height: 100vh; position: relative;
}
#tree-hole-form {
    background: linear-gradient(160deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
    backdrop-filter: blur(26px) saturate(1.3); -webkit-backdrop-filter: blur(26px) saturate(1.3);
    border: 1px solid var(--glass-border); border-radius: var(--radius-xl);
    padding: 2.6rem 1.8rem; box-shadow: var(--shadow-ambient), var(--inner-hi);
    transition: box-shadow 0.5s ease, transform 0.5s var(--ease-smooth); position: relative;
}
#tree-hole-form:hover { box-shadow: var(--shadow-ambient), var(--glow-gold), var(--inner-hi); transform: translateY(-3px); }
@media (min-width: 768px) { #tree-hole-form { padding: 3rem 2.6rem; } }

.form-hint { text-align: center; color: var(--text-2); font-size: 0.9rem; letter-spacing: 0.06em; margin-bottom: 1.6rem; }

#tree-hole-form textarea {
    background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-sm);
    resize: none; transition: all 0.4s var(--ease-smooth); font-family: 'OtherFont', sans-serif; color: var(--text);
}
#tree-hole-form textarea::placeholder { color: var(--text-faint); }
#tree-hole-form textarea:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,197,140,0.12), 0 0 36px rgba(232,197,140,0.12);
    outline: none; background: rgba(0,0,0,0.32);
}

.tree-hole-upload-label {
    background: rgba(255,255,255,0.06) !important; color: var(--text-2) !important; border-radius: var(--radius-sm) !important;
    transition: all 0.4s var(--ease-smooth) !important; border: 1px solid var(--glass-border) !important; min-width: 0;
}
.tree-hole-upload-label #file-upload-text { max-width: min(42vw, 18rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-hole-upload-label:hover { background: rgba(232,197,140,0.12) !important; color: var(--gold-bright) !important; transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--glass-border-bright) !important; }

#submit-message {
    background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 50%, var(--rose) 100%) !important;
    color: #2a1d15 !important; border: none !important; border-radius: var(--radius-sm) !important;
    font-weight: 600; letter-spacing: 0.08em; transition: all 0.4s var(--ease-smooth) !important;
    box-shadow: 0 6px 26px rgba(232,197,140,0.3); position: relative; overflow: hidden;
}
#submit-message::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent, rgba(255,255,255,0.4) 50%, transparent); transform: translateX(-120%); transition: transform 0.7s ease; }
#submit-message:hover { transform: translateY(-3px) !important; box-shadow: 0 10px 34px rgba(232,197,140,0.42), var(--glow-gold) !important; filter: brightness(1.06); }
#submit-message:hover::before { transform: translateX(120%); }
#submit-message:disabled { opacity: 0.6; transform: none !important; box-shadow: none !important; }

/* timeline */
#message-display { perspective: 1200px; }
.timeline-entry {
    display: flex; position: relative; padding-left: 42px; padding-bottom: 2.4rem;
    opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}
.timeline-entry.visible { opacity: 1; transform: translateY(0); }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-line { position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--gold), var(--rose), transparent); border-radius: 2px; box-shadow: 0 0 10px rgba(232,197,140,0.3); }
.timeline-entry:last-child .timeline-line { display: none; }
.timeline-point {
    position: absolute; left: 2px; top: 6px; width: 16px; height: 16px; border-radius: 9999px;
    background: linear-gradient(135deg, var(--gold-bright), var(--rose)); border: 3px solid var(--bg-1);
    box-shadow: 0 0 0 3px rgba(232,197,140,0.15), 0 0 14px rgba(232,197,140,0.5); transition: all 0.4s var(--ease-smooth);
}
.timeline-entry:hover .timeline-point { box-shadow: 0 0 0 4px rgba(232,197,140,0.2), 0 0 24px rgba(232,197,140,0.7); transform: scale(1.2); }
.timeline-content {
    flex-grow: 1; background: var(--glass-2); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft), var(--inner-hi); transition: all 0.5s var(--ease-smooth);
}
.timeline-content:hover { box-shadow: var(--shadow-elevated), var(--glow-gold), var(--inner-hi); transform: translateY(-3px) scale(1.01); border-color: var(--glass-border-bright); }
.timeline-time { font-size: 0.7rem; color: var(--gold); margin-bottom: 0.4rem; font-family: 'OtherFont', sans-serif; letter-spacing: 0.05em; opacity: 0.85; }
.timeline-message { word-wrap: break-word; white-space: pre-wrap; color: var(--text); font-family: 'OtherFont', sans-serif; line-height: 1.9; }
.timeline-media img, .timeline-media video, .timeline-media audio { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin-top: 0.75rem; box-shadow: var(--shadow-soft); border: 1px solid var(--glass-border); }
.timeline-media img { cursor: pointer; transition: filter 0.4s ease; }
.timeline-media img:hover { filter: brightness(1.08); }
.timeline-media audio { width: 100%; }
#message-display > p { color: var(--text-3); }

.timeline-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.45rem; }
.timeline-meta .timeline-time { margin-bottom: 0; }

/* ---- couple dual-view: sender colour coding ---- */
:root {
    --baby: #E7A9B2;          /* Baby Egg — warm rose */
    --baby-soft: rgba(231, 169, 178, 0.16);
    --cooker: #E8C58C;        /* Egg cooker — champagne gold */
    --cooker-soft: rgba(232, 197, 140, 0.16);
}
.sender-tag {
    display: inline-flex; align-items: center; gap: 0.38rem;
    font-family: 'OtherFont', sans-serif; font-size: 0.66rem; letter-spacing: 0.12em;
    padding: 0.16rem 0.6rem; border-radius: 999px;
    background: var(--glass-2); border: 1px solid var(--glass-border); color: var(--text-2);
}
.sender-tag .sender-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 8px currentColor; }

.timeline-entry.sender-baby .timeline-content { border-left: 3px solid var(--baby); background: linear-gradient(120deg, var(--baby-soft), var(--glass-2) 60%); }
.timeline-entry.sender-baby .timeline-point { background: linear-gradient(135deg, var(--baby), #f4c8cf); box-shadow: 0 0 0 3px rgba(231,169,178,0.18), 0 0 14px rgba(231,169,178,0.55); }
.timeline-entry.sender-baby .sender-tag { color: var(--baby); border-color: rgba(231,169,178,0.4); }
.timeline-entry.sender-baby .sender-tag .sender-dot { background: var(--baby); }

.timeline-entry.sender-cooker .timeline-content { border-left: 3px solid var(--cooker); background: linear-gradient(120deg, var(--cooker-soft), var(--glass-2) 60%); }
.timeline-entry.sender-cooker .timeline-point { background: linear-gradient(135deg, var(--cooker), var(--gold-bright)); box-shadow: 0 0 0 3px rgba(232,197,140,0.18), 0 0 14px rgba(232,197,140,0.55); }
.timeline-entry.sender-cooker .sender-tag { color: var(--cooker); border-color: rgba(232,197,140,0.4); }
.timeline-entry.sender-cooker .sender-tag .sender-dot { background: var(--cooker); }

/* ---- timeline month node ---- */
.timeline-month {
    position: relative; padding-left: 42px; margin: 1rem 0 2.2rem;
    opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}
.timeline-month.visible { opacity: 1; transform: translateY(0); }
.timeline-month-dot {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, var(--gold-bright), var(--gold-deep));
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 0 5px rgba(232,197,140,0.12), 0 0 22px rgba(232,197,140,0.7);
    animation: month-dot-pulse 3.6s ease-in-out infinite;
}
@keyframes month-dot-pulse {
    0%,100% { box-shadow: 0 0 0 5px rgba(232,197,140,0.1), 0 0 18px rgba(232,197,140,0.55); }
    50% { box-shadow: 0 0 0 7px rgba(232,197,140,0.16), 0 0 30px rgba(232,197,140,0.85); }
}
.timeline-month-label {
    display: inline-block; padding: 0.5rem 1.3rem; border-radius: 999px;
    background: linear-gradient(120deg, rgba(232,197,140,0.16), rgba(231,169,178,0.12));
    border: 1px solid var(--glass-border-bright);
    color: var(--gold-bright); font-size: 1.32rem; font-weight: 600; letter-spacing: 0.18em;
    text-shadow: 0 0 20px rgba(232,197,140,0.65), 0 0 40px rgba(231,169,178,0.3);
    box-shadow: var(--inner-hi), 0 0 26px rgba(232,197,140,0.2);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: month-glow 3.6s ease-in-out infinite;
}
@keyframes month-glow {
    0%,100% { box-shadow: var(--inner-hi), 0 0 22px rgba(232,197,140,0.16); }
    50% { box-shadow: var(--inner-hi), 0 0 36px rgba(232,197,140,0.42), 0 0 64px rgba(231,169,178,0.2); }
}
@media (min-width: 768px) { .timeline-month-label { font-size: 1.5rem; } }

/* ---- tree-hole sender selector (form) ---- */
.sender-select { display: flex; gap: 0.6rem; }
.sender-option {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.6rem 0.5rem; border-radius: var(--radius-sm); cursor: pointer;
    background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border);
    color: var(--text-2); font-size: 0.82rem; letter-spacing: 0.04em;
    transition: all 0.35s var(--ease-smooth); user-select: none;
}
.sender-option input { position: absolute; opacity: 0; pointer-events: none; }
.sender-option .sender-dot { width: 10px; height: 10px; border-radius: 50%; transition: all 0.3s ease; }
.sender-option.sender-baby .sender-dot { background: var(--baby); }
.sender-option.sender-cooker .sender-dot { background: var(--cooker); }
.sender-option:hover { border-color: var(--glass-border-bright); color: var(--text); }
.sender-option.sender-baby:has(input:checked) { border-color: var(--baby); background: var(--baby-soft); color: #f6d3d8; box-shadow: 0 0 18px rgba(231,169,178,0.2); }
.sender-option.sender-cooker:has(input:checked) { border-color: var(--cooker); background: var(--cooker-soft); color: var(--gold-bright); box-shadow: 0 0 18px rgba(232,197,140,0.2); }
.sender-option:has(input:checked) .sender-dot { box-shadow: 0 0 12px currentColor; transform: scale(1.2); }

/* ---- article signature (author + time) ---- */
.paragraph-signature {
    margin-top: 2rem; padding-top: 0.4rem; text-align: right;
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem;
    font-family: 'ParagraphFont', serif;
}
.paragraph-author { color: var(--gold-bright); font-size: 1.05rem; letter-spacing: 0.06em; text-shadow: 0 0 22px rgba(232,197,140,0.25); }
.paragraph-date { color: var(--text-3); font-size: 0.8rem; letter-spacing: 0.08em; }

/* ===================================================================
   FOOTER / CREDITS
   =================================================================== */
footer { padding: 7rem 1.5rem 5rem; text-align: center; position: relative; }
.footer-divider { width: 1px; height: 70px; margin: 0 auto 2.6rem; background: linear-gradient(transparent, var(--gold), transparent); box-shadow: 0 0 12px rgba(232,197,140,0.5); }
#final-quote { max-width: 36rem; margin: 0 auto; color: var(--text-2); font-size: 1.05rem; letter-spacing: 0.05em; line-height: 2.6; transition: opacity 1.2s ease; }
@media (min-width: 768px) { #final-quote { font-size: 1.2rem; } }
.footer-sign { margin-top: 3rem; font-size: 1.5rem; color: var(--gold); letter-spacing: 0.1em; opacity: 0.7; text-shadow: 0 0 26px rgba(232,197,140,0.3); }

/* ===================================================================
   DECORATIVE ELEMENTS
   =================================================================== */
.deco-orb { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform; mix-blend-mode: screen; }
.deco-orb-1 { width: 210px; height: 210px; background: radial-gradient(circle, rgba(232,197,140,0.16) 0%, transparent 70%); filter: blur(40px); animation: float-orb 10s ease-in-out infinite; }
.deco-orb-2 { width: 160px; height: 160px; background: radial-gradient(circle, rgba(231,169,178,0.16) 0%, transparent 70%); filter: blur(35px); animation: float-orb 14s ease-in-out infinite reverse; }
.deco-orb-3 { width: 260px; height: 260px; background: radial-gradient(circle, rgba(201,184,230,0.16) 0%, transparent 70%); filter: blur(50px); animation: float-orb 18s ease-in-out infinite; }
@keyframes float-orb { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(20px,-15px) scale(1.05); } 66% { transform: translate(-10px,10px) scale(0.95); } }
.deco-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(232,197,140,0.1); pointer-events: none; animation: ring-pulse 8s ease-in-out infinite; }
@keyframes ring-pulse { 0%,100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.05); opacity: 0.75; } }
.deco-line { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,197,140,0.2), transparent); pointer-events: none; }

/* ===================================================================
   LIGHTBOX
   =================================================================== */
.lightbox {
    position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
    padding: 4vw; background: rgba(6,4,9,0.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease-cinematic), visibility 0.5s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-md); box-shadow: var(--shadow-ambient), var(--glow-gold); border: 1px solid var(--glass-border-bright); transform: scale(0.92); transition: transform 0.6s var(--ease-spring); }
.lightbox.open img { transform: scale(1); }
.lightbox-close { position: absolute; top: 5vw; right: 5vw; color: var(--text-2); background: var(--glass-2); border: 1px solid var(--glass-border); border-radius: 50%; padding: 0.6rem; transition: all 0.3s ease; }
.lightbox-close:hover { color: var(--gold-bright); transform: rotate(90deg) scale(1.1); border-color: var(--glass-border-bright); }

/* ===================================================================
   REVEAL & TRANSITIONS
   =================================================================== */
.content-hidden { display: none; opacity: 0; visibility: hidden; transition: opacity 1.1s ease-in, visibility 1.1s; }
.content-visible { opacity: 1; visibility: visible; }

.reveal-up { opacity: 0; transform: translateY(46px); transition: opacity 0.9s var(--ease-cinematic), transform 0.9s var(--ease-smooth); }
.reveal-up.revealed { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(0.94) translateY(20px); transition: opacity 0.9s var(--ease-cinematic), transform 1s var(--ease-spring); }
.reveal-scale.revealed { opacity: 1; transform: scale(1) translateY(0); }

textarea { background-color: transparent; resize: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
    .blob, .light-rays, .star, .particle { animation: none !important; }
}
