/* ============================================================
   杏林学堂 · 中医知识静态站 主样式
   设计语言：宣纸 · 墨色 · 朱砂 · 竹青 | 移动优先 | 高信息密度
   ============================================================ */

:root {
  --paper: #faf7f0;          /* 宣纸底 */
  --paper-deep: #f2ecdf;     /* 深宣纸 */
  --paper-warm: #f7f1e5;     /* 暖宣纸 */
  --ink: #2c2a26;            /* 墨 */
  --ink-soft: #565248;       /* 淡墨 */
  --ink-mute: #8b8578;       /* 灰墨 */
  --cinnabar: #9e3a2b;       /* 朱砂 */
  --cinnabar-dark: #7e2c1f;  /* 深朱砂 */
  --cinnabar-bg: #f6e9e5;    /* 朱砂淡底 */
  --pine: #3f584e;           /* 竹青/黛绿 */
  --pine-bg: #eaf0ec;
  --gold: #a8874a;           /* 暗金 */
  --line: #e4ddc9;           /* 界线 */
  --line-soft: #eee8d8;
  --shadow: 0 2px 10px rgba(60, 50, 30, .07);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN",
           "Songti SC", "STSong", SimSun, Georgia, "Times New Roman", serif;
  --radius: 4px;
  --maxw: 1180px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  background-image: linear-gradient(180deg, #fbf9f3 0%, #faf7f0 30%, #f7f3e9 100%);
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-decoration: none; transition: color .18s; }
a:hover { color: var(--cinnabar); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 印章式 Logo ---------- */
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-seal {
  width: 44px; height: 44px; flex: 0 0 44px;
  background: var(--cinnabar);
  color: #fdf7ee;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; letter-spacing: 1px;
  line-height: 1.15; text-align: center;
  box-shadow: inset 0 0 0 2px rgba(253, 247, 238, .35), 0 2px 6px rgba(126, 44, 31, .28);
  writing-mode: vertical-rl;
  padding: 4px 2px;
}
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: 3px; }
.brand-sub {
  font-size: 11px; color: var(--ink-mute); letter-spacing: 2.5px; margin-top: 1px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--ink-soft);
  font-size: 15.5px; letter-spacing: 1.5px;
  padding: 8px 14px; border-radius: var(--radius);
  position: relative; white-space: nowrap;
}
.main-nav a:hover { color: var(--cinnabar); background: var(--paper-deep); }
.main-nav a.active { color: var(--cinnabar); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--cinnabar); border-radius: 1px;
}

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 1px; transition: transform .22s, opacity .22s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 65px; left: 0; right: 0; z-index: 89;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 20px 14px;
    box-shadow: 0 12px 24px rgba(60, 50, 30, .1);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 6px; font-size: 16px; border-bottom: 1px dashed var(--line-soft); border-radius: 0; }
  .main-nav a.active::after { display: none; }
  .main-nav a.active { background: var(--cinnabar-bg); }
  .brand-sub { display: none; }
}

/* ---------- 通用块 ---------- */
.page-head { padding: 34px 0 10px; }
.page-head h1 {
  font-size: 26px; letter-spacing: 2px; font-weight: 700;
  padding-left: 14px; position: relative;
}
.page-head h1::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 5px; background: var(--cinnabar); border-radius: 2px;
}
.page-head .page-desc { color: var(--ink-mute); font-size: 14.5px; margin-top: 8px; }

