/* ==========================================================================
   51视频 · 全站样式
   分组：base / layout / header / components / pages / footer / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
:root {
  --paper: #F6F1E7;
  --paper-2: #FBF8F1;
  --ink: #1C1B19;
  --ink-2: #3A3630;
  --indigo: #22406A;
  --cinnabar: #B8412F;
  --muted: #7C7364;
  --line: #DED7C8;
  --line-strong: #C9C0AC;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-1: 0 1px 2px rgba(28, 27, 25, .05);
  --shadow-2: 0 6px 18px rgba(28, 27, 25, .10);
  --container: 1120px;
  --read-width: 720px;
  --header-h: 72px;
  --header-h-tight: 56px;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono-num: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--indigo);
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

a:hover {
  color: var(--cinnabar);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

dl,
dd {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  display: block;
  padding-bottom: 72px;
}

.inner-main {
  padding-top: 28px;
}

.section-head {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  position: relative;
  font-size: 26px;
  letter-spacing: 0;
  padding-left: 16px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 3px;
  height: 18px;
  background: var(--cinnabar);
  border-radius: 2px;
}

.section-desc,
.section-note,
.section-intro,
.section-lead {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  max-width: var(--read-width);
}

.section-subtitle {
  font-size: 20px;
  margin-bottom: 10px;
}

.issue-mark,
.issue-no,
.issue-tag,
.page-issue,
.topic-no,
.topic-index,
.note-no,
.step-index,
.notice-no,
.path-index {
  font-family: var(--mono-num);
  letter-spacing: .08em;
  color: var(--cinnabar);
  font-size: 13px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}

.site-header.is-tight {
  box-shadow: var(--shadow-1);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: height .2s ease;
}

.site-header.is-tight .header-inner {
  height: var(--header-h-tight);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .02em;
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
  white-space: nowrap;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--indigo);
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

.header-note {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.header-note:hover {
  color: var(--indigo);
  border-color: var(--line-strong);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   components
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary {
  background: var(--indigo);
  color: #FBF8F1;
  border-color: var(--indigo);
}

.btn-primary:hover {
  background: #1B3355;
  border-color: #1B3355;
  color: #FBF8F1;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.btn-outline {
  background: transparent;
  color: var(--indigo);
  border-color: var(--indigo);
}

.btn-outline:hover {
  background: var(--indigo);
  color: #FBF8F1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--indigo);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-2);
}

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 900px;
}

.page-lead,
.page-desc,
.page-hero-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  max-width: var(--read-width);
}

.page-title-block {
  margin-bottom: 24px;
}

.page-masthead {
  margin-bottom: 32px;
}

/* 字段 / 说明表格 */
.table-scroll,
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.data-table,
.field-table,
.genre-table,
.entry-table,
.convention-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}

.table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td,
.field-table th,
.field-table td,
.genre-table th,
.genre-table td,
.entry-table th,
.entry-table td,
.convention-table th,
.convention-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table thead th,
.field-table thead th,
.genre-table thead th,
.entry-table thead th,
.convention-table thead th {
  background: rgba(34, 64, 106, .06);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody tr:last-child td,
.field-table tbody tr:last-child td,
.genre-table tbody tr:last-child td,
.entry-table tbody tr:last-child td,
.convention-table tbody tr:last-child td,
.field-table tbody tr:last-child th,
.convention-table tbody tr:last-child th {
  border-bottom: 0;
}

.field-table tbody th,
.convention-table tbody th {
  font-weight: 600;
  color: var(--ink);
  background: rgba(124, 115, 100, .06);
  white-space: nowrap;
}

/* 图片容器 */
figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--paper);
}

figcaption,
.media-caption,
.figure-caption,
.wall-caption {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* 编号条目（首页卷册摘要） */
.note-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.note-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.note-no {
  grid-row: 1 / span 2;
  padding-top: 4px;
}

.note-name {
  font-size: 20px;
}

.note-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 14px;
}

