/* ========== 新中式雅致 · 蜀汉足迹地图 ========== */
/* 字体体系：思源宋体(标题) + 思源黑体(正文) + Inter(数字) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    /* 蜀汉主题色彩体系 */
    --shu-red: #8B2500;          /* 蜀锦红 - 深朱砂 */
    --shu-red-light: #A52A2A;    /* 浅朱砂 */
    --shu-gold: #B8860B;         /* 青铜金 - 暗金色 */
    --shu-gold-light: #DAA520;   /* 亮金 */
    --shu-bamboo: #4A7C59;       /* 竹青 - 蜀地象征 */
    --shu-ink: #1A1A2E;          /* 墨夜 */
    --shu-paper: #F8F5F0;        /* 宣纸白 */
    --shu-paper-dark: #E8E0D5;   /* 深宣纸 */
    --shu-stone: #6B6B7B;        /* 青石 */
    --shu-line: rgba(184, 134, 11, 0.15);  /* 金线 */
    
    /* 字体栈 */
    --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', Georgia, serif;
    --font-sans: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    --font-display: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

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

html, body {
    min-height: 100%;
    background: var(--shu-ink);
    color: var(--shu-paper);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, select, input {
    font-family: inherit;
    font-size: inherit;
}

/* ========== 背景装饰 - 水墨晕染效果 ========== */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(139, 37, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(184, 134, 11, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 70%, rgba(74, 124, 89, 0.05) 0%, transparent 55%);
    z-index: 0;
}

/* ========== 主布局 ========== */
.shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(420px, 1.1fr);
    height: 100vh;
    overflow: hidden;
    background: var(--shu-ink);
}

/* ========== 地图区域 ========== */
.map-stage {
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--shu-line);
    background: linear-gradient(160deg, #12121f 0%, #0e0e1a 50%, #0a0a14 100%);
}

/* 回纹装饰边框 */
.map-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(184, 134, 11, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 134, 11, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}

/* ========== 顶部标题区 ========== */
header{position:absolute;top:0;left:0;right:0;z-index:4;padding:32px 38px;display:flex;justify-content:space-between;gap:20px;align-items:flex-start;background:linear-gradient(to bottom,rgba(3,9,19,.92),transparent)}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eyebrow {
    color: var(--shu-gold);
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    opacity: 0.9;
}

