/* ==========================================================================
   51漫画网 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --paper: #F6F2E9;
  --paper-deep: #EFE9DC;
  --ink: #1B1A18;
  --ink-60: rgba(27, 26, 24, 0.62);
  --ink-40: rgba(27, 26, 24, 0.42);
  --line: rgba(27, 26, 24, 0.16);
  --line-strong: rgba(27, 26, 24, 0.34);
  --orange: #CC4A26;
  --green: #2B6455;
  --indigo: #33517D;
  --yellow: #EFC544;
  --radius-sm: 4px;
  --radius-md: 6px;
  --container: 1120px;
  --prose: 720px;
  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  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.35;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--orange);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-sub {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-60);
  letter-spacing: 0.5px;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.nav-list a.is-current {
  color: var(--orange);
  border-bottom-color: var(--orange);
  font-weight: 700;
}

.nav-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink-60);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-text-link:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.nav-text-link.is-current {
  color: var(--orange);
  border-color: var(--orange);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.mobile-menu-list {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px 16px;
}

.mobile-menu-list li {
  border-bottom: 1px solid var(--line);
}

.mobile-menu-list li:last-child {
  border-bottom: 0;
}

.mobile-menu-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 15px;
  color: var(--ink);
}

.mobile-menu-list a:hover {
  color: var(--orange);
}

.site-main {
  display: block;
}

.home-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* 统一内页面包屑与标题区 */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--ink-60);
}

.breadcrumb a {
  color: var(--ink-60);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb-sep {
  color: var(--ink-40);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 700;
}

.page-header {
  padding: 14px 0 0;
}

.page-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: start;
  padding: 16px 0 28px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 36px;
}

.page-head-main {
  min-width: 0;
}

.section-no,
.section-index,
.col-index {
  display: inline-block;
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--orange);
  font-weight: 700;
}

.page-lead {
  margin: 0;
  max-width: var(--prose);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.head-meta {
  min-width: 0;
  padding: 12px 16px;
  background: var(--paper-deep);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-60);
}

.head-meta-title,
.meta-label,
.head-meta-label {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--orange);
  font-weight: 700;
}

.head-meta p {
  margin: 0 0 8px;
}

.head-meta p:last-child {
  margin-bottom: 0;
}

/* 通用 section 标题 */

.section-title {
  position: relative;
  padding-left: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--orange);
  border-radius: 2px;
}

.section-desc,
.section-intro,
.section-lead {
  margin: 8px 0 20px;
  max-width: var(--prose);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-60);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "→";
  font-family: var(--font-mono);
}

.link-arrow:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.btn-primary:hover {
  background: #b23e1e;
  border-color: #b23e1e;
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
}

/* 相关入口条 */

.related-bar {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.related-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-bar > a,
.related-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  min-height: 44px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.related-bar > a:hover,
.related-list a:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  color: var(--ink);
}

.related-why,
.related-note {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-60);
}

.related-name {
  font-size: 15px;
  font-weight: 700;
}

/* 页脚 */

.site-footer {
  background: var(--ink);
  color: rgba(246, 242, 233, 0.82);
  font-size: 14px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.footer-intro {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(246, 242, 233, 0.66);
}

.footer-col {
  min-width: 0;
}

.footer-about {
  grid-column: auto;
}

.footer-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--yellow);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col li {
  line-height: 1.7;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: rgba(246, 242, 233, 0.82);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--yellow);
}

.footer-about li {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(246, 242, 233, 0.66);
  padding-bottom: 4px;
}

.footer-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 18px 24px 36px;
  border-top: 1px solid rgba(246, 242, 233, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-slogan {
  margin: 0;
  font-size: 13px;
  color: rgba(246, 242, 233, 0.82);
}

.footer-copy {
  margin: 0;
  font-size: 12px;
  color: rgba(246, 242, 233, 0.5);
}

/* --------------------------------------------------------------------------
   components · 封面卡（首页 / 连载 / 短篇共用基础）
   -------------------------------------------------------------------------- */

.cover-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.cover-card:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
}

