/* ==========================================================================
   妖姬动漫 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. base：变量、重置、排版基础
   -------------------------------------------------------------------------- */
:root {
  --ink: #1C3A33;
  --teal: #4A7C6F;
  --accent: #D06A3A;
  --sand: #F7F4EC;
  --card: #FFFDF8;
  --line: #DDD5C4;
  --text: #24201C;
  --muted: #6B6357;

  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --shell: 1180px;
  --pad-x: 32px;
  --radius: 4px;
  --radius-lg: 6px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
}

h1 { font-size: 34px; line-height: 1.25; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

time {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   2. layout：页头、页脚、主容器、内页两列骨架
   -------------------------------------------------------------------------- */

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  color: var(--ink);
}

.brand:hover,
.brand:focus-visible {
  color: var(--ink);
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 2px;
}

/* 主导航 */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-list a {
  display: inline-block;
  padding: 20px 0;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--accent);
}

.nav-list a.is-current {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* 主内容 */
.site-main {
  display: block;
}

.home-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x) 72px;
}

.inner-main {
  min-width: 0;
  max-width: 720px;
  padding: 28px 0 64px;
}

/* 内页两列骨架：aside 在前，main 在后 */
.page-layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.page-layout.sidebar-left {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
}

/* 侧栏在前 */
.sidebar-left .topic-tree {
  order: 0;
}

.sidebar-left .inner-main {
  order: 1;
}

.sidebar-left .topic-tree {
  grid-column: 1;
  grid-row: 1;
}

.sidebar-left .inner-main {
  grid-column: 2;
  grid-row: 1;
}

/* 页脚 */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px var(--pad-x) 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.footer-col {
  min-width: 0;
}

.footer-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 10px;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul a {
  font-size: 14px;
  color: var(--muted);
}

.footer-col ul a:hover,
.footer-col ul a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--pad-x) 28px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   3. components：通用组件
   -------------------------------------------------------------------------- */

/* 章节标题区 */
.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 720px;
}

.section-intro {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 720px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn-primary {
  background: var(--ink);
  color: #FFFDF8;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent);
  color: #FFFDF8;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--teal);
  background: rgba(74, 124, 111, 0.08);
  border: 1px solid rgba(74, 124, 111, 0.24);
  border-radius: var(--radius);
}

/* 封面图容器 */
.cover-figure,
.entry-cover,
.hero-figure,
.feature-figure,
.genre-block-media,
.verify-figure,
.series-figure,
.field-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.cover-figure img,
.entry-cover img,
.hero-figure img,
.feature-figure img,
.genre-block-media img,
.verify-figure img,
.series-figure img,
.field-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 页面标题区 */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  margin-bottom: 14px;
}

.page-lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 14px;
  max-width: 720px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0;
}

/* 元信息行 */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
}

.meta-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.meta-item dt {
  color: var(--muted);
}

.meta-item dd {
  margin: 0;
  color: var(--ink);
}

/* 元信息表 */
.meta-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 168px;
}

.meta-pair {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 5px;
}

.meta-pair:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-pair dt {
  color: var(--muted);
  white-space: nowrap;
}

.meta-pair dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
}

/* 数据表 */
.data-table,
.update-table,
.log-table {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

.data-table th,
.data-table td,
.update-table th,
.update-table td,
.log-table th,
.log-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}

.data-table thead th,
.update-table thead th,
.log-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(221, 213, 196, 0.28);
  white-space: nowrap;
}

.data-table tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.update-table tbody tr:last-child td,
.log-table tbody tr:last-child td {
  border-bottom: 0;
}

.update-table td:first-child,
.log-table td:first-child {
  white-space: nowrap;
}

.table-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 12px;
}

/* 页内前后导航 */
.page-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pager-prev,
.pager-next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, transform 160ms ease;
}

.pager-prev:hover,
.pager-next:hover,
.pager-prev:focus-visible,
.pager-next:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pager-next {
  text-align: right;
}

.pager-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pager-title,
.pager-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.pager-desc,
.pager-hint {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* 侧栏主题树 */
.topic-tree {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 24px 0 40px;
  font-size: 14px;
  min-width: 0;
}

.topic-tree-title,
.tree-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 14px;
}

.tree-group,
.topic-group,
.topic-tree-group {
  margin-bottom: 18px;
}

.tree-group-title,
.topic-group-title,
.topic-tree-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  cursor: pointer;
  list-style: none;
}