.title {
    margin: 4px 0 2px;
    font-family: var(--font-serif);
    font-size: clamp(32px, 3.5vw, 60px);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--shu-paper);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.subtitle {
    margin: 0;
    color: rgba(248, 245, 240, 0.7);
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* ========== 地图工具栏 ========== */
.map-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.map-tools .map-status {
    white-space: nowrap;
    border: 1px solid rgba(184, 134, 11, 0.25);
    background: rgba(26, 26, 46, 0.85);
    color: var(--shu-gold-light);
    border-radius: 6px;
    padding: 8px 14px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.theme-switch {
    display: flex;
    padding: 4px;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-top: 30px;
}

.theme-button {
    min-width: 56px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(248, 245, 240, 0.6);
    padding: 8px 14px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-button:hover {
    color: var(--shu-paper);
    background: rgba(184, 134, 11, 0.1);
}

.theme-button.active {
    background: var(--shu-red);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 37, 0, 0.4);
}

/* ========== 统计信息 ========== */
.stats {
    position: absolute;
    left: 32px;
    top: 165px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat {
    min-width: 82px;
    padding: 10px 14px;
    border: 1px solid rgba(184, 134, 11, 0.15);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.stat:hover {
    border-color: rgba(184, 134, 11, 0.3);
    transform: translateY(-1px);
}

.stat strong {
    display: block;
    color: var(--shu-gold-light);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat span {
    font-family: var(--font-sans);
    font-size: 9px;
    color: rgba(248, 245, 240, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ========== 地图容器 ========== */
#bmapMap {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #0e0e1a;
    transition: background 0.3s ease;
}

.map-stage[data-map-theme="light"] #bmapMap {
    background: var(--shu-paper-dark);
}

#bmapMap .BMap_mask {
    background: inherit;
}

/* ========== 加载遮罩 ========== */
.map-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.map-stage[data-map-theme="light"] .map-loading-overlay {
    background: rgba(232, 224, 213, 0.88);
}

.map-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.map-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(184, 134, 11, 0.15);
    border-top-color: var(--shu-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.map-stage[data-map-theme="light"] .map-loading-overlay .spinner {
    border-color: rgba(139, 37, 0, 0.15);
    border-top-color: var(--shu-red);
}

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

/* ========== 地图暗角效果 ========== */
.map-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    box-shadow: inset 0 0 120px 40px rgba(5, 5, 15, 0.75);
    background: linear-gradient(to bottom, rgba(5, 5, 15, 0.55) 0%, transparent 30%, transparent 70%, rgba(5, 5, 15, 0.5) 100%);
    transition: background 0.25s, box-shadow 0.25s;
}

/* ========== 状态提示 ========== */
.map-status {
    position: absolute;
    top: 16px;
    right: 32px;
    z-index: 5;
    max-width: 440px;
    padding: 10px 14px;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.9);
    color: var(--shu-gold-light);
    font-family: var(--font-sans);
    font-size: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.map-status.error {
    border-color: rgba(165, 42, 42, 0.5);
    color: #ff8a80;
}

/* ========== 地图标记点 - 印章风格 ========== */
.life-marker {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--shu-gold-light);
    border-radius: 50%;
    background: var(--shu-red);
    box-shadow: 
        0 0 0 6px rgba(139, 37, 0, 0.15),
        0 0 20px rgba(139, 37, 0, 0.6);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.25s, 
                box-shadow 0.25s;
}

.life-marker::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.life-marker:hover,
.life-marker.active {
    transform: scale(1.4);
    background: var(--shu-gold);
    border-color: #fff;
    box-shadow: 
        0 0 0 8px rgba(184, 134, 11, 0.2),
        0 0 24px rgba(184, 134, 11, 0.8);
}

.life-marker.muted {
    opacity: 0.25;
}

/* ========== 信息弹窗 ========== */
.bmap-info-content {
    max-width: min(380px, 84vw);
    white-space: normal !important;
}

.life-info-content {
    width: min(340px, 72vw);
    max-height: 260px;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    white-space: normal;
    color: #1a1a2e;
    padding-right: 6px;
    font-family: var(--font-sans);
}

.life-info-content strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--shu-ink);
}

.life-info-content > span {
    color: var(--shu-red);
    font-weight: 600;
    font-family: var(--font-display);
}

.life-info-content p {
    margin: 8px 0 0;
    line-height: 1.65;
    color: #4a4a5a;
    font-size: 12px;
}

.info-story-hook {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(184, 134, 11, 0.12);
    color: var(--shu-gold);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
}

/* ========== 播放控制面板 ========== */
.play-panel {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 28px;
    transform: translateX(-50%);
    width: min(600px, calc(100% - 56px));
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(184, 134, 11, 0.2);
    background: rgba(26, 26, 46, 0.92);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 5;
}

.play-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.play {
    border: 0;
    border-radius: 8px;
    background: var(--shu-red);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
    letter-spacing: 0.02em;
}

.play:hover {
    background: var(--shu-red-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 37, 0, 0.4);
}

.reset {
    min-height: 40px;
    border: 1px solid rgba(184, 134, 11, 0.5);
    border-radius: 8px;
    background: rgba(184, 134, 11, 0.7);
    color: rgba(248, 245, 240, 0.75);
    padding: 9px 14px;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.reset:hover {
    background: rgba(184, 134, 11, 0.1);
    border-color: rgba(184, 134, 11, 0.4);
    color: #1A1A2E;
}

.speed {
    border-radius: 8px;
    border: 1px solid rgba(184, 134, 11, 0.2);
    background: rgba(26, 26, 46, 0.8);
    color: var(--shu-paper);
    padding: 8px 10px;
    font-family: var(--font-display);
}

.now-year {
    min-width: 60px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--shu-gold-light);
    letter-spacing: -0.02em;
}

/* ========== 进度条 ========== */
.progress-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.route-progress {
    height: 4px;
    overflow: hidden;
    background: rgba(184, 134, 11, 0.12);
    border-radius: 4px;
}

.route-progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--shu-red), var(--shu-gold));
    border-radius: 4px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-line span {
    color: rgba(248, 245, 240, 0.5);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ========== 右侧面板 ========== */
aside {
    height: 100vh;
    overflow: auto;
    background: #161625;
    color: var(--shu-paper);
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 134, 11, 0.3) transparent;
    transition: background 0.3s, color 0.3s;
}

aside::-webkit-scrollbar {
    width: 6px;
}

aside::-webkit-scrollbar-track {
    background: transparent;
}

aside::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.3);
    border-radius: 3px;
}

aside::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.5);
}