.cover-card > a,
.cover-card-link {
  display: block;
  padding: 10px 12px 14px;
  color: var(--ink);
}

.cover-card > a:hover,
.cover-card-link:hover {
  color: var(--ink);
}

.cover-figure {
  position: relative;
  margin: 0 0 10px;
  aspect-ratio: 3 / 4;
  background: var(--paper-deep);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cover-genre,
.card-genre {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.cover-status,
.card-status {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  padding: 2px 8px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.cover-title,
.card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.cover-line,
.card-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-60);
}

.cover-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
}

/* 状态词颜色 */

.status-new {
  color: var(--orange);
}

.status-fill {
  color: var(--green);
}

.status-done {
  color: var(--indigo);
}

.status-reorder {
  color: var(--ink-60);
}

.cover-status.status-new {
  color: var(--ink);
  background: var(--yellow);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 40px;
  align-items: end;
  padding: 48px 0 44px;
  border-bottom: 1px solid var(--line-strong);
}

.hero-copy {
  min-width: 0;
  padding-bottom: 6px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 3px 10px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
}

.hero-copy h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-lead {
  max-width: 34em;
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-60);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  position: relative;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-deep);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 1.6;
}

.hero-meta .meta-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
  white-space: nowrap;
}

.meta-text {
  color: var(--ink-60);
}

/* 场景选择条 */

.scene-picker {
  padding: 40px 0 8px;
}

.scene-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scene-btn {
  flex: 1 1 180px;
  min-height: 48px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.scene-btn:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  color: var(--orange);
}

.scene-btn.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.scene-clear {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 18px;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-60);
}

.scene-clear:hover {
  color: var(--orange);
  border-color: var(--orange);
}

/* 读法对照表 */

.compare {
  padding: 40px 0 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.65;
}

.compare-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 0;
}

.compare-table tbody th {
  width: 22%;
  background: var(--paper-deep);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table tbody tr:hover td {
  background: #fbf8f1;
}

.compare-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.7;
}

/* 连载书架精选 */

.shelf {
  padding: 40px 0 8px;
}

.shelf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.shelf-grid .cover-card > a {
  position: relative;
  padding: 0;
}

.shelf-grid .cover-card > a img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.shelf-grid .cover-card .card-title {
  padding: 10px 12px 0;
}

.shelf-grid .cover-card .card-line {
  padding: 4px 12px 14px;
}

.shelf-note {
  padding: 18px 18px 20px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.aside-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.shelf-note p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-60);
}

/* 本周新入流水 */

.entry-flow {
  padding: 40px 0 8px;
}

.flow-list {
  border-top: 1px solid var(--line-strong);
}

.flow-item {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: baseline;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.flow-num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--ink-40);
}

.flow-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

.flow-name {
  font-weight: 700;
  color: var(--ink);
}

.flow-tip {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.6;
}

/* 题材图谱带 */

.genres {
  padding: 40px 0 8px;
}

.genre-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.genre-chip {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.genre-chip:nth-child(2n) {
  border-left-color: var(--indigo);
}

.genre-chip:nth-child(3n) {
  border-left-color: var(--orange);
}

.genre-chip:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
}

.genre-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.genre-line {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-60);
}

/* 短篇与连载读法对照 */

.read-mode {
  padding: 40px 0 8px;
}

.mode-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.col-short,
.col-serial {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  min-width: 0;
}

.col-short {
  border-top: 3px solid var(--green);
}

.col-serial {
  border-top: 3px solid var(--indigo);
}

.col-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.mode-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
}

.mode-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.mode-entry {
  margin-top: 20px;
}

/* 作品条目字段解读 */

.fields {
  padding: 40px 0 8px;
}

.fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  margin-bottom: 16px;
}

.fields-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-item {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.field-item dt {
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
}

.field-item dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-60);
}

