/* ==========================================================================
   鲜火焱 · 站点样式
   设计语言：纸墨 · 编辑排版
   - 宣纸底色 + 墨色 + 朱砂红点缀
   - 宋体标题 / 系统无衬线正文
   品牌名集中在 main.js 的 SITE 配置里，改一处即可。
   ========================================================================== */

:root {
  /* 色板 —— 纸墨 */
  --paper: #f7f3ea;          /* 宣纸底 */
  --paper-deep: #f1ebe0;     /* 深一档纸色（交替区块） */
  --ink: #262019;            /* 墨 */
  --ink-soft: #4a4136;       /* 次级墨 */
  --muted: #7a6f60;          /* 弱化文字 */
  --line: #e2d9c8;           /* 描边/分隔 */
  --cinnabar: #b03a2e;       /* 朱砂红 · 唯一强调色 */
  --cinnabar-deep: #8f2c23;

  /* 字体 */
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", "SimSun-ExtB", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;

  /* 尺寸与节奏 */
  --maxw: 1080px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 6px;
  --shadow-soft: 0 1px 2px rgba(38, 32, 25, 0.04), 0 8px 24px rgba(38, 32, 25, 0.06);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* 顶栏 ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--paper);
  background: var(--cinnabar);
  border-radius: var(--radius);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--cinnabar); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* 首屏 ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6rem);
}

.hero::after {
  content: "史";
  position: absolute;
  right: -0.04em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: clamp(10rem, 24vw, 20rem);
  line-height: 1;
  color: color-mix(in srgb, var(--cinnabar) 6%, transparent);
  pointer-events: none;
  user-select: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-kicker {
  font-size: 0.95rem;
  color: var(--cinnabar);
  letter-spacing: 0.18em;
  margin: 0 0 1.25rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 1.5rem;
}
.hero-title .em {
  color: var(--cinnabar);
  position: relative;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 0 2.5rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.6rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--cinnabar); color: var(--paper); }
.btn-primary:hover { background: var(--cinnabar-deep); }

.btn-ghost { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* 区块通用 -------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--paper-deep); }

.section-head { max-width: 40em; margin-bottom: 3rem; }

.section-kicker {
  font-size: 0.85rem;
  color: var(--cinnabar);
  letter-spacing: 0.2em;
  margin: 0 0 0.6rem;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.section-desc { color: var(--muted); margin: 0; }

/* 栏目 ------------------------------------------------------------------ */
.column-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.column-item {
  background: var(--paper);
  padding: 2rem 1.75rem;
  min-height: 180px;
}
.column-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  color: inherit;
}
.column-link:hover .column-title { color: var(--cinnabar); }
.column-badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  background: var(--paper-deep);
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.column-enter {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--cinnabar);
  transition: transform 0.2s var(--ease);
}
.column-link:hover .column-enter { transform: translateX(4px); }

.column-num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--cinnabar);
}

