/* =========================================================
   91涩漫 · 全站样式
   base → layout → components → pages → responsive
   ========================================================= */

/* ---------- base ---------- */

:root {
  --paper: #FBFAF6;
  --ink: #16202B;
  --ink-soft: #3C4753;
  --ink-mute: #6E7681;
  --indigo: #23556B;
  --indigo-deep: #1A4356;
  --line: #E2DED4;
  --line-strong: #CFC9BC;
  --tag-green: #3F7D6E;
  --tag-purple: #8A5A8C;
  --tag-amber: #B4763C;
  --tag-blue: #6B7FA3;
  --alert: #C56A8A;
  --radius: 6px;
  --shell: 1120px;
  --reading: 720px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Consolas, "Courier New", monospace;
}

*,
*::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: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.6;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.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;
}

/* 数字、轮次编号、字段名统一等宽 */
.round-no,
.book-index,
.book-round,
.book-volume,
.step-no,
.step-num,
.order-no,
.settings-index,
.info-index,
.meta-item,
.meta-key,
.meta-num,
.genre-letter,
.filter-label,
.field-name,
.round-category,
.round-cat,
.error-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
}

/* ---------- layout ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 10px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--indigo-deep);
}

.brand-tagline {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.3;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.nav-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--indigo);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--indigo);
  font-weight: 700;
  border-bottom-color: var(--indigo);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.action-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--indigo);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.action-link:hover {
  text-decoration: none;
  border-color: var(--indigo);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.menu-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
}

.genre-strip {
  border-top: 1px solid var(--line);
  background: #F4F1EA;
}

.genre-strip-list {
  display: flex;
  gap: 6px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.genre-strip-list li {
  flex: 0 0 auto;
}

.genre-strip-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.genre-strip-list a:hover {
  color: var(--indigo);
  text-decoration: none;
}

.site-main {
  display: block;
}

.home-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0 4px;
  font-size: 13px;
  color: var(--ink-mute);
}

.breadcrumb a {
  color: var(--ink-mute);
}

.breadcrumb a:hover {
  color: var(--indigo);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-soft);
}

.page-header {
  padding: 6px 0 0;
}

.page-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.page-title + .page-title,
.page-header + .page-title {
  margin-top: 0;
}

/* 内页统一标题区 */
.inner-main > .page-title,
.page-shell > .page-title,
.content-main > .page-title,
.page-layout > .page-title {
  display: block;
  padding: 16px 0 0;
}

.page-lead,
.page-task {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
  max-width: var(--reading);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  color: var(--ink-mute);
  font-size: 13px;
}

.meta-sep {
  color: var(--line-strong);
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
  margin-top: 24px;
}

.content-main {
  min-width: 0;
  max-width: var(--reading);
}

.page-shell {
  max-width: var(--reading);
  margin-top: 24px;
}

/* 内页 section 通用节奏 */
.inner-main section,
.page-shell section {
  margin-top: 40px;
}

.inner-main section:first-of-type,
.page-shell section:first-of-type {
  margin-top: 24px;
}

.section-title,
.inner-main h2,
.page-shell h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 22px;
}

.section-desc,
.section-intro {
  margin-top: 8px;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.8;
  max-width: 68ch;
}

/* ---------- components ---------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}

.btn-primary:hover {
  background: var(--indigo-deep);
  border-color: var(--indigo-deep);
}

.btn-ghost {
  background: #fff;
  color: var(--indigo);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--indigo);
}

/* 文本链接 */
.text-link {
  display: inline-block;
  font-size: 14px;
  color: var(--indigo);
}

.text-link::after {
  content: " →";
  font-family: var(--font-mono);
}