.field-figure {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.field-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.field-figure figcaption {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
  border-top: 1px solid var(--line);
}

/* 三步开始与编选说明摘要 */

.start-notes {
  padding: 40px 0 8px;
}

.start-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.start-steps,
.notes-brief {
  padding: 20px 22px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: step;
}

.step-list li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  counter-increment: step;
}

.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

.step-name {
  font-weight: 700;
}

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.brief-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.brief-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 2px;
  background: var(--orange);
}

/* --------------------------------------------------------------------------
   pages · 阅读场景
   -------------------------------------------------------------------------- */

.scene-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.scene-unit {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.scene-figure {
  margin: 0;
  min-width: 0;
}

.scene-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.scene-figure figcaption {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
}

.scene-meta {
  min-width: 0;
  padding: 12px 14px;
  background: var(--paper-deep);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.7;
}

.scene-meta .meta-no {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
}

.scene-meta dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
}

.scene-meta dt {
  color: var(--ink-60);
  font-size: 12px;
}

.scene-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.scene-meta dd a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.scene-body {
  min-width: 0;
}

.scene-body h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}

.scene-body p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

/* 选错场景 */

.misuse {
  padding: 32px 0 8px;
  border-top: 1px solid var(--line-strong);
}

.misuse-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.misuse-item {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.misuse-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.misuse-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-60);
}

/* --------------------------------------------------------------------------
   pages · 连载书架
   -------------------------------------------------------------------------- */

.genre-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.genre-btn {
  min-height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.genre-btn:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  color: var(--orange);
}

.genre-btn.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.genre-reset {
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-60);
}

.genre-reset:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.shelf-wall {
  padding: 24px 0 8px;
}

.shelf-wall .shelf-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.shelf-wall .cover-card > a {
  padding: 10px 12px 14px;
}

.status-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 32px 0 8px;
  border-top: 1px solid var(--line-strong);
  margin-top: 40px;
}

.status-guide > .section-title {
  grid-column: 1 / -1;
}

.status-note {
  min-width: 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.status-note h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.status-note ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-note li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-60);
}

.status-note strong {
  font-weight: 700;
  margin-right: 4px;
}

.start-list {
  min-width: 0;
  padding: 18px 20px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  counter-reset: startitem;
}

.start-list h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.start-list li {
  position: relative;
  padding-left: 28px;
  padding-bottom: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  counter-increment: startitem;
}

.start-list li:last-child {
  padding-bottom: 0;
}

.start-list li::before {
  content: counter(startitem, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

/* --------------------------------------------------------------------------
   pages · 短篇一册
   -------------------------------------------------------------------------- */

.shorts-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.shorts-hero > .section-title {
  grid-column: 1 / -1;
}

.hero-figure {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-deep);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.figure-caption {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
  border-top: 1px solid var(--line);
  background: #fff;
}

.hero-meta {
  min-width: 0;
  padding: 18px 20px;
  background: var(--paper-deep);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}

.hero-meta p {
  margin: 0 0 12px;
}

.hero-meta p:last-child {
  margin-bottom: 0;
}

.short-list {
  padding: 32px 0 8px;
}

.section-head {
  margin-bottom: 4px;
}

.short-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.short-grid .cover-card-link {
  position: relative;
}

.cover-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.cover-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.cover-row dt {
  flex: 0 0 auto;
  color: var(--ink-40);
}

.cover-row dd {
  margin: 0;
  color: var(--ink-60);
  min-width: 0;
}

.diff {
  padding: 40px 0 8px;
}

.diff-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.col-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.col-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
}

.col-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.diff-entry {
  margin: 20px 0 0;
}

.diff-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.diff-entry a:hover {
  background: #b23e1e;
  color: #fff;
}

.genre-spread {
  padding: 40px 0 8px;
}

.genre-spread-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.genre-spread-item a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.genre-spread-item:nth-child(2n) a {
  border-left-color: var(--indigo);
}

.genre-spread-item:nth-child(3n) a {
  border-left-color: var(--orange);
}

.genre-spread-item a:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  color: var(--ink);
}

