/* 慈氏学堂视觉原型 · 2026-12
   对齐慈氏文库：深色底 #1A1A1A、金色强调 #D8BD8A、橙色当前标记 #FE740D、
   无硬边框、8px 圆角、轻阴影、系统无衬线字体。
   说明：仅用于视觉确认，不是生产代码 */

:root {
  color-scheme: dark;
  --bg: #1a1a1a;
  --bg-deep: #141414;
  --header-bg: rgba(26, 26, 26, 0.97);
  --header-line: #303030;
  --hero: #271b04;
  --hero-strong: #ffffff;
  --hero-sub: #cccccc;
  --hero-accent: #d8bd8a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: #2a2a2a;
  --surface-3: #242424;
  --ph-bg: #222222;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --ink: #e5e7eb;
  --text-strong: #ffffff;
  --text-secondary: #cccccc;
  --muted: #999999;
  --muted-2: #666666;
  --gold: #d8bd8a;
  --gold-hover: #f1d7a8;
  --gold-tint: rgba(216, 189, 138, 0.1);
  --gold-tint-strong: rgba(216, 189, 138, 0.16);
  --orange: #fe740d;
  --green: #7bd3a0;
  --red: #ff6b6b;
  --control-bg: rgba(255, 255, 255, 0.06);
  --control-bg-hover: rgba(255, 255, 255, 0.12);
  --hover-bg: rgba(255, 255, 255, 0.04);
  --node-bg: rgba(255, 255, 255, 0.05);
  --qr-bg: rgba(255, 255, 255, 0.04);
  --heat-bg: rgba(255, 255, 255, 0.06);
  --heat-on: rgba(123, 211, 160, 0.75);
  --heat-mid: rgba(123, 211, 160, 0.35);
  --pin-bg: rgba(255, 107, 107, 0.12);
  --badge-ok-bg: rgba(123, 211, 160, 0.12);
  --badge-wait-bg: rgba(232, 185, 106, 0.12);
  --badge-none-bg: rgba(255, 255, 255, 0.06);
  --badge-stage-bg: rgba(216, 189, 138, 0.1);
  --badge-wait-text: #e8b96a;
  --btn-primary-bg: rgba(216, 189, 138, 0.18);
  --btn-primary-text: #f1d7a8;
  --btn-primary-hover: rgba(216, 189, 138, 0.28);
  --btn-ghost-bg: rgba(255, 255, 255, 0.07);
  --btn-ghost-text: #cccccc;
  --btn-ghost-hover: rgba(255, 255, 255, 0.12);
  --wenku-bg: rgba(216, 189, 138, 0.12);
  --wenku-text: #d8bd8a;
  --wenku-hover: rgba(216, 189, 138, 0.2);
  --wenku-text-hover: #f1d7a8;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.35);
  --header-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --drawer-shadow: 20px 0 40px rgba(0, 0, 0, 0.4);
  --banner-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  --mega-border: rgba(255, 255, 255, 0.05);
  --seal-bg: #8c2b22;
  --seal-text: #f1d7a8;
  --radius: 8px;
  --sans: "Source Han Sans SC", "Noto Sans SC", SimHei, "PingFang SC", "Microsoft YaHei", sans-serif;
  --title: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --seal: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --max: 1200px;
}