.note-fields dt {
  color: var(--muted);
  font-size: 13px;
}

.note-fields dd {
  color: var(--ink-2);
}

.note-more,
.path-more,
.brief-more {
  margin-top: 20px;
  font-size: 15px;
}

.note-more a,
.path-more a,
.brief-more a {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.note-more a:hover,
.path-more a:hover,
.brief-more a:hover {
  border-bottom-color: var(--cinnabar);
}

/* 卡片通用 */
.topic-card,
.path-card,
.wall-cell,
.entry-item,
.issue-group,
.rule-section,
.notice-section,
.related-item,
.link-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.hero-masthead {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 40px;
  margin: 14px 0 18px;
}

.hero-lead {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 560px;
}

.genre-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 26px;
}

.genre-tab {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 14px;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.genre-tab:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.genre-tab.is-active {
  background: var(--indigo);
  color: #FBF8F1;
  border-color: var(--indigo);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  min-width: 0;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.featured-topics,
.genre-index,
.volume-notes,
.cover-wall,
.reading-paths,
.issue-brief {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
}

.topic-cover {
  margin-bottom: 14px;
}

.topic-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.topic-no {
  margin-bottom: 6px;
}

.topic-name {
  font-size: 20px;
  margin-bottom: 6px;
}

.topic-range {
  font-size: 13px;
  color: var(--cinnabar);
  margin-bottom: 10px;
}

.topic-summary {
  font-size: 14px;
  color: var(--ink-2);
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-link {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  align-self: flex-start;
  padding-bottom: 2px;
}

.topic-link:hover {
  border-bottom-color: var(--cinnabar);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.tag-btn:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.tag-btn.is-active {
  background: var(--indigo);
  color: #FBF8F1;
  border-color: var(--indigo);
}

.tag-clear {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
}

.tag-clear:hover {
  color: var(--cinnabar);
  border-color: var(--cinnabar);
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.wall-cell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.wall-cell:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
}

.wall-cell img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}

.wall-cell .wall-caption {
  margin: 0;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-2);
}

.wall-cell:hover .wall-caption {
  color: var(--ink);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.path-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.path-name {
  font-size: 20px;
  margin-bottom: 12px;
}

.path-for,
.path-step,
.path-warn {
  font-size: 14px;
  margin-bottom: 8px;
}

.path-for {
  color: var(--ink-2);
}

.path-step {
  color: var(--indigo);
}

.path-warn {
  color: var(--muted);
}

.brief-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.brief-row {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.brief-label {
  font-family: var(--mono-num);
  letter-spacing: .08em;
  font-size: 13px;
  color: var(--cinnabar);
  margin-bottom: 8px;
}

.brief-text {
  font-size: 15px;
  color: var(--ink-2);
}

.site-charter-bar {
  padding: 40px 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.charter-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.charter-text {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  max-width: 640px;
}

.charter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   pages · 全书目
   -------------------------------------------------------------------------- */
.page-layout {
  display: grid;
  gap: 40px;
  align-items: start;
}

.catalog-layout {
  grid-template-columns: 220px minmax(0, 1fr) 200px;
}

.catalog-layout.sidebar-left {
  grid-template-columns: 220px minmax(0, 1fr) 200px;
}

.genre-rail {
  position: sticky;
  top: calc(var(--header-h-tight) + 20px);
  align-self: start;
}

.rail-title,
.toc-title,
.side-title {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--muted);
  letter-spacing: .04em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.genre-rail-list {
  display: grid;
  gap: 14px;
}

.genre-rail-group > a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
}

.genre-rail-group > a:hover {
  color: var(--indigo);
}

.genre-rail-sub {
  margin-top: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.genre-rail-sub li a {
  font-size: 13px;
  color: var(--muted);
}

.genre-rail-sub li a:hover {
  color: var(--indigo);
}

.entry-column {
  min-width: 0;
}

.catalog-figure {
  margin-bottom: 32px;
}

.catalog-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.genre-block {
  margin-bottom: 40px;
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.genre-block-head {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.genre-block-head h2 {
  font-size: 22px;
}

.genre-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.entry-item {
  padding: 20px 22px;
  margin-bottom: 16px;
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.entry-item h3 {
  font-size: 19px;
  margin-bottom: 12px;
}

.entry-fields {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 16px;
  font-size: 14px;
  margin-bottom: 12px;
}

.entry-fields dt {
  color: var(--muted);
}

.entry-fields dd {
  color: var(--ink-2);
}

.entry-advice {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--indigo);
}

.field-guide {
  margin-top: 40px;
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.field-guide-lead {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
}

.page-toc {
  position: sticky;
  top: calc(var(--header-h-tight) + 20px);
  align-self: start;
}

.toc-list {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.toc-list li a {
  color: var(--muted);
}

.toc-list li a:hover {
  color: var(--indigo);
}

.catalog-next {
  margin-top: 40px;
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.catalog-next-lead {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}

.catalog-next-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 15px;
}

.link-card {
  padding: 18px 20px;
}

/* --------------------------------------------------------------------------
   pages · 专题书架
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.page-hero-inner {
  display: block;
}

.issue-tag {
  margin-bottom: 10px;
}

.topic-list {
  padding-bottom: 48px;
}

.topic-list .topic-card {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
  margin-bottom: 24px;
}

.topic-list .topic-card-lead {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}

.topic-media {
  min-width: 0;
}

.topic-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

.topic-body {
  min-width: 0;
}

.topic-body .topic-index {
  margin-bottom: 8px;
}

.topic-fields {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 16px;
  font-size: 14px;
  margin: 14px 0;
}

.topic-fields dt {
  color: var(--muted);
}

.topic-fields dd {
  color: var(--ink-2);
}

.topic-matrix {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.next-step {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.next-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

.next-step-col {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.next-step-heading {
  font-size: 19px;
  margin-bottom: 10px;
}

.next-step-col p {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.next-step-note {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   pages · 连载刊期
   -------------------------------------------------------------------------- */
.content-column {
  min-width: 0;
}

.side-column {
  display: grid;
  gap: 28px;
  position: sticky;
  top: calc(var(--header-h-tight) + 20px);
  align-self: start;
}

.side-nav {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.side-list {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.side-list li a {
  color: var(--muted);
}

.side-list li a:hover {
  color: var(--indigo);
}

.issue-groups {
  margin-bottom: 48px;
}

.section-figure {
  margin-bottom: 28px;
}

.section-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.issue-group {
  padding: 22px;
  margin-bottom: 20px;
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.issue-group-head {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.issue-group-head .issue-no {
  margin-bottom: 6px;
}

.issue-group-title {
  font-size: 20px;
}

.issue-group-note {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.entry-rows {
  display: grid;
  gap: 12px;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 120px 120px;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  align-items: baseline;
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-row .entry-name {
  font-weight: 600;
  color: var(--ink);
}

.entry-row .entry-genre,
.entry-row .entry-stage,
.entry-row .entry-volume {
  color: var(--muted);
}

.entry-row .entry-stage {
  color: var(--cinnabar);
}

.issue-naming,
.status-fields,
.notice-entry {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.naming-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.naming-item {
  padding: 18px 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.naming-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.naming-item p {
  font-size: 15px;
  color: var(--ink-2);
}

.notice-entry-text {
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: var(--read-width);
}

.notice-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   pages · 新读者路径
   -------------------------------------------------------------------------- */
.page-head {
  margin-bottom: 32px;
}

.page-head-inner {
  padding: 0;
}

.page-conventions,
.missing-volume {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.reading-paths.container {
  padding-top: 8px;
  padding-bottom: 48px;
}

.reading-paths .path-card {
  padding: 24px;
}

.reading-paths .path-index {
  margin-bottom: 8px;
}

.reading-paths .path-name {
  margin-bottom: 12px;
}

.path-fields {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.path-fields dt {
  color: var(--muted);
}

.path-fields dd {
  color: var(--ink-2);
}

.card-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  align-self: flex-start;
  padding-bottom: 2px;
}

.card-link:hover {
  border-bottom-color: var(--cinnabar);
}

.path-figure {
  margin-top: 32px;
}

.path-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.step-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-item .step-index {
  font-size: 20px;
  color: var(--cinnabar);
  padding-top: 2px;
}

.step-body {
  min-width: 0;
}

.step-name {
  font-size: 18px;
  margin-bottom: 8px;
}

.step-body p {
  font-size: 15px;
  color: var(--ink-2);
}

.convention-entry {
  padding-bottom: 48px;
}

.entry-box {
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.entry-box h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.entry-box p {
  color: var(--ink-2);
  max-width: var(--read-width);
  margin-bottom: 18px;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   pages · 站点章程
   -------------------------------------------------------------------------- */
.layout-shell {
  display: grid;
  gap: 40px;
  align-items: start;
}

.layout-shell.sidebar-left {
  grid-template-columns: 220px minmax(0, 1fr);
}

.rule-rail {
  position: sticky;
  top: calc(var(--header-h-tight) + 20px);
  align-self: start;
}

.rail-list {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.rail-list li a {
  color: var(--muted);
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.rail-list li a:hover {
  color: var(--indigo);
  border-bottom-color: var(--line-strong);
}

.rule-column {
  min-width: 0;
}

.rule-section {
  padding: 28px 30px;
  margin-bottom: 28px;
  scroll-margin-top: calc(var(--header-h-tight) + 20px);
}

.rule-section .section-title {
  font-size: 22px;
  margin-bottom: 16px;
}

.rule-section p {
  color: var(--ink-2);
  max-width: var(--read-width);
  margin-bottom: 14px;
}

.rule-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding-left: 0;
}

.rule-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--ink-2);
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 6px;
  height: 6px;
  background: var(--cinnabar);
  border-radius: 50%;
}

.rule-figure {
  margin-top: 20px;
}

.rule-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-steps {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  counter-reset: rule-step;
}

.rule-steps li {
  position: relative;
  padding-left: 40px;
  font-size: 15px;
  color: var(--ink-2);
  counter-increment: rule-step;
}

.rule-steps li::before {
  content: counter(rule-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono-num);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--cinnabar);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.rule-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--muted);
}

.related-pages {
  padding: 28px 30px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-pages .section-title {
  font-size: 22px;
  margin-bottom: 16px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-item {
  padding: 18px 20px;
}

.related-item a {
  font-weight: 600;
  font-size: 16px;
}

.related-item p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   pages · 连载通告
   -------------------------------------------------------------------------- */
.notice-body {
  display: block;
  padding: 0 0 48px;
}

.notice-column {
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 0 24px;
}

.notice-figure {
  margin-bottom: 28px;
}

.notice-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.notice-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.notice-head .notice-no {
  margin-bottom: 8px;
}

.notice-title {
  font-size: 28px;
  margin-bottom: 10px;
}

.notice-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.notice-section {
  padding: 22px 24px;
  margin-bottom: 18px;
}

.notice-section p {
  color: var(--ink-2);
  font-size: 15px;
}

.affected-entries,
.same-kind-notices,
.back-paths {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.affected-entries h2,
.same-kind-notices h2,
.back-paths h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.notice-index {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.notice-index li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}

.notice-index li:last-child {
  border-bottom: 0;
}

.notice-index li a {
  font-weight: 600;
}

.back-path-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 20px 24px;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.related-links-label {
  color: var(--muted);
}

.related-links-item {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.related-links-item:hover {
  border-bottom-color: var(--cinnabar);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */
.error-main {
  padding: 80px 0 96px;
}

.error-panel {
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 0 24px;
  text-align: left;
}

.error-code {
  font-family: var(--mono-num);
  letter-spacing: .16em;
  font-size: 14px;
  color: var(--cinnabar);
  margin-bottom: 14px;
}

.error-panel h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.error-text {
  color: var(--ink-2);
  margin-bottom: 24px;
}

.error-links {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.error-links li a {
  font-size: 15px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.error-links li a:hover {
  border-bottom-color: var(--cinnabar);
}

.error-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  color: #FBF8F1;
  background: var(--indigo);
  border-radius: var(--radius);
}

.error-home:hover {
  background: #1B3355;
  color: #FBF8F1;
}

/* --------------------------------------------------------------------------
   footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding-top: 48px;
  color: var(--ink-2);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-intro {
  font-size: 14px;
  color: var(--muted);
  max-width: 320px;
}

.footer-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-list {
  display: grid;
  gap: 10px;
}

.footer-list li a {
  font-size: 14px;
  color: var(--muted);
}

.footer-list li a:hover {
  color: var(--indigo);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.footer-slogan {
  margin: 0;
}

.footer-note {
  margin: 0;
}

.footer-note a {
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.footer-note a:hover {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .page-title {
    font-size: 32px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .catalog-layout,
  .catalog-layout.sidebar-left {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .catalog-layout .page-toc {
    grid-column: 1 / -1;
    position: static;
  }

  .topic-list .topic-card {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 18px;
  }

  .header-inner {
    padding: 0 18px;
    height: var(--header-h-tight);
    gap: 12px;
  }

  .brand-tag {
    display: none;
  }

  .header-note {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    padding: 8px 18px 16px;
    display: block;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
  }

  .nav-link.is-current {
    border-bottom-color: var(--line);
    border-left-color: var(--ink);
    padding-left: 10px;
  }

  .site-main {
    padding-bottom: 48px;
  }

  .section-title {
    font-size: 22px;
  }

  .page-title {
    font-size: 28px;
  }

  .hero-masthead {
    padding: 36px 0 44px;
  }

  .hero-title {
    font-size: 28px;
  }

  .featured-topics,
  .genre-index,
  .volume-notes,
  .cover-wall,
  .reading-paths,
  .issue-brief {
    padding: 40px 0;
  }

  .topic-grid,
  .wall-grid,
  .path-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .brief-rows,
  .next-step-grid,
  .related-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-item .note-no {
    grid-row: auto;
  }

  .catalog-layout,
  .catalog-layout.sidebar-left,
  .layout-shell,
  .layout-shell.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .genre-rail,
  .page-toc,
  .rule-rail,
  .side-column {
    position: static;
  }

  .catalog-layout .genre-rail,
  .catalog-layout .page-toc,
  .layout-shell .rule-rail {
    order: 2;
  }

  .catalog-layout .entry-column,
  .layout-shell .rule-column {
    order: 1;
  }

  .topic-list .topic-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .entry-row .entry-name {
    font-size: 15px;
  }

  .entry-fields,
  .topic-fields,
  .path-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px 0;
  }

  .entry-fields dt,
  .topic-fields dt,
  .path-fields dt {
    margin-top: 8px;
  }

  .field-table,
  .convention-table,
  .data-table,
  .genre-table,
  .entry-table {
    min-width: 520px;
  }

  .rule-section,
  .related-pages,
  .entry-box,
  .issue-group,
  .naming-item,
  .notice-section {
    padding: 20px 18px;
  }

  .charter-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-bottom: 32px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 24px;
  }

  .hero-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 20px;
  }

  .btn {
    width: 100%;
    padding: 0 16px;
  }

  .hero-actions,
  .charter-actions,
  .entry-actions,
  .notice-entry-actions,
  .back-path-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .step-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .step-item .step-index {
    font-size: 16px;
  }

  .table-scroll,
  .table-wrap {
    border-radius: var(--radius-sm);
  }

  .notice-column {
    padding: 0 18px;
  }

  .related-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 滚动进入视口的淡入增强（仅增强，不改变初始可见性） */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    transition: opacity .18s ease, transform .18s ease;
  }

  .fade-in.is-visible {
    opacity: 1;
    transform: none;
  }
}