.genre-spread-entry {
  margin: 16px 0 0;
}

.genre-spread-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  border-bottom: 1px solid transparent;
}

.genre-spread-entry a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages · 题材图谱
   -------------------------------------------------------------------------- */

.anchor-index {
  margin: 0 0 24px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.anchor-index ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
}

.anchor-link:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.genre-visual {
  margin: 0 0 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-deep);
}

.genre-visual img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.genre-visual figcaption {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
  background: #fff;
  border-top: 1px solid var(--line);
}

.genre-blocks {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.genre-block {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.genre-band {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.genre-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
}

.genre-band h2 {
  font-size: 20px;
  font-weight: 700;
}

.genre-tagline {
  font-size: 13px;
  color: var(--ink-60);
}

.genre-def {
  padding: 18px 20px 0;
}

.genre-def p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 4px 20px 20px;
}

.entry-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.entry-list a {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.entry-list a:hover {
  color: var(--orange);
}

.entry-list span {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-60);
}

.crossover {
  padding: 32px 0 8px;
  border-top: 1px solid var(--line-strong);
}

.crossover h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.crossover-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.crossover-list li {
  padding: 16px 18px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.crossover-list h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.crossover-list p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-60);
}

.crossover-note {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.7;
}

.crossover-note a {
  color: var(--orange);
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.crossover-note a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages · 阅读指引
   -------------------------------------------------------------------------- */

.page-layout {
  display: block;
}

.page-content {
  min-width: 0;
}

.terms {
  padding-bottom: 8px;
}

.terms-group {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.terms-subtitle {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
}

.terms-list {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 8px 16px;
  align-items: baseline;
}

.terms-list dt {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.terms-list dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-60);
  min-width: 0;
}

.field-map {
  padding: 32px 0 8px;
}

.field-map-body {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.field-map-figure {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.field-map-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.field-map-figure figcaption {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
  border-top: 1px solid var(--line);
}

.field-note {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.field-map .field-item {
  background: var(--paper-deep);
}

.field-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 2px;
}

.start-path {
  padding: 32px 0 8px;
}

.start-path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  counter-reset: pathstep;
}

.start-step {
  position: relative;
  padding: 16px 18px 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  min-width: 0;
  counter-increment: pathstep;
}

.start-step::before {
  content: counter(pathstep, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
}

.start-step .step-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.start-step p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-60);
}

.start-step .step-result {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink);
  font-weight: 700;
}

.faq {
  padding: 32px 0 8px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  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-size: 18px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-item[open] .faq-question {
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}

.faq-answer {
  padding: 14px 18px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-60);
}

.faq-answer p {
  margin: 0 0 10px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--orange);
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.faq-answer a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages · 编选说明
   -------------------------------------------------------------------------- */

.summary {
  padding: 24px 0 8px;
  margin-bottom: 8px;
}

.summary h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.content-media {
  margin: 0 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-deep);
}

.content-media img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.content-media figcaption {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-60);
  background: #fff;
  border-top: 1px solid var(--line);
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.summary-list li {
  position: relative;
  padding: 12px 14px 12px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  min-width: 0;
}

.summary-list li::before {
  content: "§";
  position: absolute;
  left: 12px;
  top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

.summary-note {
  margin: 0;
  padding: 12px 16px;
  background: var(--paper-deep);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-60);
}

.page-layout.sidebar-left {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.page-layout.sidebar-left .anchor-index {
  position: sticky;
  top: 84px;
  margin: 0;
  padding: 16px 18px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.toc-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 0;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.toc-list li:last-child a {
  border-bottom: 0;
}

.toc-list a:hover {
  color: var(--orange);
}

.notes-body {
  min-width: 0;
  max-width: var(--prose);
}

.note-chapter {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.note-chapter:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.note-chapter h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.note-chapter p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.note-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-60);
}

.note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 2px;
  background: var(--orange);
}

.note-list strong {
  color: var(--ink);
  font-weight: 700;
}