/* 白天模式：对齐慈氏文库浅色主题（#F4F5F7 底、白卡片、#206EA7 链接、#FE740D 当前项） */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-deep: #edeef0;
  --header-bg: rgba(255, 255, 255, 0.97);
  --header-line: #e5e5e5;
  --hero: #271b04;
  --hero-strong: #ffffff;
  --hero-sub: #e2d8c9;
  --hero-accent: #d8bd8a;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #ffffff;
  --ph-bg: #efefef;
  --line: #e5e5e5;
  --line-soft: #ececec;
  --ink: #333333;
  --text-strong: #1a1a1a;
  --text-secondary: #555555;
  --muted: #666666;
  --muted-2: #999999;
  --gold: #a78972;
  --gold-hover: #7f6754;
  --gold-tint: rgba(167, 137, 114, 0.12);
  --gold-tint-strong: rgba(167, 137, 114, 0.2);
  --orange: #fe740d;
  --green: #07c160;
  --red: #e5484d;
  --control-bg: #e9ebee;
  --control-bg-hover: #dfe3e8;
  --hover-bg: #f5f5f5;
  --node-bg: #f2f2f2;
  --qr-bg: #f7f8fa;
  --heat-bg: #ececec;
  --heat-on: rgba(7, 193, 96, 0.75);
  --heat-mid: rgba(7, 193, 96, 0.3);
  --pin-bg: rgba(229, 72, 77, 0.1);
  --badge-ok-bg: rgba(7, 193, 96, 0.1);
  --badge-wait-bg: rgba(254, 116, 13, 0.1);
  --badge-none-bg: #f0f0f0;
  --badge-stage-bg: rgba(167, 137, 114, 0.14);
  --badge-wait-text: #b26a14;
  --btn-primary-bg: #008bfb;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #0079dd;
  --btn-ghost-bg: #f0f0f0;
  --btn-ghost-text: #333333;
  --btn-ghost-hover: #e6e6e6;
  --wenku-bg: #e8f2fa;
  --wenku-text: #206ea7;
  --wenku-hover: #d7e9f7;
  --wenku-text-hover: #155e90;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.14);
  --header-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --drawer-shadow: 20px 0 40px rgba(0, 0, 0, 0.18);
  --banner-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  --mega-border: #ececec;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部工具条 ---------- */
.topbar {
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-left .dot { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-right a:hover { color: var(--gold-hover); }
.topbar-right .ext { color: var(--gold); }

/* ---------- 主头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  backdrop-filter: blur(8px);
}
.site-header.is-scrolled { box-shadow: var(--header-shadow); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand .seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #8c2b22;
  color: #f1d7a8;
  font-family: var(--seal);
  font-size: 25px;
  line-height: 1;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(241, 215, 168, 0.18);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: var(--title);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--text-strong);
  font-weight: 700;
}
.brand-text small { font-size: 9px; letter-spacing: 2px; color: var(--muted-2); }

.main-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 10px 11px;
  font-family: var(--title);
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
  position: relative;
  white-space: nowrap;
}
.main-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav > ul > li:hover > a,
.main-nav > ul > li.active > a { color: var(--text-strong); }
.main-nav > ul > li.active > a::after { transform: scaleX(1); }
.main-nav > ul > li:hover > a { color: var(--gold-hover); }

.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--control-bg);
  color: var(--text-secondary);
  border-radius: 6px;
}
.icon-btn:hover { background: var(--control-bg-hover); color: var(--text-strong); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.login-link { font-size: 14px; color: var(--text-secondary); }
.login-link:hover { color: var(--gold-hover); }
.btn-wenku {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--wenku-bg);
  color: var(--wenku-text);
  font-size: 13px;
  border: 0;
  border-radius: 6px;
}
.btn-wenku:hover { background: var(--wenku-hover); color: var(--wenku-text-hover); }
.btn-wenku .arrow { font-size: 13px; }

/* ---------- Mega menu ---------- */
.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 760px;
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 120;
}
.main-nav > ul > li:hover .mega,
.main-nav > ul > li:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mega.mega-right { left: auto; right: -120px; transform: translateY(6px); }
.main-nav > ul > li:hover .mega.mega-right,
.main-nav > ul > li:focus-within .mega.mega-right { transform: translateY(0); }
.mega.mega-left { left: 0; transform: translateY(6px); }
.main-nav > ul > li:hover .mega.mega-left,
.main-nav > ul > li:focus-within .mega.mega-left { transform: translateY(0); }

.mega-col h4 {
  margin: 0 0 12px;
  font-family: var(--title);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.mega-list { display: flex; flex-direction: column; gap: 2px; }
.mega-list a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
}
.mega-list a:hover { background: var(--control-bg); }
.mega-list .glyph {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--gold-tint);
  color: var(--gold);
  font-family: var(--seal);
  font-size: 12px;
  border-radius: 4px;
  margin-top: 1px;
}
.mega-list strong { display: block; font-size: 14px; color: var(--ink); font-weight: 500; }
.mega-list span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.mega-list a:hover strong { color: var(--text-strong); }
.mega-feature {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}
.mega-feature .tag { font-size: 11px; letter-spacing: 2px; color: var(--gold); }
.mega-feature h5 {
  font-family: var(--title);
  font-size: 20px;
  margin: 8px 0 6px;
  color: var(--text-strong);
  font-weight: 700;
}
.mega-feature p { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }
.mega-feature .go { font-size: 13px; color: var(--gold); }
.mega-feature .go:hover { color: var(--gold-hover); }

