/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 温润高级配色 */
    --cream: #F7F5F2;
    --cream-warm: #FAF8F5;
    --ink: #3d3d3d;
    --ink-light: #6b6b6b;
    --ink-lighter: #9a9a9a;
    --rose: #c98b8b;
    --rose-dark: #a86b6b;
    --terracotta: #a67c6c;
    --charcoal: #4a4a4a;
    --primary: var(--rose);
    --primary-dark: var(--rose-dark);
    --accent: var(--terracotta);
    --bg: var(--cream);
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-bg-solid: #ffffff;
    --text: var(--ink);
    --text-light: var(--ink-light);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-colored: 0 12px 40px rgba(201, 139, 139, 0.12);
    --radius: 1rem;
    --radius-sm: 0.75rem;
    --radius-lg: 1.25rem;

    /* 柔和渐变（用于滚动条等装饰） */
    --dream-start: #c4b5a0;
    --dream-mid: #d4b8b8;
    --dream-end: #a8b5c4;

    /* 时光轴主题色（降低饱和度） */
    --theme-campus: #6b7fa8;
    --theme-campus-glow: rgba(107, 127, 168, 0.35);
    --theme-island: #5a9aa3;
    --theme-island-glow: rgba(90, 154, 163, 0.35);
    --theme-disney: #a67bb5;
    --theme-disney-glow: rgba(166, 123, 181, 0.35);
    --theme-sakura: #c98b9f;
    --theme-sakura-glow: rgba(201, 139, 159, 0.35);
    --theme-tianzifang: #b5866b;
    --theme-tianzifang-glow: rgba(181, 134, 107, 0.35);
    --theme-graduation: #4a6fa5;
    --theme-graduation-glow: rgba(74, 111, 165, 0.35);
    --theme-confession: #e74c3c;
    --theme-confession-glow: rgba(231, 76, 60, 0.35);
    --theme-zoo: #70a83b;
    --theme-zoo-glow: rgba(112, 168, 59, 0.35);
    --theme-aquarium: #1e88e5;
    --theme-aquarium-glow: rgba(30, 136, 229, 0.35);
    --theme-farmstay: #c9a227;
    --theme-farmstay-glow: rgba(201, 162, 39, 0.35);
    --theme-fireworks: #9b59b6;
    --theme-fireworks-glow: rgba(155, 89, 182, 0.35);
    --theme-talkshow: #c0392b;
    --theme-talkshow-glow: rgba(192, 57, 43, 0.35);
    --theme-disney-garden: #e91e63;
    --theme-disney-garden-glow: rgba(233, 30, 99, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: transparent;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.75;
}

h1, h2, h3, .section-title {
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "PingFang SC", serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

html {
    background: var(--bg);
}

/* ==================== 全屏星空与流星雨画布 ==================== */
.starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* ==================== 主题氛围过渡层 ==================== */
.theme-transition-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    background: radial-gradient(ellipse at 50% 100%, var(--theme-glow), transparent 65%);
}

body[data-active-theme="campus"] .theme-transition-layer {
    opacity: 0.45;
    background:
        radial-gradient(ellipse at 20% 100%, rgba(107, 127, 168, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(196, 181, 160, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 120%, rgba(168, 140, 120, 0.10) 0%, transparent 60%);
}

body[data-active-theme="island"] .theme-transition-layer {
    opacity: 0.5;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(90, 154, 163, 0.24) 0%, transparent 58%),
        radial-gradient(ellipse at 20% 85%, rgba(168, 181, 196, 0.12) 0%, transparent 48%),
        radial-gradient(ellipse at 80% 95%, rgba(255, 250, 230, 0.08) 0%, transparent 50%);
}

body[data-active-theme="disney"] .theme-transition-layer {
    opacity: 0.5;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(166, 123, 181, 0.20) 0%, transparent 55%),
        radial-gradient(ellipse at 25% 20%, rgba(141, 110, 99, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 25%, rgba(212, 184, 184, 0.10) 0%, transparent 42%);
}

body[data-active-theme="sakura"] .theme-transition-layer {
    opacity: 0.45;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 139, 159, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 15%, rgba(255, 230, 240, 0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 70% 20%, rgba(196, 181, 160, 0.08) 0%, transparent 48%);
}

body[data-active-theme="tianzifang"] .theme-transition-layer {
    opacity: 0.5;
    background:
        radial-gradient(ellipse at 80% 100%, rgba(181, 134, 107, 0.24) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 95%, rgba(166, 124, 108, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 110%, rgba(93, 64, 55, 0.08) 0%, transparent 55%);
}

/* ==================== 首屏照片墙 ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-wall {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--wall-cell-size, 200px), 1fr));
    grid-auto-rows: minmax(var(--wall-cell-size, 200px), 1fr);
    gap: 6px;
    background: transparent;
    z-index: 0;
    perspective: 1400px;
    perspective-origin: center center;
}

.photo-wall::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(5, 10, 18, 0) 0%,
        rgba(5, 10, 18, 0.25) 60%,
        rgba(5, 10, 18, 0.55) 100%
    );
    pointer-events: none;
}

.wall-cell {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
}

.wall-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
    filter: sepia(5%) saturate(92%) contrast(98%) brightness(1.02);
    /* 强制 GPU 层，减少低端 WebView 渲染闪烁 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.wall-cell:hover img {
    transform: scale(1.1);
    filter: sepia(0%) saturate(100%) contrast(100%) brightness(1.04);
}

.wall-cell.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.65);
}

/* 照片墙逐片翻转打开 */
.wall-cell.flip-in {
    animation: flipOpen 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity;
}

@keyframes flipOpen {
    0% {
        opacity: 0;
        transform: rotateY(92deg) scale(0.82);
    }
    40% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

/* 移动端降级：避免 3D rotateY 在部分 WebView（如 VIA）上闪烁 */
@keyframes wallFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wall-cell.flip-in {
        animation: wallFadeIn 0.35s ease-out both;
    }
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 首屏文字层 */
.hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 2.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(32px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    max-width: 90%;
    width: 680px;
    animation: fadeInUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-overlay::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient(135deg, rgba(166, 124, 108, 0.35), rgba(201, 139, 139, 0.35), rgba(168, 140, 120, 0.35));
    z-index: -1;
    filter: blur(12px);
    opacity: 0.6;
    animation: glowRotate 10s linear infinite;
}

@keyframes glowRotate {
    0% { filter: blur(12px) hue-rotate(-10deg); }
    50% { filter: blur(12px) hue-rotate(10deg); }
    100% { filter: blur(12px) hue-rotate(-10deg); }
}

.hero-overlay h1 {
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
    margin-bottom: 0.8rem;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 8px rgba(201, 139, 139, 0.2)); }
    to { filter: drop-shadow(0 0 16px rgba(166, 124, 108, 0.3)); }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2.2rem;
    font-weight: 400;
}

/* 计数器 */
.counter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.counter div {
    position: relative;
    background: var(--card-bg-solid);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    min-width: 5rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.counter div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.counter span {
    display: block;
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.counter small {
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 500;
}

.start-date {
    color: var(--text);
    font-size: 1rem;
    margin-top: 1rem;
    letter-spacing: 0.02em;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 滚动提示 */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    animation: bounce 2.8s infinite;
    cursor: pointer;
}

.scroll-hint span {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.scroll-hint .arrow {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(8px); }
    60% { transform: translateX(-50%) translateY(4px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==================== 时间轴 ==================== */
.timeline-section {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 1.5rem 6rem;
}

.timeline-section h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3.5rem;
    position: relative;
}

.timeline-section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    margin: 0.8rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--dream-start), var(--dream-end));
}

/* 主题章节分隔页 */
.timeline-wrap {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.theme-chapter {
    position: relative;
    text-align: center;
    padding: 4rem 1.5rem;
    margin: 0 auto;
    max-width: 720px;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    --theme-color: var(--theme-campus);
    --theme-glow: var(--theme-campus-glow);
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}

.theme-chapter.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.theme-chapter.switching {
    animation: chapterPulseStrong 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes chapterPulseStrong {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); box-shadow: 0 0 40px var(--theme-glow); }
    100% { transform: scale(1); }
}

.theme-chapter[data-theme="campus"] { --theme-color: var(--theme-campus); --theme-glow: var(--theme-campus-glow); }
.theme-chapter[data-theme="island"] { --theme-color: var(--theme-island); --theme-glow: var(--theme-island-glow); }
.theme-chapter[data-theme="disney"] { --theme-color: var(--theme-disney); --theme-glow: var(--theme-disney-glow); }
.theme-chapter[data-theme="sakura"] { --theme-color: var(--theme-sakura); --theme-glow: var(--theme-sakura-glow); }
.theme-chapter[data-theme="tianzifang"] { --theme-color: var(--theme-tianzifang); --theme-glow: var(--theme-tianzifang-glow); }
.theme-chapter[data-theme="graduation"] { --theme-color: var(--theme-graduation); --theme-glow: var(--theme-graduation-glow); }
.theme-chapter[data-theme="confession"] { --theme-color: var(--theme-confession); --theme-glow: var(--theme-confession-glow); }
.theme-chapter[data-theme="zoo"] { --theme-color: var(--theme-zoo); --theme-glow: var(--theme-zoo-glow); }
.theme-chapter[data-theme="aquarium"] { --theme-color: var(--theme-aquarium); --theme-glow: var(--theme-aquarium-glow); }
.theme-chapter[data-theme="farmstay"] { --theme-color: var(--theme-farmstay); --theme-glow: var(--theme-farmstay-glow); }
.theme-chapter[data-theme="fireworks"] { --theme-color: var(--theme-fireworks); --theme-glow: var(--theme-fireworks-glow); }
.theme-chapter[data-theme="talkshow"] { --theme-color: var(--theme-talkshow); --theme-glow: var(--theme-talkshow-glow); }
.theme-chapter[data-theme="disneyGarden"] { --theme-color: var(--theme-disney-garden); --theme-glow: var(--theme-disney-garden-glow); }

.theme-chapter .chapter-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, var(--theme-glow), transparent 65%);
    opacity: 0.55;
    pointer-events: none;
    animation: chapterPulse 8s ease-in-out infinite;
}