.note-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  counter-reset: notestep;
}

.note-steps li {
  position: relative;
  padding-left: 30px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
  counter-increment: notestep;
}

.note-steps li::before {
  content: counter(notestep, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

.note-link-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
}

.note-link-line a {
  color: var(--orange);
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.note-link-line a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.error-inner {
  padding: 64px 0 24px;
  max-width: var(--prose);
}

.error-code {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
}

.error-title {
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}

.error-lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-60);
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.error-paths {
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.error-path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.error-path-list li {
  min-width: 0;
}

.error-path-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  min-height: 44px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.error-path-list a:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  color: var(--ink);
}

.error-path-list span {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-60);
}

.error-note {
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-60);
}

.error-note a {
  color: var(--orange);
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.error-note a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .header-inner {
    height: 56px;
    gap: 16px;
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-menu.is-open {
    display: block;
  }

  .home-main,
  .inner-main,
  .error-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .page-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 28px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 32px 0 36px;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .shelf-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .shelf-note {
    order: 2;
  }

  .genre-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .fields-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .fields-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-figure {
    max-width: 320px;
  }

  .start-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .scene-unit {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  .scene-meta {
    border-left: 0;
    border-top: 3px solid var(--orange);
    border-radius: var(--radius-sm);
  }

  .shelf-wall .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-guide {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .status-guide > .section-title {
    grid-column: auto;
  }

  .shorts-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .shorts-hero > .section-title {
    grid-column: auto;
  }

  .short-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diff-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-spread-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-map-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-map-figure {
    max-width: 340px;
  }

  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .page-layout.sidebar-left .anchor-index {
    position: static;
    padding: 12px 14px;
  }

  .toc-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .toc-list li {
    border: 0;
  }

  .toc-list a {
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
  }

  .notes-body {
    max-width: none;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
    padding-top: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 32px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .mobile-menu-list {
    padding: 8px 16px 16px;
  }

  .home-main,
  .inner-main,
  .error-main {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 56px;
  }

  .hero {
    padding: 24px 0 28px;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .hero-lead {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual img {
    aspect-ratio: 4 / 3;
  }

  .hero-meta {
    flex-direction: column;
    gap: 2px;
  }

  .section-title {
    font-size: 20px;
  }

  .scene-picker,
  .compare,
  .shelf,
  .entry-flow,
  .genres,
  .read-mode,
  .fields,
  .start-notes {
    padding-top: 32px;
  }

  .scene-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .scene-btn {
    flex: none;
    min-height: 48px;
    padding: 0 10px;
    font-size: 13px;
  }

  .scene-clear {
    grid-column: 1 / -1;
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .compare-table {
    min-width: 0;
    display: block;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .compare-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
  }

  .compare-table tbody th {
    width: auto;
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 0 0 8px;
    margin-bottom: 8px;
    font-size: 15px;
    white-space: normal;
    color: var(--orange);
  }

  .compare-table tbody td {
    padding: 4px 0;
    border-bottom: 0;
    font-size: 14px;
  }

  .compare-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: var(--ink-40);
    margin-bottom: 2px;
  }

  .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .shelf-grid .cover-card .card-title {
    font-size: 15px;
    padding: 8px 10px 0;
  }

  .shelf-grid .cover-card .card-line {
    font-size: 12px;
    padding: 2px 10px 12px;
  }

  .flow-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 12px 2px;
  }

  .flow-num {
    grid-row: 1;
    grid-column: 1;
  }

  .flow-status {
    grid-row: 1;
    grid-column: 2;
    justify-self: start;
  }

  .flow-name {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 15px;
  }

  .flow-tip {
    grid-row: 3;
    grid-column: 1 / -1;
    font-size: 13px;
  }

  .genre-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .genre-chip {
    padding: 12px 12px;
  }

  .genre-name {
    font-size: 14px;
  }

  .genre-line {
    font-size: 12px;
  }

  .col-short,
  .col-serial,
  .start-steps,
  .notes-brief {
    padding: 16px 16px;
  }

  .fields-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-figure {
    max-width: none;
  }

  .scene-unit {
    padding: 14px;
  }

  .scene-body h3 {
    font-size: 18px;
  }

  .scene-body p {
    font-size: 14px;
  }

  .misuse-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-switch {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 16px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .genre-btn,
  .genre-reset {
    flex: 0 0 auto;
    min-height: 44px;
    font-size: 13px;
    padding: 0 12px;
  }

  .shelf-wall .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .shelf-wall .cover-card > a {
    padding: 8px 10px 12px;
  }

  .shelf-wall .cover-title {
    font-size: 15px;
  }

  .shelf-wall .cover-line,
  .shelf-wall .cover-hint {
    font-size: 12px;
  }

  .short-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .short-grid .cover-card:last-child {
    grid-column: 1 / -1;
  }

  .short-grid .cover-card:last-child .cover-figure {
    aspect-ratio: 16 / 9;
  }

  .short-grid .cover-card:last-child .cover-figure img {
    object-position: center;
  }

  .genre-spread-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .genre-spread-item a {
    padding: 12px 12px;
  }

  .anchor-index ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .anchor-link {
    flex: 0 0 auto;
    min-height: 44px;
    font-size: 13px;
    padding: 0 12px;
  }

  .genre-visual img {
    aspect-ratio: 16 / 10;
  }

  .genre-band {
    padding: 12px 14px;
    gap: 8px;
  }

  .genre-band h2 {
    font-size: 18px;
  }

  .genre-def {
    padding: 14px 14px 0;
  }

  .genre-def p {
    font-size: 14px;
  }

  .entry-list {
    grid-template-columns: minmax(0, 1fr);
    padding: 4px 14px 16px;
  }

  .crossover-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .terms-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .terms-list dt {
    margin-top: 8px;
  }

  .terms-group {
    padding: 14px 14px;
  }

  .field-map-figure {
    max-width: none;
  }

  .start-path-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-question {
    padding: 12px 14px;
    font-size: 14px;
    min-height: 48px;
  }

  .faq-answer {
    padding: 12px 14px 14px;
  }

  .summary-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-media img {
    aspect-ratio: 16 / 10;
  }

  .note-chapter h2 {
    font-size: 20px;
  }

  .note-chapter p {
    font-size: 14px;
  }

  .related-bar {
    margin-top: 40px;
  }

  .related-bar > a,
  .related-list a {
    padding: 12px 14px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    padding: 36px 16px 0;
  }

  .footer-brand,
  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    margin-top: 28px;
    padding: 16px 16px 28px;
  }

  .error-inner {
    padding: 40px 0 16px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn {
    width: 100%;
  }

  .error-path-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
/* 移动导航展开状态由脚本切换 body.nav-open 与 .mobile-menu.is-open 控制 */
body.nav-open .mobile-menu {
  display: block;
}

@media (min-width: 901px) {
  .mobile-menu.is-open {
    display: none;
  }
}
/* 场景按钮与题材按钮的选中态 */
.scene-btn[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.genre-btn[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* 场景按钮联动对照表行高亮 */
.compare-table tbody tr.is-active th {
  background: var(--yellow);
}

.compare-table tbody tr.is-active td {
  background: #fdf6e3;
}

/* 封面卡被题材筛选隐藏时保持网格稳定 */
.cover-card.is-hidden {
  display: none;
}

/* 二次确认提示条 */
.confirm-bar {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--orange);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.confirm-bar p {
  margin: 0 0 10px;
}

.confirm-bar .confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.confirm-bar button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 14px;
}

.confirm-bar .confirm-ok {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  font-weight: 700;
}

.confirm-bar .confirm-cancel {
  color: var(--ink-60);
}

/* 内容区块进入视口的轻微上移淡入（不依赖脚本也可读） */
.reveal {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.reveal.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transform: none;
    opacity: 1;
  }
}
