/* ==========================================================================
   女神漫画官网 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base 基础层：变量、重置、排版、通用元素
   -------------------------------------------------------------------------- */
:root {
  --bg-page: #f5f6f8;
  --bg-panel: #ffffff;
  --bg-subtle: #f0f2f6;
  --text-main: #1c2027;
  --text-sub: #5b6472;
  --text-faint: #7d8695;
  --line: #dfe3ea;
  --line-strong: #c9cfda;
  --brand: #3155cc;
  --brand-soft: #eef1fb;
  --brand-hover: #1f3ca8;
  --genre-pink: #e0568b;
  --state-ongoing: #2f9e6e;
  --state-finished: #7d8695;
  --state-paused: #d08b21;
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --shadow-panel: 0 1px 2px rgba(28, 32, 39, 0.05);
  --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --shell-width: 1080px;
  --header-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--text-main);
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--brand-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.6;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

time,
.mono,
.cell-mono,
.field-name,
.rank-no {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
  color: var(--brand);
  font-size: 14px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 8px;
}

/* --------------------------------------------------------------------------
   layout 骨架层：页头、导航、主容器、面包屑、页标题、页脚
   -------------------------------------------------------------------------- */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--shell-width);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  flex: 0 0 auto;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible {
  color: var(--brand);
  text-decoration: none;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  background-color: var(--brand-soft);
  color: var(--brand-hover);
  text-decoration: none;
}

.nav-link.is-current {
  background-color: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-main);
}

/* 主内容 */
.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 28px 20px 44px;
}

.home-main {
  padding-top: 24px;
}

.inner-main {
  padding-top: 20px;
}

/* 面包屑 */
.breadcrumb {
  margin-bottom: 14px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text-sub);
}

/* 页标题区 */
.page-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: var(--text-main);
}

.page-head {
  margin-bottom: 22px;
}

.page-lead {
  max-width: 720px;
  color: var(--text-sub);
  font-size: 15px;
}

.page-meta {
  margin: 6px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}

.page-hero {
  margin-bottom: 26px;
}

.page-hero-inner {
  max-width: 760px;
}

/* 页脚 */
.site-footer {
  margin-top: 24px;
  background-color: var(--bg-panel);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px 32px;
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 700;
}

.footer-desc {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.footer-title {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
}

.footer-title + .footer-list + .footer-title {
  margin-top: 18px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-list a {
  color: var(--text-sub);
  font-size: 13px;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--brand-hover);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-note,
.footer-copy {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 20px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.7;
}

.footer-note {
  padding-top: 16px;
}

.footer-copy {
  padding-bottom: 20px;
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 13px;
  box-shadow: var(--shadow-panel);
}

.back-to-top::before {
  content: "↑";
  display: block;
  font-size: 16px;
  line-height: 1;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   components 组件层：按钮、标签、状态、表格、卡片、步骤、问答、图块
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #ffffff;
}

.btn-ghost {
  background-color: var(--bg-panel);
  border-color: var(--line-strong);
  color: var(--text-main);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--brand);
  color: var(--brand-hover);
}

.btn-plain {
  background-color: var(--bg-subtle);
  border-color: var(--line);
  color: var(--text-main);
}

.btn-plain:hover,
.btn-plain:focus-visible {
  border-color: var(--brand);
  color: var(--brand-hover);
}

.text-link {
  font-size: 14px;
  font-weight: 700;
}

/* 题材标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.tag:hover,
.tag:focus-visible {
  text-decoration: none;
}

.tag-hotblood,
.tag-hot {
  border-color: #f0c3cf;
  background-color: #fdeef2;
  color: #b93b66;
}

.tag-daily {
  border-color: #cfe0ef;
  background-color: #eef5fb;
  color: #2f6f9e;
}

.tag-mystery,
.tag-suspense {
  border-color: #d6d2ec;
  background-color: #f1effb;
  color: #5a4fa8;
}

.tag-fantasy {
  border-color: #cbe2d8;
  background-color: #eef8f3;
  color: #2b7a5c;
}

.tag-school,
.tag-campus {
  border-color: #e6dcc3;
  background-color: #faf4e6;
  color: #8d6b1f;
}

.tag-scifi {
  border-color: #c9d9ea;
  background-color: #edf3fa;
  color: #2f5f96;
}

.tag-action {
  border-color: var(--brand);
  background-color: var(--brand-soft);
  color: var(--brand);
}

.tag-plain {
  background-color: var(--bg-panel);
}

.tag-genre {
  border-color: #f0c3cf;
  background-color: #fdeef2;
  color: #b93b66;
  padding: 4px 10px;
}

.tag-genre:hover,
.tag-genre:focus-visible {
  border-color: var(--brand);
  color: var(--brand-hover);
  text-decoration: none;
}

.tag-genre-shonen {
  border-color: #f0c3cf;
  background-color: #fdeef2;
  color: #b93b66;
}

.tag-genre-slice {
  border-color: #cfe0ef;
  background-color: #eef5fb;
  color: #2f6f9e;
}

.tag-genre-mystery {
  border-color: #d6d2ec;
  background-color: #f1effb;
  color: #5a4fa8;
}

.tag-genre-fantasy {
  border-color: #cbe2d8;
  background-color: #eef8f3;
  color: #2b7a5c;
}

.tag-genre-school {
  border-color: #e6dcc3;
  background-color: #faf4e6;
  color: #8d6b1f;
}

.tag-genre-scifi {
  border-color: #c9d9ea;
  background-color: #edf3fa;
  color: #2f5f96;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* 状态标签 */
.status,
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.status-ongoing,
.tag-status-ongoing {
  background-color: #eaf7f1;
  color: var(--state-ongoing);
}

.status-completed,
.status-finished,
.tag-status-completed,
.tag-status-paused {
  background-color: #f0f2f6;
  color: var(--state-finished);
}

.status-paused {
  background-color: #fbf3e4;
  color: var(--state-paused);
}

.status-tag.status-ongoing {
  background-color: #eaf7f1;
  color: var(--state-ongoing);
}

.status-tag.status-finished {
  background-color: #f0f2f6;
  color: var(--state-finished);
}

.status-tag.status-paused {
  background-color: #fbf3e4;
  color: var(--state-paused);
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

/* 表格 */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  min-width: 560px;
  font-size: 13px;
  line-height: 1.5;
}

.data-table caption,
.table-caption {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-sub);
  font-size: 13px;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background-color: #fafbfd;
}