.side-head {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 28px 28px 20px;
    background: linear-gradient(to bottom, #181828 80%, rgba(24, 24, 40, 0.95));
    border-bottom: 1px solid rgba(184, 134, 11, 0.15);
}

.side-kicker {
    margin-bottom: 10px;
    color: var(--shu-gold);
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.side-head h2 {
    margin: 0 0 10px;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--shu-paper);
    letter-spacing: 0.04em;
}

.summary {
    margin: 0 0 16px;
    color: rgba(248, 245, 240, 0.65);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.8;
    font-weight: 300;
}

.filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 134, 11, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar {
    height: 4px;
}

.filters::-webkit-scrollbar-track {
    background: transparent;
}

.filters::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.3);
    border-radius: 2px;
}

.filters::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.5);
}

.filter {
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid rgba(184, 134, 11, 0.15);
    background: transparent;
    color: rgba(248, 245, 240, 0.6);
    padding: 7px 12px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter:hover {
    border-color: rgba(184, 134, 11, 0.3);
    color: var(--shu-paper);
}

.filter.active {
    border-color: var(--shu-red);
    background: var(--shu-red);
    color: #fff;
    font-weight: 600;
}

/* ========== 时间线区域 ========== */
.timeline {
    padding: 20px 24px 64px;
}

/* ========== 人物画廊 ========== */
.module-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.module-heading small {
    display: block;
    color: var(--shu-gold);
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.module-heading h3 {
    margin: 4px 0 0;
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    color: var(--shu-paper);
}

.portrait-gallery {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(184, 134, 11, 0.15);
    border-radius: 12px;
    background: #1c1c30;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.gallery-actions {
    display: flex;
    gap: 6px;
}

.gallery-button {
    width: 34px;
    height: 30px;
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-radius: 6px;
    background: transparent;
    color: rgba(248, 245, 240, 0.7);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-button:hover {
    border-color: var(--shu-gold);
    background: rgba(184, 134, 11, 0.1);
    color: var(--shu-gold-light);
}

.portrait-viewport {
    overflow: hidden;
    border-radius: 8px;
}

.portrait-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
}

.portrait-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    min-width: 100%;
    aspect-ratio: 4/3;
    scroll-snap-align: start;
}

.gallery-slide > figure {
    width: 100%;
    height: 100%;
}

.portrait-card {
    margin: 0;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.portrait-card img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.portrait-card figcaption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(26, 26, 46, 0.85));
    color: var(--shu-paper);
}

.portrait-card figcaption strong {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
}

.portrait-card figcaption span {
    font-family: var(--font-sans);
    font-size: 9px;
    color: rgba(248, 245, 240, 0.7);
    font-weight: 400;
}

.gallery-index {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: rgba(248, 245, 240, 0.5);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 500;
}

.gallery-index i {
    width: 36px;
    height: 2px;
    background: var(--shu-red);
    border-radius: 1px;
}

/* ========== 故事幻灯片 ========== */
.story-slide {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #12121f;
    border-radius: 8px;
}

.story-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-slide figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 14px 12px;
    background: linear-gradient(transparent, rgba(18, 18, 31, 0.92));
    color: var(--shu-paper);
    font-family: var(--font-sans);
    font-size: 10px;
    line-height: 1.5;
    font-weight: 400;
}

/* ========== 时间线卡片 - 卷轴风格 ========== */
.timeline-card {
    position: relative;
    margin: 0 0 16px;
    padding: 20px 20px 18px 26px;
    border: 1px solid rgba(184, 134, 11, 0.12);
    border-radius: 10px;
    background: #1a1a2e;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.28s, 
                opacity 0.28s, 
                background 0.3s, 
                color 0.3s,
                box-shadow 0.28s;
}

/* 卷轴左侧装饰线 */
.timeline-card::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 18px;
    bottom: 18px;
    width: 3px;
    background: rgba(184, 134, 11, 0.2);
    border-radius: 2px;
    transition: background 0.28s, box-shadow 0.28s;
}

