/* ==========================================================
   书城模板样式
   配色参考：米白纸面 + 墨蓝 + 玉绿点缀
   ========================================================== */

:root {
  --ink: #102a43;
  --ink-2: #243b53;
  --muted: #6b7c8f;
  --faint: #9aa8b7;
  --line: #d9e0e7;
  --paper: #fbfaf6;
  --white: #fff;
  --soft: #f1f4f5;
  --blue: #174a72;
  --blue-2: #0f3657;
  --jade: #1d7a63;
  --red: #a44437;
  --shadow: 0 10px 32px rgba(16, 42, 67, .08);
  --radius: 4px;
  --max: 1360px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --ink: #e7edf3;
  --ink-2: #c3d0dd;
  --muted: #93a5b6;
  --faint: #74879a;
  --line: #2b3b4d;
  --paper: #10171f;
  --white: #18222c;
  --soft: #1b2632;
  --blue: #6fa9d8;
  --blue-2: #9cc6e8;
  --jade: #4fbfa0;
  --red: #e08a7c;
  --shadow: 0 10px 32px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

h1, h2, h3 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid rgba(29, 122, 99, .35);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link:focus {
  position: fixed !important;
  left: 16px; top: 12px;
  z-index: 9999;
  width: auto; height: auto;
  padding: 10px 18px;
  clip: auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}

.icon {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------------- 头部 ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid rgba(16, 42, 67, .12);
}
html[data-theme="dark"] .site-header { border-bottom-color: var(--line); }

.header-inner {
  width: min(var(--max), calc(100% - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linejoin: round;
  flex: none;
}
html[data-theme="dark"] .brand-mark { stroke: var(--blue); }
.brand-logo { max-width: 190px; height: 44px; object-fit: contain; }
.brand span { display: grid; line-height: 1.15; }
.brand strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  letter-spacing: .08em;
  color: var(--ink);
}
.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .13em;
}

.primary-nav { min-width: max-content; }
.nav-list {
  display: flex;
  gap: 26px;
  margin: 0; padding: 0;
  list-style: none;
}
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 22px 0;
  font-weight: 600;
  color: var(--ink-2);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 15px;
  height: 2px;
  background: var(--jade);
  transition: right .28s var(--ease);
}
.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after { right: 0; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 2px;
  background: var(--ink-2);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  width: min(300px, 34vw);
  padding: 0 4px 0 12px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
}
.header-search:focus-within { border-color: var(--jade); }
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  outline: none;
  font-size: 14px;
}
.header-search button {
  border: 0;
  padding: 6px 12px;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
html[data-theme="dark"] .header-search button { color: #10171f; }

.theme-toggle {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { border-color: var(--jade); color: var(--jade); }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }
html[data-theme="dark"] .icon-sun { display: none; }

/* ---------------- 面包屑 ---------------- */

.crumbs {
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.crumbs-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { margin: 0 8px; color: var(--faint); }
.crumbs .cur { color: var(--ink-2); font-weight: 600; }

/* ---------------- 通用布局 ---------------- */

.main {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.panel { min-width: 0; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: .06em;
}
.panel-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.panel-more::after { content: " →"; }
.panel-more:hover { color: var(--jade); }

.panel-wide {
  margin-top: 44px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.empty-tip, .empty-box {
  padding: 34px 0;
  color: var(--muted);
  font-size: 14px;
}
.empty-box { text-align: center; }
.empty-box .btn-primary { margin-top: 16px; }

/* ---------------- 按钮 ---------------- */

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
html[data-theme="dark"] .btn-primary { color: #10171f; }
.btn-primary:hover { background: var(--blue-2); color: #fff; }
html[data-theme="dark"] .btn-primary:hover { color: #10171f; }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--jade); color: var(--jade); }

/* ---------------- 首页 Hero ---------------- */

.hero {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { width: 100%; }

.hero-feature {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 12%, rgba(29, 122, 99, .07), transparent 42%),
    radial-gradient(circle at 6% 90%, rgba(23, 74, 114, .07), transparent 40%),
    var(--white);
}

.hero-art { display: grid; place-items: center; }
.hero-art img {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(16, 42, 67, .14);
  border-radius: 2px;
  box-shadow: 0 18px 42px rgba(16, 42, 67, .18);
}

.kicker {
  margin: 0 0 10px;
  color: var(--jade);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.hero-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: .03em;
}
.hero-title a:hover { color: var(--blue); }
.hero-meta {
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}
.hero-meta a { color: var(--ink-2); border-bottom: 1px solid var(--line); }
.hero-meta .dot { color: var(--faint); }
.hero-intro {
  margin: 0 0 24px;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.9;
}
.hero-dots { display: flex; gap: 8px; margin-top: 22px; }
.hero-dot {
  width: 26px; height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background .2s;
}
.hero-dot.is-active, .hero-dot:hover { background: var(--jade); }

.hero-empty {
  padding: 44px clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.genre-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.genre-chip {
  padding: 7px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-size: 14px;
  transition: border-color .2s, color .2s, background .2s;
}
.genre-chip:hover { border-color: var(--jade); color: var(--jade); }
.genre-chip.is-all { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.genre-chip.is-all:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
  margin-top: 44px;
}

/* ---------------- 排行列表 ---------------- */

.rank-list {
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: rank;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.rank-item:last-child { border-bottom: 0; }
.rank-no {
  width: 26px;
  flex: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: var(--faint);
  text-align: center;
}
.rank-no.is-top { color: var(--red); font-weight: 700; }
.rank-cover {
  width: 46px;
  flex: none;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-copy { flex: 1; min-width: 0; }
.rank-copy h3 {
  margin: 0 0 3px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-copy p {
  margin: 0;
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.rank-tag {
  flex: none;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------------- 书籍卡片 ---------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.book-card { min-width: 0; }
.book-cover {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 42, 67, .14);
  background: #e6ebee;
  box-shadow: 0 5px 13px rgba(16, 42, 67, .08);
}
html[data-theme="dark"] .book-cover {
  border-color: var(--line);
  background: var(--soft);
  box-shadow: 0 5px 13px rgba(0, 0, 0, .3);
}
.book-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s var(--ease), filter .3s;
}
.book-card:hover .book-cover img { transform: scale(1.03); filter: saturate(1.05); }
.badge-done {
  position: absolute;
  right: 0; top: 0;
  padding: 2px 7px;
  background: rgba(15, 54, 87, .85);
  color: #fff;
  font-size: 11px;
  letter-spacing: .05em;
}
.book-body { padding-top: 10px; }
.book-title {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-title a:hover { color: var(--blue); }
.book-meta, .book-facts {
  margin: 0 0 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.book-meta .author { color: var(--ink-2); }
.book-meta .author:hover { color: var(--jade); }
.book-meta .dot { color: var(--faint); }
.book-facts { gap: 8px; color: var(--faint); }

/* 封面占位 */
.cover-fallback {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  background: linear-gradient(150deg, #dfe7ec, #ccd8e1);
  color: rgba(16, 42, 67, .5);
}
html[data-theme="dark"] .cover-fallback {
  background: linear-gradient(150deg, #22303d, #1a2530);
  color: rgba(231, 237, 243, .4);
}
.cover-fallback b {
  font-family: "Songti SC", serif;
  font-size: 40px;
  letter-spacing: .05em;
}
.cover-fallback.is-sm b { font-size: 20px; }
.cover-fallback.is-lg b { font-size: 72px; }
.cover-fallback.is-xl b { font-size: 84px; }

/* ---------------- 标签云 ---------------- */

.tag-cloud {
  margin-top: 44px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.tag-cloud h2 {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: .06em;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.tag-list a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color .2s, color .2s;
}
.tag-list a:hover { border-color: var(--jade); color: var(--jade); }
.tag-list em {
  font-style: normal;
  font-size: 11px;
  color: var(--faint);
}
.tag-list.is-compact a { padding: 3px 10px; font-size: 12px; }

/* ---------------- 说明区块 ---------------- */

.intro-block {
  margin-top: 44px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.intro-block h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.intro-block p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.intro-block p:last-child { margin-bottom: 0; }
.intro-block strong { color: var(--ink); }

/* ---------------- 列表页 ---------------- */

.page-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: clamp(24px, 3vw, 46px);
  align-items: start;
}
.page-main { min-width: 0; }

.page-head { margin-bottom: 26px; }
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: .04em;
}
.page-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-inline {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}
.search-inline input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-2);
  outline: none;
}
.search-inline input:focus { border-color: var(--jade); }
.search-inline button {
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
html[data-theme="dark"] .search-inline button { color: #10171f; }

.hot-words {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -12px 0 26px;
  font-size: 13px;
}
.hot-words.is-block { margin: 0 0 22px; }
.hot-words-label { color: var(--muted); }
.hot-words a {
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  transition: border-color .2s, color .2s;
}
.hot-words a:hover,
.hot-words a.is-current { border-color: var(--jade); color: var(--jade); }

/* ---------------- 侧栏 ---------------- */

.page-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}
.side-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.side-panel h2 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: .08em;
}
.side-cats, .side-links {
  margin: 0; padding: 0;
  list-style: none;
}
.side-cats li, .side-links li {
  border-bottom: 1px dashed var(--line);
}
.side-cats li:last-child, .side-links li:last-child { border-bottom: 0; }
.side-cats a, .side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-2);
}
.side-cats a:hover, .side-links a:hover { color: var(--jade); }
.side-cats em {
  font-style: normal;
  font-size: 12px;
  color: var(--faint);
}
.side-cats li.is-active a { color: var(--jade); font-weight: 600; }

.side-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px 10px;
  font-size: 13px;
}
.side-dl dt { color: var(--muted); }
.side-dl dd { margin: 0; color: var(--ink-2); }

/* ---------------- 详情页 ---------------- */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: clamp(24px, 3vw, 46px);
  align-items: start;
}
.detail-main { min-width: 0; }

.detail-hero {
  display: grid;
  grid-template-columns: minmax(150px, 250px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(16, 42, 67, .14);
  box-shadow: 0 16px 34px rgba(16, 42, 67, .16);
}
html[data-theme="dark"] .detail-cover img { border-color: var(--line); box-shadow: 0 16px 34px rgba(0, 0, 0, .45); }

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.25;
}
.detail-meta {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 14px;
  color: var(--muted);
}
.detail-meta a { color: var(--ink-2); border-bottom: 1px solid var(--line); }
.detail-meta a:hover { color: var(--jade); }

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.detail-tags a {
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  color: var(--muted);
}
.detail-tags a:hover { border-color: var(--jade); color: var(--jade); }

.format-block { margin-bottom: 22px; }
.format-block h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--muted);
  font-family: inherit;
}
.format-list { display: flex; flex-wrap: wrap; gap: 7px; }
.format-chip {
  padding: 3px 11px;
  border-radius: 2px;
  background: var(--soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
}

.detail-stats {
  margin: 0; padding: 0;
  display: flex;
  gap: 30px;
  list-style: none;
}
.detail-stats li { display: grid; }
.detail-stats strong {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.2;
}
.detail-stats span { font-size: 12px; color: var(--muted); }

.detail-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.detail-section:last-child { border-bottom: 0; }
.detail-section > h2 {
  margin: 0 0 16px;
  font-size: 19px;
  letter-spacing: .06em;
}
.detail-section > h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 15px;
  margin-right: 10px;
  vertical-align: -2px;
  background: var(--jade);
  border-radius: 1px;
}

.prose { font-size: 15.5px; line-height: 2; color: var(--ink-2); }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose-html { margin-top: 14px; }
.prose-html img { border-radius: 3px; }
.prose-html a { color: var(--blue); text-decoration: underline; }
.prose-html ul, .prose-html ol { padding-left: 22px; }

/* 网盘 */
.pan-list {
  margin: 0; padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.pan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.pan-copy { display: grid; gap: 3px; min-width: 0; }
.pan-copy strong { font-size: 15px; color: var(--ink); }
.pan-note { font-size: 12.5px; color: var(--muted); }
.pan-pwd { font-size: 13px; color: var(--muted); }
.pan-pwd code {
  padding: 1px 7px;
  border-radius: 2px;
  background: var(--soft);
  color: var(--jade);
  font-weight: 700;
  letter-spacing: .08em;
}
.btn-download {
  flex: none;
  padding: 9px 20px;
  border-radius: var(--radius);
  background: var(--jade);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: filter .2s;
}
.btn-download:hover { color: #fff; filter: brightness(1.08); }
.pan-tip {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.8;
}

.section-more { margin: 22px 0 0; font-size: 13px; }
.section-more a { color: var(--muted); }
.section-more a:hover { color: var(--jade); }

/* 单页 */
.single .prose { max-width: 900px; }

/* ---------------- 分页 ---------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.page-link {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-2);
  font-size: 14px;
}
a.page-link:hover { border-color: var(--jade); color: var(--jade); }
.page-link.is-current {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
html[data-theme="dark"] .page-link.is-current { color: #10171f; }
.page-link.is-disabled { color: var(--faint); background: transparent; }
.page-gap { display: inline-grid; place-items: center; width: 24px; color: var(--faint); }

/* ---------------- 404 ---------------- */

.notfound {
  padding: 60px 0 40px;
  text-align: center;
}
.nf-code {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(64px, 12vw, 120px);
  line-height: 1;
  color: var(--line);
  letter-spacing: .06em;
}
.notfound h1 { margin: 8px 0 12px; font-size: 24px; }
.nf-tip { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.nf-actions { display: flex; justify-content: center; gap: 12px; }

/* ---------------- 页脚 ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}
.footer-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 34px;
}
.footer-brand strong {
  font-family: "Songti SC", serif;
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--ink);
}
.footer-brand p {
  margin: 10px 0 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.footer-col h3 {
  margin: 0 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { font-size: 13px; color: var(--muted); }
.footer-col a:hover { color: var(--jade); }

.footer-bottom {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 12.5px;
  color: var(--faint);
}
.footer-bottom a:hover { color: var(--jade); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1100px) {
  .nav-list { gap: 20px; }
  .page-wrap, .detail { grid-template-columns: minmax(0, 1fr); }
  .page-side { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .header-inner {
    width: calc(100% - 32px);
    height: 64px;
    gap: 12px;
  }
  .brand small { display: none; }
  .header-search { width: auto; flex: 1; min-width: 0; }
  .header-search input { font-size: 15px; }
  .header-search button { display: none; }
  .nav-toggle { display: flex; order: 3; }
  .primary-nav {
    position: absolute;
    left: 0; right: 0; top: 64px;
    display: none;
    padding: 8px 16px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(16, 42, 67, .08);
    z-index: 100;
  }
  .primary-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 13px 0; border-bottom: 1px dashed var(--line); }
  .nav-list a::after { display: none; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-feature { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 210px; }
  .hero-meta, .hero-dots { justify-content: center; }
  .hero-intro { margin-left: auto; margin-right: auto; }
  .detail-hero { grid-template-columns: minmax(0, 1fr); }
  .detail-cover { max-width: 200px; }
  .crumbs-inner { width: calc(100% - 32px); }
  .main { width: calc(100% - 32px); padding-top: 22px; }
  .panel { padding: 18px; }
  .panel-wide { padding: 18px; }
  .page-side { gap: 18px; }
  .side-panel { padding: 16px; }
  .rank-list { gap: 14px; }
  .hot-words { margin: -10px 0 20px; font-size: 12px; }
  .hot-words a { padding: 2px 10px; }
  .search-inline { gap: 8px; margin-bottom: 20px; }
  .search-inline input { height: 42px; padding: 0 12px; font-size: 15px; }
  .search-inline button { padding: 0 18px; font-size: 14px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .brand strong { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-search input { padding: 0 12px; font-size: 14px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px; }
  .mini-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .panel-wide { padding: 16px; }
  .page-head h1 { font-size: 22px; }
  .page-sub { font-size: 13px; }
  .tag-cloud, .intro-block { padding: 16px; }
  .pan-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .btn-download { width: 100%; text-align: center; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 0 24px; }
  .footer-bottom { flex-direction: column; }
  .detail-stats { gap: 22px; }
  .detail-title { font-size: 24px; }
  .nf-actions { flex-direction: column; align-items: stretch; }
  .nf-actions a { justify-content: center; }
  .btn-primary, .btn-ghost { padding: 10px 18px; font-size: 14px; }
  .hot-words { font-size: 11px; gap: 6px; }
  .hot-words a { padding: 2px 9px; }
  .hot-words-label { font-size: 12px; }
  .search-inline input { height: 40px; }
  .rank-no { width: 20px; height: 20px; font-size: 11px; }
  .rank-cover { width: 48px; height: 64px; }
  .rank-cover img { width: 48px; height: 64px; }
  .cover-fallback.is-sm { width: 48px; height: 64px; font-size: 16px; }
}

/* 触摸设备移除 hover 残留 */
.touch-device a:active { opacity: .7; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
