﻿/* 史记站 · 家族统一基因（照《学霸星球学科站-统一设计规范》一字不改的 CSS 变量与质感签名）
   版面骨架 = 家族最新左栏导航版（化学站 v0.12.18 sidenav 基准）
   本站内容层（Hero 十二件套 / 板块页）按规范第三节公式套写 */
:root {
  --brand: #1f5fd6;        /* 品牌蓝 */
  --brand-dark: #1d4ed8;
  --brand-soft: #eef4ff;
  --violet: #8b5cf6;       /* 品牌紫 */
  --grad: linear-gradient(135deg, #1f5fd6, #8b5cf6);          /* 渐变竖条/logo/点缀 */
  --grad-btn: linear-gradient(135deg, #1f5fd6, #3b82f6);      /* 主按钮渐变 */
  --bg: #eef1f5;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #8b9199;
  --sub: #4b5563;
  --line: #e5e7eb;
  --danger: #e11d48;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 4px 28px rgba(16,24,40,.07), 0 1px 4px rgba(16,24,40,.04);
  /* 史记站内容色（基于品牌色衍生，仅用于数据语义：五体分类） */
  --c-benji: #b45309;   /* 本纪 · 赭 */
  --c-shijia: #0d9488;  /* 世家 · 青 */
  --c-liezhuan: #1f5fd6;/* 列传 · 品牌蓝 */
  --c-biao: #7c3aed;    /* 表 · 紫 */
  --c-shu: #059669;     /* 书 · 绿 */
  --c-hanshu: #a83250;  /* 汉书后史 · 绛 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 15px/1.6 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, #e3edfd 0%, #ece7fc 48%, #e4f0fd 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(560px 360px at 12% -4%, rgba(31,95,214,.14), transparent 62%),
    radial-gradient(640px 420px at 96% 30%, rgba(139,92,246,.12), transparent 65%),
    radial-gradient(520px 380px at 50% 108%, rgba(59,130,246,.10), transparent 60%);
}

/* ============ 左栏导航（家族左栏版基准） ============ */
.layout { display: flex; min-height: 100vh; }
.sidenav {
  width: 224px; flex: 0 0 224px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(10px);
  border-right: 1px solid rgba(229,231,235,.8);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 50;
  padding: 18px 14px 14px;
}
.sn-logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.sn-logo .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(31,95,214,.28);
}
.sn-logo .nm { font-weight: 700; font-size: 17px; letter-spacing: 1px; }
.sn-logo .sub { font-size: 11px; color: var(--muted); }
.sn-nav { flex: 1; overflow-y: auto; }
.sn-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin: 3px 0; border-radius: 10px;
  color: var(--sub); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.sn-item:hover { background: rgba(31,95,214,.07); color: var(--brand); }
.sn-item.on {
  background: var(--grad-btn); color: #fff;
  box-shadow: 0 3px 10px rgba(31,95,214,.28);
}
.sn-item .ico { font-size: 17px; width: 20px; text-align: center; }
.sn-item .tag { margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.08); color: inherit; opacity: .75; }
.sn-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.sn-foot .sn-item { font-size: 13.5px; padding: 9px 12px; }
.sn-foot .fab-g { color: #07c160; }
.sn-foot .fab-b { color: var(--brand); }
.sn-foot .sn-item.on { background: none; color: inherit; box-shadow: none; }
.sn-more { font-size: 11.5px; color: var(--muted); padding: 8px 12px 0; line-height: 1.9; }
.sn-more a { color: var(--brand); text-decoration: none; }

/* 移动端抽屉 */
.m-burger { display: none; }
@media (max-width: 900px) {
  .layout { display: block; }
  .sidenav {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto;
    transform: translateX(-100%); transition: transform .22s;
    box-shadow: 0 0 40px rgba(16,24,40,.18);
  }
  body.nav-open .sidenav { transform: translateX(0); }
  .m-burger {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 12px; left: 12px; z-index: 60;
    width: 40px; height: 40px; border-radius: 12px; border: none;
    background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
    box-shadow: var(--shadow); font-size: 18px; cursor: pointer;
  }
  .sn-mask { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(15,20,28,.4); }
  body.nav-open .sn-mask { display: block; }
}

/* ============ 主内容区 ============ */
.main { flex: 1; min-width: 0; max-width: 980px; margin: 0 auto; padding: 22px 20px 60px; }

/* Hero 十二件套 */
.hero2 {
  background: radial-gradient(120% 120% at 50% 0%, #eef3ff 0%, #f6f3ff 45%, #fff 100%);
  border-radius: 20px; text-align: center; padding: 34px 22px 28px;
  border: 1px solid rgba(229,231,235,.8); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero2::before, .hero2::after {
  content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  filter: blur(2px); opacity: .5; pointer-events: none;
}
.hero2::before { background: radial-gradient(circle, rgba(31,95,214,.18), transparent 70%); top: -50px; left: -50px; }
.hero2::after { background: radial-gradient(circle, rgba(139,92,246,.18), transparent 70%); bottom: -60px; right: -50px; }
.hbadge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(31,95,214,.08); color: var(--brand); border: 1px solid rgba(31,95,214,.18);
}
.hero2 h2 { font-size: 27px; margin: 14px 0 6px; letter-spacing: .5px; }
.hero2 h2 b { background: linear-gradient(135deg, #1f5fd6, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hsub { color: var(--sub); font-size: 14.5px; line-height: 1.8; }
.hstat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 620px; margin: 18px auto 0; }
.hstat .cell { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px 10px; }
.hstat .num { font-weight: 700; font-size: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hstat .lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hloop { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 18px 0 4px; }
.hloop .step { padding: 6px 14px; border-radius: 999px; font-size: 13px; background: #fff; border: 1px solid var(--line); color: var(--sub); font-weight: 500; }
.hloop .step b { color: var(--brand); }
.hpts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 720px; margin: 16px auto 0; text-align: left; }
.hpts .pt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.hpts .hi {
  width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  margin-bottom: 8px;
}
.hpts .pt h4 { font-size: 14.5px; margin-bottom: 4px; }
.hpts .pt p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.cred { display: flex; justify-content: center; gap: 22px; margin-top: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cred b { color: var(--sub); font-weight: 600; }
.hbig {
  margin: 18px auto 0; max-width: 640px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(225,29,72,.06), rgba(225,29,72,.02));
  border: 1px solid rgba(225,29,72,.18); border-radius: 14px;
  color: var(--danger); font-weight: 600; font-size: 16px;
}
.hbig b { background: rgba(245,158,11,.28); padding: 1px 5px; border-radius: 5px; animation: pulse 1.6s ease-in-out infinite; }
.hbig em { display: block; font-style: normal; margin-top: 6px; font-size: 14px; background: linear-gradient(90deg, #e11d48, #f59e0b, #1f5fd6, #e11d48); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 3.2s linear infinite; }
@keyframes pulse { 50% { background-color: rgba(245,158,11,.4); } }
@keyframes flow { to { background-position: 300% 0; } }
.price { display: flex; gap: 14px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.price .pk {
  position: relative; width: 200px; background: #fff; border-radius: 16px;
  padding: 18px 16px 14px; border: 1px solid var(--line); box-shadow: var(--shadow);
  text-align: center; text-decoration: none; color: var(--text); transition: transform .15s;
}
.price .pk:hover { transform: translateY(-3px); }
.price .pk.pj { border-top: 4px solid var(--brand); }
.price .pk.js { border-top: 4px solid var(--violet); }
.price .nm { font-weight: 700; font-size: 14px; color: var(--sub); }
.price .pv { font-size: 26px; font-weight: 800; margin: 4px 0 2px; }
.price .pk.pj .pv { color: var(--brand); }
.price .pk.js .pv { color: var(--violet); }
.price .pv i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted); }
.price .bd { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.price .corner { position: absolute; top: 8px; right: 10px; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.hbuy {
  max-width: 640px; margin: 16px auto 0; padding: 11px 16px;
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(245,158,11,.05));
  border: 1px solid rgba(245,158,11,.35); border-radius: 12px;
  font-size: 13.5px; color: #92400e; font-weight: 500;
}
.hbuy b { color: #b45309; }
.hcta {
  max-width: 640px; margin: 12px auto 0; padding: 10px 16px;
  background: rgba(31,95,214,.07); border: 1px solid rgba(31,95,214,.2);
  border-radius: 12px; font-size: 13px; color: var(--brand); font-weight: 500;
}

/* 板块入口网格 */
.entries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.entries .et {
  position: relative; display: block; background: #fff; border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s;
}
.entries .et:hover { transform: translateY(-3px); }
.entries .et::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3.5px; background: var(--grad); }
.entries .et .ico { font-size: 24px; }
.entries .et h3 { font-size: 16px; margin: 8px 0 4px; }
.entries .et p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.entries .et .go { position: absolute; right: 14px; top: 16px; color: var(--brand); font-weight: 600; font-size: 13px; }

/* 小节标题（渐变竖条签名） */
.sec-title { font-size: 18px; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-title::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--grad); }
.sec-title .muted { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

/* ============ 板块页通用 ============ */
.page-head { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 14px; }
.page-head h2 { font-size: 21px; }
.page-head p { font-size: 13px; color: var(--muted); }
.chipbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: #fff; border: 1px solid var(--line); color: var(--sub);
  cursor: pointer; transition: all .15s; border: none;
}
.chip.on { background: var(--grad-btn); color: #fff; box-shadow: 0 3px 10px rgba(31,95,214,.28); }

/* 长廊卡片网格 */
.grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.post-card {
  position: relative; background: #fff; border-radius: 12px; padding: 12px;
  border: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: transform .15s; overflow: hidden;
}
.post-card:hover { transform: translateY(-2px); }
.post-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--pc, var(--brand)); }
.post-card .vol { font-size: 10.5px; color: var(--muted); }
.post-card .nm { font-size: 14px; font-weight: 600; margin: 2px 0 4px; line-height: 1.4; }
.post-card .brief { font-size: 11px; color: var(--muted); line-height: 1.6; height: 34px; overflow: hidden; }
.post-card .st { font-size: 10px; padding: 1px 8px; border-radius: 999px; display: inline-block; margin-top: 6px; }
.post-card.ready .st { background: rgba(13,148,136,.12); color: #0d9488; }
.post-card.locked { opacity: .55; cursor: pointer; }
.post-card.locked::before { background: #cbd2dc; }
.post-card.locked .st { background: rgba(0,0,0,.06); color: var(--muted); }
/* 生平画卷卡（图文卷轴：上画卷/下文字） */
.post-card.has-fig { padding: 0; }
.post-card.has-fig .vol, .post-card.has-fig .nm, .post-card.has-fig .brief, .post-card.has-fig .st { margin-left: 12px; margin-right: 12px; }
.post-card.has-fig .vol { margin-top: 10px; }
.post-card.has-fig .st { margin-bottom: 12px; }
.pfig { position: relative; overflow: hidden; }
.pfig img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top;
  transform: perspective(700px) rotateX(0deg); transition: transform .35s ease;
  border-bottom: 1px solid var(--line);
}
.post-card.has-fig:hover .pfig img { transform: perspective(700px) rotateX(5deg) scale(1.04); transform-origin: 50% 100%; }
.pfig-tag {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(255,253,247,.92); border: 1px solid rgba(150,90,40,.35);
  border-radius: 999px; padding: 2px 9px; font-size: 10px; font-weight: 700; color: #8a5a2e;
  box-shadow: 0 1px 4px rgba(80,50,20,.18);
}

/* 篇目详情 */
.reader { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px 22px; }
/* 篇目头图（生平画卷，2.5D 微透视入场） */
.hero-fig { position: relative; margin: -24px -22px 18px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.hero-fig img { display: block; width: 100%; max-height: 300px; object-fit: cover; object-position: center 18%; }
.hero-fig-tag {
  position: absolute; left: 14px; bottom: 12px;
  background: rgba(255,253,247,.92); border: 1px solid rgba(150,90,40,.35);
  border-radius: 999px; padding: 4px 14px; font-size: 12px; font-weight: 700; color: #8a5a2e;
  box-shadow: 0 1px 5px rgba(80,50,20,.2);
}
.reader h3 { font-size: 20px; margin-bottom: 4px; }
.reader .meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.reader .brief { font-size: 14.5px; line-height: 1.9; color: var(--sub); }
.reader .todo-note { margin-top: 16px; padding: 12px 14px; background: rgba(31,95,214,.06); border: 1px solid rgba(31,95,214,.15); border-radius: 10px; font-size: 13px; color: var(--brand); }

/* 悬案八段式 */
.case-wrap { max-width: 760px; margin: 0 auto; }
.case-head { text-align: center; padding: 26px 20px; background: radial-gradient(120% 120% at 50% 0%, #eef3ff, #f6f3ff 45%, #fff); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.case-head .cat { font-size: 12px; color: var(--brand); font-weight: 600; letter-spacing: 2px; }
.case-head h2 { font-size: 26px; margin: 8px 0 6px; }
.case-head .sum { font-size: 14px; color: var(--sub); }
.case-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-top: 16px; opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s; }
.case-sec.in { opacity: 1; transform: none; }
.case-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin-bottom: 10px; }
.case-sec h4 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: 0 0 24px; }
.case-sec p { font-size: 14px; line-height: 1.9; color: var(--sub); }
.case-sec .src { margin-top: 10px; padding: 10px 12px; background: var(--surface, #f7f8fa); border-left: 3px solid var(--brand); border-radius: 6px; font-size: 13px; color: var(--sub); line-height: 1.9; }
.case-hero { position: relative; border-radius: 18px; overflow: hidden; margin-top: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); transform-style: preserve-3d; will-change: transform; }
/* 三层 2.5D 画卷：ch-layer 背景画卷（scrub zoom）→ ch-mist 前景雾气 → ch-title 中景题签 */
.case-hero .ch-layer { position: relative; }
.case-hero .ch-layer img { display: block; width: 100%; height: auto; will-change: transform; }
.case-hero .ch-mist {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(250,244,226,.42) 0%, rgba(250,244,226,0) 34%, rgba(38,28,16,.16) 74%, rgba(38,28,16,.5) 100%);
}
.case-hero .ch-title {
  position: absolute; left: 26px; bottom: 44px; display: flex; flex-direction: column; gap: 6px; will-change: transform;
}
.case-hero .ch-title .ch-t1 {
  font-family: 'Kaiti SC', 'KaiTi', 'STKaiti', serif;
  font-size: 30px; font-weight: 700; letter-spacing: 4px; color: #fffdf7;
  text-shadow: 0 2px 12px rgba(30,20,10,.65), 0 0 26px rgba(30,20,10,.35);
}
.case-hero .ch-title .ch-t2 {
  font-size: 12.5px; font-weight: 700; letter-spacing: 2px; color: rgba(255,251,240,.92);
  background: rgba(120,60,30,.55); border: 1px solid rgba(255,245,225,.3);
  align-self: flex-start; padding: 3px 12px; border-radius: 999px; backdrop-filter: blur(3px);
}
.case-hero .ch-title .ch-t3 {
  font-size: 11px; letter-spacing: 3px; color: rgba(255,248,235,.72);
  text-shadow: 0 1px 6px rgba(30,20,10,.6);
}
.case-hero .ch-cap {
  position: absolute; right: 14px; bottom: 12px;
  background: rgba(15,20,28,.55); color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(4px);
}
@media (prefers-reduced-motion: reduce) { .case-hero .ch-layer img { animation: none !important; transform: none !important; } }
.case-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.case-people .pp { padding: 10px 12px; background: #f7f8fa; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.case-people .pp b { color: var(--text); }
.case-people .pp .role { color: var(--brand); font-size: 11px; }
/* 人物头像卡（画卷圆裁） */
.case-people .pp.has-fig { display: grid; grid-template-columns: 52px 1fr; gap: 3px 12px; align-items: start; }
.case-people .pp .pp-fig {
  grid-row: 1 / span 3; width: 52px; height: 52px; object-fit: cover; object-position: top;
  border-radius: 50%; border: 2.5px solid rgba(150,90,40,.4); box-shadow: 0 1px 5px rgba(80,50,20,.2);
  background: #f4ecd8;
}
/* 「经过」段叙事浮动插画 */
.proc-fig { float: right; width: 200px; margin: 0 0 12px 16px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.proc-fig img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.proc-fig .proc-cap {
  display: block; text-align: center; font-size: 10.5px; font-weight: 700; color: #8a5a2e;
  background: #f4ecd8; padding: 4px 8px; border-top: 1px solid var(--line);
}
@media (max-width: 640px) { .proc-fig { float: none; width: 100%; margin: 0 0 12px; } }
.case-q { background: linear-gradient(135deg, rgba(139,92,246,.06), rgba(139,92,246,.02)); border: 1px solid rgba(139,92,246,.25); }
.case-q .vp { margin: 8px 0 0; padding: 9px 12px; background: #fff; border-radius: 8px; font-size: 13px; color: var(--sub); line-height: 1.7; }

/* 关系图谱 */
.graph-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.graph-box svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--sub); }
.legend .k { display: inline-flex; align-items: center; gap: 5px; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.tipbox { position: absolute; pointer-events: none; background: rgba(15,20,28,.92); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 8px; max-width: 240px; line-height: 1.6; z-index: 90; display: none; }

/* 时间轴 */
.tl-box { position: relative; max-width: 760px; margin: 0 auto; padding-left: 30px; }
.tl-box::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--grad); opacity: .35; }
.tl-item { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.tl-item::before { content: ''; position: absolute; left: -27px; top: 18px; width: 11px; height: 11px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 3px rgba(31,95,214,.15); }
.tl-item .yr { font-size: 12px; font-weight: 700; color: var(--brand); }
.tl-item h4 { font-size: 15px; margin: 2px 0 4px; }
.tl-item p { font-size: 13px; color: var(--muted); line-height: 1.75; }
.tl-item .from { font-size: 11px; color: var(--muted); margin-top: 6px; }
/* 里程碑配图节点（画卷复用映射） */
.tl-item.has-img { display: grid; grid-template-columns: 132px 1fr; gap: 4px 14px; align-items: start; }
.tl-item.has-img .tl-fig { grid-row: 1 / span 4; margin-top: 4px; }
.tl-item.has-img .tl-fig img {
  display: block; width: 132px; aspect-ratio: 4 / 3; object-fit: cover; object-position: top;
  border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 1px 5px rgba(80,60,30,.14);
}
.tl-item.has-img .yr { grid-column: 2; }
.tl-item.has-img h4 { grid-column: 2; margin: 0; }
.tl-item.has-img p { grid-column: 2; }
@media (max-width: 640px) {
  .tl-item.has-img { grid-template-columns: 1fr; }
  .tl-item.has-img .tl-fig { grid-row: auto; }
  .tl-item.has-img .tl-fig img { width: 100%; }
  .tl-item.has-img .yr, .tl-item.has-img h4, .tl-item.has-img p { grid-column: 1; }
}

/* member 页 */
.lock-box { text-align: center; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 26px 20px; max-width: 460px; margin: 30px auto; }
.lock-box .big { font-size: 34px; }
.lic-row { display: flex; gap: 8px; margin-top: 14px; }
.lic-row input {
  flex: 1; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  font-size: 14px; font-family: inherit; outline: none;
}
.lic-row input:focus { border-color: var(--brand); }
.btn-main {
  display: inline-block; padding: 11px 22px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--grad-btn); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 3px 10px rgba(31,95,214,.28); text-decoration: none; font-family: inherit;
}
.btn-ghost {
  display: inline-block; padding: 10px 18px; border-radius: 10px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--sub); font-weight: 500;
  font-size: 13.5px; text-decoration: none; font-family: inherit;
}
.btn-mini { padding: 5px 12px; border-radius: 8px; border: none; background: #fff; color: var(--brand); font-weight: 600; font-size: 12.5px; cursor: pointer; border: 1px solid rgba(31,95,214,.3); }

/* footer */
.foot { text-align: center; padding: 26px 16px 30px; font-size: 12px; color: var(--muted); }
.foot a { color: var(--brand); text-decoration: none; }

/* ============ 三千年总图（2.5D 水墨疆域地图） ============ */
.map-stage { position: relative; perspective: 1400px; }
.map-tilt {
  position: relative; transform-style: preserve-3d; will-change: transform;
  border-radius: var(--radius-card); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background: #e8dcc0;
}
/* 缩放透视视差层：镜头推近时俯仰下沉（2.5D 进深），gsap 入场动画控制外层 tilt 不冲突 */
.map-deep { transform-style: preserve-3d; will-change: transform; transform-origin: 50% 62%; }
.map-deep .map-marks { display: block; width: 100%; height: auto; }
.map-base { display: block; width: 100%; height: auto; transition: opacity .8s ease; }
#mapBase1, #mapBase2 { transition: opacity .8s ease; }
.map-base2 { position: absolute; inset: 0; }
.period-badge {
  position: absolute; left: 14px; top: 14px;
  background: rgba(255,253,247,.9); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px; font-size: 13px; font-weight: 700; color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.map-marks { display: block; width: 100%; height: auto; } /* SVG 内含底图 image 层，流式撑起容器 */
.mk text { font-family: 'Kaiti SC', 'KaiTi', 'STKaiti', serif; user-select: none; text-shadow: 0 0 4px rgba(255,250,240,.92), 0 1px 2px rgba(255,250,240,.75); }
.mk-pulse { transform-box: fill-box; transform-origin: center; animation: mkpulse 2.4s ease-out infinite; }
@keyframes mkpulse {
  0% { transform: scale(1); opacity: .8; }
  70% { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
.tl-wrap { position: relative; margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 12px; box-shadow: var(--shadow); }
/* —— 水墨卷轴朝代带 —— */
#tlwrap { position: relative; padding: 26px 26px 8px; background: linear-gradient(180deg, #faf5e8, #f2e9d2); }
#tlbar {
  position: relative; height: 40px; border-radius: 10px;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, #f4ecd8, #eadfc4);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 8px rgba(80,60,30,.10);
}
.tlera:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.tlera:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
/* 卷轴两端轴头 */
#tlbar::before, #tlbar::after {
  content: ''; position: absolute; z-index: 3; top: 50%; width: 13px; height: 13px;
  border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 35% 32%, #b98a5e, #6b4a2c 70%);
  box-shadow: 0 1px 3px rgba(60,40,20,.45);
}
#tlbar::before { left: 5px; }
#tlbar::after { right: 5px; }
.tlera {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-width: 0; overflow: hidden; opacity: .78;
  border-right: 1px solid rgba(90,70,50,.30);
}
.tlera span {
  font-family: 'Kaiti SC', 'KaiTi', 'STKaiti', serif;
  font-size: 12.5px; letter-spacing: 2px; white-space: nowrap;
  color: rgba(255,252,244,.96); text-shadow: 0 1px 2px rgba(40,30,20,.35);
  padding: 0 6px;
}
.tlera:last-of-type { border-right: none; }
/* 朱砂游标针 + 年份签 */
.tlpin {
  position: absolute; top: -4px; bottom: -2px; width: 0; z-index: 2;
  transform: translateX(-50%); pointer-events: none; transition: none;
}
.tlpin::before {
  content: ''; position: absolute; left: -1.5px; top: 6px; bottom: 0; width: 3px;
  border-radius: 2px; background: linear-gradient(180deg, #c9463a, #9c3226);
  box-shadow: 0 0 4px rgba(160,50,40,.5);
}
.tlpin-dot {
  position: absolute; left: -5px; top: 0; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #e07a6a, #9c3226 72%);
  border: 1.5px solid #fffdf7; box-shadow: 0 1px 4px rgba(120,40,30,.5);
}
.tltag {
  position: absolute; left: 0; top: -22px; transform: translateX(-50%);
  background: #fffdf7; border: 1px solid rgba(150,60,45,.4); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 700; color: #9c3226; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(90,50,30,.16);
}
/* 原生滑块仅作交互层（透明覆盖），视觉全部由卷轴带与朱砂针承担 */
#tlrange {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; -webkit-appearance: none;
}
#tlrange::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 48px; }
.tlcur { display: none; } /* 年份签已随针移动，右上角固定徽章弃用 */
#maptip { display: none; position: absolute; width: 232px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border: 1.5px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; z-index: 90; }
#maptip .mkt { font-weight: 700; font-size: 14.5px; color: var(--text); }
#maptip .mkyear { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 6px; }
#maptip .mkb { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 6px 0 8px; }
.mkbtn { display: block; font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: none; padding: 6px 10px; background: rgba(31,95,214,.07); border-radius: 8px; margin-top: 6px; }
.mkbtn.mkmain { background: var(--grad-btn); color: #fff; box-shadow: 0 2px 8px rgba(31,95,214,.28); }
.mktodo { font-size: 12px; color: var(--muted); padding: 6px 0 2px; }
/* 缩放控件 + 图例 + 图卡弹卡 */
.zoomctl { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; }
.zoomctl button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 15px; cursor: pointer; color: var(--text); }
.zoomctl button:hover { border-color: var(--brand); color: var(--brand); }
#zoomLabel { font-size: 11.5px; color: var(--muted); margin-left: 4px; min-width: 34px; }
.legendbar { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 16px; font-size: 12px; color: var(--sub); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg-lg, .lg-jun, .lg-st, .lg-ev, .lg-ps { display: inline-block; width: 12px; height: 12px; }
.lg-lg { border-radius: 50%; background: #B88C2C; box-shadow: 0 0 0 3px rgba(184,140,44,.2); }
.lg-jun { background: #4a4438; border-radius: 3px; }
.lg-st { border: 1.5px dashed #7a746a; border-radius: 50%; }
.lg-ev { border-radius: 50%; background: #E11D48; }
.lg-ps { border-radius: 50%; background: #1F5FD6; }
#maptip { width: 252px; }
#maptip .mkimg { position: relative; margin: -12px -14px 10px; border-radius: 10px 10px 0 0; overflow: hidden; }
#maptip .mkimg img { display: block; width: 100%; height: 108px; object-fit: cover; }
#maptip .mkcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 6px; background: linear-gradient(transparent, rgba(15,20,28,.78)); color: #fff; font-size: 11.5px; font-weight: 600; }
#maptip .mkbook { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
#maptip .mkev-h { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 8px; }
#maptip .mkev { list-style: none; margin: 4px 0 6px; padding: 0; }
#maptip .mkev li { font-size: 12px; color: var(--text); line-height: 1.55; padding: 5px 8px; background: rgba(31,95,214,.05); border-radius: 7px; margin-top: 5px; }
#maptip .mkev li b { color: #B4233A; margin-right: 4px; }
#maptip .mkev li span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }

/* toast + 弹层（family.js 注入用） */
#toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(8px);
  background: rgba(15,20,28,.92); color: #fff; font-size: 13.5px;
  padding: 10px 18px; border-radius: 10px; z-index: 300;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
  max-width: 80vw; text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.ov { position: fixed; inset: 0; background: rgba(15,20,28,.55); backdrop-filter: blur(3px); z-index: 200; display: none; }
.ov.on { display: flex; }
.ovbox { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 20px 18px; margin: auto; }
.ovbox h3 { font-size: 17px; margin-bottom: 4px; }
.ovbox .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.ovbox .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #f7f8fa; border-radius: 10px; margin-bottom: 10px; font-size: 13.5px; }
.ovbox label { display: block; font-size: 12.5px; color: var(--sub); margin: 10px 0 4px; font-weight: 500; }
.ovbox input, .ovbox textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  font-size: 14px; font-family: inherit; outline: none; resize: vertical;
}
.ovbox input:focus, .ovbox textarea:focus { border-color: var(--brand); }
.ovbox .agree { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); margin: 12px 0; line-height: 1.6; }
.ovbox .agree a { color: var(--brand); }
.ovbox .ops { display: flex; gap: 10px; margin-top: 6px; }

@media (max-width: 560px) {
  .hero2 h2 { font-size: 22px; }
  .hstat { grid-template-columns: repeat(2, 1fr); }
  .hpts { grid-template-columns: 1fr; }
  .entries { grid-template-columns: 1fr; }
  .main { padding: 16px 14px 50px; }
}