@keyframes chapterPulse {
    0%, 100% { opacity: 0.40; transform: scale(1); }
    50% { opacity: 0.60; transform: scale(1.02); }
}

.theme-chapter .chapter-content {
    position: relative;
    z-index: 1;
}

.theme-chapter .chapter-icon {
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 8px 16px var(--theme-glow));
}

.theme-chapter h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    margin-bottom: 0.4rem;
}

.theme-chapter p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

/* 主题装饰元素 */
.theme-chapter::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    opacity: 0.18;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
}

.theme-chapter[data-theme="campus"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M10 40 L20 15 L30 40 M90 40 L100 10 L110 40 M0 40 L120 40' stroke='%235b7cfa' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}
.theme-chapter[data-theme="island"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M0 30 Q30 15 60 30 T120 30' stroke='%233ec2d1' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}
.theme-chapter[data-theme="disney"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M20 40 L30 20 L40 40 M80 40 L90 15 L100 40' stroke='%23e66ef7' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}
.theme-chapter[data-theme="sakura"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M20 40 Q35 10 50 40 M70 40 Q85 5 100 40' stroke='%23ff9ec8' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}
.theme-chapter[data-theme="tianzifang"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M10 40 L10 20 L30 20 L30 40 M90 40 L90 15 L110 15 L110 40' stroke='%23ff9f5a' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}
.theme-chapter[data-theme="graduation"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M60 8 L20 22 L60 36 L100 22 Z M60 36 L60 30 M40 25 L40 32 Q60 40 80 32 L80 25' stroke='%234a6fa5' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}

/* 主题徽章 */
.theme-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-color), rgba(255, 255, 255, 0.22));
    padding: 0.28rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 4px 14px var(--theme-glow);
    letter-spacing: 0.02em;
}

.timeline {
    list-style: none;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    --theme-color: var(--theme-campus);
    --theme-glow: var(--theme-campus-glow);
    transition: --theme-color 0.9s ease, --theme-glow 0.9s ease;
}

.timeline[data-theme="campus"] { --theme-color: var(--theme-campus); --theme-glow: var(--theme-campus-glow); }
.timeline[data-theme="island"] { --theme-color: var(--theme-island); --theme-glow: var(--theme-island-glow); }
.timeline[data-theme="disney"] { --theme-color: var(--theme-disney); --theme-glow: var(--theme-disney-glow); }
.timeline[data-theme="sakura"] { --theme-color: var(--theme-sakura); --theme-glow: var(--theme-sakura-glow); }
.timeline[data-theme="tianzifang"] { --theme-color: var(--theme-tianzifang); --theme-glow: var(--theme-tianzifang-glow); }
.timeline[data-theme="graduation"] { --theme-color: var(--theme-graduation); --theme-glow: var(--theme-graduation-glow); }
.timeline[data-theme="confession"] { --theme-color: var(--theme-confession); --theme-glow: var(--theme-confession-glow); }
.timeline[data-theme="zoo"] { --theme-color: var(--theme-zoo); --theme-glow: var(--theme-zoo-glow); }
.timeline[data-theme="aquarium"] { --theme-color: var(--theme-aquarium); --theme-glow: var(--theme-aquarium-glow); }
.timeline[data-theme="farmstay"] { --theme-color: var(--theme-farmstay); --theme-glow: var(--theme-farmstay-glow); }
.timeline[data-theme="fireworks"] { --theme-color: var(--theme-fireworks); --theme-glow: var(--theme-fireworks-glow); }
.timeline[data-theme="talkshow"] { --theme-color: var(--theme-talkshow); --theme-glow: var(--theme-talkshow-glow); }
.timeline[data-theme="disneyGarden"] { --theme-color: var(--theme-disney-garden); --theme-glow: var(--theme-disney-garden-glow); }

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--theme-color), rgba(255, 255, 255, 0.45), var(--theme-color));
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 0 24px var(--theme-glow);
}

.timeline-item {
    --theme-color: var(--theme-campus);
    --theme-glow: var(--theme-campus-glow);
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--card-bg-solid);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}

.timeline-item[data-theme="campus"] { --theme-color: var(--theme-campus); --theme-glow: var(--theme-campus-glow); }
.timeline-item[data-theme="island"] { --theme-color: var(--theme-island); --theme-glow: var(--theme-island-glow); }
.timeline-item[data-theme="disney"] { --theme-color: var(--theme-disney); --theme-glow: var(--theme-disney-glow); }
.timeline-item[data-theme="sakura"] { --theme-color: var(--theme-sakura); --theme-glow: var(--theme-sakura-glow); }
.timeline-item[data-theme="tianzifang"] { --theme-color: var(--theme-tianzifang); --theme-glow: var(--theme-tianzifang-glow); }
.timeline-item[data-theme="graduation"] { --theme-color: var(--theme-graduation); --theme-glow: var(--theme-graduation-glow); }
.timeline-item[data-theme="confession"] { --theme-color: var(--theme-confession); --theme-glow: var(--theme-confession-glow); }
.timeline-item[data-theme="zoo"] { --theme-color: var(--theme-zoo); --theme-glow: var(--theme-zoo-glow); }
.timeline-item[data-theme="aquarium"] { --theme-color: var(--theme-aquarium); --theme-glow: var(--theme-aquarium-glow); }
.timeline-item[data-theme="farmstay"] { --theme-color: var(--theme-farmstay); --theme-glow: var(--theme-farmstay-glow); }
.timeline-item[data-theme="fireworks"] { --theme-color: var(--theme-fireworks); --theme-glow: var(--theme-fireworks-glow); }
.timeline-item[data-theme="talkshow"] { --theme-color: var(--theme-talkshow); --theme-glow: var(--theme-talkshow-glow); }
.timeline-item[data-theme="disneyGarden"] { --theme-color: var(--theme-disney-garden); --theme-glow: var(--theme-disney-garden-glow); }

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

