/* ==========================================================================
   52吃瓜网 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* ==========================================================================
   1. base —— 变量、重置、排版基准
   ========================================================================== */

:root {
  --paper: #FAF8F4;
  --cover: #FFFFFF;
  --ink: #1C1A17;
  --ink-soft: #3A362F;
  --muted: #6B6459;
  --line: #E2DCD2;
  --line-strong: #CFC7B9;
  --spine-red: #C0362C;
  --spine-teal: #2F6E6A;
  --spine-yellow: #D89B2A;
  --radius: 4px;
  --radius-lg: 8px;
  --shell: 1120px;
  --content: 720px;
  --aside: 320px;
  --gap-col: 80px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-num: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--spine-red);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--spine-red);
  outline-offset: 2px;
}

/* ==========================================================================
   2. layout —— 全站骨架：容器、页头、导航、主体、页脚
   ========================================================================== */

.site-body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
}

/* --- 页头 --- */

.site-header {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-spine {
  display: block;
  width: 8px;
  height: 26px;
  border-radius: 2px;
  background: var(--spine-red);
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

/* --- 主导航 --- */

.site-nav {
  flex: 1 1 auto;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
}

.nav-list a:hover {
  background: rgba(192, 54, 44, 0.07);
  color: var(--spine-red);
}

.nav-list a.is-current {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--spine-red);
}

/* --- 汉堡按钮（桌面隐藏） --- */

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--cover);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 1px;
}

/* --- 移动端抽屉 --- */

.mobile-drawer {
  border-top: 1px solid var(--line);
  background: var(--cover);
}

.mobile-drawer[hidden] {
  display: none;
}

.drawer-brand {
  margin: 0;
  padding: 14px 24px 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.drawer-list {
  padding: 0 12px 12px;
}

.drawer-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 16px;
}

.drawer-list a:hover {
  background: rgba(192, 54, 44, 0.07);
  color: var(--spine-red);
}

.drawer-list a.is-current {
  color: var(--ink);
  font-weight: 700;
  background: rgba(216, 155, 42, 0.12);
}

/* --- 主体容器 --- */