.menu-toggle { display: none; }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 8px; color: var(--muted-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 44px;
  align-items: center;
  margin-top: 24px;
  padding: 46px 40px;
  background-color: var(--hero);
  background-image: url("/images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(39, 27, 4, 0.97) 0%, rgba(39, 27, 4, 0.9) 52%, rgba(39, 27, 4, 0.55) 100%),
    radial-gradient(circle at 82% 12%, rgba(216, 189, 138, 0.16), transparent 55%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--hero-accent);
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--hero-accent); }
.hero h1 {
  margin: 0 0 18px;
  font-family: var(--title);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.3;
  letter-spacing: 2px;
  color: var(--hero-strong);
}
.hero h1 em { font-style: normal; color: var(--hero-accent); }
.hero .lead { margin: 0 0 26px; font-size: 15px; color: var(--hero-sub); line-height: 1.9; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  border: 0;
  border-radius: 6px;
  white-space: nowrap;
}
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-ghost { background: var(--btn-ghost-bg); color: var(--btn-ghost-text); }
.btn-ghost:hover { background: var(--btn-ghost-hover); color: var(--text-strong); }
.hero .btn-primary { background: rgba(216, 189, 138, 0.18); color: #f1d7a8; }
.hero .btn-primary:hover { background: rgba(216, 189, 138, 0.28); }
.hero .btn-ghost { background: rgba(255, 255, 255, 0.08); color: #e5e7eb; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.hero-stats { display: flex; gap: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--title); font-size: 24px; color: var(--hero-accent); font-weight: 700; }
.hero-stats span { font-size: 12px; color: var(--hero-sub); letter-spacing: 1px; }

.hero-media { position: relative; }
.banner-card {
  position: relative;
  z-index: 1;
  background: var(--surface-2);
  border-radius: var(--radius);
  box-shadow: var(--banner-shadow);
  padding: 26px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.banner-card::after {
  content: "慈";
  position: absolute;
  right: 14px;
  bottom: -24px;
  font-family: var(--seal);
  font-size: 150px;
  color: rgba(216, 189, 138, 0.06);
  line-height: 1;
  pointer-events: none;
}
.slides { position: relative; flex: 1; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.slide.is-active { opacity: 1; transform: translateY(0); position: relative; }
.slide .kicker { font-size: 11px; letter-spacing: 3px; color: var(--gold); margin-bottom: 12px; }
.slide h3 {
  font-family: var(--title);
  font-size: 26px;
  line-height: 1.4;
  color: var(--text-strong);
  margin: 0 0 12px;
  font-weight: 700;
}
.slide p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.slide .go { font-size: 13px; color: var(--gold); align-self: flex-start; }
.slide .go:hover { color: var(--gold-hover); }
.slide .ph {
  height: 130px;
  margin-bottom: 18px;
  background: var(--ph-bg);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 2px;
  overflow: hidden;
}
.slide .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dots { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.dots button { width: 22px; height: 3px; border: 0; background: var(--line); padding: 0; border-radius: 2px; }
.dots button.is-active { background: var(--orange); }

/* ---------- 通用 section ---------- */
.section { padding: 34px 20px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sec-title { display: flex; align-items: baseline; gap: 14px; }
.sec-title h2 {
  margin: 0;
  font-family: var(--title);
  font-size: 27px;
  color: var(--text-strong);
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}
.sec-title h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 2px;
  background: var(--gold);
}
.sec-title .en { font-size: 11px; letter-spacing: 2px; color: var(--muted-2); text-transform: uppercase; }
.sec-more { font-size: 13px; color: var(--gold); }
.sec-more:hover { color: var(--gold-hover); }

/* ---------- 三条主路径 ---------- */
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.path-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.path-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.path-card .seal-sm {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--gold-tint);
  color: var(--gold);
  font-family: var(--seal);
  font-size: 23px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.path-card h3 {
  margin: 0 0 8px;
  font-family: var(--title);
  font-size: 20px;
  color: var(--text-strong);
  font-weight: 700;
}
.path-card p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; min-height: 44px; }
.path-card .links { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--gold); }
.path-card .index {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--seal);
  font-size: 28px;
  color: rgba(216, 189, 138, 0.18);
}

/* ---------- 入门引导 ---------- */
.intro-strip {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: center;
}
.intro-strip h3 { margin: 0 0 8px; font-family: var(--title); font-size: 22px; color: var(--text-strong); font-weight: 700; }
.intro-strip p { margin: 0; color: var(--muted); font-size: 13.5px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .no {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--gold-tint);
  color: var(--gold);
  font-size: 12px;
  border-radius: 50%;
}
.step strong { display: block; font-size: 14px; color: var(--ink); font-weight: 500; }
.step span { font-size: 12.5px; color: var(--muted); }

/* ---------- 两栏列表 ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h3 { margin: 0; font-family: var(--title); font-size: 18px; color: var(--text-strong); font-weight: 700; }
.panel-head a { font-size: 12.5px; color: var(--gold); }
.panel-head a:hover { color: var(--gold-hover); }
.list-rows li { border-bottom: 1px solid var(--line-soft); }
.list-rows li:last-child { border-bottom: 0; }
.list-rows a { display: flex; gap: 16px; padding: 14px 20px; align-items: flex-start; min-width: 0; }
.list-rows a:hover { background: var(--hover-bg); }
.list-rows time { flex: 0 0 76px; font-size: 12px; color: var(--muted-2); padding-top: 2px; }
.list-rows .txt { min-width: 0; flex: 1 1 auto; }
.list-rows .txt strong { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.list-rows .txt span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.list-rows .badge { flex: 0 0 auto; }

/* ---------- 时间线预览 ---------- */
.tl-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.tl-preview {
  flex: 0 0 260px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.tl-preview::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.tl-preview .year { font-family: var(--title); font-size: 22px; color: var(--gold); font-weight: 700; }
.tl-preview .stage { font-size: 11px; letter-spacing: 2px; color: var(--muted); margin: 4px 0 10px; }
.tl-preview h4 { margin: 0 0 6px; font-size: 15px; font-weight: 500; color: var(--ink); }
.tl-preview p { margin: 0; font-size: 12.5px; color: var(--muted); }
.tl-preview .people { display: flex; gap: 6px; margin-top: 12px; }
.avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--gold);
}

/* ---------- 人物推荐 ---------- */
.people-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.person-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.person-card .portrait {
  width: 100%;
  aspect-ratio: 1 / 1.1;
  background: var(--surface-2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--seal);
  font-size: 30px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.person-card .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.person-card .portrait::after {
  content: "像";
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 10px;
  font-family: var(--sans);
  letter-spacing: 2px;
  color: var(--muted-2);
}
.person-card h4 { margin: 0 0 2px; font-family: var(--title); font-size: 17px; color: var(--text-strong); font-weight: 700; }
.person-card .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.person-card .one {
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 公告 + 打卡 ---------- */
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 24px; }
.notice-list li { display: flex; gap: 12px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.notice-list li:last-child { border-bottom: 0; }
.notice-list a { color: var(--ink); }
.notice-list a:hover { color: var(--gold); }
.notice-list .pin { flex: 0 0 auto; font-size: 10px; color: var(--red); background: var(--pin-bg); padding: 1px 6px; border-radius: 3px; }
.notice-list time { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.checkin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.checkin-card h3 { margin: 0 0 4px; font-family: var(--title); font-size: 18px; color: var(--text-strong); font-weight: 700; }
.checkin-card p { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }
.heatmap { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-bottom: 14px; }
.heatmap i { display: block; aspect-ratio: 1; background: var(--control-bg); border-radius: 2px; }
.heatmap i.on { background: var(--heat-on); }
.heatmap i.mid { background: var(--heat-mid); }
.checkin-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.checkin-meta strong { color: var(--gold); font-family: var(--title); font-size: 20px; font-weight: 700; }

/* ---------- 页脚 ---------- */
.footer { background: var(--bg-deep); margin-top: 40px; border-top: 1px solid var(--line); }
.footer .wrap { padding-top: 36px; padding-bottom: 22px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.footer h4 { margin: 0 0 12px; font-family: var(--title); font-size: 14px; letter-spacing: 2px; color: var(--gold); font-weight: 600; }
.footer p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.footer-links { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); }
.footer-links a:hover { color: var(--gold-hover); }
.qr-row { display: flex; gap: 12px; }
.qr {
  width: 74px;
  height: 74px;
  background: var(--hover-bg);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.footer-bottom {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: var(--muted-2);
  flex-wrap: wrap;
}

/* ---------- 标签 / 徽标 ---------- */
.badge { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.badge-ok { color: var(--green); background: var(--badge-ok-bg); }
.badge-wait { color: var(--badge-wait-text); background: var(--badge-wait-bg); }
.badge-none { color: var(--muted); background: var(--control-bg); }
.badge-stage { color: var(--gold); background: var(--gold-tint); }

/* ---------- 内页标题 ---------- */
.page-head { padding: 22px 20px 26px; text-align: center; }
.page-head h1 { margin: 0 0 10px; font-family: var(--title); font-size: 36px; letter-spacing: 3px; color: var(--text-strong); font-weight: 700; }
.page-head p { margin: 0 auto; max-width: 680px; color: var(--muted); font-size: 14.5px; }
.page-head .rule { width: 50px; height: 2px; background: var(--gold); margin: 16px auto 0; }

/* ---------- 历史源流 ---------- */
.stage-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 30px; }
.chip {
  border: 0;
  background: var(--control-bg);
  color: var(--text-secondary);
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 6px;
}
.chip.is-active, .chip:hover { color: var(--gold); background: var(--gold-tint); }
.history-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: start; }
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-node { position: relative; padding: 0 0 26px 24px; }
.tl-node::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 8px;
  width: 11px;
  height: 11px;
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 50%;
}
.tl-node.stage-india::before { border-color: var(--red); }
.tl-node.stage-tang::before { border-color: var(--gold); }
.tl-node.stage-song::before { border-color: #8fa6b2; }
.tl-node.stage-modern::before { border-color: var(--green); }
.tl-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.tl-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-year { font-family: var(--title); font-size: 21px; color: var(--gold); font-weight: 700; }
.tl-type { font-size: 11px; color: var(--muted); background: var(--control-bg); padding: 1px 7px; border-radius: 4px; }
.tl-card h3 { margin: 0 0 8px; font-family: var(--title); font-size: 19px; color: var(--text-strong); font-weight: 700; }
.tl-card p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.tl-media {
  height: 150px;
  background: var(--surface-2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}
.tl-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; display: block; }
.tl-people { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--node-bg);
  padding: 2px 9px 2px 3px;
  border-radius: 20px;
}
.person-chip:hover { color: var(--gold); background: var(--gold-tint); }
.person-chip .avatar-sm { width: 20px; height: 20px; font-size: 10px; }
.stage-index { position: sticky; top: 110px; background: var(--surface-2); border-radius: var(--radius); padding: 18px; }
.stage-index h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 2px; color: var(--gold); }
.stage-index li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.stage-index li:last-child { border-bottom: 0; }
.stage-index .bar { width: 4px; height: 18px; display: inline-block; margin-right: 8px; vertical-align: middle; border-radius: 2px; }
.bar-india { background: var(--red); }
.bar-tang { background: var(--gold); }
.bar-song { background: #8fa6b2; }
.bar-modern { background: var(--green); }

/* ---------- 人物详情 ---------- */
.person-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.person-portrait {
  aspect-ratio: 385 / 624;
  background: var(--surface-2);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--seal);
  font-size: 40px;
  overflow: hidden;
}
.person-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.img-credit { margin-top: 14px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.person-info h1 { margin: 0 0 4px; font-family: var(--title); font-size: 36px; letter-spacing: 3px; color: var(--text-strong); font-weight: 700; }
.person-info .alias { color: var(--gold); font-size: 14px; margin-bottom: 10px; }
.person-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.person-oneliner {
  border-left: 3px solid var(--gold);
  background: var(--gold-tint);
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.person-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.person-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; margin-top: 28px; align-items: start; }
.article-block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 22px; }
.article-block h2 {
  margin: 0 0 16px;
  font-family: var(--title);
  font-size: 21px;
  color: var(--text-strong);
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.article-block p { margin: 0 0 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.9; }
.thought-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.thought { background: var(--surface-2); border-radius: 6px; padding: 14px 16px; }
.thought strong { display: block; font-size: 14px; color: var(--text-strong); margin-bottom: 4px; }
.thought span { font-size: 12.5px; color: var(--muted); }
.lineage { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lineage .node { background: var(--node-bg); padding: 8px 12px; font-size: 13px; color: var(--text-secondary); border-radius: 6px; }
.lineage .node.current { background: var(--gold-tint-strong); color: var(--gold); }
.lineage .arrow { color: var(--muted-2); }
.work-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.work-list li:last-child { border-bottom: 0; }
.work-list .title { font-size: 14.5px; color: var(--ink); }
.work-list .meta { font-size: 12px; color: var(--muted-2); }
.work-list .spacer { flex: 1; }
.work-list .go { font-size: 12.5px; color: var(--gold); }
.work-list .go:hover { color: var(--gold-hover); }
.side-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.side-card h3 { margin: 0 0 12px; font-family: var(--title); font-size: 17px; color: var(--text-strong); font-weight: 700; }
.side-list li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--text-secondary); }
.side-list a:hover { color: var(--gold); }
.side-cta { background: var(--surface-2); }
.side-cta p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }

/* ---------- 移动端底栏 ---------- */
.mobile-bottom-nav { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .header-inner { gap: 14px; }
  .main-nav > ul { gap: 0; }
  .main-nav > ul > li > a { padding: 10px 7px; font-size: 13px; }
  .login-link { display: none; }
  .hero h1 { font-size: 40px; }
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: var(--control-bg);
    color: var(--ink);
    border-radius: 6px;
    order: -1;
  }
  .header-inner { gap: 14px; }
  .main-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: 86%;
    max-width: 340px;
    background: var(--bg);
    border-right: 1px solid var(--header-line);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: block;
    padding: 22px 18px 60px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: var(--drawer-shadow);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > ul { display: block; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line-soft); }
  .main-nav > ul > li > a { padding: 14px 4px; font-size: 15px; }
  .main-nav > ul > li > a::after { display: none; }
  .mega {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    padding: 4px 0 12px;
    grid-template-columns: 1fr;
    gap: 14px;
    background: transparent;
  }
  .main-nav > ul > li.is-open .mega { display: grid; }
  .mega.mega-right, .mega.mega-left { right: auto; left: auto; }
  .mega-feature { display: none; }
  .mega-list a { padding: 8px 4px; }
  .mega-col h4 { margin-bottom: 8px; }
  .drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
    z-index: 190;
  }
  .drawer-mask.is-open { opacity: 1; visibility: visible; }
  .header-actions .login-link { display: none; }
  .btn-wenku { padding: 8px 10px; font-size: 12px; }
  .brand-text strong { font-size: 18px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 34px 26px; }
  .path-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .intro-strip { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .two-col, .bottom-grid { grid-template-columns: minmax(0, 1fr); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-layout { grid-template-columns: minmax(0, 1fr); }
  .stage-index { display: none; }
  .person-body { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { padding-bottom: 64px; }
  .topbar-left span:last-child { display: none; }
  .topbar-right { gap: 12px; }
  .topbar-right .hide-sm { display: none; }
  .header-inner { min-height: 64px; }
  .brand .seal { width: 38px; height: 38px; font-size: 22px; }
  .brand-text strong { font-size: 17px; letter-spacing: 2px; }
  .brand-text small { display: none; }
  .icon-btn { width: 34px; height: 34px; }
  .hero { margin-top: 14px; padding: 26px 20px; border-radius: 10px; }
  .hero h1 { font-size: 30px; letter-spacing: 1px; }
  .hero .lead { font-size: 14px; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 20px; }
  .banner-card { padding: 20px; min-height: 290px; }
  .slide h3 { font-size: 21px; }
  .path-grid { grid-template-columns: minmax(0, 1fr); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .person-card { padding: 12px; }
  .sec-title h2 { font-size: 22px; }
  .section { padding: 26px 20px; }
  .page-head { padding-top: 10px; }
  .page-head h1 { font-size: 28px; }
  .person-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .person-portrait { max-width: 220px; }
  .person-info h1 { font-size: 30px; }
  .thought-grid { grid-template-columns: 1fr; }
  .article-block { padding: 20px; }
  .work-list li { align-items: flex-start; }
  .work-list .spacer { display: none; }
  .tl-card { padding: 16px; }
  .timeline { padding-left: 22px; }
  .tl-node { padding-left: 18px; }
  .tl-node::before { left: -17px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    background: var(--bg-deep);
    border-top: 1px solid var(--header-line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .mobile-bottom-nav a.active { color: var(--gold); }
  .mobile-bottom-nav .glyph { font-family: var(--seal); font-size: 16px; line-height: 1; }
  .mega { display: none; }
  .main-nav > ul > li.is-open .mega { display: grid; }
}

/* ---------- 内容页：唯识概要 / 慈宗要义 ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 30px;
  align-items: start;
}
.article-block h3 {
  margin: 22px 0 10px;
  font-family: var(--title);
  font-size: 18px;
  color: var(--text-strong);
}
.article-block ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
  list-style: disc;
  color: var(--text-secondary);
}
.article-block li { margin: 6px 0; }
.inline-link { color: var(--gold); border-bottom: 1px solid var(--gold-tint-strong); }
.inline-link:hover { color: var(--gold-hover); }
.compare-table-wrap { overflow-x: auto; margin: 14px 0 4px; }
.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-secondary);
}
.compare-table th {
  background: var(--surface-2);
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}
.compare-table tr:last-child td { border-bottom: 0; }
.faq details {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋"; color: var(--gold); margin-right: 8px; }
.faq details[open] summary::before { content: "－"; }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.8; }

/* ---------- 传承谱系 ---------- */
.lineage-toolbar { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.lineage-graph {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow-x: auto;
}
.lineage-svg { width: 100%; height: auto; min-width: 760px; display: block; }
.lineage-svg .edge { stroke: var(--line); stroke-width: 2; fill: none; }
.lineage-svg .edge-dashed { stroke-dasharray: 7 7; }
.lineage-svg #arrow path { fill: var(--line); }
.lineage-svg .edge-label { fill: var(--muted-2); font-size: 11px; font-family: var(--sans); }
.lineage-svg .stage-label { fill: var(--gold); font-size: 13px; letter-spacing: 2px; font-family: var(--sans); }
.lineage-svg .node-rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.lineage-svg .node-main { stroke: var(--gold); }
.lineage-svg .node-text { fill: var(--text-strong); font-size: 15px; font-weight: 600; font-family: var(--title); }
.lineage-svg .node-sub { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.lineage-svg a:hover .node-rect { fill: var(--gold-tint); stroke: var(--gold); }
.lineage-note { margin: 12px 0 0; font-size: 12px; color: var(--muted-2); text-align: center; }
.lineage-list[hidden] { display: none !important; }
.lineage-group { margin-bottom: 30px; }
.lineage-relations { display: flex; flex-direction: column; gap: 10px; }
.lineage-relations li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 13.5px;
}
.lineage-relations a { color: var(--gold); }
.lineage-relations a:hover { color: var(--gold-hover); }
.lineage-relations .arrow { color: var(--muted-2); }

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-layout aside { margin-top: 4px; }
}