/* 筛选条 */
.filter-bar {
  margin-top: 4px;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.filter-chip:hover {
  text-decoration: none;
  border-color: var(--indigo);
  color: var(--indigo);
}

.filter-chip.is-active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

.filter-note {
  margin-top: 10px;
  color: var(--ink-mute);
  font-size: 13px;
}

.filter-group {
  margin-top: 14px;
}

.filter-label {
  display: block;
  color: var(--ink-mute);
  margin-bottom: 2px;
}

/* 书目行（首页 / 连载书目共用骨架） */
.book-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.book-row {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1.5fr) 92px 100px 96px 88px minmax(0, 2fr);
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.book-row:hover {
  border-bottom-color: var(--line-strong);
  transform: translateY(-2px);
}

.book-index {
  color: var(--ink-mute);
}

.book-thumb {
  width: 56px;
  height: 74px;
  border-radius: 4px;
  overflow: hidden;
  background: #EDE9E0;
}

.book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.book-name a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.book-name a:hover {
  color: var(--indigo);
}

.book-genre {
  font-size: 13px;
}

.book-genre span,
.genre-tag span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
}

.genre-xuanyi,
.tag-xuanyi {
  background: var(--tag-green);
}

.genre-dushi,
.tag-dushi {
  background: var(--tag-blue);
}

.genre-qihuan,
.tag-qihuan {
  background: var(--tag-purple);
}

.genre-richang,
.tag-richang {
  background: var(--tag-amber);
}

.tag-kehuan {
  background: var(--tag-purple);
}

.tag-xiaoyuan {
  background: var(--tag-amber);
}

.tag-jingji {
  background: var(--tag-green);
}

.tag-zhiye {
  background: var(--tag-blue);
}

.tag-zhiliao {
  background: var(--tag-green);
}

.book-status,
.book-volume,
.book-round {
  font-size: 13px;
  color: var(--ink-soft);
}

.book-status span,
.status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  white-space: nowrap;
}

.status-serial,
.status-ongoing {
  border-color: #B7CFC8;
  color: var(--tag-green);
  background: #F1F6F4;
}

.status-done,
.status-finished {
  border-color: #C4CAD8;
  color: var(--tag-blue);
  background: #F2F4F8;
}

.status-pause,
.status-paused {
  border-color: #E4C3CE;
  color: var(--alert);
  background: #FBF1F4;
}

.book-note {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.catalog-more,
.rounds-more,
.method-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
}

/* 分组跳转 */
.group-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  padding: 12px 14px;
  background: #F4F1EA;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.group-jump-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-mute);
}

.group-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.group-jump-list a {
  font-size: 14px;
}

/* 折叠问答 */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  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: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--indigo);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
  max-width: 66ch;
}

.faq-answer p + p {
  margin-top: 8px;
}

/* 相关页面带 */
.related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 12px;
}

.related-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
  flex: 1 1 200px;
}

.related-item a {
  font-size: 15px;
}

.related-desc {
  font-size: 13px;
  color: var(--ink-mute);
}