.site-main {
  display: block;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.inner-main {
  min-width: 0;
}

/* --- 面包屑 --- */

.breadcrumb {
  margin: 20px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-list li + li::before {
  content: "›";
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--spine-red);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.breadcrumb-sep {
  color: var(--line-strong);
  padding: 0 2px;
}

/* --- 页面标题区 --- */

.page-header {
  margin: 0 0 18px;
}

.page-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.page-lead {
  margin: 12px 0 0;
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.page-question {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.page-head {
  margin: 0 0 22px;
}

.page-title-bar {
  border-left: 4px solid var(--spine-yellow);
  padding-left: 16px;
  margin: 0 0 22px;
}

.page-title-inner .page-lead {
  margin-top: 0;
}

/* --- 页脚 --- */

.site-footer {
  margin-top: 56px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.footer-intro {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-col {
  min-width: 0;
}

.footer-col-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  display: inline-block;
  padding: 3px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-col a:hover {
  color: var(--spine-red);
}

.footer-bottom {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px 24px 32px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer-copy {
  color: var(--line-strong);
}

/* ==========================================================================
   3. components —— 通用组件
   ========================================================================== */

/* --- 按钮 --- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--cover);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.btn:hover {
  border-color: var(--spine-red);
  color: var(--spine-red);
}

.btn-primary {
  border-color: var(--spine-red);
  background: var(--spine-red);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #A62C23;
  border-color: #A62C23;
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
}

/* --- 标签 --- */

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.tag-genre {
  padding: 2px 10px;
  background: rgba(47, 110, 106, 0.12);
  color: var(--spine-teal);
}

.tag-update {
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* --- 书脊色条 --- */

.spine-bar {
  display: block;
  width: 6px;
  align-self: stretch;
  min-height: 34px;
  border-radius: 2px;
  background: var(--spine-red);
}

.spine-chip {
  display: inline-block;
  width: 6px;
  height: 18px;
  margin-right: 8px;
  border-radius: 2px;
  vertical-align: -3px;
}

.spine-red .spine-bar,
.spine-chip.spine-red {
  background: var(--spine-red);
}

.spine-teal .spine-bar,
.spine-chip.spine-teal {
  background: var(--spine-teal);
}

.spine-yellow .spine-bar,
.spine-chip.spine-yellow {
  background: var(--spine-yellow);
}

/* --- 区块标题 --- */

.section-head {
  margin: 0 0 18px;
}

.section-head h2 {
  font-size: 22px;
  font-weight: 700;
}

.section-note {
  margin: 8px 0 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--spine-yellow);
}

.section-text,
.section-intro {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.section-block {
  margin: 0 0 40px;
}

.content-section {
  margin: 0 0 40px;
}

/* --- 编号规则列表 --- */

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.rule-num {
  flex: 0 0 auto;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(192, 54, 44, 0.1);
  color: var(--spine-red);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}

.rule-text,
.rule-item strong {
  display: block;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

/* --- 图例 --- */

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.legend-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.legend-subtitle {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.legend-text,
.legend-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.spine-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- 步骤列表 --- */

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.step-index {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--spine-red);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.step-name,
.step-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.step-desc {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.step-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--spine-red);
  font-size: 14px;
  font-weight: 600;
}

.step-link:hover {
  text-decoration: underline;
}

/* --- 文字链接 --- */

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--spine-red);
  font-size: 14px;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

/* --- 页内目录 / 侧栏 --- */

.toc-nav,
.toc,
.aside-toc {
  margin: 0 0 24px;
}

.aside-title,
.toc-title,
.aside-links-title,
.sidebar-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--line);
}

.toc-list li {
  min-width: 0;
}

.toc-link {
  display: block;
  min-height: 36px;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  margin-left: -2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.toc-link:hover {
  color: var(--ink);
}

.toc-link.is-active {
  border-left-color: var(--spine-red);
  color: var(--spine-red);
  font-weight: 600;
}

.related-nav,
.aside-links,
.sidebar-links {
  margin: 0;
}

.related-list,
.aside-link-list,
.sidebar-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-list a,
.aside-links a,
.sidebar-links a {
  display: inline-block;
  min-height: 36px;
  padding: 6px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px dashed var(--line);
}

.related-list a:hover,
.aside-links a:hover,
.sidebar-links a:hover {
  color: var(--spine-red);
  border-bottom-color: var(--spine-red);
}

/* --- 相关链接条 --- */

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 32px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.related-links-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.related-links-item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--spine-red);
  font-size: 14px;
  font-weight: 600;
}

.related-links-item:hover {
  text-decoration: underline;
}

/* ==========================================================================
   4. pages —— 首页与各内页专属模块
   ========================================================================== */

/* --------------------------------------------------------------------------
   4.1 首页
   -------------------------------------------------------------------------- */

.home-main {
  padding-bottom: 8px;
}

/* --- 首屏 --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 480px);
  gap: 48px;
  align-items: center;
  padding: 40px 0 44px;
  border-bottom: 1px solid var(--line);
}

.hero-text {
  min-width: 0;
}

.hero-text h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px;
}

.hero-lead {
  margin: 0 0 22px;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions li {
  display: block;
}

.hero-visual {
  min-width: 0;
}

.hero-visual img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.hero-visual figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* --- 封面陈列墙 --- */

.cover-wall {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  min-width: 0;
}

.cover-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
  box-shadow: 0 1px 0 rgba(28, 26, 23, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cover-card > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(28, 26, 23, 0.1);
  color: var(--ink);
}

.cover-figure {
  margin: 0 0 10px;
}

.cover-figure img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}

.cover-card .tag-genre {
  align-self: flex-start;
  margin-bottom: 6px;
}

.cover-card .tag-update {
  align-self: flex-start;
  margin-bottom: 10px;
}

.cover-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* --- 题材书架全览 --- */

.genre-overview {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.spine-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spine-row {
  min-width: 0;
}

.spine-row > a {
  display: grid;
  grid-template-columns: 6px minmax(120px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.spine-row > a:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.spine-row .spine-bar {
  width: 6px;
  height: 34px;
  min-height: 34px;
}

.spine-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.spine-desc {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* --- 最近更新带 --- */

.update-strip {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-row {
  display: grid;
  grid-template-columns: 64px minmax(120px, 160px) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.update-thumb {
  margin: 0;
}

.update-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}

.update-genre {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.update-row .tag-update {
  justify-self: start;
}

.update-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  color: var(--spine-red);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.update-link:hover {
  text-decoration: underline;
}

/* --- 主题合集速览 --- */

.collection-preview {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.collection-card {
  min-width: 0;
}

.collection-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.collection-card > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(28, 26, 23, 0.1);
  color: var(--ink);
}

.collection-figure {
  margin: 0 0 12px;
}

.collection-figure img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}

.collection-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.collection-scene {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* --- 三步开始阅读 --- */

.start-steps {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

/* --- 分镜读法入口 --- */

.guide-entry {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.guide-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--spine-teal);
  border-radius: var(--radius);
  background: var(--cover);
}

.guide-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.guide-title a {
  color: var(--ink);
}

.guide-title a:hover {
  color: var(--spine-red);
}

.guide-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

/* --- 常见问题入口 --- */

.faq-entry {
  padding: 44px 0 8px;
}

.faq-entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-entry-item {
  min-width: 0;
}

.faq-entry-item a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.faq-entry-item a:hover {
  border-color: var(--spine-red);
  color: var(--spine-red);
}

/* --------------------------------------------------------------------------
   4.2 内页通用两栏布局
   -------------------------------------------------------------------------- */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--content)) minmax(0, var(--aside));
  gap: var(--gap-col);
  align-items: start;
  padding-bottom: 8px;
}

.layout-shell {
  grid-template-columns: minmax(0, var(--content)) minmax(0, var(--aside));
}

.page-content {
  min-width: 0;
}

.content-column {
  min-width: 0;
}

.content-aside,
.page-aside,
.sidebar {
  min-width: 0;
}

.aside-inner {
  position: sticky;
  top: 24px;
}

.content-aside .aside-inner {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.page-aside,
.sidebar {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

/* --------------------------------------------------------------------------
   4.3 题材书架页
   -------------------------------------------------------------------------- */

.page-genres .section-block:last-child {
  margin-bottom: 8px;
}

.spine-legend .spine-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.spine-legend .spine-row .spine-bar {
  width: 6px;
  height: 22px;
  min-height: 22px;
}

.spine-legend .spine-name {
  font-size: 14px;
  font-weight: 600;
}

.genre-shelf {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.shelf-cover {
  margin: 0;
}

.shelf-cover img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}

.shelf-body {
  min-width: 0;
}

.shelf-name {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.shelf-flavor {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.shelf-rhythm {
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.path-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-item {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.path-name {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.path-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   4.4 主题合集页
   -------------------------------------------------------------------------- */

.page-collections .content-section:last-child {
  margin-bottom: 8px;
}

.collection-block {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.collection-cover {
  margin: 0;
}

.collection-cover img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}

.collection-body {
  min-width: 0;
}

.collection-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.collection-body p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.collection-body .collection-scene {
  color: var(--spine-teal);
  font-size: 14px;
  font-weight: 600;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--cover);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.link-list a:hover {
  border-color: var(--spine-red);
  color: var(--spine-red);
}

/* --------------------------------------------------------------------------
   4.5 翻页节奏页
   -------------------------------------------------------------------------- */

.guide-article {
  min-width: 0;
}

.guide-section {
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.guide-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
}

.guide-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 24px;
  align-items: start;
  margin-top: 14px;
}

.guide-split .step-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.guide-figure {
  margin: 0;
}

.guide-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.guide-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.tip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.tip-item {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.tip-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.tip-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.resume-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--spine-yellow);
  border-radius: var(--radius);
  background: var(--cover);
}

.resume-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.resume-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.resume-note {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(216, 155, 42, 0.08);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   4.6 常见问题页
   -------------------------------------------------------------------------- */

.page-hero {
  margin: 24px 0 20px;
}

.page-faq .page-hero .page-lead {
  margin-top: 0;
}

.content-figure {
  margin: 0 0 28px;
}

.content-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.content-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
}

.faq-item summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "＋";
  flex: 0 0 auto;
  width: 20px;
  margin-right: 8px;
  color: var(--spine-red);
  font-size: 15px;
  line-height: 1;
}

.faq-item[open] summary::before {
  content: "－";
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-answer {
  padding: 14px 16px 16px;
}

.faq-answer p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4.7 404 页
   -------------------------------------------------------------------------- */

.error-main {
  padding-top: 48px;
  padding-bottom: 24px;
}

.error-block {
  max-width: 640px;
  margin: 0 0 40px;
}

.error-code {
  margin: 0 0 8px;
  color: var(--spine-red);
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.error-block h1 {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
}

.error-lead {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--cover);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.error-btn:hover {
  border-color: var(--spine-red);
  color: var(--spine-red);
}

.error-btn-primary {
  border-color: var(--spine-red);
  background: var(--spine-red);
  color: #FFFFFF;
}

.error-btn-primary:hover {
  background: #A62C23;
  border-color: #A62C23;
  color: #FFFFFF;
}

.error-hints {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.error-hints h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
}

.error-hint-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-hint-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cover);
  color: var(--ink-soft);
  font-size: 15px;
}

.error-hint-list a:hover {
  border-color: var(--spine-red);
  color: var(--spine-red);
}

/* ==========================================================================
   5. responsive —— 单一断点 768px
   ========================================================================== */

@media (max-width: 768px) {

  body {
    font-size: 15px;
  }

  .header-inner {
    padding: 12px 16px;
    gap: 12px;
  }

  .brand-name {
    font-size: 18px;
  }

  .site-nav {
    flex: 0 0 auto;
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: none;
  }

  .nav-list.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 8px;
  }

  .nav-list.is-open a {
    justify-content: flex-start;
    min-height: 48px;
    padding: 10px 12px;
  }

  .site-main {
    padding: 0 16px;
  }

  .breadcrumb {
    margin: 16px 0 10px;
  }

  .page-title,
  .hero-text h1,
  .error-block h1 {
    font-size: 26px;
  }

  .section-title,
  .section-head h2,
  .error-hints h2 {
    font-size: 20px;
  }

  .page-lead,
  .hero-lead,
  .section-text,
  .section-intro {
    font-size: 15px;
  }

  /* --- 首页 --- */

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 0 32px;
  }

  .hero-visual {
    order: 2;
  }

  .hero-visual img {
    height: 220px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions li,
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .cover-wall,
  .genre-overview,
  .update-strip,
  .collection-preview,
  .start-steps,
  .guide-entry,
  .faq-entry {
    padding: 32px 0;
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .cover-figure img {
    height: 200px;
  }

  .spine-row > a {
    grid-template-columns: 6px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
  }

  .spine-row .spine-bar {
    grid-row: span 2;
    height: 100%;
    min-height: 40px;
  }

  .update-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .update-thumb img {
    width: 56px;
    height: 56px;
  }

  .update-row .tag-update {
    grid-column: 2;
  }

  .update-link {
    grid-column: 2;
    justify-content: flex-start;
    min-height: 44px;
    text-align: left;
  }

  .collection-grid,
  .step-list,
  .guide-list,
  .resume-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-figure img {
    height: 170px;
  }

  /* --- 内页两栏：单列，正文在前、侧栏在后 --- */

  .page-layout,
  .layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .content-aside,
  .page-aside,
  .sidebar {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }

  .content-aside .aside-inner {
    position: static;
    border-left: 0;
    padding-left: 0;
  }

  .aside-inner {
    position: static;
  }

  /* --- 题材书架页 --- */

  .legend-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .genre-shelf {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .shelf-cover img {
    height: 200px;
  }

  /* --- 主题合集页 --- */

  .collection-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .collection-cover img {
    height: 200px;
  }

  /* --- 翻页节奏页 --- */

  .guide-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .guide-figure img {
    height: 200px;
  }

  /* --- 常见问题页 --- */

  .page-hero {
    margin: 18px 0 14px;
  }

  .content-figure img {
    height: 190px;
  }

  /* --- 404 --- */

  .error-main {
    padding-top: 32px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-btn {
    justify-content: center;
  }

  /* --- 页脚 --- */

  .site-footer {
    margin-top: 40px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 16px 20px;
  }

  .footer-bottom {
    padding: 14px 16px 28px;
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}