.section { padding: 26px 0 8px; }
.sec-title {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 18px;
}
.sec-title h2 { font-size: 21px; letter-spacing: 2px; }
.sec-title .sec-en {
  font-size: 11.5px; color: var(--ink-mute); letter-spacing: 3px; text-transform: uppercase;
}
.sec-title .sec-more { margin-left: auto; font-size: 13.5px; color: var(--pine); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-family: var(--serif); font-size: 15px; letter-spacing: 2px;
  border: 1px solid var(--cinnabar); cursor: pointer;
  transition: all .18s;
}
.btn-primary { background: var(--cinnabar); color: #fdf7ee !important; }
.btn-primary:hover { background: var(--cinnabar-dark); border-color: var(--cinnabar-dark); color: #fdf7ee !important; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--ink-mute); }
.btn-ghost:hover { color: var(--cinnabar) !important; border-color: var(--cinnabar); }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 58px 0 54px;
  background:
    radial-gradient(ellipse 900px 380px at 85% -10%, rgba(63, 88, 78, .10), transparent 60%),
    radial-gradient(ellipse 700px 300px at 8% 108%, rgba(158, 58, 43, .08), transparent 60%),
    var(--paper-warm);
  border-bottom: 1px solid var(--line);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1px solid rgba(168, 135, 74, .25);
}
.hero::before { width: 420px; height: 420px; right: -160px; top: -220px; }
.hero::after { width: 300px; height: 300px; right: -80px; top: -140px; border-style: dashed; }
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; text-align: center; }
.hero-big-seal {
  width: 76px; height: 76px; margin: 0 auto 22px;
  background: var(--cinnabar); color: #fdf7ee; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; letter-spacing: 2px;
  writing-mode: vertical-rl; line-height: 1.2; padding: 6px 3px;
  box-shadow: inset 0 0 0 3px rgba(253, 247, 238, .3), 0 8px 20px rgba(126, 44, 31, .3);
  transform: rotate(-3deg);
}
.hero h1 { font-size: 34px; letter-spacing: 6px; font-weight: 700; }
.hero .hero-sub { color: var(--cinnabar); letter-spacing: 7px; font-size: 14px; margin-top: 10px; }
.hero .hero-desc {
  max-width: 620px; margin: 20px auto 0; color: var(--ink-soft); font-size: 15.5px;
}
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-quote {
  margin-top: 34px; display: inline-block;
  color: var(--ink-mute); font-size: 14px; letter-spacing: 2px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 8px 6px;
}
@media (min-width: 640px) {
  .hero { padding: 84px 0 78px; }
  .hero h1 { font-size: 44px; }
  .hero .hero-sub { font-size: 15px; }
  .hero .hero-desc { font-size: 16.5px; }
}

/* ---------- 栏目卡片 ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(1, 1fr); gap: 14px;
}
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  position: relative; display: block;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: var(--shadow);
  transition: transform .18s, border-color .18s, box-shadow .18s;
  color: var(--ink); overflow: hidden;
}
.cat-card:hover { transform: translateY(-3px); border-color: rgba(158, 58, 43, .45); color: var(--ink); }
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--cat-color, var(--cinnabar));
}
.cat-card .cat-tag {
  display: inline-block; font-size: 11.5px; letter-spacing: 2px;
  color: var(--cat-color, var(--cinnabar));
  border: 1px solid currentColor; border-radius: 3px;
  padding: 1px 8px; margin-bottom: 10px;
}
.cat-card h3 { font-size: 18.5px; letter-spacing: 1.5px; margin-bottom: 6px; }
.cat-card p { font-size: 13.5px; color: var(--ink-mute); line-height: 1.75; margin-bottom: 10px; }
.cat-card .cat-count { font-size: 12.5px; color: var(--ink-mute); letter-spacing: 1px; }
.cat-card .cat-count b { color: var(--cinnabar); font-size: 14px; }

/* ---------- 文章列表 ---------- */
.post-list { display: grid; gap: 10px; }
.post-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color .18s, box-shadow .18s;
}
.post-item:hover { border-color: rgba(158, 58, 43, .4); box-shadow: var(--shadow); }
.post-item .post-no {
  flex: 0 0 auto; min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-deep); color: var(--ink-soft);
  border-radius: 50%; font-size: 13px; margin-top: 3px;
}
.post-item h3 { font-size: 16.5px; line-height: 1.6; letter-spacing: .5px; }
.post-item h3 a { color: var(--ink); }
.post-item h3 a:hover { color: var(--cinnabar); }
.post-item .post-meta { font-size: 12.5px; color: var(--ink-mute); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.post-item .post-cat { color: var(--pine); }

/* 列表页分组 */
.cat-block { margin-bottom: 34px; }
.cat-block-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
}
.cat-block-title .cat-block-seal {
  width: 30px; height: 30px; flex: 0 0 30px;
  background: var(--cat-color, var(--cinnabar)); color: #fdf7ee;
  border-radius: 4px; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.cat-block-title h2 { font-size: 19px; letter-spacing: 2px; }
.cat-block-title .cat-block-sub { font-size: 12px; color: var(--ink-mute); letter-spacing: 1px; margin-top: 2px; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 16px 0 2px; font-size: 13px; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--cinnabar); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .cur { color: var(--ink-soft); }

/* ---------- 文章页 ---------- */
.article-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 10px 0 30px; }
@media (min-width: 1060px) {
  /* 桌面：正文弹性占大部分，目录固定窄列在右侧 */
  .article-layout { grid-template-columns: minmax(0, 1fr) 200px; gap: 48px; }
  .article-main { order: 1; }
  .toc-aside { order: 2; }
}
.article-main { min-width: 0; max-width: 860px; margin: 0 auto; width: 100%; }