.timeline-item:hover {
    box-shadow: var(--shadow-colored), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #fff 0%, var(--theme-color) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.5), 0 0 24px var(--theme-color);
    z-index: 2;
}

.timeline-item:nth-child(even) .timeline-img {
    order: 2;
}

.timeline-item:nth-child(even) .timeline-text {
    order: 1;
    text-align: right;
}

.timeline-img {
    overflow: hidden;
    border-radius: var(--radius-sm);
    min-height: 240px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: var(--shadow-soft);
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    gap: 0.45rem;
}

.timeline-img[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.timeline-img[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.timeline-img[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    min-height: 320px;
}

.timeline-img img {
    width: 100%;
    height: 100%;
    min-height: unset;
    object-fit: cover;
    display: block;
    border-radius: 0.35rem;
    filter: sepia(6%) saturate(92%) contrast(98%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.timeline-item:hover .timeline-img img {
    transform: scale(1.06);
    filter: sepia(0%) saturate(100%) contrast(100%);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-color), rgba(255, 255, 255, 0.22));
    background-size: 200% 200%;
    animation: shimmer 5s ease infinite;
    color: #fff;
    font-size: 3.5rem;
}

.timeline-text {
    padding: 0.8rem;
}

.timeline-text .date {
    display: inline-block;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-color), rgba(255, 255, 255, 0.25));
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 12px var(--theme-glow);
    letter-spacing: 0.03em;
    margin-left: 0.5rem;
}

.timeline-item:nth-child(even) .timeline-text .date {
    margin-left: 0;
    margin-right: 0.5rem;
}

.timeline-text h3 {
    font-size: 1.45rem;
    color: var(--ink);
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.timeline-text p {
    color: var(--text-light);
    font-size: 1.02rem;
    white-space: pre-wrap;
    line-height: 1.85;
}

/* 共同维护邀请 */
.invite-section {
    position: relative;
    padding: 4rem 1rem 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg);
}

.invite-card {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.invite-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-colored);
}

.invite-window {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #f7f7f7 0%, #f0f0f0 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.invite-window span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.invite-window span:nth-child(1) { background: #ff5f57; }
.invite-window span:nth-child(2) { background: #febc2e; }
.invite-window span:nth-child(3) { background: #28c840; }

.invite-window code {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #888;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.commit-block {
    padding: 1.8rem 1.6rem 1.4rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #3d3d3d;
    background: #fafafa;
}

.commit-block p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commit-key {
    color: #d73a49;
    font-weight: 600;
}

.commit-hash {
    color: #6f42c1;
}

.commit-email {
    color: #032f62;
}

.commit-title {
    color: #22863a;
    font-weight: 600;
    padding-left: 0.5rem;
}

.commit-body {
    color: #586069;
    padding-left: 0.5rem;
    line-height: 1.85;
    white-space: normal;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.2rem 1.6rem 1.6rem;
    background: #ffffff;
}

.invite-repo-btn,
.invite-accept-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.4rem;
    border-radius: 2rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.invite-repo-btn {
    background: #24292f;
    color: #fff;
}

.invite-repo-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.invite-accept-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.invite-accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(201, 139, 139, 0.28);
}

.invite-accept-btn.accepted {
    background: #28c840;
    cursor: default;
}

.invite-accept-btn.accepted:hover {
    transform: none;
    box-shadow: none;
}

.invite-accept-text,
.invite-accept-check {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.invite-accept-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
}

.invite-accept-btn.accepted .invite-accept-text {
    opacity: 0;
    transform: translateY(-100%);
}

.invite-accept-btn.accepted .invite-accept-check {
    opacity: 1;
    transform: translateY(0);
}

.invite-response {
    padding: 0 1.6rem 1.6rem;
    text-align: center;
    background: #ffffff;
    animation: inviteResponseIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.invite-response.hidden {
    display: none;
}

.invite-response p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
}

.invite-response .invite-merge {
    margin-top: 0.4rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.82rem;
    color: var(--primary-dark);
}

@keyframes inviteResponseIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 页脚 */
footer {
    position: relative;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
    background: transparent;
}

footer p {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ==================== 顶部滚动进度条 ==================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--dream-start), var(--dream-mid), var(--dream-end));
    z-index: 9999;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.12);
    transition: width 0.1s linear;
}

/* ==================== 情书手札 ==================== */
.love-letter-section {
    position: relative;
    padding: 5rem 1rem 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.love-letter-scene {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* 信封列表 */
.letter-tabs {
    width: 100%;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) transparent;
}

.letter-tabs::-webkit-scrollbar {
    height: 5px;
}

.letter-tabs::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 3px;
}

.letter-tab {
    flex: 0 0 auto;
    padding: 0.55rem 1.1rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(139, 90, 60, 0.12);
    border-radius: 2rem;
    font-size: 0.9rem;
    color: #6b4c3a;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(60, 45, 30, 0.06);
}

.letter-tab:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(212, 175, 55, 0.35);
    color: #5d2e2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(60, 45, 30, 0.1);
}

.letter-tab.active {
    background: linear-gradient(135deg, #b8860b 0%, #d4a017 100%);
    color: #2b1d12;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.22);
    font-weight: 700;
}

/* 舞台 */
.letter-stage {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 420px;
}

.letter-nav {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(139, 90, 60, 0.18);
    border-radius: 50%;
    background: transparent;
    color: #7a2e2e;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s ease;
}

.letter-nav:hover {
    transform: scale(1.1);
    background: rgba(139, 90, 60, 0.06);
    border-color: rgba(139, 90, 60, 0.35);
    color: #5d2e2e;
}

/* 信封容器 */
.envelope-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 3 / 2;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.envelope {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #7a2e2e 0%, #5c2020 100%);
    border-radius: 0.5rem;
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(212, 175, 55, 0.18),
        inset 0 2px 8px rgba(255, 255, 255, 0.08);
    transform-style: preserve-3d;
    z-index: 1;
    overflow: hidden;
}

.envelope::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 35%,
        rgba(0, 0, 0, 0.18) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.envelope::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48%;
    border-radius: 0 0 0.5rem 0.5rem;
    background-image:
        radial-gradient(circle at 14% 70%, rgba(212, 175, 55, 0.35) 0%, rgba(212, 175, 55, 0) 2.4%),
        radial-gradient(circle at 32% 84%, rgba(255, 236, 200, 0.25) 0%, rgba(255, 236, 200, 0) 2%),
        radial-gradient(circle at 52% 66%, rgba(212, 175, 55, 0.28) 0%, rgba(212, 175, 55, 0) 2.2%),
        radial-gradient(circle at 70% 80%, rgba(255, 236, 200, 0.22) 0%, rgba(255, 236, 200, 0) 2%),
        radial-gradient(circle at 86% 68%, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0) 1.8%),
        radial-gradient(circle at 40% 56%, rgba(255, 236, 200, 0.2) 0%, rgba(255, 236, 200, 0) 1.6%),
        radial-gradient(circle at 74% 54%, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0) 1.5%),
        radial-gradient(circle at 56% 58%, rgba(255, 236, 200, 0.18) 0%, rgba(255, 236, 200, 0) 1.8%);
    filter: blur(0.3px);
    z-index: 0;
    pointer-events: none;
}

