/* ==========================================================================
   韩漫在线免费 · 站点样式
   base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. base
   -------------------------------------------------------------------------- */

:root {
  --paper: #f4f3f0;
  --surface: #ffffff;
  --ink: #16181a;
  --muted: #6b6f76;
  --line: #dcdad4;
  --line-strong: #c6c3bb;
  --accent: #b4552b;
  --accent-soft: #f0e3dc;
  --green: #2f4a3f;
  --sidebar-w: 240px;
  --content-max: 1120px;
  --gap-xl: 96px;
  --gap-lg: 64px;
  --gap-md: 40px;
  --gap-sm: 24px;
  --gap-xs: 12px;
  --radius: 6px;
  --header-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.9;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

strong {
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  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;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

/* --------------------------------------------------------------------------
   2. layout · 页头
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(244, 243, 240, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  max-width: calc(var(--content-max) + var(--sidebar-w) + 64px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 0;
}

.brand-mark {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.header-nav {
  flex: 1;
  min-width: 0;
}

.header-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius);
  transition: background 0.18s ease, color 0.18s ease;
}

.header-nav-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.header-nav-link.is-current {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-location {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   3. layout · 侧栏 + 主内容
   -------------------------------------------------------------------------- */

.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  max-width: calc(var(--content-max) + var(--sidebar-w) + 64px);
  margin: 0 auto;
  padding: 0 24px;
  gap: 0 40px;
}

.page-layout > .site-main {
  grid-column: 2;
  min-width: 0;
}

.page-layout > aside {
  grid-column: 1;
  grid-row: 1;
}

/* 侧栏统一外观 */
.site-sidebar,
.side-nav {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 16px 16px 24px 0;
  border-right: 1px solid var(--line);
}

/* 侧栏分组：五套 DOM 变体统一视觉 */
.nav-group,
.side-nav-group,
.sidebar-group,
.side-group {
  border-bottom: 1px solid var(--line);
}

.nav-group:last-child,
.side-nav-group:last-child,
.sidebar-group:last-child,
.side-group:last-child {
  border-bottom: 0;
}

.nav-group-title,
.side-nav-toggle,
.side-nav-group-title,
.sidebar-group-title,
.sidebar-group-toggle,
.side-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.side-nav-group-title,
.side-group-title {
  cursor: default;
}

.nav-group-title:hover,
.side-nav-toggle:hover,
.sidebar-group-toggle:hover {
  background: var(--surface);
  border-radius: var(--radius);
}

.nav-count,
.side-nav-count,
.sidebar-count,
.side-group-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav-list,
.side-nav-list,
.sidebar-list,
.side-group-list {
  padding: 0 0 8px;
}

.nav-list[hidden],
.side-nav-list[hidden],
.sidebar-list[hidden],
.side-group-list[hidden] {
  display: none;
}

.nav-link,
.side-nav-link,
.sidebar-link,
.side-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px 4px 16px;
  font-size: 13px;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.side-nav-link:hover,
.sidebar-link:hover,
.side-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav-link.is-current,
.side-nav-link.is-current,
.sidebar-link.is-current,
.side-link.is-current {
  color: var(--ink);
  font-weight: 700;
  border-left-color: var(--accent);
  background: var(--surface);
}

/* 主内容容器 */
.site-main {
  min-width: 0;
  padding: 32px 0 var(--gap-xl);
}

.inner-main {
  max-width: var(--content-max);
  width: 100%;
}

/* --------------------------------------------------------------------------
   4. components · 通用
   -------------------------------------------------------------------------- */

.section-head {
  margin-bottom: var(--gap-sm);
}

.section-head h2 {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}

.section-head p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 64ch;
}

.section-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}

.section-desc,
.section-lead {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 68ch;
}