.column-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.column-desc { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

/* 空状态 ------------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-mark { font-size: 1.5rem; letter-spacing: 0.5em; margin: 0 0 0.5rem; color: var(--line); }

/* 关于 ------------------------------------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}
.about-body { font-size: 1.1rem; color: var(--ink-soft); }
.about-note { font-size: 0.85rem; color: var(--muted); }

.fact-list { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fact {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.fact dt {
  font-family: var(--font-serif);
  color: var(--cinnabar);
  min-width: 2.5em;
  margin: 0;
}
.fact dd { margin: 0; color: var(--ink-soft); }

/* 关注 ------------------------------------------------------------------ */
.follow-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.follow-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.follow-card:hover { border-color: var(--cinnabar); transform: translateY(-2px); }
.follow-status { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.follow-hint { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* 页脚 ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-brand { font-family: var(--font-serif); font-weight: 700; margin: 0; }
.footer-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* 响应式 ---------------------------------------------------------------- */
@media (max-width: 720px) {
  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .site-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .column-list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .follow-list { grid-template-columns: 1fr; }
}

/* 文章页 ---------------------------------------------------------------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}

.article-head {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-kicker {
  font-size: 0.85rem;
  color: var(--cinnabar);
  letter-spacing: 0.2em;
  margin: 0 0 0.75rem;
}

.article-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
}

.article-dek {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.95;
  color: var(--ink);
}

.article-body p { margin: 0 0 1.5rem; }

.article-body > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 3.1em;
  line-height: 0.85;
  padding: 0.06em 0.12em 0 0;
  color: var(--cinnabar);
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 2.75rem 0 1rem;
  color: var(--ink);
}

.article-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--cinnabar);
  background: color-mix(in srgb, var(--cinnabar) 5%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}

.article-body blockquote p { margin: 0; }

.article-body blockquote .blockquote-src {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.article-foot {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.back-link:hover { color: var(--cinnabar); }

/* 内容卡片 ---------------------------------------------------------------- */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.post-card:hover {
  border-color: var(--cinnabar);
  transform: translateY(-2px);
}

.post-tag {
  font-size: 0.8rem;
  color: var(--cinnabar);
  letter-spacing: 0.12em;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.post-desc {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}

.post-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* 栏目分组 ---------------------------------------------------------------- */
.column-group {
  margin-bottom: 2.75rem;
}
.column-group:last-child {
  margin-bottom: 0;
}
.column-group-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.column-group-count {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* 新增：文章页阅读进度与站内导航 ------------------------------------------ */
.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 200;
  width: 0;
  height: 2px;
  background: var(--cinnabar);
  pointer-events: none;
  transition: width 0.08s linear;
}

.article-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.article-pagination a,
.article-pagination-empty,
.related-articles {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.article-pagination a,
.article-pagination-empty {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0.85rem 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.article-pagination a:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  transform: translateY(-2px);
}

.article-pagination-empty {
  color: var(--muted);
  background: var(--paper-deep);
}

.related-articles {
  margin-top: 1.25rem;
  padding: 1.25rem;
}

.related-articles h2 {
  margin: 0 0 0.75rem;
  color: var(--cinnabar);
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.related-articles ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.related-articles a {
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.related-articles a:hover { color: var(--cinnabar); }

@media (max-width: 640px) {
  .article-pagination { grid-template-columns: 1fr; }
}


/* 回到顶部按钮 ------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  z-index: 60;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}


/* 站内搜索 ---------------------------------------------------------------- */
.search-bar {
  position: relative;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}
.search-input {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.search-input:focus { border-color: var(--cinnabar); }
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 40;
  display: none;
}
.search-results.open { display: block; }
.search-result {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s var(--ease);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--paper-deep); }
.search-tag {
  font-size: 0.78rem;
  color: var(--cinnabar);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-title { color: var(--ink); font-size: 0.95rem; }
.search-empty { padding: 1rem 1.25rem; color: var(--muted); margin: 0; }


/* 分享按钮 ---------------------------------------------------------------- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.share-label { color: var(--muted); font-size: 0.9rem; }
.share-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.share-btn:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.share-tip { color: var(--cinnabar); font-size: 0.85rem; }


/* 专题入口横幅 ------------------------------------------------------------ */
.topic-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease);
}
.topic-banner:hover { transform: translateY(-2px); }
.topic-kicker {
  font-size: 0.8rem;
  color: var(--cinnabar);
  background: var(--paper);
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  flex-shrink: 0;
}
.topic-title { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; }
.topic-arrow { margin-left: auto; font-size: 1.1rem; }

/* 时间线 ------------------------------------------------------------------ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cinnabar);
  border: 2px solid var(--paper);
}
.timeline-era { font-family: var(--font-serif); font-size: 0.9rem; color: var(--cinnabar); }
.timeline-card {
  display: block;
  margin-top: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.timeline-card:hover { border-color: var(--cinnabar); transform: translateX(4px); }
.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.timeline-desc { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }


/* 文章头图 ---------------------------------------------------------------- */
.article-hero {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  object-position: center top;
  border-radius: var(--radius);
  margin: 0 auto 0.4rem;
}
.article-hero-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1.5rem;
}
/* 文内插图 ---------------------------------------------------------------- */
.article-inline {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto 0.4rem;
  border-radius: var(--radius);
}
.article-inline-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 2rem;
}
/* 帝王世系表 ---------------------------------------------------------------- */
.emperor-table-wrap { overflow-x: auto; margin: 1rem 0; }
.emperor-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.emperor-table th, .emperor-table td { padding: 0.7rem 0.6rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.emperor-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.emperor-table td a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--border); }
.emperor-table td a:hover { color: var(--cinnabar); border-color: var(--cinnabar); }
.emperor-table tr.pending td { color: var(--muted); }
.emperor-pending { font-size: 0.72rem; color: var(--cinnabar); margin-left: 0.3rem; white-space: nowrap; }
.emperor-note { font-size: 0.85rem; color: var(--muted); margin-top: 1.5rem; line-height: 1.7; }
/* 阅读进度条 ---------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--cinnabar);
  z-index: 1000;
  transition: width 0.1s linear;
}
/* 文章目录 ---------------------------------------------------------------- */
.article-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.toc-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}
.toc-link {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}
.toc-link:hover { color: var(--cinnabar); }
/* 相关阅读 ---------------------------------------------------------------- */
.related-articles {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.related-title {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.related-card {
  display: block;
  padding: 0.7rem 0;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
.related-card:last-child { border-bottom: none; }
.related-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--cinnabar);
  margin-right: 0.5rem;
}
.related-name { color: var(--ink); font-size: 0.95rem; }
.related-card:hover .related-name { color: var(--cinnabar); }

/* 404 页 ---------------------------------------------------------------- */
.notfound { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4rem 1.5rem; }
.notfound-code { font-size: 5rem; color: var(--cinnabar); font-family: var(--font-serif); margin: 0; line-height: 1; }
.notfound-title { font-size: 1.6rem; margin: 1rem 0 0.5rem; }
.notfound-desc { color: var(--muted); margin: 0 0 2rem; }
.notfound-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }


/* ============ 面包屑 ============ */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cinnabar); }
.bc-sep { color: var(--line); margin: 0 0.4rem; }
.bc-cur { color: var(--ink-soft); }

/* ============ 主题切换按钮 ============ */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

/* ============ 字号调节 ============ */
.font-ctrl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.font-ctrl-label { color: var(--muted); }
.font-ctrl button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.85rem;
}
.font-ctrl button:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

/* ============ 正文字号变量 ============ */
:root { --article-size: 17px; }
.article-body { font-size: var(--article-size); }

/* ============ 暗色模式 ============ */
[data-theme="dark"] {
  --paper: #1a1713;
  --paper-deep: #221e18;
  --ink: #e6ded0;
  --ink-soft: #c9bfae;
  --muted: #8f8574;
  --line: #3a3328;
  --cinnabar: #c8503e;
  --cinnabar-deep: #a83d2e;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.footer-beian { margin-top: 6px; font-size: 0.82rem; color: var(--muted); }
.footer-beian a { color: var(--muted); text-decoration: none; }
.footer-beian a:hover { color: var(--accent); }