.envelope-flap {
    position: absolute;
    width: 100%;
    height: 65%;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.envelope-flap-top {
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #8b3a3a 0%, #6d2626 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    z-index: 4;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(212, 175, 55, 0.25);
}

.envelope-flap-top::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 46%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
}

.envelope-flap-bottom {
    bottom: 0;
    left: 0;
    background: linear-gradient(0deg, #5c2020 0%, #7a2e2e 100%);
    clip-path: polygon(0 100%, 100% 100%, 50% 0);
    transform-origin: bottom center;
    z-index: 1;
}

.envelope-flap-left {
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, #7a2e2e 0%, #5c2020 100%);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform-origin: left center;
    z-index: 2;
}

.envelope-flap-right {
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(270deg, #7a2e2e 0%, #5c2020 100%);
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    transform-origin: right center;
    z-index: 2;
}

.envelope-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.envelope-label {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: #f4e4bc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.envelope-title {
    font-family: "Noto Serif SC", serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.envelope-meta {
    font-size: 0.8rem;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

.envelope-seal {
    position: relative;
    z-index: 5;
    margin-top: 1.2rem;
    width: 3.2rem;
    height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 32%, #c0392b 0%, #7a1818 70%, #4a0f0f 100%);
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.35),
        inset 2px 2px 6px rgba(255, 200, 180, 0.25),
        0 5px 14px rgba(0, 0, 0, 0.35),
        0 0 0 2px rgba(212, 175, 55, 0.2);
    font-size: 1.4rem;
    transition: transform 0.4s ease;
}

.envelope-seal::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px dashed rgba(212, 175, 55, 0.45);
}

.envelope-wrap.opened .envelope-flap-top {
    transform: rotateX(-180deg);
}

.envelope-wrap.opened .envelope-seal {
    animation: sealBreak 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.envelope-wrap.opened .envelope-body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes sealBreak {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    40% { transform: scale(1.2) rotate(-12deg); }
    100% { transform: scale(0) rotate(45deg); opacity: 0; }
}

/* 信纸 */
.letter-paper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 88%;
    min-height: 360px;
    padding: 2.6rem 2.2rem 2.5rem;
    background-color: #f7f0e0;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
        repeating-linear-gradient(
            180deg,
            transparent,
            transparent 31px,
            rgba(139, 110, 80, 0.08) 31px,
            rgba(139, 110, 80, 0.08) 32px
        ),
        radial-gradient(circle at 85% 8%, rgba(212, 175, 55, 0.06) 0%, transparent 22%),
        radial-gradient(circle at 8% 92%, rgba(180, 140, 80, 0.05) 0%, transparent 22%);
    border-radius: 0.25rem;
    border: 1px solid rgba(139, 90, 60, 0.2);
    box-shadow:
        0 22px 56px rgba(0, 0, 0, 0.32),
        0 8px 18px rgba(0, 0, 0, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 0 80px rgba(180, 140, 80, 0.08);
    color: #3e2723;
    z-index: 2;
    transform: translate(-50%, -50%) scaleY(0) rotateX(-8deg);
    transform-origin: top center;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s ease;
    overflow: hidden;
}

.letter-paper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    bottom: 0;
    border-left: 1px solid rgba(139, 90, 60, 0.08);
    border-right: 1px solid rgba(139, 90, 60, 0.08);
    pointer-events: none;
}

.letter-paper::after {
    content: "";
    position: absolute;
    top: 1.4rem;
    left: 1.4rem;
    right: 1.4rem;
    bottom: 1.4rem;
    border: 1px solid rgba(139, 90, 60, 0.1);
    pointer-events: none;
}

.envelope-wrap.opened .letter-paper {
    transform: translate(-50%, -58%) scaleY(1) rotateX(0deg);
    opacity: 1;
    pointer-events: auto;
    z-index: 6;
    transition-delay: 0.45s;
}

.letter-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: #7a5c48;
    z-index: 1;
    border-bottom: 1px solid rgba(139, 90, 60, 0.12);
    padding-bottom: 0.7rem;
}

.letter-title {
    position: relative;
    font-family: "Noto Serif SC", serif;
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.2rem;
    color: #5d2e2e;
    z-index: 1;
    letter-spacing: 0.06em;
}

.letter-content {
    position: relative;
    min-height: 140px;
    font-family: "Noto Serif SC", "Ma Shan Zheng", serif;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.95;
    color: #3e2723;
    white-space: pre-wrap;
    text-align: left;
    z-index: 1;
}

.letter-content::after {
    content: "|";
    display: inline-block;
    color: #a07060;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

.letter-content.done::after {
    display: none;
}

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

.letter-signature {
    position: relative;
    margin-top: 1.8rem;
    text-align: right;
    font-family: "Ma Shan Zheng", "Noto Serif SC", cursive;
    font-size: 1.25rem;
    font-weight: 600;
    color: #4a2c1f;
    z-index: 1;
}

.letter-signature::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    width: 6rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 44, 31, 0.35));
}

/* 底部操作 */
.letter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.open-btn,
.close-btn,
.replay-btn {
    padding: 0.65rem 1.6rem;
    border: none;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.open-btn {
    background: linear-gradient(135deg, #b8860b 0%, #d4a017 100%);
    color: #2b1d12;
    border: 1px solid rgba(255, 248, 220, 0.25);
}

.open-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #c9981c 0%, #e5b12c 100%);
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.28);
}

.close-btn {
    background: #fff;
    color: #5d2e2e;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(139, 90, 60, 0.18);
}

.close-btn:hover {
    transform: translateY(-3px);
    background: #fff8f0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.replay-btn {
    background: #f7f0e0;
    color: #3e2723;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(139, 90, 60, 0.18);
}

.replay-btn:hover {
    transform: translateY(-3px);
    background: #fff8ea;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.replay-btn.hidden,
.close-btn.hidden,
.open-btn.hidden {
    display: none;
}

/* 响应式 */
@media (max-width: 640px) {
    .letter-stage {
        min-height: 360px;
    }

    .envelope-wrap {
        max-width: 92vw;
    }

    .letter-paper {
        width: 96%;
        min-height: unset;
        max-height: 68vh;
        padding: 1.4rem 1.2rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* 避免在窄屏上被拉得过于细长 */
        transform: translate(-50%, -50%) scaleY(0) rotateX(-8deg);
    }

    .envelope-wrap.opened .letter-paper {
        transform: translate(-50%, -52%) scaleY(1) rotateX(0deg);
    }

    .letter-paper::before {
        left: 1rem;
        right: 1rem;
    }

    .letter-paper::after {
        top: 0.9rem;
        left: 0.9rem;
        right: 0.9rem;
        bottom: 0.9rem;
    }

    .letter-header {
        font-size: 0.78rem;
        margin-bottom: 0.9rem;
        padding-bottom: 0.5rem;
    }

    .letter-title {
        font-size: 1.25rem;
        margin-bottom: 0.9rem;
    }

    .letter-content {
        min-height: unset;
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .letter-signature {
        margin-top: 1.2rem;
        font-size: 1.1rem;
    }

    .letter-nav {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.3rem;
    }
}

/* ==================== 那些让我心动的瞬间 ==================== */
.heartbeat-section {
    padding: 4rem 1.5rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.heartbeat-section h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
}

.heartbeat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    align-items: start;
}

.heartbeat-card {
    background: #fff;
    border-radius: 4px;
    padding: 0.8rem 0.8rem 1.4rem;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(40px) rotate(-1deg);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
}

.heartbeat-card:nth-child(even) {
    transform: translateY(40px) rotate(1.5deg);
}

.heartbeat-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
}