.article-header { padding: 16px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.article-header .art-cat {
  display: inline-block; font-size: 12px; letter-spacing: 2px;
  color: #fdf7ee; background: var(--cinnabar);
  border-radius: 3px; padding: 2px 10px; margin-bottom: 12px;
}
.article-header h1 {
  font-size: 25px; line-height: 1.55; letter-spacing: 1px; font-weight: 700;
}
@media (min-width: 640px) { .article-header h1 { font-size: 30px; } }
.article-header .art-meta {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 13px; color: var(--ink-mute);
}

/* 正文排版：手机 17px，随屏幕增大提升桌面阅读舒适度 */
.prose { font-size: 16.5px; line-height: 2.05; color: var(--ink); letter-spacing: .3px; }
@media (min-width: 640px) { .prose { font-size: 17.5px; line-height: 2.1; } }
@media (min-width: 1100px) { .prose { font-size: 18.5px; } }
.prose p { margin: 0 0 1.45em; text-align: justify; }
.prose h2 {
  font-size: 21px; letter-spacing: 1.5px; margin: 2.3em 0 1em;
  padding-left: 12px; border-left: 4px solid var(--cinnabar); line-height: 1.5;
}
.prose h2:first-child { margin-top: .4em; }
.prose h3 {
  font-size: 18px; letter-spacing: 1px; margin: 1.9em 0 .85em; color: var(--ink);
}
.prose h4 { font-size: 16.5px; margin: 1.6em 0 .7em; color: var(--ink-soft); }
.prose strong { color: var(--cinnabar-dark); }
.prose blockquote {
  margin: 1.4em 0; padding: 14px 18px;
  background: var(--paper-deep); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft); font-size: .95em;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.6em; margin: 0 0 1.35em; }