.section {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.section-block {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.section-block:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: var(--gap-md);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  padding: 4px 0 0;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.18s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 页面标题区（全站统一） */
.page-header {
  margin-top: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
}

/* 页头内容（引导句 + 页头图） */
.page-head {
  margin-top: var(--gap-md);
}

.page-lead {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  max-width: 68ch;
}

.page-head-media,
.page-head-figure,
.page-title-media,
.page-figure {
  margin-top: var(--gap-sm);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.page-head-media img,
.page-head-figure img,
.page-title-media img,
.page-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #9a4723;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
}

/* 阅读提示条 */
.reading-tip {
  margin-top: var(--gap-sm);
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 字段表 */
.field-table {
  margin: 0;
  font-size: 13px;
}

.field-table dt,
.field-table th {
  color: var(--muted);
  font-weight: 400;
}

.field-table dd,
.field-table td {
  color: var(--ink);
  margin: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.field-row:last-child {
  border-bottom: 0;
}

.field-name {
  font-size: 13px;
  color: var(--muted);
}

.field-value {
  font-size: 13px;
  color: var(--ink);
  margin: 0;
}

/* 条目列表行（首页与书架共用） */
.entry-list {
  border-top: 1px solid var(--line);
}

.entry-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.6fr) 84px 68px 72px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  transition: background 0.18s ease;
}

.entry-row:hover {
  background: var(--surface);
}

.entry-no {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.entry-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}

a.entry-name:hover {
  color: var(--accent);
}

.entry-tag,
.entry-genre {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-len,
.entry-length {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.entry-state,
.entry-status {
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
}

.is-added,
.is-ongoing {
  color: var(--green);
}

.is-adjusted,
.is-changed {
  color: var(--accent);
}

.is-done {
  color: var(--muted);
}

/* 相关推荐双栏 */
.related,
.section-related {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.related-grid,
.related-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.related-card-title,
.related-title {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
}

.related-card-title a,
.related-title a {
  color: var(--ink);
  transition: color 0.18s ease;
}

.related-card-title a:hover,
.related-title a:hover {
  color: var(--accent);
}

.related-card-desc,
.related-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.related-more {
  margin-top: var(--gap-sm);
  font-size: 13px;
}

.related-more a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-soft);
}

/* 相关链接条 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: var(--gap-md);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.related-links-label {
  color: var(--muted);
  font-size: 12px;
}

.related-links-item {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.related-links-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* 折叠问答 */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-item[open] .faq-question {
  color: var(--accent);
}

.faq-answer {
  padding: 0 0 16px;
}

.faq-answer p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 68ch;
}

.faq-answer p + p {
  margin-top: 8px;
}

/* 文本链接 */
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.text-link:hover {
  border-color: var(--accent);
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   5. layout · 页脚
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: var(--gap-xl);
  background: var(--ink);
  color: #e7e5e0;
}

.footer-inner {
  max-width: calc(var(--content-max) + var(--sidebar-w) + 64px);
  margin: 0 auto;
  padding: var(--gap-md) 24px var(--gap-sm);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: var(--gap-md);
}

.footer-mark {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.footer-desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: #a9a7a2;
  max-width: 34ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.footer-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.footer-group ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-group a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 13px;
  color: #a9a7a2;
  transition: color 0.18s ease;
}

.footer-group a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: calc(var(--content-max) + var(--sidebar-w) + 64px);
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid #2c2f31;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 12px;
  color: #85837e;
}

/* --------------------------------------------------------------------------
   6. pages · 首页
   -------------------------------------------------------------------------- */

.home-main {
  padding-top: var(--gap-md);
}

/* 索引台首屏 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--gap-md);
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.hero-copy h1 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}

.hero-lead {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--gap-sm);
}

.hero-visual {
  min-width: 0;
}

.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.meta-item {
  background: var(--surface);
  padding: 10px 12px;
  min-width: 0;
}

.meta-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.meta-value {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* 题材谱系带 */
.genre-band {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: var(--gap-sm);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.genre-card {
  background: var(--surface);
  padding: 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.genre-no {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.genre-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.genre-hint {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  flex: 1;
}

.genre-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.genre-link::after {
  content: "→";
  margin-left: 6px;
}

.genre-link:hover {
  color: #9a4723;
}

/* 最近入架与条目摘要 */
.recent-shelf {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.recent-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--gap-md);
  margin-top: var(--gap-sm);
}

.recent-list-wrap {
  min-width: 0;
}

.entry-digest-wrap {
  min-width: 0;
}

.digest-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.digest-tag {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.digest-title {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
}

.digest-summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.digest-card .field-table {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.digest-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.digest-link:hover {
  border-color: var(--accent);
}

/* 书架封面墙 */
.cover-wall {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
}

.cover-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.cover-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.cover-no {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
}

.cover-figure {
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
}

.cover-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cover-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.cover-summary {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  flex: 1;
}

.cover-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.cover-fields span {
  white-space: nowrap;
}

.cover-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.cover-link::after {
  content: "→";
  margin-left: 6px;
}

/* 编目规则 */
.rules {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.rules-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
  margin-top: var(--gap-sm);
}

.rule-col {
  min-width: 0;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.rule-title {
  font-size: 16px;
  font-weight: 700;
}

.rule-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.rules-note {
  margin-top: var(--gap-sm);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* 读前四问 */
.faq {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.faq-list {
  margin-top: var(--gap-sm);
  border-top: 1px solid var(--line);
}

.faq-more {
  margin-top: var(--gap-sm);
  font-size: 13px;
}

.faq-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-soft);
}

/* 反馈入口摘要 */
.feedback-brief {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.feedback-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
  margin-top: var(--gap-sm);
}

.feedback-col {
  min-width: 0;
}

.feedback-title {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.feedback-list {
  margin-top: 10px;
}

.feedback-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.feedback-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.feedback-link {
  margin-top: var(--gap-sm);
  font-size: 13px;
}

.feedback-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.feedback-link a:hover {
  background: var(--surface);
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   7. pages · 精选书架
   -------------------------------------------------------------------------- */

.shelf-intro {
  margin-top: var(--gap-md);
}

.shelf-intro-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.shelf-intro-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.shelf-intro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.shelf-intro-list strong {
  color: var(--ink);
}

.shelf-group {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.shelf-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}

.shelf-group-desc {
  flex: 1 1 320px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  min-width: 0;
}

.shelf-group-count {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.shelf-group-cover {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.shelf-group-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

.shelf-group .entry-list {
  margin-top: 16px;
}

.field-legend {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.field-legend .field-table {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.shelf-path {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.shelf-path-steps {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
  counter-reset: shelfstep;
}

.shelf-path-steps li {
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: shelfstep;
}

.shelf-path-steps li::before {
  content: counter(shelfstep, decimal-leading-zero);
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.shelf-path-steps a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.shelf-path-steps a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   8. pages · 题材谱系
   -------------------------------------------------------------------------- */

.genre-index {
  margin-top: var(--gap-md);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.genre-index-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.genre-index-item {
  min-width: 0;
}

.genre-index-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 56px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.genre-index-link:hover {
  border-color: var(--accent);
}

.genre-index-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.genre-index-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.genre-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--gap-md);
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
  align-items: start;
}

.genre-block-side {
  min-width: 0;
}

.genre-block-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.genre-block-name {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.genre-block-media {
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.genre-block-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.genre-block-body {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.genre-block-part {
  min-width: 0;
}

.genre-block-part h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.genre-block-part p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 68ch;
}

.genre-cross {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.genre-cross h2 {
  font-size: 22px;
}

.genre-cross-list {
  margin-top: var(--gap-sm);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.genre-cross-item {
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.genre-cross-item h3 {
  font-size: 15px;
  font-weight: 700;
}

.genre-cross-item p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.genre-path {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.genre-path h2 {
  font-size: 22px;
}

.genre-path-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.genre-path-links a,
.genre-path .entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.18s ease;
}

.genre-path-links a:hover,
.genre-path .entry-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   9. pages · 更新记录
   -------------------------------------------------------------------------- */

.rules-block {
  margin-top: var(--gap-md);
  padding-top: 0;
  border-top: 0;
}

.rule-list {
  margin-top: var(--gap-sm);
  display: grid;
  gap: 10px;
}

.rule-item {
  position: relative;
  padding: 12px 16px 12px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  min-width: 0;
}

.rule-num {
  position: absolute;
  left: 16px;
  top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.table-wrap {
  margin-top: var(--gap-sm);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.batch-table {
  min-width: 640px;
  font-size: 13px;
}

.table-caption {
  caption-side: top;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.batch-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.batch-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}

.batch-table tbody tr:last-child td {
  border-bottom: 0;
}

.batch-table tbody tr:hover {
  background: var(--paper);
}

.cell-batch {
  font-weight: 600;
  white-space: nowrap;
}

.cell-date {
  color: var(--muted);
  white-space: nowrap;
}

.cell-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.entry-cell {
  display: block;
  width: 40px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.entry-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell-type {
  white-space: nowrap;
}

.type-block {
  margin-top: var(--gap-lg);
}

.type-grid {
  margin-top: var(--gap-sm);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.type-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.type-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.type-card p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.type-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
}

.type-in {
  color: var(--green);
  background: #e7ede9;
}

.type-field {
  color: var(--accent);
  background: var(--accent-soft);
}

.type-status {
  color: #4a4a52;
  background: #ece9e4;
}

.type-group {
  color: #3c4a63;
  background: #e6eaf1;
}

.compare-block {
  margin-top: var(--gap-lg);
}

.compare-steps {
  margin-top: var(--gap-sm);
  display: grid;
  gap: 10px;
}

.compare-step {
  position: relative;
  padding: 14px 16px 14px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  min-width: 0;
}

.compare-step .step-num {
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.compare-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--gap-sm);
}

/* --------------------------------------------------------------------------
   10. pages · 条目解读
   -------------------------------------------------------------------------- */

.sample-card {
  margin-top: var(--gap-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.sample-card h2 {
  font-size: 18px;
  font-weight: 700;
}

.sample-note {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.sample-card-body {
  margin-top: 16px;
}

.sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
}

.tag-genre {
  color: var(--accent);
  background: var(--accent-soft);
}

.tag-type {
  color: #3c4a63;
  background: #e6eaf1;
}

.tag-status {
  color: var(--green);
  background: #e7ede9;
}

.sample-summary {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
  max-width: 68ch;
}

.sample-card .field-table {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.entry-steps {
  margin-top: var(--gap-lg);
}

.entry-step {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--gap-md);
  padding: var(--gap-md) 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.step-rail {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.step-rail .step-num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.step-name {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink);
}

.step-body {
  min-width: 0;
}

.step-body p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  max-width: 68ch;
}

.step-body p + p {
  margin-top: 12px;
}

.entry-figure {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.entry-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.entry-figure figcaption {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.next-step {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.next-step h2 {
  font-size: 22px;
}

.next-step > p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 68ch;
}

.next-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
}

.next-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease;
}

.next-card:hover {
  border-color: var(--accent);
}

.next-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.next-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.next-card-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   11. pages · 读法说明
   -------------------------------------------------------------------------- */

.guide-block {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.guide-block h2 {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
}

.guide-block-note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 68ch;
}

.guide-block details:first-of-type {
  margin-top: 16px;
}

.guide-block .faq-item {
  border-top: 1px solid var(--line);
}

.guide-next {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.guide-next a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.guide-next a:hover {
  border-color: var(--accent);
}

.guide-path {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--line);
}

.guide-path h2 {
  font-size: 22px;
}

.guide-path-note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 68ch;
}

.path-steps {
  margin-top: var(--gap-sm);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.path-step {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-step-num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.path-step-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.path-step p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.path-step-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* 出现动画：默认完全可见，脚本执行后才做增强 */
.reveal {
  opacity: 1;
}

.reveal.is-revealed {
  animation: reveal-fade 0.5s ease both;
}

@keyframes reveal-fade {
  from {
    opacity: 0.4;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal.is-revealed {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --------------------------------------------------------------------------
   12. pages · 反馈与收录
   -------------------------------------------------------------------------- */

.scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
  margin-top: var(--gap-sm);
}

.scope-col {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-col-in {
  border-left: 3px solid var(--green);
}

.scope-col-out {
  border-left: 3px solid var(--accent);
}

.scope-col-title {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.scope-list {
  margin-top: 10px;
}

.scope-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.scope-col-in .scope-list li::before {
  background: var(--green);
}

.scope-col-out .scope-list li::before {
  background: var(--accent);
}

.scope-note {
  margin-top: var(--gap-sm);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.material-list {
  margin-top: var(--gap-sm);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.material-item {
  position: relative;
  min-width: 0;
  padding: 18px 20px 18px 56px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.material-index {
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.material-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.material-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.process-steps {
  margin-top: var(--gap-sm);
  display: grid;
  gap: 10px;
}

.process-step {
  position: relative;
  min-width: 0;
  padding: 16px 20px 16px 60px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.process-index {
  position: absolute;
  left: 20px;
  top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.process-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.process-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 68ch;
}

.dispute-list {
  margin-top: var(--gap-sm);
  display: grid;
  gap: var(--gap-sm);
}

.dispute-item,
.dispute-title-wrap {
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dispute-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.dispute-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   13. pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--gap-lg) 24px var(--gap-xl);
}

.error-inner {
  width: 100%;
  max-width: 640px;
}

.error-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.error-title {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  font-weight: 700;
}

.error-lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 52ch;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--gap-sm);
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.error-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.error-btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.error-btn-primary:hover {
  color: #fff;
  background: #9a4723;
  border-color: #9a4723;
}

.error-tips {
  margin-top: var(--gap-md);
  padding-top: var(--gap-sm);
  border-top: 1px solid var(--line);
}

.error-tips-title {
  font-size: 16px;
  font-weight: 700;
}

.error-tips-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.error-tips-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.error-tips-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   14. responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .header-location {
    display: none;
  }

  .genre-index-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  :root {
    --gap-xl: 64px;
    --gap-lg: 48px;
    --gap-md: 32px;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 20px;
  }

  .page-layout > .site-main {
    grid-column: 1;
    grid-row: 1;
  }

  .page-layout > aside {
    grid-column: 1;
    grid-row: 2;
    position: static;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
    margin-top: var(--gap-md);
  }

  .header-inner {
    padding: 0 20px;
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(22, 24, 26, 0.08);
    padding: 8px 16px 16px;
  }

  .header-nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .header-nav-list.is-open {
    display: flex;
  }

  .header-nav-link {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .header-nav-link.is-current {
    box-shadow: inset 3px 0 0 var(--accent);
    background: var(--paper);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-sm);
  }

  .hero-lead {
    max-width: none;
  }

  .hero-figure img {
    aspect-ratio: 16 / 9;
  }

  .recent-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .digest-card {
    position: static;
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-sm);
  }

  .type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-block {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-sm);
  }

  .genre-block-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 4px 16px;
    align-items: start;
  }

  .genre-block-num {
    grid-column: 1;
  }

  .genre-block-name {
    grid-column: 1;
  }

  .genre-block-media {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .genre-cross-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .step-rail {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .step-name {
    margin-top: 0;
    font-size: 16px;
  }

  .path-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .material-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-sm);
    padding: var(--gap-md) 20px var(--gap-sm);
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-sm) var(--gap-md);
  }

  .footer-bottom {
    padding: 16px 20px 28px;
  }
}

@media (max-width: 720px) {
  :root {
    --gap-xl: 48px;
    --gap-lg: 40px;
    --gap-md: 28px;
    --gap-sm: 18px;
  }

  body.site-body {
    font-size: 15px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .brand-sub {
    display: none;
  }

  .page-layout {
    padding: 0 16px;
  }

  .site-main {
    padding: 24px 0 56px;
  }

  .page-title {
    font-size: 26px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    flex: 1 1 160px;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-row {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
      "no name"
      "no meta";
    row-gap: 2px;
    padding: 10px 4px 10px 0;
  }

  .entry-row .entry-no {
    grid-area: no;
    align-self: start;
    padding-top: 2px;
  }

  .entry-row .entry-name {
    grid-area: name;
  }

  .entry-row .entry-tag,
  .entry-row .entry-genre {
    grid-area: meta;
    justify-self: start;
  }

  .entry-row .entry-len,
  .entry-row .entry-length,
  .entry-row .entry-state,
  .entry-row .entry-status {
    display: none;
  }

  .shelf-group .entry-row .entry-length,
  .shelf-group .entry-row .entry-status {
    display: inline;
  }

  .shelf-group .entry-row .entry-length,
  .shelf-group .entry-row .entry-status,
  .shelf-group .entry-row .entry-genre {
    grid-area: meta;
    justify-self: start;
    font-size: 12px;
  }

  .feedback-columns,
  .scope-columns,
  .related-grid,
  .related-columns,
  .next-links,
  .shelf-path-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
  }

  .genre-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-block-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-block-media {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
  }

  .type-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 批次表：小屏转纵向卡片 */
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .batch-table {
    min-width: 0;
    display: block;
  }

  .batch-table caption {
    display: block;
    padding: 0 0 12px;
    border-bottom: 0;
  }

  .batch-table thead {
    display: none;
  }

  .batch-table tbody,
  .batch-table tr,
  .batch-table td {
    display: block;
    width: 100%;
  }

  .batch-table tbody tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
  }

  .batch-table tbody td {
    padding: 4px 0;
    border-bottom: 0;
  }

  .batch-table tbody td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 72px;
    font-size: 12px;
    color: var(--muted);
  }

  .cell-entry {
    min-width: 0;
    flex-wrap: wrap;
  }

  .sample-card {
    padding: 18px;
  }

  .material-item,
  .process-step,
  .rule-item,
  .compare-step {
    padding-left: 52px;
  }

  .error-main {
    padding: 40px 16px 56px;
  }

  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-group a {
    min-height: 44px;
  }
}

@media (max-width: 400px) {
  .header-inner {
    padding: 0 12px;
  }

  .page-layout {
    padding: 0 12px;
  }

  .brand-mark {
    font-size: 16px;
  }

  .hero-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-index-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