.heartbeat-card:nth-child(even).visible {
    transform: translateY(0) rotate(1.5deg);
}

.heartbeat-card:hover {
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-6px) rotate(0deg) scale(1.02);
}

.heartbeat-card:nth-child(even):hover {
    transform: translateY(-6px) rotate(0deg) scale(1.02);
}

.heartbeat-img {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 2px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0e6e6, #e8e0e0);
    margin-bottom: 1rem;
}

.heartbeat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: sepia(8%) saturate(92%) contrast(98%);
    transition: transform 0.6s ease, filter 0.4s ease;
}

.heartbeat-card:hover .heartbeat-img img {
    transform: scale(1.06);
    filter: sepia(0%) saturate(100%) contrast(100%);
}

.heartbeat-img.fallback::after {
    content: "💕";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.heartbeat-text p {
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink);
    text-align: center;
    padding: 0 0.4rem;
}

.heartbeat-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--card-bg-solid);
    border-radius: var(--radius);
    color: var(--text-light);
}

/* ==================== 灯箱 ==================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(30, 25, 45, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 88vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-nav,
.lightbox-close {
    position: absolute;
    background: var(--card-bg-solid);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--ink);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8rem;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.lightbox-nav:hover,
.lightbox-close:hover {
    background: var(--cream-warm);
    transform: scale(1.08);
    box-shadow: var(--shadow);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* ==================== 背景音乐播放器 ==================== */
.music-player {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg-solid);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-player:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-colored);
}

/* 自动滚动开关 */
.auto-scroll-toggle {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 2rem;
    border: none;
    background: var(--card-bg-solid);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auto-scroll-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
}

.auto-scroll-toggle.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.auto-scroll-toggle.active .auto-scroll-icon {
    animation: scrollPulse 1.2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(3px); opacity: 0.7; }
}

.music-player.hidden {
    display: none;
}

.music-icon {
    font-size: 1.4rem;
    color: var(--primary-dark);
    transition: transform 0.3s ease;
}

.music-player.playing .music-icon {
    animation: spin 6s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-waves {
    position: absolute;
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-player.playing .music-waves {
    opacity: 1;
}

.music-waves i {
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 3px;
    animation: wave 1.2s ease-in-out infinite alternate;
}

.music-waves i:nth-child(1) { height: 8px; animation-delay: 0s; }
.music-waves i:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.music-waves i:nth-child(3) { height: 10px; animation-delay: 0.3s; }

@keyframes wave {
    from { transform: scaleY(0.6); }
    to { transform: scaleY(1.2); }
}

/* ==================== 自动播放提示 ==================== */
.autoplay-prompt {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    z-index: 9997;
    background: var(--card-bg-solid);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 2rem;
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.autoplay-prompt.visible {
    opacity: 1;
    transform: translateY(0);
    animation: promptPulse 2s ease-in-out infinite;
}

@keyframes promptPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.02); }
}

/* ==================== 点击爱心 ==================== */
.click-heart {
    position: fixed;
    pointer-events: none;
    font-size: 1.2rem;
    color: var(--primary);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
    animation: heartFloat 1.4s ease-out forwards;
    z-index: 9997;
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 0), -80px) scale(1.1) rotate(var(--rot, 20deg));
    }
}

/* ==================== 恋爱数据统计 ==================== */
.stats-section {
    padding: 5rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.stat-card {
    background: var(--card-bg-solid);
    border-radius: var(--radius);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-size: 2.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ==================== 纪念日倒计时 ==================== */
.anniversary-section {
    padding: 2rem 1.5rem 5rem;
    display: flex;
    justify-content: center;
}

.anniversary-card {
    width: 100%;
    max-width: 720px;
    background: var(--card-bg-solid);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.anniversary-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(201, 139, 139, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
}

.anniversary-card::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(166, 124, 108, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
}

.anniversary-label {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.anniversary-countdown {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.anniversary-countdown div {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    min-width: 4.8rem;
    box-shadow: var(--shadow-soft);
}

.anniversary-countdown span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.anniversary-countdown small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.anniversary-date {
    position: relative;
    z-index: 1;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==================== 她对我的意义 ==================== */
.meaning-section {
    padding: 5rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.meaning-section h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
}

.meaning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    padding: 0.5rem;
}

.meaning-card {
    position: relative;
    background: var(--sticky-color, #fff8dc);
    border-radius: 0.2rem 0.2rem 0.5rem 0.5rem;
    padding: 2.4rem 1.6rem 2rem;
    box-shadow:
        3px 5px 14px rgba(60, 45, 30, 0.14),
        1px 2px 4px rgba(60, 45, 30, 0.08);
    opacity: 0;
    transform: scale(0.85) rotate(calc(var(--rotate, 0deg) * 1.5));
    transform-origin: center center;
    transition:
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease,
        opacity 0.5s ease;
    font-family: "Ma Shan Zheng", "Noto Serif SC", cursive;
    overflow: hidden;
}

/* 顶部胶带 */
.meaning-card::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 38%;
    height: 22px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 2;
    pointer-events: none;
}

/* 细横线纹理 */
.meaning-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            transparent,
            transparent 27px,
            rgba(80, 60, 40, 0.05) 27px,
            rgba(80, 60, 40, 0.05) 28px
        );
    pointer-events: none;
    z-index: 0;
}

.meaning-card.visible {
    opacity: 1;
    transform: scale(1) rotate(var(--rotate, 0deg));
}

.meaning-card:hover {
    z-index: 2;
    box-shadow:
        6px 12px 28px rgba(60, 45, 30, 0.18),
        2px 4px 8px rgba(60, 45, 30, 0.1);
    transform: rotate(0deg) scale(1.05) translateY(-6px);
}

.meaning-card h3 {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    color: #3e2e22;
    margin-bottom: 0.9rem;
    font-weight: 700;
}

.meaning-card p {
    position: relative;
    z-index: 1;
    color: #2d2118;
    font-size: 1.15rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ==================== 生日过渡页 ==================== */
.birthday-transition {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
}

.transition-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.transition-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.transition-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
    letter-spacing: 0.05em;
}

.transition-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.2rem;
}

.transition-content .arrow-hint {
    font-size: 2rem;
    color: var(--accent);
    animation: bounceArrow 2.2s infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* ==================== 生日专属页（梦幻星河宫殿） ==================== */
.birthday-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    background:
        radial-gradient(ellipse at 50% 0%, #2a1f3a 0%, #1a1225 40%, #0f0a18 100%);
    overflow: hidden;
}

.birthday-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.birthday-stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.birthday-stars .star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: starTwinkle var(--duration, 3s) ease-in-out infinite;
    opacity: var(--opacity, 0.6);
}

@keyframes starTwinkle {
    0%, 100% { opacity: var(--opacity, 0.6); transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.birthday-nebula {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
}

.nebula {
    position: absolute;
    border-radius: 50%;
    opacity: 0.35;
    animation: nebulaDrift 20s ease-in-out infinite alternate;
}

.nebula-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -100px;
    background: radial-gradient(circle, rgba(201, 139, 159, 0.5) 0%, transparent 70%);
    animation-duration: 25s;
}

.nebula-2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -150px;
    background: radial-gradient(circle, rgba(166, 124, 108, 0.4) 0%, transparent 70%);
    animation-duration: 30s;
    animation-delay: -5s;
}

.nebula-3 {
    width: 400px;
    height: 400px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(201, 139, 139, 0.25) 0%, transparent 70%);
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes nebulaDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 20px) scale(1.08); }
}