.prose li { margin-bottom: .45em; }
.prose hr { border: none; border-top: 1px dashed var(--line); margin: 2.2em 0; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92em;
  background: #fff; display: block; overflow-x: auto;
  box-shadow: var(--shadow); border-radius: var(--radius);
}
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 14px; text-align: left; }
.prose th { background: var(--paper-deep); letter-spacing: 1px; white-space: nowrap; }
.prose tr:nth-child(even) td { background: #fdfbf5; }
.prose img { border-radius: var(--radius); margin: 1.2em auto; border: 1px solid var(--line); }
.prose figcaption, .prose .img-cap { text-align: center; font-size: 13px; color: var(--ink-mute); margin-top: -0.8em; margin-bottom: 1.2em; }

/* 经文引用块（md 中以【经文】标记的段落） */
.jingwen {
  position: relative; margin: 1.6em 0; padding: 16px 20px 14px 48px;
  background: var(--paper-warm); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.jingwen::before {
  content: "經"; position: absolute; left: 12px; top: 14px;
  width: 24px; height: 24px; border-radius: 4px;
  background: var(--pine); color: #fdf7ee;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.jingwen p { margin-bottom: .8em; color: var(--ink-soft); }
.jingwen p:last-child { margin-bottom: 0; }

/* 移动端 TOC（折叠） */
.toc-mobile {
  margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.toc-mobile summary {
  cursor: pointer; padding: 10px 16px; font-size: 14.5px; letter-spacing: 2px;
  color: var(--ink-soft); background: var(--paper-deep);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.toc-mobile summary::before { content: "目"; width: 20px; height: 20px; background: var(--cinnabar); color: #fdf7ee; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile .toc-list { padding: 8px 16px 12px; }

/* 侧栏 TOC（桌面） */
.toc-aside { display: none; }
@media (min-width: 1060px) {
  .toc-mobile { display: none; }
  .toc-aside {
    display: block; position: sticky; top: 90px; align-self: start;
    font-size: 13.5px; max-height: calc(100vh - 130px); overflow: auto;
    padding-left: 6px; scrollbar-width: thin;
  }
  .toc-aside .toc-title {
    font-size: 13px; letter-spacing: 3px; color: var(--ink-mute);
    border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 8px;
  }
}
.toc-list a {
  display: block; padding: 4px 0 4px 12px; color: var(--ink-soft);
  border-left: 2px solid var(--line); line-height: 1.65;
  font-size: 13.5px; transition: color .15s, border-color .15s;
}
.toc-list a:hover { color: var(--cinnabar); border-left-color: var(--cinnabar); }
.toc-list a.current { color: var(--cinnabar); border-left-color: var(--cinnabar); font-weight: 700; }
.toc-list a.lv3 { padding-left: 26px; font-size: 12.5px; color: var(--ink-mute); }
.toc-list a.lv3.current { color: var(--cinnabar); }

/* 文末：上一篇 / 下一篇 */
.post-nav {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 38px;
}
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a {
  display: block; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 12px 16px; transition: border-color .18s;
}
.post-nav a:hover { border-color: rgba(158, 58, 43, .4); }
.post-nav .nav-label { font-size: 12px; color: var(--ink-mute); letter-spacing: 2px; }
.post-nav .nav-title { font-size: 14.5px; color: var(--ink); margin-top: 3px; line-height: 1.6; }
.post-nav a.next { text-align: right; }

/* ---------- 分享栏 ---------- */
.share-bar {
  margin-top: 40px; padding: 18px 0 4px; border-top: 1px solid var(--line);
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.share-bar .share-label { font-size: 14px; color: var(--ink-mute); letter-spacing: 2px; margin-right: 4px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--line); background: #fff;
  font-family: var(--serif); font-size: 13.5px; color: var(--ink-soft);
  cursor: pointer; transition: all .18s; letter-spacing: 1px;
}
.share-badge {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11.5px; line-height: 1; flex: 0 0 20px;
}
.share-btn:hover { border-color: currentColor; }
.share-btn.wechat { color: #1fa258; }
.share-btn.wechat:hover { background: #f0f9f3; border-color: #1fa258; }
.share-btn.wechat .share-badge { background: #1fa258; }
.share-btn.weibo { color: #d5442c; }
.share-btn.weibo:hover { background: #fdf1ee; border-color: #d5442c; }
.share-btn.weibo .share-badge { background: #d5442c; }
.share-btn.qq { color: #3d9fd8; }
.share-btn.qq:hover { background: #eef7fc; border-color: #3d9fd8; }
.share-btn.qq .share-badge { background: #3d9fd8; }
.share-btn.link { color: var(--ink-soft); }
.share-btn.link:hover { background: var(--paper-deep); border-color: var(--ink-soft); }
.share-btn.link .share-badge { background: var(--pine); }

/* ---------- 分享弹窗（微信二维码） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(44, 42, 38, .55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--paper); border-radius: 8px; max-width: 340px; width: 100%;
  padding: 26px 24px 22px; text-align: center; position: relative;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}
.modal .modal-close {
  position: absolute; right: 12px; top: 10px;
  background: none; border: none; font-size: 22px; color: var(--ink-mute);
  cursor: pointer; line-height: 1; padding: 4px;
}
.modal h3 { font-size: 17px; letter-spacing: 2px; margin-bottom: 4px; }
.modal .modal-tip { font-size: 12.5px; color: var(--ink-mute); line-height: 1.7; margin-bottom: 14px; }
#qrcode-box {
  display: inline-block; padding: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
}
#qrcode-box img, #qrcode-box canvas { display: block; }
.modal .modal-wechat-name { margin-top: 12px; font-size: 13px; color: #1fa258; letter-spacing: 1px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #faf7ee; font-size: 14px; letter-spacing: 1px;
  padding: 9px 22px; border-radius: 30px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 300; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 首页经典名句带 ---------- */
.classic-strip {
  margin: 34px 0 6px; padding: 26px 18px;
  background: var(--pine); color: #f2ede0;
  border-radius: var(--radius); text-align: center; position: relative; overflow: hidden;
}
.classic-strip::before {
  content: "「"; position: absolute; left: 18px; top: 2px;
  font-size: 52px; opacity: .25; line-height: 1;
}
.classic-strip::after {
  content: "」"; position: absolute; right: 18px; bottom: -18px;
  font-size: 52px; opacity: .25; line-height: 1;
}
.classic-strip .classic-text { font-size: 18px; letter-spacing: 3px; line-height: 2; }
.classic-strip .classic-src { margin-top: 8px; font-size: 12.5px; opacity: .75; letter-spacing: 2px; }

/* ---------- 关于页 / 通用内容卡 ---------- */
.content-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
}
.content-card h2 { font-size: 19px; letter-spacing: 2px; margin: 1.6em 0 .7em; }
.content-card h2:first-child { margin-top: 0; }
.content-card p { margin-bottom: 1em; color: var(--ink-soft); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 48px; background: #2e2b26; color: #b7b0a2;
  font-size: 13.5px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 38px 20px 22px;
}
.footer-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(183, 176, 162, .18);
}
@media (min-width: 760px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .f-name { color: #f2ede0; font-size: 18px; letter-spacing: 3px; font-weight: 700; }
.footer-brand .f-sub { margin-top: 6px; line-height: 1.8; opacity: .8; font-size: 12.5px; }
.footer-col h4 { color: #e8e2d3; font-size: 14px; letter-spacing: 2px; margin-bottom: 12px; }
.footer-col a { display: block; color: #b7b0a2; padding: 3px 0; font-size: 13px; }
.footer-col a:hover { color: #f2ede0; }
.footer-bottom {
  padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: space-between; font-size: 12px; opacity: .75;
}
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-disclaimer {
  margin-top: 14px; font-size: 12px; line-height: 1.8; opacity: .65;
  border-top: 1px dashed rgba(183, 176, 162, .25); padding-top: 12px;
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 18px; bottom: 26px; z-index: 80;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--cinnabar); color: #fdf7ee; border: none; cursor: pointer;
  font-family: var(--serif); font-size: 12px; letter-spacing: 1px;
  box-shadow: 0 6px 16px rgba(126, 44, 31, .35);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* ---------- 打印 ---------- */
@media print {
  .site-header, .site-footer, .share-bar, .back-top, .toc-aside, .toc-mobile, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .prose { font-size: 12pt; }
}