.timeline-card:hover {
    transform: translateX(-4px);
    border-color: rgba(184, 134, 11, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.timeline-card.active {
    border-color: var(--shu-red);
    background: #1e1e35;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
}

.timeline-card.active::before {
    background: var(--shu-red);
    box-shadow: 0 0 14px rgba(139, 37, 0, 0.5);
}

.timeline-card.hidden {
    display: none;
}

.timeline-card.has-visual::after {
    content: "故事图";
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: var(--shu-gold);
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.year {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--shu-gold-light);
    letter-spacing: -0.02em;
}

.confidence {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(74, 124, 89, 0.1);
    color: #7ec8a0;
}

.confidence.inferred {
    background: rgba(184, 134, 11, 0.1);
    color: var(--shu-gold-light);
}

.confidence.disputed {
    background: rgba(165, 42, 42, 0.12);
    color: #e57373;
}

.place {
    margin: 10px 0 3px;
    color: var(--shu-red-light);
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 600;
}

.place span {
    margin-left: 8px;
    color: rgba(248, 245, 240, 0.45);
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 400;
}

.story-hook {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 2px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(184, 134, 11, 0.25);
    background: rgba(184, 134, 11, 0.08);
    color: var(--shu-gold-light);
    font-family: var(--font-sans);
}

.story-hook span {
    font-weight: 600;
}

.story-hook small {
    color: rgba(184, 134, 11, 0.7);
    font-weight: 400;
}

.timeline-card h3 {
    margin: 8px 0 8px;
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    color: var(--shu-paper);
    line-height: 1.4;
}

.timeline-card p {
    margin: 0;
    color: rgba(248, 245, 240, 0.7);
    line-height: 1.75;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 300;
}

.timeline-card details {
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 11px;
    color: rgba(248, 245, 240, 0.5);
}

.timeline-card summary {
    cursor: pointer;
    color: rgba(248, 245, 240, 0.65);
    font-weight: 500;
}

.sources {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.sources a,
.sources span,
.bmap-link {
    color: #64b5f6;
    text-decoration: none;
    font-family: var(--font-sans);
}

.sources a:hover,
.bmap-link:hover {
    text-decoration: underline;
    color: #90caf9;
}

.bmap-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 11px;
    font-weight: 500;
}

/* ========== 页脚 ========== */
.footnote {
    padding: 0 28px 40px;
    color: rgba(248, 245, 240, 0.4);
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1.7;
    font-weight: 300;
    margin-top: -50px;
}

/* ========== 浅色主题 ========== */
.map-stage[data-map-theme="light"] header {
    background: linear-gradient(to bottom, rgba(248, 245, 240, 0.96) 0%, rgba(248, 245, 240, 0.75) 55%, transparent 100%);
}

.map-stage[data-map-theme="light"] .eyebrow {
    color: var(--shu-gold);
}

.map-stage[data-map-theme="light"] .title {
    color: var(--shu-ink);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.map-stage[data-map-theme="light"] .subtitle {
    color: rgba(26, 26, 46, 0.65);
}

.map-stage[data-map-theme="light"] .map-tools .map-status {
    border-color: rgba(139, 37, 0, 0.2);
    background: rgba(248, 245, 240, 0.92);
    color: var(--shu-red);
}

.map-stage[data-map-theme="light"] .theme-switch {
    border-color: rgba(26, 26, 46, 0.12);
    background: rgba(248, 245, 240, 0.95);
}

.map-stage[data-map-theme="light"] .theme-button {
    color: rgba(26, 26, 46, 0.6);
}

.map-stage[data-map-theme="light"] .theme-button:hover {
    color: var(--shu-ink);
    background: rgba(139, 37, 0, 0.08);
}

.map-stage[data-map-theme="light"] .theme-button.active {
    color: #fff;
}

.map-stage[data-map-theme="light"] .map-vignette {
    box-shadow: inset 0 0 80px 20px rgba(26, 26, 46, 0.08);
    background: linear-gradient(to bottom, rgba(248, 245, 240, 0.3) 0%, transparent 25%, transparent 75%, rgba(232, 224, 213, 0.4) 100%);
}

.map-stage[data-map-theme="light"] .map-status {
    border-color: rgba(139, 37, 0, 0.18);
    background: rgba(248, 245, 240, 0.92);
    color: var(--shu-red);
}

.map-stage[data-map-theme="light"] .stat,
.map-stage[data-map-theme="light"] .play-panel {
    border-color: rgba(26, 26, 46, 0.1);
    background: rgba(248, 245, 240, 0.92);
    color: var(--shu-ink);
}

.map-stage[data-map-theme="light"] .stat span {
    color: rgba(26, 26, 46, 0.5);
}

.map-stage[data-map-theme="light"] .speed {
    border-color: rgba(26, 26, 46, 0.12);
    background: #fff;
    color: var(--shu-ink);
}

.shell[data-theme="light"] aside {
    background: var(--shu-paper);
    color: var(--shu-ink);
    scrollbar-color: rgba(139, 37, 0, 0.25) transparent;
}

.shell[data-theme="light"] .side-head {
    background: linear-gradient(to bottom, #f5f0e8 80%, rgba(245, 240, 232, 0.96));
    border-color: rgba(139, 37, 0, 0.12);
}

.shell[data-theme="light"] .side-head h2 {
    color: var(--shu-ink);
}

.shell[data-theme="light"] .summary {
    color: rgba(26, 26, 46, 0.6);
}

.shell[data-theme="light"] .portrait-gallery {
    border-color: rgba(139, 37, 0, 0.12);
    background: #faf7f2;
    box-shadow: 0 14px 32px rgba(26, 26, 46, 0.06);
}

.shell[data-theme="light"] .module-heading h3,
.shell[data-theme="light"] .timeline-heading {
    color: var(--shu-ink);
}

.shell[data-theme="light"] .gallery-button {
    border-color: rgba(139, 37, 0, 0.15);
    color: rgba(26, 26, 46, 0.6);
}

.shell[data-theme="light"] .gallery-button:hover {
    border-color: var(--shu-red);
    color: var(--shu-red);
    background: rgba(139, 37, 0, 0.06);
}

.shell[data-theme="light"] .story-slide {
    background: #ede8df;
}

.shell[data-theme="light"] .timeline-card {
    border-color: rgba(139, 37, 0, 0.06);
    background: #faf7f2;
    color: var(--shu-ink);
    box-shadow: 0 4px 16px rgba(26, 26, 46, 0.03);
}

.shell[data-theme="light"] .timeline-card:hover {
    border-color: rgba(139, 37, 0, 0.15);
    box-shadow: 0 6px 20px rgba(26, 26, 46, 0.06);
}

.shell[data-theme="light"] .timeline-card.active {
    border-color: var(--shu-red);
    background: #fff;
    box-shadow: 0 10px 28px rgba(139, 37, 0, 0.08);
}

.shell[data-theme="light"] .timeline-card.active::before {
    background: var(--shu-red);
}

.shell[data-theme="light"] .timeline-card p {
    color: rgba(26, 26, 46, 0.65);
}

.shell[data-theme="light"] .filter {
    border-color: rgba(139, 37, 0, 0.12);
    color: rgba(26, 26, 46, 0.6);
}

.shell[data-theme="light"] .filter:hover {
    border-color: rgba(139, 37, 0, 0.25);
    color: var(--shu-ink);
}

.shell[data-theme="light"] .filter.active {
    border-color: var(--shu-red);
    background: var(--shu-red);
    color: #fff;
}

.shell[data-theme="light"] .year {
    color: var(--shu-gold);
}

.shell[data-theme="light"] .confidence {
    background: rgba(74, 124, 89, 0.1);
    color: var(--shu-bamboo);
}

.shell[data-theme="light"] .confidence.inferred {
    background: rgba(184, 134, 11, 0.1);
    color: var(--shu-gold);
}

.shell[data-theme="light"] .place span {
    color: rgba(26, 26, 46, 0.45);
}

.shell[data-theme="light"] .story-hook {
    border-color: rgba(184, 134, 11, 0.25);
    background: rgba(184, 134, 11, 0.08);
    color: var(--shu-gold);
}

.shell[data-theme="light"] .story-hook small {
    color: rgba(184, 134, 11, 0.7);
}

.shell[data-theme="light"] .timeline-card details,
.shell[data-theme="light"] .timeline-card summary {
    color: rgba(26, 26, 46, 0.5);
}

.shell[data-theme="light"] .sources a,
.shell[data-theme="light"] .bmap-link {
    color: #1565c0;
}

.shell[data-theme="light"] .sources a:hover,
.shell[data-theme="light"] .bmap-link:hover {
    color: #1976d2;
}

.shell[data-theme="light"] .footnote {
    color: rgba(26, 26, 46, 0.4);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .shell {
        grid-template-columns: 1fr;
        grid-template-rows: 55vh 1fr;
    }
    
    .map-stage {
        border-right: 0;
        border-bottom: 1px solid var(--shu-line);
    }
    
    header {
        padding: 20px 24px;
    }
    
    .stats {
        left: 24px;
        top: 140px;
    }
    
    .play-panel {
        width: min(520px, calc(100% - 40px));
        bottom: 20px;
    }
}

@media (max-width: 640px) {
    .shell {
        grid-template-rows: 50vh 1fr;
    }
    
    header {
        padding: 16px 18px;
    }
    
    .title {
        font-size: clamp(24px, 5vw, 36px);
    }
    
    .stats {
        left: 18px;
        top: 120px;
    }
    
    .stat {
        min-width: 70px;
        padding: 8px 10px;
    }
    
    .play-panel {
        width: calc(100% - 32px);
        padding: 12px;
    }
    
    .play-actions {
        flex-wrap: wrap;
    }
}