.birthday-meteors {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.birthday-age {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(12rem, 35vw, 28rem);
    font-weight: 700;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    color: transparent;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.18) 0%, rgba(212, 175, 55, 0.08) 60%, transparent 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 120px rgba(255, 215, 0, 0.15);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
    letter-spacing: -0.05em;
}

.birthday-section.visible .birthday-age {
    opacity: 1;
}

.spotlight {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 120%;
    background: linear-gradient(180deg, rgba(255, 245, 220, 0.12) 0%, rgba(255, 245, 220, 0.03) 40%, transparent 80%);
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

.birthday-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    width: 100%;
}

.birthday-pretitle {
    font-size: 1rem;
    color: rgba(255, 232, 200, 0.75);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.birthday-title {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.1s, transform 0.8s ease 0.1s;
    display: flex;
    justify-content: center;
    gap: 0.1em;
}

.birthday-title span {
    display: inline-block;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    background: linear-gradient(180deg, #fff 0%, #ffe4c4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

.birthday-section.visible .birthday-title span {
    animation: titleCharIn 0.8s ease both;
}

.birthday-title span:nth-child(1) { animation-delay: 0.1s; }
.birthday-title span:nth-child(2) { animation-delay: 0.2s; }
.birthday-title span:nth-child(3) { animation-delay: 0.3s; }
.birthday-title span:nth-child(4) { animation-delay: 0.4s; }

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

.birthday-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.birthday-section.visible .birthday-pretitle,
.birthday-section.visible .birthday-title,
.birthday-section.visible .birthday-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.cake-container {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    cursor: pointer;
    z-index: 2;
}

.cake {
    width: clamp(260px, 40vw, 360px);
    height: auto;
    display: block;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45));
    animation: cakeFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes cakeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.cake-container:hover .cake {
    animation-play-state: paused;
    transform: scale(1.02);
}

.cake-glow {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 40%;
    background: radial-gradient(ellipse, rgba(255, 215, 0, 0.25) 0%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.cake-container.all-out .cake-glow {
    background: radial-gradient(ellipse, rgba(255, 215, 0, 0.45) 0%, transparent 70%);
    animation: glowBurst 2s ease-out forwards;
}

@keyframes glowBurst {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
    100% { opacity: 0.8; transform: translateX(-50%) scale(1.15); }
}

.candle {
    cursor: pointer;
}

.candle-hit {
    pointer-events: all;
    cursor: pointer;
}

.candle .flame,
.candle .flame-core,
.candle .flame-glow {
    transform-box: fill-box;
    transform-origin: center bottom;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.candle .flame {
    animation: flicker 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 16px rgba(255, 210, 90, 1)) drop-shadow(0 0 32px rgba(255, 140, 60, 0.85));
}

.candle .flame-core {
    animation: flicker 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(255, 230, 130, 1));
}

.candle .flame-glow {
    animation: glowFlicker 1.2s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

.candle:hover .flame {
    filter: drop-shadow(0 0 22px rgba(255, 230, 120, 1)) drop-shadow(0 0 44px rgba(255, 170, 80, 1));
    transform: scale(1.15);
}

.candle:hover .flame-core {
    transform: scale(1.1);
}

.candle:hover .flame-glow {
    opacity: 1;
    transform: scale(1.25);
}

@keyframes flicker {
    0% { transform: scale(1) rotate(-1deg); opacity: 1; }
    100% { transform: scale(1.12) rotate(1deg); opacity: 0.98; }
}

@keyframes glowFlicker {
    0% { opacity: 0.75; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.15); }
}

.candle:nth-of-type(2) .flame,
.candle:nth-of-type(2) .flame-core,
.candle:nth-of-type(2) .flame-glow {
    animation-delay: 0.1s;
}

.candle:nth-of-type(3) .flame,
.candle:nth-of-type(3) .flame-core,
.candle:nth-of-type(3) .flame-glow {
    animation-delay: 0.2s;
}

.candle.extinguished .flame,
.candle.extinguished .flame-core,
.candle.extinguished .flame-glow {
    animation: blowOut 0.6s ease forwards;
}

@keyframes blowOut {
    0% { transform: scale(1); opacity: 1; }
    40% { transform: scale(1.4) rotate(3deg); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

.cake-hint {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 232, 180, 0.9);
    white-space: nowrap;
    transition: opacity 0.4s ease;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 12px rgba(255, 160, 60, 0.5);
    animation: hintPulse 1.8s ease-in-out infinite;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    backdrop-filter: blur(4px);
}

@keyframes hintPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.9; }
    50% { transform: translateX(-50%) scale(1.05); opacity: 1; }
}

.cake-container.all-out .cake-hint {
    opacity: 0;
}

.cake-container.all-out {
    opacity: 0.75;
    transform: scale(0.92);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
    filter: blur(0.5px);
}

.birthday-letter {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px) scale(0.96) rotateX(8deg);
    transform-origin: top center;
    transition:
        opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s,
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
    pointer-events: none;
    perspective: 1200px;
}

.birthday-letter.show {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    pointer-events: auto;
}

.birthday-letter-paper {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 250, 235, 0.98) 0%, rgba(255, 245, 220, 0.98) 100%);
    border-radius: 4px;
    padding: 3.5rem 2.5rem 2.5rem;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(139, 90, 60, 0.12);
    color: #5a4636;
    transform: rotate(-1deg);
    background-image:
        repeating-linear-gradient(
            180deg,
            transparent,
            transparent 31px,
            rgba(180, 160, 140, 0.15) 31px,
            rgba(180, 160, 140, 0.15) 32px
        );
}

.birthday-letter-seal {
    position: absolute;
    top: -22px;
    right: 2.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c0392b, #a93226);
    border-radius: 50%;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(160, 50, 40, 0.4);
    transform: rotate(-12deg);
}

.birthday-letter-paper h3 {
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6b4c3a;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.birthday-letter-content {
    font-family: "Noto Serif SC", "Source Han Serif SC", "STKaiti", "KaiTi", "楷体", serif;
    font-size: 1.15rem;
    line-height: 2;
    color: #5a4636;
    white-space: pre-wrap;
    text-align: left;
    padding-left: 0.5rem;
}

.birthday-letter-signature {
    margin-top: 2rem;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STKaiti", "KaiTi", serif;
    font-size: 1.1rem;
    color: #6b4c3a;
    text-align: right;
    padding-right: 1rem;
}

.birthday-letter-signature:empty {
    display: none;
}

.wish-delivered {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: rgba(255, 232, 200, 0.85);
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.wish-delivered.show {
    opacity: 1;
    transform: translateY(0);
}

.stardust-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.stardust-container .dust {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    animation: dustFloat var(--duration, 6s) ease-in-out infinite;
    opacity: var(--opacity, 0.6);
}

@keyframes dustFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: var(--opacity, 0.6); }
    50% { transform: translate(var(--tx, 20px), var(--ty, -30px)) scale(1.2); opacity: 1; }
}

.smoke-container {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.smoke-container .smoke {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    animation: smokeRise 1.5s ease-out forwards;
}

@keyframes smokeRise {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate(var(--dx, 10px), -60px) scale(2.5); opacity: 0; }
}

