
:root {
  --bg: #faf9f6; --fg: #2b2a27; --muted: #8a867e; --card: #ffffff;
  --border: #e6e2da; --accent: #8a5a2b; --link: #4a6b52;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a; --fg: #d9d6cf; --muted: #85817a; --card: #202024;
    --border: #34343a; --accent: #c89b6a; --link: #8fae96;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, "Microsoft YaHei", serif;
  line-height: 1.9; font-size: 17px;
}
.wrap { max-width: 42em; margin: 0 auto; padding: 0 1.25em 4em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
header.site { border-bottom: 1px solid var(--border); margin-bottom: 2em; }
header.site .wrap { padding-top: 1.4em; padding-bottom: 1em; display: flex; justify-content: space-between; align-items: baseline; }
header.site .brand { font-size: 1.05em; font-weight: 700; letter-spacing: 0.08em; }
header.site .brand a { color: var(--fg); }
header.site .sub { color: var(--muted); font-size: 0.85em; }
h1.book-title { font-size: 1.7em; margin: 0.6em 0 0.2em; line-height: 1.4; }
h1.chapter-title { font-size: 1.45em; margin: 1.6em 0 0.4em; text-align: center; line-height: 1.5; }
.meta { color: var(--muted); font-size: 0.88em; margin-bottom: 2.2em; }
.meta.center { text-align: center; }
.prose p { margin: 0 0 0.1em; text-indent: 2em; }
.prose blockquote { margin: 1em 0; padding: 0.2em 1em; border-left: 3px solid var(--border); color: var(--muted); text-indent: 0; }
.prose blockquote p { text-indent: 0; }
.toc { list-style: none; padding: 0; margin: 1.5em 0; }
.toc li { border-bottom: 1px dashed var(--border); }
.toc a { display: flex; justify-content: space-between; padding: 0.65em 0.2em; color: var(--fg); }
.toc a:hover { color: var(--accent); text-decoration: none; background: var(--card); }
.toc .no { color: var(--muted); margin-right: 0.8em; font-size: 0.9em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16em, 1fr)); gap: 1em; margin-top: 1.5em; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.1em 1.2em; }
.card h2 { font-size: 1.15em; margin: 0 0 0.4em; }
.card h2 a { color: var(--fg); }
.card .desc { color: var(--muted); font-size: 0.9em; margin: 0.5em 0 0.8em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .count { font-size: 0.82em; color: var(--accent); }
.pager { display: flex; justify-content: space-between; gap: 1em; margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--border); font-size: 0.95em; }
.pager span { color: var(--muted); }
.back { text-align: center; margin-top: 1.6em; font-size: 0.9em; }
.intro { color: var(--muted); margin: 0.4em 0 1.6em; }
hr.divider { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
footer.site { border-top: 1px solid var(--border); margin-top: 4em; }
footer.site .wrap { padding-top: 1.2em; color: var(--muted); font-size: 0.8em; }