.tree-group-title::-webkit-details-marker {
  display: none;
}

.tree-list,
.topic-group ul,
.topic-tree-group ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 10px;
}

.tree-list a,
.topic-group ul a,
.topic-tree-group ul a {
  display: block;
  padding: 6px 8px;
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.tree-list a:hover,
.topic-group ul a:hover,
.topic-tree-group ul a:hover,
.tree-list a:focus-visible,
.topic-group ul a:focus-visible,
.topic-tree-group ul a:focus-visible {
  color: var(--ink);
  background: rgba(221, 213, 196, 0.3);
}

.tree-list a.is-current,
.topic-group ul a.is-current,
.topic-tree-group ul a.is-current {
  color: var(--ink);
  font-weight: 700;
  border-left-color: var(--teal);
  background: rgba(74, 124, 111, 0.08);
}

/* --------------------------------------------------------------------------
   4. pages：首页
   -------------------------------------------------------------------------- */

/* 首屏起步区 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  padding: 56px 0 64px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin-bottom: 18px;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 14px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-figure {
  aspect-ratio: 16 / 10;
}

.hero-entries {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color 160ms ease;
}

.entry-card:last-child {
  border-bottom: 0;
}

.entry-card:hover,
.entry-card:focus-visible {
  background: rgba(221, 213, 196, 0.24);
}

.entry-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.entry-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.entry-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-update-bar {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

/* 三步起步条 */
.steps {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step-item {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}

.step-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
}

.step-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* 专题章节 */
.feature {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}

.feature-media {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-figure {
  aspect-ratio: 4 / 3;
}

.feature-figure figcaption {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.side-note {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}

.side-note-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 6px;
}

.side-note p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.feature-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-article h3 {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.feature-article p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.feature-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.feature-links a {
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid transparent;
}

.feature-links a:hover,
.feature-links a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 题材索引带 */
.genres {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.genre-band-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.genre-band {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 96px;
  gap: 20px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color 160ms ease;
}

.genre-band:hover {
  background: rgba(221, 213, 196, 0.22);
}

.genre-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.genre-scope {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.genre-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-align: right;
}

.genres-more,
.shelf-more,
.threads-more {
  margin-top: 18px;
}

.genres-more a,
.shelf-more a,
.threads-more a {
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.genres-more a:hover,
.shelf-more a:hover,
.threads-more a:hover,
.genres-more a:focus-visible,
.shelf-more a:focus-visible,
.threads-more a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 作品封面墙 */
.shelf {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.shelf-group {
  margin-bottom: 36px;
}

.shelf-group:last-of-type {
  margin-bottom: 0;
}

.shelf-group-title {
  font-size: 16px;
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.cover-card:hover,
.cover-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.cover-card > a {
  display: block;
  padding: 10px;
  color: inherit;
}

.cover-figure {
  aspect-ratio: 3 / 4;
  margin-bottom: 10px;
}

.cover-title {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--ink);
}

.cover-tags {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 4px;
}

.cover-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

/* 系列谱系摘要 */
.threads {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.thread-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.thread-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 108px;
  gap: 20px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.thread-child {
  padding-left: 28px;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}

.thread-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.thread-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.thread-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-align: right;
}

/* 更新记录 */
.updates {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.update-table {
  table-layout: auto;
}

.update-table td time {
  font-size: 12px;
}

/* 内容边界 */
.boundary {
  padding: 56px 0 0;
  border-top: 1px solid var(--line);
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.boundary-item {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.boundary-item h3 {
  margin-bottom: 10px;
}

.boundary-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* 离线提示条 */
.offline-bar {
  display: none;
  padding: 8px var(--pad-x);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #FFFDF8;
  background: var(--ink);
  text-align: center;
}

/* --------------------------------------------------------------------------
   5. pages：内页业务模块
   -------------------------------------------------------------------------- */

/* 作品库 */
.entry-list h2,
.status-legend h2,
.series-index h2,
.updates-log h2 {
  margin-bottom: 8px;
}

.entry-list {
  margin-bottom: 48px;
}

.entry-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 200px;
  gap: 20px;
  align-items: start;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.entry-card:hover,
.entry-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.entry-list .entry-card:last-child {
  margin-bottom: 0;
}

.entry-cover {
  aspect-ratio: 3 / 4;
}

.entry-main {
  min-width: 0;
}

.entry-main .entry-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.entry-main .entry-title a {
  color: var(--ink);
}

.entry-main .entry-title a:hover,
.entry-main .entry-title a:focus-visible {
  color: var(--accent);
}

.entry-tags {
  margin-bottom: 8px;
}

.entry-main .entry-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.status-legend {
  margin-bottom: 48px;
}

.legend-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.legend-item {
  min-width: 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legend-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 6px;
}

.legend-rule {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.series-index {
  margin-bottom: 48px;
}

.series-group {
  margin-bottom: 24px;
}

.series-group:last-child {
  margin-bottom: 0;
}

.series-group-title {
  font-size: 16px;
  margin-bottom: 6px;
  padding-left: 10px;
  border-left: 3px solid var(--teal);
}

.series-group-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 10px;
  padding-left: 13px;
}

.series-entry-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.series-entry-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}

.series-entry-list a {
  font-size: 14px;
  color: var(--ink);
}

.series-entry-list a:hover,
.series-entry-list a:focus-visible {
  color: var(--accent);
}

.series-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.updates-log {
  margin-bottom: 0;
}

.log-table {
  table-layout: auto;
}

.log-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 12px;
}

/* 题材索引 */
.genre-table {
  margin-bottom: 48px;
}

.genre-detail {
  margin-bottom: 48px;
}

.genre-block {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.genre-block:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.genre-block-text {
  min-width: 0;
}

.genre-block-text h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.genre-def {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 14px;
}

.genre-block-text h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin: 16px 0 8px;
}

.genre-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.genre-points li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.genre-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
}

.genre-block-text p:last-child {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 0;
}

.genre-block-media {
  min-width: 0;
}

.genre-block-media img {
  aspect-ratio: 3 / 4;
}

.genre-block-media figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.fig-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.fig-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.genre-block-media figcaption a {
  font-size: 13px;
  color: var(--teal);
  margin-top: 2px;
}

.genre-block-media figcaption a:hover,
.genre-block-media figcaption a:focus-visible {
  color: var(--accent);
}

.genre-samples {
  margin-bottom: 48px;
}

.sample-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.sample-row:last-of-type {
  border-bottom: 1px solid var(--line);
}

.sample-text {
  min-width: 0;
}

.sample-text h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.sample-text p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.sample-link {
  margin: 0;
  padding-top: 24px;
}

.sample-link a {
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.sample-link a:hover,
.sample-link a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tips {
  margin-bottom: 8px;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: tip;
}

.tip-item {
  min-width: 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}

.tip-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.tip-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.tips-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
}

.tips-next a {
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.tips-next a:hover,
.tips-next a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 起步路径 */
.steps-detail {
  margin-bottom: 48px;
}

.steps-detail .step-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.steps-detail .step-item:last-child {
  margin-bottom: 0;
}

.steps-detail .step-item h3 {
  grid-column: 2;
  font-size: 17px;
  margin-bottom: 4px;
}

.steps-detail .step-index {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.4;
}

.steps-detail .step-item p {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 8px;
}

.steps-detail .step-item p a {
  color: var(--teal);
  border-bottom: 1px solid var(--line);
}

.steps-detail .step-item p a:hover,
.steps-detail .step-item p a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.steps-detail .step-example {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  margin-bottom: 0;
}

.verify {
  margin-bottom: 48px;
}

.verify-figure {
  aspect-ratio: 16 / 7;
  margin-bottom: 20px;
}

.verify-figure figcaption {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.verify-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.verify-block {
  min-width: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.verify-block h3 {
  font-size: 16px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.verify-block p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.pitfalls {
  margin-bottom: 48px;
}

.pitfall-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pitfall-item {
  min-width: 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pitfall-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.pitfall-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 8px;
}

.pitfall-exception {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-bottom: 0;
}

.two-col {
  margin-bottom: 8px;
}

.two-col-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.col-branch,
.col-picks {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.col-branch h3,
.col-picks h3 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.branch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branch-item {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}

.branch-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 1px;
}

.picks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.picks-list li a {
  display: block;
  font-size: 14px;
  color: var(--teal);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, color 160ms ease;
}

.picks-list li a:hover,
.picks-list li a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.picks-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 0;
}

/* 系列谱系 */
.series-overview {
  margin-bottom: 48px;
}

.series-block {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.series-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.series-name {
  font-size: 17px;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

.series-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.series-node {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 92px;
  gap: 16px;
  align-items: baseline;
  padding: 8px 0 8px 12px;
  border-bottom: 1px dashed var(--line);
}

.series-node:last-child {
  border-bottom: 0;
}

.series-node-child {
  padding-left: 32px;
}

.series-node-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.series-node-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.series-node-flag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-align: right;
}

.order-table {
  margin-bottom: 48px;
}

.entry-points {
  margin-bottom: 48px;
}

.entry-point {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.entry-point:last-child {
  margin-bottom: 0;
}

.entry-point-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.entry-point-reason {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 8px;
}

.entry-point-missing {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.pager-note {
  margin-bottom: 8px;
}

.series-figure {
  aspect-ratio: 16 / 7;
  margin-bottom: 20px;
}

.series-figure figcaption {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.pager-usage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.pager-usage-col {
  min-width: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pager-usage-col h3 {
  font-size: 16px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.pager-usage-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pager-usage-col li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.pager-usage-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 1px;
}

.pager-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
}

.pager-more a {
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.pager-more a:hover,
.pager-more a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 内容边界 */
.field-table {
  margin-bottom: 48px;
}

.field-figure {
  max-width: 560px;
  margin-bottom: 20px;
}

.field-figure figcaption {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.scope {
  margin-bottom: 48px;
}

.scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.scope-col {
  min-width: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-col h3 {
  font-size: 16px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.scope-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scope-col li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.scope-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 1px;
}

.judgement {
  margin-bottom: 48px;
}

.judgement-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.judgement-list li {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}

.judgement-list h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.judgement-list p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.faq {
  margin-bottom: 8px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.faq details:last-of-type {
  margin-bottom: 0;
}

.faq summary {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 40px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq details p {
  padding: 12px 18px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.related-links-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.related-links-item {
  font-size: 13px;
  color: var(--teal);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-links-item:hover,
.related-links-item:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* 更正说明 */
.field-list {
  margin-bottom: 48px;
}

.field-item {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.field-item:last-child {
  margin-bottom: 0;
}

.field-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.field-wrong {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
}

.field-wrong::before {
  content: "×";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  color: var(--accent);
}

.field-right {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
  padding-left: 14px;
  position: relative;
}

.field-right::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  color: var(--teal);
}

.process {
  margin-bottom: 48px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.process-step {
  min-width: 0;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.process-step .step-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}

.process-step h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.process-step p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.excluded {
  margin-bottom: 48px;
}

.excluded-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.excluded-col {
  min-width: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.excluded-col h3 {
  font-size: 16px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.excluded-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.excluded-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.excluded-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 1px;
}

.evidence {
  margin-bottom: 8px;
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.evidence-item {
  min-width: 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}

.evidence-item h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.evidence-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.evidence-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
}

.evidence-next a {
  font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.evidence-next a:hover,
.evidence-next a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 404 */
.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 64px var(--pad-x) 80px;
}

.error-panel {
  max-width: 620px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 12px;
}

.error-panel h1 {
  margin-bottom: 14px;
}

.error-lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 10px;
}

.error-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 22px;
}

.error-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  background: var(--ink);
  color: #FFFDF8;
  border-radius: var(--radius);
}

.error-home-link:hover,
.error-home-link:focus-visible {
  background: var(--accent);
  color: #FFFDF8;
}

.error-guide {
  max-width: 720px;
}

.error-guide h2 {
  margin-bottom: 14px;
}

.error-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.error-link-list li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-link-list li a:hover,
.error-link-list li a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   6. responsive：1024px 与 640px 断点
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --pad-x: 24px;
  }

  .header-inner {
    gap: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad-x) 16px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(36, 32, 28, 0.08);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .nav-list li:last-child {
    border-bottom: 0;
  }

  .nav-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    font-size: 15px;
    border-bottom: 0;
  }

  .nav-list a.is-current {
    border-bottom: 0;
    color: var(--accent);
  }

  /* 内页：侧栏收为折叠块，置于主内容之后 */
  .page-layout.sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .sidebar-left .inner-main {
    order: 0;
    max-width: none;
    width: 100%;
  }

  .sidebar-left .topic-tree {
    order: 1;
    position: static;
    width: 100%;
    padding: 20px 0 40px;
    margin-top: 8px;
    border-top: 1px solid var(--line);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 40px 0 48px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .feature-media {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }

  .feature-media .feature-figure {
    flex: 0 0 46%;
  }

  .feature-media .side-note {
    flex: 1 1 auto;
  }

  .genre-band {
    grid-template-columns: 140px minmax(0, 1fr) 84px;
    gap: 14px;
  }

  .thread-item {
    grid-template-columns: 168px minmax(0, 1fr) 92px;
    gap: 14px;
  }

  .entry-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .entry-card .meta-table {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }

  .entry-card .meta-pair {
    border-bottom: 0;
    padding-bottom: 0;
    gap: 8px;
  }

  .legend-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .genre-block-media {
    max-width: 320px;
  }

  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --pad-x: 20px;
    --header-h: 56px;
  }

  body {
    font-size: 15px;
  }

  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
  h3 { font-size: 16px; }

  .brand-name {
    font-size: 17px;
  }

  .brand-tagline {
    font-size: 10px;
  }

  .home-main {
    padding-bottom: 56px;
  }

  .hero {
    padding: 28px 0 36px;
  }

  .hero-copy h1 {
    margin-bottom: 14px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-figure {
    aspect-ratio: 4 / 3;
  }

  .hero-side {
    gap: 16px;
  }

  .steps,
  .feature,
  .genres,
  .shelf,
  .threads,
  .updates,
  .boundary {
    padding: 36px 0;
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .feature-media {
    flex-direction: column;
  }

  .feature-media .feature-figure {
    flex: 0 0 auto;
    width: 100%;
  }

  .feature-article p {
    font-size: 15px;
  }

  .genre-band {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 2px;
  }

  .genre-count {
    text-align: left;
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .cover-card > a {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 4px 14px;
    align-items: start;
  }

  .cover-figure {
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }

  .cover-title,
  .cover-tags,
  .cover-status {
    grid-column: 2;
  }

  .thread-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 2px;
  }

  .thread-child {
    padding-left: 16px;
    margin-left: 4px;
  }

  .thread-mark {
    text-align: left;
  }

  .boundary-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  /* 表格转字段行 */
  .update-table thead,
  .data-table thead,
  .log-table thead {
    display: none;
  }

  .update-table,
  .update-table tbody,
  .update-table tr,
  .update-table td,
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td,
  .log-table,
  .log-table tbody,
  .log-table tr,
  .log-table td {
    display: block;
    width: 100%;
  }

  .update-table tr,
  .data-table tr,
  .log-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .update-table tr:last-child,
  .data-table tr:last-child,
  .log-table tr:last-child {
    border-bottom: 0;
  }

  .update-table td,
  .data-table td,
  .data-table th,
  .log-table td {
    padding: 2px 0;
    border-bottom: 0;
    font-size: 14px;
  }

  .update-table td:first-child,
  .log-table td:first-child {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
  }

  .data-table tbody th {
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 2px;
  }

  .data-table td:last-child {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
  }

  /* 内页 */
  .inner-main {
    padding: 20px 0 48px;
  }

  .page-header {
    margin-bottom: 24px;
  }

  .page-lead {
    font-size: 15px;
  }

  .page-pager {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 36px;
  }

  .pager-next {
    text-align: left;
  }

  .entry-list,
  .status-legend,
  .series-index,
  .genre-table,
  .genre-detail,
  .genre-samples,
  .steps-detail,
  .verify,
  .pitfalls,
  .series-overview,
  .order-table,
  .entry-points,
  .field-table,
  .scope,
  .judgement,
  .field-list,
  .process,
  .excluded {
    margin-bottom: 36px;
  }

  .entry-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .entry-card .meta-table {
    gap: 6px 18px;
  }

  .legend-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .series-entry-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .genre-block-media {
    max-width: none;
  }

  .sample-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .sample-link {
    padding-top: 0;
  }

  .steps-detail .step-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 16px;
  }

  .steps-detail .step-index {
    font-size: 17px;
  }

  .verify-columns,
  .pitfall-list,
  .two-col-inner,
  .pager-usage,
  .scope-columns,
  .excluded-cols,
  .evidence-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .series-node {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 8px 0 8px 10px;
  }

  .series-node-child {
    padding-left: 24px;
  }

  .series-node-flag {
    text-align: left;
  }

  .process-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .error-main {
    padding: 36px var(--pad-x) 56px;
  }

  .error-panel {
    padding: 22px;
  }

  .error-link-list {
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 32px;
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .cover-card:hover,
  .cover-card:focus-within,
  .entry-card:hover,
  .entry-card:focus-within,
  .pager-prev:hover,
  .pager-next:hover,
  .pager-prev:focus-visible,
  .pager-next:focus-visible {
    transform: none;
  }
}