.fireworks {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ==================== 那些被记录的里程碑 ==================== */
.milestones-section {
    padding: 5rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.milestones-section h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.milestone-card {
    position: relative;
    background:
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            rgba(120, 90, 60, 0.04) 31px,
            rgba(120, 90, 60, 0.04) 32px
        ),
        #fffaf5;
    border: 1px solid rgba(180, 140, 80, 0.22);
    border-radius: 0.5rem;
    padding: 2.4rem 1.8rem 2rem;
    box-shadow:
        0 14px 38px rgba(60, 45, 30, 0.1),
        0 4px 12px rgba(60, 45, 30, 0.06);
    outline: 1px solid rgba(180, 140, 80, 0.16);
    outline-offset: 6px;
    opacity: 0;
    transform: translateY(40px) rotateX(6deg);
    transform-origin: center bottom;
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
    text-align: center;
    overflow: hidden;
}

/* 四角装饰 */
.milestone-card::before,
.milestone-card::after {
    content: "❧";
    position: absolute;
    font-size: 1.1rem;
    color: rgba(180, 140, 80, 0.45);
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}

.milestone-card::before {
    top: 0.7rem;
    left: 0.7rem;
    transform: rotate(-45deg);
}

.milestone-card::after {
    bottom: 0.7rem;
    right: 0.7rem;
    transform: rotate(135deg);
}

.milestone-card.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.milestone-card:hover {
    box-shadow:
        0 20px 48px rgba(60, 45, 30, 0.14),
        0 6px 16px rgba(60, 45, 30, 0.08);
    transform: translateY(-6px);
}

.milestone-card.visible:hover {
    transform: translateY(-6px);
}

.milestone-number {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    font-family: "Noto Serif SC", serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: rgba(180, 140, 80, 0.75);
}

.milestone-seal {
    width: 4.2rem;
    height: 4.2rem;
    margin: 0 auto 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(180, 140, 80, 0.45);
    background: rgba(180, 140, 80, 0.08);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.5),
        0 4px 10px rgba(60, 45, 30, 0.08);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.milestone-card:hover .milestone-seal {
    transform: rotate(10deg) scale(1.08);
}

.milestone-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.milestone-card h3 {
    font-family: "Noto Serif SC", serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #5a4a3d;
    margin-bottom: 1rem;
}

.milestone-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: var(--shadow-soft);
}

.milestone-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.milestone-card:hover .milestone-img img {
    transform: scale(1.05);
}

.milestone-img.fallback::after {
    content: "💕";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.85);
}