.related-band {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-title,
.related-heading {
  font-size: 18px;
  font-weight: 700;
}

/* 侧栏 */
.page-toc,
.change-index,
.content-aside {
  position: sticky;
  top: 96px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-title,
.toc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.toc-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  font-size: 14px;
  color: var(--ink-soft);
}

.toc-list a:hover {
  color: var(--indigo);
}

.toc-extra {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.toc-extra-text {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.toc-extra-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
}

/* 编号步骤（首页 method 与内页共用骨架，作用域分开） */
.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.method-step {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.method-step .step-no {
  display: inline-block;
  color: var(--indigo);
  font-weight: 700;
}

.method-step h3 {
  margin-top: 6px;
  font-size: 16px;
}

.method-step p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 页脚 */
.site-footer {
  background: var(--ink);
  color: #D8DCE2;
  margin-top: 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #F4F1EA;
}

.footer-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: #A8B0BA;
  max-width: 40ch;
}

.footer-heading {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 400;
  color: #8792A0;
  margin-bottom: 10px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  font-size: 14px;
  color: #D8DCE2;
}

.footer-list a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid #2C3947;
  font-size: 12px;
  color: #8792A0;
}

/* ---------- pages ---------- */

/* 首页 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 40px;
  align-items: center;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--indigo);
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.hero-lead {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags li {
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
}

.hero-cover-wall {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 320px;
}

.cover-cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #EDE9E0;
  border: 1px solid var(--line);
}

.cover-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-cell-main {
  grid-row: span 2;
}

.cover-cell figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  font-size: 12px;
  color: #fff;
  background: rgba(22, 32, 43, 0.72);
}

.catalog {
  margin-top: 40px;
}

.rounds {
  margin-top: 48px;
}

.round-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.round-item {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: var(--radius);
}

.round-item .round-no {
  color: var(--indigo);
  font-weight: 700;
}

.round-item .round-cat {
  display: inline-block;
  margin-left: 8px;
  color: var(--ink-mute);
}

.round-item .round-summary {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.round-item .round-scope {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

.start-order {
  margin-top: 48px;
}

.order-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.order-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.order-item .order-no {
  color: var(--indigo);
  font-weight: 700;
  padding-top: 2px;
}

.order-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.paths {
  margin-top: 48px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.path-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-card h3 {
  font-size: 16px;
}

.path-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  flex: 1 1 auto;
}

.method {
  margin-top: 48px;
}

.feedback-band {
  margin-top: 48px;
  padding: 24px;
  background: #F4F1EA;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-band h2 {
  font-size: 20px;
}

.feedback-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 68ch;
}

.feedback-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 14px;
}

/* 连载书目 */
.page-series .filter-bar {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-series .filter-list {
  margin-top: 6px;
}

.list-intro {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.8;
}

.list-group {
  margin-top: 28px;
}

.group-title {
  font-size: 17px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.page-series .book-list {
  margin-top: 0;
  border-top: 0;
}

.page-series .book-row {
  grid-template-columns: 34px 56px minmax(0, 1.4fr) 84px 96px 84px 78px minmax(0, 2fr);
}

.page-series .book-genre,
.page-series .book-status,
.page-series .book-volume,
.page-series .book-round {
  min-width: 0;
}

.page-series .book-round .round-no {
  color: var(--indigo);
}

.list-note {
  margin-top: 36px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.note-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 12px;
}

/* 题材索引 */
.page-genres .page-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.page-genres .content-main {
  max-width: none;
}

.letter-index {
  margin-top: 24px;
}

.letter-index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.letter-index-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.letter-index-list a:hover {
  text-decoration: none;
  color: var(--indigo);
  border-color: var(--indigo);
}

.genre-list {
  margin-top: 32px;
}

.genre-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.genre-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.genre-name {
  font-size: 18px;
}

.genre-letter {
  color: var(--ink-mute);
}

.genre-scope {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 68ch;
}

.genre-rep {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
}

.genre-figure {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.genre-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.genre-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.genre-compare {
  margin-top: 40px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.compare-item {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare-title {
  font-size: 15px;
  font-weight: 700;
}

.compare-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.genre-dispute {
  margin-top: 40px;
}

.dispute-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.dispute-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.dispute-action {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-mute);
}

.content-aside .aside-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

.aside-toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.aside-toc-list a {
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

/* 整理记录 */
.page-updates .page-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.timeline-figure {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.timeline-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.timeline-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.timeline-list {
  position: relative;
  margin-top: 24px;
  padding-left: 20px;
  border-left: 2px solid var(--line);
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 8px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--indigo);
  border: 2px solid var(--paper);
}

.round-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.round-card .round-no {
  color: var(--indigo);
  font-weight: 700;
}

.round-title {
  margin-top: 4px;
  font-size: 16px;
}

.round-category {
  margin-top: 6px;
  color: var(--ink-mute);
}

.round-summary {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.round-scope {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

.round-links {
  margin-top: 10px;
  font-size: 14px;
}

.change-index-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.change-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.change-scope {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

/* 阅读指引 */
.page-reading-guide .page-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.field-table {
  margin-top: 32px;
}

.guide-figure {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.field-table-grid {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.field-table-grid th,
.field-table-grid td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.75;
}

.field-table-grid thead th {
  background: #F4F1EA;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--ink-mute);
}

.field-table-grid tbody tr:last-child th,
.field-table-grid tbody tr:last-child td {
  border-bottom: 0;
}

.field-name {
  width: 120px;
  color: var(--indigo);
  font-weight: 700;
  white-space: nowrap;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.path-title {
  font-size: 16px;
}

.path-desc {
  flex: 1 1 auto;
}

.path-link {
  font-size: 14px;
}

.settings-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.settings-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.settings-index {
  color: var(--indigo);
  font-weight: 700;
}

.settings-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.page-toc .toc-title {
  font-size: 15px;
}

/* 整理组 */
.page-editorial .page-shell {
  max-width: none;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.role-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.role-name {
  font-size: 16px;
}

.role-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.role-output {
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 13px;
}

.role-output dt {
  font-family: var(--font-mono);
  color: var(--ink-mute);
}

.role-output dd {
  margin: 0;
  color: var(--ink-soft);
}

.work-figure {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.work-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.work-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.page-editorial .method-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-editorial .method-step .step-num {
  display: inline-block;
  color: var(--indigo);
  font-weight: 700;
}

.step-name {
  margin-top: 6px;
  font-size: 15px;
}

.step-action {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.sample-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.sample-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sample-title {
  font-size: 16px;
}

.sample-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.sample-side {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.sample-before {
  background: #FAF7F1;
}

.sample-after {
  background: #F1F6F4;
  border-color: #B7CFC8;
}

.sample-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.sample-fields {
  margin: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 2px 8px;
}

.sample-fields dt {
  font-family: var(--font-mono);
  color: var(--ink-mute);
}

.sample-fields dd {
  margin: 0;
}

.sample-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.boundary-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.boundary-item {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tag-amber);
  border-radius: var(--radius);
}

.boundary-name {
  font-size: 15px;
}

.boundary-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* 纠错与版权 */
.page-feedback .page-figure {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.page-feedback .page-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.page-feedback .page-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.trigger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.trigger-col {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trigger-col h3 {
  font-size: 16px;
}

.trigger-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trigger-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.trigger-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tag-amber);
}

.info-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.info-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.info-index {
  color: var(--indigo);
  font-weight: 700;
}

.info-body h3 {
  font-size: 15px;
}

.info-body p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.process-step {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.process-step .step-num {
  display: inline-block;
  color: var(--indigo);
  font-weight: 700;
}

.process-step h3 {
  margin-top: 6px;
  font-size: 15px;
}

.process-step p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.copyright-note {
  margin-top: 40px;
}

.copyright-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.copyright-item {
  padding: 14px 16px;
  background: #FBF1F4;
  border: 1px solid #E4C3CE;
  border-radius: var(--radius);
}

.copyright-item h3 {
  font-size: 15px;
  color: var(--ink);
}

.copyright-item p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.page-feedback .related {
  margin-top: 40px;
}

/* 404 */
.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.error-panel {
  max-width: 640px;
  padding: 56px 0 32px;
}

.error-code {
  color: var(--indigo);
  font-size: 14px;
}

.error-title {
  margin-top: 10px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
}

.error-desc {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.error-guide {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 640px;
}

.error-guide-title {
  font-size: 18px;
}

.error-guide-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 12px;
}

.error-guide-list a {
  font-size: 15px;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 10px 20px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .header-actions {
    order: 2;
  }

  .menu-toggle {
    display: flex;
    order: 3;
  }

  .site-nav {
    order: 4;
    flex-basis: 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .nav-link {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 0;
  }

  .nav-link.is-current {
    border-bottom: 0;
    padding-left: 10px;
    border-left: 3px solid var(--indigo);
  }

  .genre-strip-list {
    padding: 0 20px;
  }

  .home-main,
  .inner-main,
  .error-main {
    padding: 0 20px 48px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 32px 0 28px;
  }

  .hero-cover-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-height: 260px;
  }

  .cover-cell-main {
    grid-row: auto;
  }

  .round-list,
  .path-grid,
  .paths-grid,
  .roles-grid,
  .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-steps,
  .page-editorial .method-steps,
  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-layout,
  .page-genres .page-layout,
  .page-updates .page-layout,
  .page-reading-guide .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .content-main,
  .page-shell {
    max-width: none;
  }

  .page-toc,
  .change-index,
  .content-aside {
    position: static;
  }

  .book-row,
  .page-series .book-row {
    grid-template-columns: 28px 52px minmax(0, 1fr) 84px;
    grid-template-areas:
      "idx thumb title title"
      "idx thumb genre status"
      "idx thumb volume round"
      "note note note note";
    gap: 6px 12px;
    align-items: start;
    padding: 14px 2px;
  }

  .book-index {
    grid-area: idx;
  }

  .book-thumb {
    grid-area: thumb;
    width: 52px;
    height: 68px;
  }

  .book-title,
  .book-name {
    grid-area: title;
  }

  .book-genre {
    grid-area: genre;
  }

  .book-status {
    grid-area: status;
  }

  .book-volume {
    grid-area: volume;
  }

  .book-round {
    grid-area: round;
  }

  .book-note {
    grid-area: note;
    padding-top: 4px;
  }
}

@media (max-width: 640px) {
  body.site-body {
    font-size: 15px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    font-size: 11px;
  }

  .header-actions {
    display: none;
  }

  .header-inner {
    padding: 8px 16px;
  }

  .genre-strip-list {
    padding: 0 16px;
    gap: 2px;
  }

  .home-main,
  .inner-main,
  .error-main {
    padding: 0 16px 40px;
  }

  .hero {
    padding: 24px 0 24px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
  }

  .hero-cover-wall {
    min-height: 220px;
    gap: 8px;
  }

  .cover-cell figcaption {
    font-size: 11px;
    padding: 4px 8px;
  }

  .round-list,
  .path-grid,
  .paths-grid,
  .roles-grid,
  .compare-grid,
  .trigger-grid,
  .method-steps,
  .page-editorial .method-steps,
  .process-steps,
  .sample-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .feedback-band {
    padding: 18px;
  }

  .filter-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .book-row,
  .page-series .book-row {
    grid-template-columns: 24px 48px minmax(0, 1fr);
    grid-template-areas:
      "idx thumb title"
      "idx thumb genre"
      "idx thumb status"
      "idx thumb volume"
      "idx thumb round"
      "note note note";
    gap: 4px 10px;
  }

  .book-thumb {
    width: 48px;
    height: 64px;
  }

  .book-title,
  .book-name a {
    font-size: 15px;
  }

  .book-status,
  .book-volume,
  .book-round {
    font-size: 12px;
  }

  .group-jump {
    padding: 10px 12px;
  }

  .group-jump-list {
    gap: 6px 14px;
  }

  .timeline-list {
    padding-left: 14px;
  }

  .timeline-item {
    padding-left: 4px;
  }

  .timeline-item::before {
    left: -21px;
    width: 8px;
    height: 8px;
  }

  .field-table-grid thead th,
  .field-table-grid th,
  .field-table-grid td {
    padding: 10px;
  }

  .field-name {
    width: 76px;
    white-space: normal;
  }

  .settings-item,
  .info-item {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
  }

  .role-output {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .sample-fields {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 20px;
  }

  .footer-bottom {
    padding: 14px 16px 24px;
  }

  .related-list {
    flex-direction: column;
    gap: 12px;
  }

  .related-item {
    min-width: 0;
    flex-basis: auto;
  }

  .error-panel {
    padding: 40px 0 24px;
  }

  .error-actions .btn {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .book-row {
    transition: none;
  }

  .book-row:hover {
    transform: none;
  }
}