.data-table tbody th {
  font-weight: 700;
}

.table-note,
.section-note {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 13px;
}

/* 图块 */
.section-figure {
  margin: 20px 0;
  padding: 12px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.section-figure img,
.content-figure img,
.maintain-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
}

/* 区块标题 */
.section,
.section-block,
.content-section,
.content-block {
  margin-bottom: 34px;
}

.section-head {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-title,
.section-head h2,
.content-section h2,
.content-block h2,
.section h2 {
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
}

.section-head h2 {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-desc,
.section-intro {
  max-width: 720px;
  color: var(--text-sub);
  font-size: 14px;
}

.section-foot {
  margin-top: 12px;
}

/* 卡片网格 */
.genre-grid,
.entry-grid,
.related-grid {
  display: grid;
  gap: 14px;
}

.genre-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.genre-card,
.entry-card,
.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.genre-card h3,
.entry-card h3,
.related-card h3 {
  margin: 0;
  font-size: 16px;
}

.genre-card p,
.entry-card p,
.related-card p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

.genre-link,
.entry-title a,
.related-card a {
  font-size: 14px;
  font-weight: 700;
}

.related-card:hover {
  border-color: var(--brand);
}

/* 步骤 */
.step-nav {
  display: grid;
  gap: 12px;
}

.steps-section .step-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.step-index {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.step-name {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
}

.step-text,
.step-desc {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

/* 榜单 */
.ranking-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ranking-box {
  padding: 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.ranking-name {
  margin: 0 0 6px;
  font-size: 16px;
}

.ranking-note {
  margin: 0 0 10px;
  color: var(--text-faint);
  font-size: 13px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.ranking-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rank-no {
  flex: 0 0 auto;
  min-width: 20px;
  color: var(--text-faint);
  font-size: 12px;
}

.ranking-row a {
  flex: 1 1 auto;
  min-width: 0;
}

.rank-meta {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}

/* 摘要两列 */
.rules-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rules-col {
  padding: 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.rules-name {
  margin: 0 0 8px;
  font-size: 16px;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.rules-list li {
  position: relative;
  padding-left: 14px;
  color: var(--text-sub);
  font-size: 14px;
}

.rules-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--brand);
}

.rules-text {
  color: var(--text-sub);
  font-size: 14px;
}

/* 字段列表 */
.field-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.field-row,
.field-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.field-item {
  grid-template-columns: 110px minmax(0, 1fr);
}

.field-row:last-child,
.field-item:last-child {
  border-bottom: 0;
}

.field-name {
  color: var(--text-main);
  font-weight: 700;
}

.field-meaning,
.field-desc {
  color: var(--text-sub);
}

.field-hint {
  color: var(--text-faint);
}

/* 锚点索引条 */
.anchor-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 60;
  margin-bottom: 26px;
  padding: 8px 0;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--line);
}

.anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anchor-link {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 13px;
}

.anchor-link:hover,
.anchor-link:focus-visible {
  border-color: var(--brand);
  color: var(--brand-hover);
  text-decoration: none;
}

/* 侧栏卡片 */
.side-card {
  margin-bottom: 16px;
  padding: 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.side-card-title,
.sidebar-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.side-list,
.side-link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-list li,
.side-link-list li {
  color: var(--text-sub);
  font-size: 13px;
}

.sidebar-note {
  margin-top: 12px;
  color: var(--text-faint);
  font-size: 13px;
}

/* 状态图例 */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.status-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.status-mean {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
}

/* 步骤列表（在更记录 / 阅读指引） */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-list .step-item {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.step-list .step-index {
  flex: 0 0 auto;
  min-width: 22px;
}

.step-title {
  margin: 0 0 4px;
  font-size: 15px;
}

/* 变更类型 */
.change-type-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.change-type-item {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.change-type-name {
  margin: 0 0 6px;
  font-size: 15px;
}

.change-type-item p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

/* 返回条 */
.return-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.return-block {
  display: block;
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
}

.return-block:hover,
.return-block:focus-visible {
  border-color: var(--brand);
  color: var(--brand-hover);
  text-decoration: none;
}

.return-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.return-list a {
  display: inline-block;
  padding: 8px 14px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.return-list a:hover,
.return-list a:focus-visible {
  border-color: var(--brand);
  text-decoration: none;
}

/* 关联入口 */
.related-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.related-item {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.related-item a {
  font-size: 14px;
  font-weight: 700;
}

.related-item p {
  margin: 6px 0 0;
  color: var(--text-sub);
  font-size: 13px;
}

/* 规则列表 */
.rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rule-item {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.rule-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.rule-item p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

/* 反馈步骤 */
.feedback-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feedback-step {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.feedback-step h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.feedback-step p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

/* 问答折叠 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.faq-item summary {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "＋";
  float: right;
  color: var(--text-faint);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "－";
}

.faq-item p {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--text-sub);
  font-size: 14px;
}

/* 阅读清单 */
.reading-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reading-list li {
  position: relative;
  padding-left: 14px;
  color: var(--text-sub);
  font-size: 14px;
}

.reading-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--brand);
}

/* 流程列表 */
.flow-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.flow-index {
  flex: 0 0 auto;
  min-width: 22px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.flow-text {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
}

/* 维护布局 */
.maintain-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.maintain-text {
  min-width: 0;
}

.maintain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.maintain-item {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.maintain-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.maintain-item p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

.maintain-figure {
  margin: 0;
  padding: 12px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* 建议列表 */
.advice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.advice-item {
  padding: 14px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 14px;
}

.advice-item a {
  font-weight: 700;
}

/* 题材分组 */
.genre-group {
  scroll-margin-top: 128px;
}

.genre-block {
  margin-bottom: 24px;
  padding: 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  scroll-margin-top: 128px;
}

.genre-block-head {
  margin-bottom: 10px;
}

.genre-block-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.genre-block-lead {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

/* 条目行链接 */
.row-link,
.item-name a {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   pages 页面层：首页与各内页的专属模块
   -------------------------------------------------------------------------- */

/* 首页 · 首屏 */
.hero {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 36px;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: 30px;
}

.hero-intro {
  max-width: 620px;
  color: var(--text-sub);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 16px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-visual {
  margin: 0;
  padding: 12px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.hero-visual img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
}

/* 首页 · 榜单速览图 */
.ranking-section .section-figure img,
.updates-section .section-figure img,
.genres-section .section-figure img,
.fields-section .section-figure img,
.rules-section .section-figure img {
  height: 220px;
}

/* 内页 · 两栏布局 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(0, 280px);
  gap: 40px;
  align-items: start;
}

.page-layout.sidebar-left,
.sidebar-left .page-layout {
  grid-template-columns: minmax(0, 280px) minmax(0, 760px);
}

.layout-main,
.page-content {
  min-width: 0;
}

.layout-side,
.page-aside,
.page-sidebar {
  min-width: 0;
}

/* 目录页 */
.page-inner {
  min-width: 0;
}

.page-catalog .section-block {
  scroll-margin-top: 128px;
}

/* 在更记录页 */
.page-updates .page-layout {
  grid-template-columns: minmax(0, 280px) minmax(0, 760px);
}

.page-updates .page-sidebar .field-list {
  margin-bottom: 18px;
}

.page-updates .section-figure img {
  height: 220px;
}

/* 榜单页 */
.page-ranking .section-figure img {
  height: 220px;
}

.page-ranking .ranking-table td,
.page-ranking .crossref-table td {
  font-size: 13px;
}

/* 阅读指引页 */
.page-guide .page-layout {
  grid-template-columns: minmax(0, 280px) minmax(0, 760px);
}

.page-guide .aside-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.page-guide .step-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-guide .step-item {
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
}

.page-guide .step-item.is-done {
  background-color: var(--bg-subtle);
}

.page-guide .step-item.is-done .step-name {
  color: var(--text-sub);
  font-weight: 400;
}

.page-guide .step-item.is-current {
  border-color: var(--brand);
  background-color: var(--brand-soft);
}

.page-guide .aside-note {
  margin-top: 12px;
  color: var(--text-faint);
  font-size: 13px;
}

.page-guide .content-figure img {
  height: 240px;
}

/* 收录与引用页 */
.page-rules .maintain-figure img {
  height: 260px;
}

/* 404 */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 56px;
}

.error-panel {
  width: 100%;
  max-width: 640px;
  padding: 28px 24px;
  background-color: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
}

.error-code {
  margin: 0 0 6px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.error-panel h1 {
  margin: 0 0 12px;
  font-size: 26px;
}

.error-text {
  max-width: 560px;
  color: var(--text-sub);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   responsive 响应层
   -------------------------------------------------------------------------- */

/* 小于 1080px：侧栏下移，网格收窄 */
@media (max-width: 1080px) {
  .page-layout,
  .page-layout.sidebar-left,
  .sidebar-left .page-layout,
  .page-updates .page-layout,
  .page-guide .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .page-updates .page-sidebar,
  .page-guide .page-aside {
    order: 2;
  }

  .page-updates .inner-main,
  .page-guide .page-content {
    order: 1;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-visual img {
    height: 240px;
  }

  .genre-grid,
  .ranking-columns,
  .related-links,
  .feedback-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-section .step-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 小于 768px：单栏、移动导航、表格信息对 */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  h1,
  .page-title,
  .hero-copy h1 {
    font-size: 22px;
  }

  h2,
  .section-title,
  .section-head h2,
  .content-section h2,
  .content-block h2,
  .section h2 {
    font-size: 18px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 16px;
    min-height: 56px;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    flex: 1 0 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 10px;
    font-size: 15px;
  }

  .site-main {
    padding: 20px 16px 36px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 26px 16px 20px;
  }

  .footer-note,
  .footer-copy {
    padding-left: 16px;
    padding-right: 16px;
  }

  .anchor-bar {
    top: 56px;
  }

  .anchor-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .anchor-link {
    flex: 0 0 auto;
  }

  .genre-grid,
  .entry-grid,
  .related-grid,
  .ranking-columns,
  .rules-columns,
  .change-type-list,
  .rule-list,
  .feedback-steps,
  .return-bar,
  .related-links,
  .maintain-layout,
  .steps-section .step-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-row,
  .field-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .data-table {
    min-width: 0;
    font-size: 13px;
  }

  .data-table thead {
    display: none;
  }

  .data-table caption,
  .table-caption {
    padding: 10px 12px;
  }

  .data-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .data-table tbody tr:last-child {
    border-bottom: 0;
  }

  .data-table tbody th,
  .data-table tbody td {
    padding: 0;
    border-bottom: 0;
  }

  .data-table tbody td:first-child {
    grid-column: 1 / -1;
    font-weight: 700;
  }

  .section-figure img,
  .content-figure img,
  .maintain-figure img,
  .hero-visual img,
  .ranking-section .section-figure img,
  .updates-section .section-figure img,
  .genres-section .section-figure img,
  .fields-section .section-figure img,
  .rules-section .section-figure img,
  .page-updates .section-figure img,
  .page-ranking .section-figure img,
  .page-guide .content-figure img,
  .page-rules .maintain-figure img {
    height: 200px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
  }
}

/* 极窄屏微调 */
@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .step-list .step-item,
  .flow-row {
    flex-direction: column;
    gap: 6px;
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}

/* 程序验收反馈：移动端防溢出 */
@media (max-width: 768px) {
  .site-main,
  .site-main * {
    min-width: 0;
    max-width: 100%;
  }

  .site-main :is(h1, h2, h3, h4, p, a, span) {
    overflow-wrap: anywhere;
  }
}