.milestone-desc {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.milestone-quote {
    position: relative;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.85;
    color: #6b5c4d;
    background: rgba(201, 139, 139, 0.06);
    border-left: 3px solid #d4af37;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.2rem 1rem 1.6rem;
    text-align: left;
    white-space: pre-wrap;
}

.milestone-quote::before {
    content: """;
    font-family: "Noto Serif SC", serif;
    font-size: 2.2rem;
    line-height: 1;
    color: #d4af37;
    opacity: 0.55;
    position: absolute;
    top: -0.2rem;
    left: 0.35rem;
}

/* ==================== 足迹地图（真实长三角可爱地图） ==================== */
.footprint-section {
    padding: 5rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.footprint-section h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
}

.footprint-card {
    background: var(--card-bg-solid);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.footprint-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.handdrawn-map {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 */
    background: #F9F6F0;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(141, 110, 99, 0.08);
    overflow: hidden;
    box-shadow:
        inset 0 0 80px rgba(141, 110, 99, 0.06),
        inset 0 0 0 1px rgba(141, 110, 99, 0.1),
        0 12px 40px rgba(80, 50, 20, 0.08);
}

.handdrawn-map::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.06'/%3E%3C/svg%3E");
    opacity: 0.7;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.handdrawn-map::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 158, 200, 0.08);
}

.handdrawn-map > svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.map-marker {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.map-marker:hover,
.map-marker.active {
    transform: translateY(-4px) scale(1.15);
    z-index: 10;
}

.marker-icon {
    position: relative;
    z-index: 2;
    font-size: 1.7rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-marker:hover .marker-icon,
.map-marker.active .marker-icon {
    transform: scale(1.15);
}

.map-marker.current .marker-icon {
    filter: drop-shadow(0 0 10px var(--marker-color));
}

.marker-star {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.85rem;
    line-height: 1;
    animation: starBlink 1.8s ease-in-out infinite;
    z-index: 5;
    filter: drop-shadow(0 1px 2px rgba(255, 217, 102, 0.4));
}

@keyframes starBlink {
    0%, 100% { opacity: 0.7; transform: scale(0.95) rotate(-10deg); }
    50% { opacity: 1; transform: scale(1.15) rotate(10deg); }
}

.marker-pulse {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 12px;
    height: 6px;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    background: var(--marker-color);
    opacity: 0.35;
    z-index: 1;
    animation: pinPulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes pinPulse {
    0% { transform: translate(-50%, 50%) scale(1); opacity: 0.35; }
    100% { transform: translate(-50%, 50%) scale(3.5); opacity: 0; }
}

.map-tooltip {
    position: absolute;
    z-index: 1000;
    min-width: 140px;
    max-width: 250px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -92%);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.map-tooltip::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.96);
}

.map-tooltip.visible {
    opacity: 1;
    transform: translate(-50%, -102%);
}

.tooltip-name {
    display: block;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

.tooltip-time {
    display: block;
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    color: var(--text-light);
    letter-spacing: 0.02em;
}

.tooltip-photos {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.tooltip-photos.hidden {
    display: none;
}

.tooltip-photos img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.45rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.footprint-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.4rem;
    margin-top: 1.6rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: clamp(0.78rem, 1.8vw, 0.88rem);
    color: var(--text);
    padding: 0.25rem 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    opacity: 0.85;
}

.legend-item:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.legend-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 3px currentColor;
    font-size: 0;
    line-height: 1;
}

/* Leaflet 真实地图覆盖 */
.leaflet-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: inherit;
    background: #F9F6F0;
}

.leaflet-map .leaflet-tile {
    filter: grayscale(0.35) sepia(0.12) saturate(0.7) contrast(0.92) brightness(1.05);
}

.custom-leaflet-marker {
    background: transparent !important;
    border: none !important;
}

/* 足迹路线流动动画 */
.footprint-route {
    animation: routeFlow 1.6s linear infinite;
}

@keyframes routeFlow {
    to { stroke-dashoffset: -12; }
}

/* 让 Leaflet 的 attribution 不显示 */
.leaflet-control-attribution {
    display: none;
}

/* ==================== 板块分隔线 ==================== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--ink-lighter);
    font-size: 0.75rem;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
}

.section-divider span {
    margin: 0 1rem;
    line-height: 1;
}

/* ==================== 响应式 ==================== */
@media (max-width: 720px) {
    .photo-wall {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        grid-auto-rows: minmax(90px, 1fr);
        gap: 3px;
        /* 移动端关闭 3D 透视，避免低端 WebView 合成层闪烁 */
        perspective: none;
    }

    .wall-cell.flip-in {
        animation-name: wallFadeIn;
    }

    .hero-overlay {
        padding: 1.8rem 1.2rem;
        border-radius: var(--radius);
        width: 94%;
    }

    .hero-overlay h1 { font-size: 1.9rem; }
    .subtitle { font-size: 0.95rem; margin-bottom: 1.4rem; }

    .counter {
        gap: 0.5rem;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }
    .counter div {
        flex: 1 1 calc(33.333% - 0.5rem);
        min-width: unset;
        padding: 0.6rem 0.3rem;
        border-radius: 0.9rem;
    }
    .counter span { font-size: 1.35rem; }
    .counter small { font-size: 0.72rem; }

    .start-date { font-size: 0.9rem; }

    .scroll-hint {
        bottom: 1.2rem;
    }
    .scroll-hint span { font-size: 0.85rem; }
    .scroll-hint .arrow { font-size: 1.5rem; }

    .love-letter-section { padding: 4rem 1rem; }
    .love-letter-scene { max-width: 100%; }
    .love-letter-card { min-height: unset; }
    .love-letter-face {
        padding: 1.6rem 1.2rem;
        border-radius: var(--radius);
        position: relative;
    }
    .love-letter-face h2 { font-size: 1.35rem; margin-bottom: 1rem; }
    .letter-tag { font-size: 0.7rem; margin-bottom: 0.8rem; }
    .typewriter {
        font-size: 0.95rem;
        min-height: 90px;
        line-height: 1.85;
    }
    .letter-actions {
        flex-direction: column;
        gap: 0.55rem;
        margin-top: 1.4rem;
    }
    .open-btn, .close-btn, .replay-btn, .flip-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .gallery-section {
        padding: 3rem 1rem 4rem;
    }
    .gallery-section h2 { font-size: 1.6rem; margin-bottom: 2rem; }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
        gap: 0.6rem;
    }
    .gallery-item:nth-child(3n+1) {
        grid-row: span 1;
    }

    .timeline-section { padding: 3rem 1rem 4rem; }
    .timeline-section h2 { font-size: 1.6rem; margin-bottom: 2.5rem; }

    .timeline::before {
        left: 18px;
        transform: none;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-left: 44px;
        padding: 1rem 1rem 1rem 44px;
        border-radius: var(--radius);
    }

    .timeline-item::before {
        left: 18px;
        width: 12px;
        height: 12px;
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5), 0 0 12px var(--theme-color);
    }

    .theme-chapter {
        padding: 2.5rem 1rem;
        border-radius: 1.4rem;
    }
    .theme-chapter .chapter-icon { font-size: 2.4rem; }
    .theme-chapter h3 { font-size: 1.5rem; }
    .theme-chapter p { font-size: 0.9rem; }

    .timeline-item:nth-child(even) .timeline-img,
    .timeline-item:nth-child(even) .timeline-text {
        order: unset;
        text-align: left;
    }

    .timeline-img { min-height: 160px; border-radius: 1rem; }
    .timeline-img[data-count="4"] { min-height: 220px; }
    .timeline-img img { min-height: unset; }
    .img-placeholder { min-height: 120px; font-size: 2.5rem; }
    .timeline-text { padding: 0; }
    .timeline-text .date { font-size: 0.78rem; }
    .timeline-text h3 { font-size: 1.15rem; }
    .timeline-text p { font-size: 0.95rem; line-height: 1.75; }

    .lightbox-nav,
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
    .lightbox-close { top: 0.8rem; right: 0.8rem; }
    .lightbox-prev { left: 0.4rem; }
    .lightbox-next { right: 0.4rem; }

    .stats-section { padding: 3rem 1rem; }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    .stat-card { padding: 1.4rem 0.6rem; border-radius: var(--radius-sm); }
    .stat-number { font-size: 1.8rem; }
    .stat-label { font-size: 0.85rem; }

    .anniversary-section { padding: 1rem 1rem 3rem; }
    .anniversary-card { padding: 1.8rem 1.2rem; border-radius: var(--radius); }
    .anniversary-countdown { gap: 0.6rem; }
    .anniversary-countdown div { padding: 0.7rem 0.5rem; min-width: 3.6rem; border-radius: 0.8rem; }
    .anniversary-countdown span { font-size: 1.4rem; }
    .anniversary-countdown small { font-size: 0.72rem; }
    .anniversary-label { font-size: 0.95rem; margin-bottom: 1.2rem; }

    .section-divider { padding: 1.5rem 1rem; font-size: 1.2rem; }
    .section-divider::before,
    .section-divider::after { max-width: 60px; }

    .music-player {
        width: 46px;
        height: 46px;
        bottom: 0.8rem;
        right: 0.8rem;
    }
    .music-icon { font-size: 1.1rem; }

    .auto-scroll-toggle {
        bottom: 0.8rem;
        left: 0.8rem;
        padding: 0.45rem 0.8rem;
        font-size: 0.78rem;
    }

    footer { padding: 2rem 1rem; font-size: 0.85rem; }

    .invite-section { padding: 3rem 1rem 4rem; }
    .invite-card { border-radius: calc(var(--radius) - 0.25rem); }
    .commit-block { padding: 1.4rem 1.2rem 1.1rem; font-size: 0.8rem; }
    .commit-block p { white-space: normal; }
    .invite-actions { flex-direction: column; gap: 0.6rem; padding: 1rem 1.2rem 1.2rem; }
    .invite-repo-btn,
    .invite-accept-btn { width: 100%; padding: 0.6rem 1rem; font-size: 0.9rem; }
    .invite-response { padding: 0 1.2rem 1.2rem; }

    .meaning-section { padding: 3rem 1rem; }
    .meaning-section h2 { font-size: 1.6rem; margin-bottom: 2rem; }
    .meaning-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .meaning-card { padding: 2rem 1.3rem 1.6rem; border-radius: 0.2rem 0.2rem 0.5rem 0.5rem; }
    .meaning-card h3 { font-size: 1.15rem; }
    .meaning-card p { font-size: 1.05rem; }

    .birthday-transition { min-height: 50vh; padding: 3rem 1rem; }
    .transition-content h2 { font-size: 1.6rem; }
    .transition-content p { font-size: 0.95rem; }

    .birthday-section { padding: 3rem 1rem; }
    .birthday-age { font-size: 10rem; opacity: 0.5; }
    .birthday-title { font-size: 2.4rem; }
    .birthday-subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .cake { width: 240px; }
    .cake-hint { font-size: 0.9rem; bottom: -2.6rem; }
    .birthday-letter { padding: 0 1rem; }
    .birthday-letter-paper { padding: 2.5rem 1.6rem 1.8rem; }
    .birthday-letter-paper h3 { font-size: 1.25rem; }
    .birthday-letter-content { font-size: 1rem; }
    .birthday-letter-seal { width: 36px; height: 36px; font-size: 1.1rem; top: -18px; }
    .spotlight { width: 300px; filter: blur(20px); }
    .nebula { filter: blur(40px); }

    .milestones-section { padding: 3rem 1rem; }
    .milestones-section h2 { font-size: 1.6rem; margin-bottom: 2rem; }
    .milestones-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .milestone-card { padding: 2rem 1.4rem 1.6rem; outline-offset: 4px; }
    .milestone-seal { width: 3.6rem; height: 3.6rem; }
    .milestone-icon { font-size: 1.8rem; }
    .milestone-card h3 { font-size: 1.1rem; }
    .milestone-quote { font-size: 0.9rem; padding: 0.85rem 1rem 0.85rem 1.3rem; }

    .footprint-section { padding: 3rem 1rem; }
    .footprint-section h2 { font-size: 1.6rem; margin-bottom: 2rem; }
    .footprint-card { padding: 1rem; border-radius: var(--radius); }
    .handdrawn-map { border-radius: calc(var(--radius) - 0.25rem); }
    .map-tooltip { padding: 0.65rem 0.85rem; min-width: 130px; }
    .tooltip-name { font-size: 0.85rem; }
    .tooltip-time { font-size: 0.75rem; }
    .tooltip-photos { gap: 0.3rem; margin-top: 0.45rem; }
    .tooltip-photos img { width: 52px; height: 52px; border-radius: 0.35rem; }
    .footprint-legend { gap: 0.5rem 0.9rem; margin-top: 1.2rem; }
}

@media (max-width: 360px) {
    .stats-grid { gap: 0.6rem; }
    .stat-number { font-size: 1.55rem; }
    .stat-label { font-size: 0.78rem; }
    .anniversary-countdown div { min-width: 3.2rem; }
}

@media (max-width: 360px) {
    .hero-overlay h1 { font-size: 1.7rem; }
    .counter div { padding: 0.5rem 0.2rem; }
    .counter span { font-size: 1.2rem; }

    .love-letter-face { padding: 1.4rem 1rem; }
    .love-letter-face h2 { font-size: 1.2rem; }
    .typewriter { font-size: 0.88rem; }

    .gallery-grid {
        grid-auto-rows: 130px;
    }
}
