/* ==========================================================================
   韩漫漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #f5f4f0;
  --bg-card: #ffffff;
  --text-main: #1f2422;
  --text-sub: #5c6360;
  --accent: #2f5d50;
  --accent-soft: #e4ece8;
  --border: #dcdad3;
  --border-strong: #c3c0b6;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-soft: 0 1px 2px rgba(31, 36, 34, 0.05);
  --shadow-lift: 0 6px 16px rgba(31, 36, 34, 0.08);
  --container: 1180px;
  --gap: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt,
figure,
figcaption {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

strong {
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   layout · 页头 / 导航 / 页脚 / 主容器
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-main);
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--accent);
  background-color: var(--accent-soft);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
}

.site-main {
  display: block;
  width: 100%;
}

.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* 面包屑 */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--border-strong);
}

.breadcrumb-current {
  color: var(--text-main);
}

/* 内页标题区 */

.page-header {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.page-description {
  max-width: 780px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
}

.page-description a {
  color: var(--accent);
}

/* 页脚 */

.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.footer-list {
  display: grid;
  gap: 8px;
}

.footer-list a {
  display: inline-block;
  min-height: 24px;
  font-size: 14px;
  color: var(--text-sub);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
}

.footer-about {
  padding-top: 24px;
}

.footer-about p {
  max-width: 880px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.footer-copy {
  margin-top: 10px;
  font-size: 13px;
  color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   components · 通用按钮 / 区块标题 / 卡片 / 列表 / 表格 / 步骤 / FAQ
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #26493f;
  border-color: #26493f;
  color: #ffffff;
  text-decoration: none;
}

.btn-outline {
  background-color: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.section-head p {
  max-width: 820px;
  font-size: 15px;
  color: var(--text-sub);
}

.section-title {
  font-size: 22px;
  margin-bottom: 12px;
}

.section-text {
  max-width: 820px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.section-text:last-child {
  margin-bottom: 0;
}

.section-text a {
  color: var(--accent);
}

.section-desc {
  max-width: 820px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.section-intro {
  max-width: 820px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.section-more {
  margin-top: 18px;
  font-size: 15px;
}

.section-more a {
  color: var(--accent);
  font-weight: 600;
}

/* 封面条目卡 */

.entry-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.entry-card:hover,
.entry-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.entry-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--accent-soft);
  overflow: hidden;
}

.entry-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 16px;
}

.entry-card-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.entry-card-name a {
  color: var(--text-main);
}

.entry-card-name a:hover,
.entry-card-name a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.entry-card-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 13px;
  color: var(--text-sub);
}

.entry-card-fields dt {
  color: var(--text-sub);
}

.entry-card-fields dd {
  color: var(--text-main);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--text-sub);
}

.entry-meta span {
  display: inline-block;
}

/* 通用条目行（分类页） */

.entry-list {
  display: grid;
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 120px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  transition: background-color 0.16s ease;
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-row:hover {
  background-color: var(--accent-soft);
}

.entry-name {
  color: var(--text-main);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.entry-name:hover,
.entry-name:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.entry-genre,
.entry-status {
  font-size: 13px;
  color: var(--text-sub);
}

.entry-status {
  text-align: right;
}

/* 更新记录行（首页 + 更新页共用基础，父级限定差异） */

.update-list {
  display: grid;
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.16s ease;
}

.update-row:last-child {
  border-bottom: 0;
}

.update-row:hover {
  background-color: var(--accent-soft);
}

.update-date {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-sub);
}

.update-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.update-name a {
  color: var(--text-main);
}

.update-name a:hover,
.update-name a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.update-genre {
  font-size: 13px;
  color: var(--text-sub);
}

.update-status {
  font-size: 13px;
  color: var(--accent);
}

/* 位次列表（首页 + 人气位次页共用基础） */

.rank-list,
.ranking-list {
  display: grid;
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.16s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background-color: var(--accent-soft);
}

.rank-no {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.rank-name a {
  color: var(--text-main);
}

.rank-name a:hover,
.rank-name a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.rank-genre {
  font-size: 13px;
  color: var(--text-sub);
}

.rank-basis {
  font-size: 13px;
  color: var(--text-sub);
}

/* 字段对照表（首页摘要 + 条目字段页） */

.field-table {
  display: grid;
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-table tbody {
  display: grid;
  gap: 0;
}

.field-table tr {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.field-table tr:last-child {
  border-bottom: 0;
}

.field-table th,
.field-table td {
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.field-name {
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.field-meaning {
  color: var(--text-sub);
}

/* 步骤条（首页概览 + 查阅路径页共用基础，父级限定差异） */

.step-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.step-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.step-no,
.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step-goal,
.step-title {
  font-size: 16px;
  font-weight: 600;
}

.step-where,
.step-action,
.step-check {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.step-where strong,
.step-action strong,
.step-check strong {
  color: var(--text-main);
}

/* FAQ（原生 details） */

.faq-item,
.boundary-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item:last-child,
.boundary-item:last-child {
  margin-bottom: 0;
}

.faq-question,
.boundary-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker,
.boundary-question::-webkit-details-marker {
  display: none;
}

.faq-question::after,
.boundary-question::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}

.faq-item[open] .faq-question::after,
.boundary-item[open] .boundary-question::after {
  content: "−";
}

.faq-answer,
.boundary-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */

.fact-bar {
  background-color: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}

.fact-bar p {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent);
}

.home-main {
  display: block;
}

.hero {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.hero-title {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
}

.hero-lead {
  max-width: 560px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--accent-soft);
}

.hero-media figcaption {
  font-size: 13px;
  color: var(--text-sub);
}

.genre-overview {
  padding: 56px 0;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.genre-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.genre-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.genre-name {
  font-size: 17px;
  font-weight: 600;
}

.genre-scope {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.genre-common {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.genre-sample {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--accent);
}

.home-split {
  padding: 48px 0;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-split-alt {
  background-color: var(--bg-page);
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}

.split-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.col-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.col-note {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.path-overview {
  padding: 56px 0;
}

.site-index {
  padding: 0 0 64px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.index-item {
  display: block;
}

.index-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.index-item a:hover,
.index-item a:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.index-name {
  font-size: 15px;
  font-weight: 600;
}

.index-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages · 题材分类
   -------------------------------------------------------------------------- */

.group-heading {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.genre-index .entry-list:last-of-type {
  margin-bottom: 0;
}

.genre-scope {
  margin-top: 48px;
}

.scope-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 20px;
  align-items: start;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.scope-card:last-child {
  margin-bottom: 0;
}

.scope-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.scope-card .scope-media {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--accent-soft);
}

.scope-card .scope-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scope-fields {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 14px;
  grid-column: 1;
}

.scope-fields dt {
  color: var(--text-sub);
}

.scope-fields dd {
  color: var(--text-main);
}

.genre-field-note {
  margin-top: 48px;
}

.genre-field-note > p {
  max-width: 820px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.genre-field-note .entry-card {
  max-width: 420px;
  margin: 20px 0;
}

.genre-field-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 15px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   pages · 最近更新
   -------------------------------------------------------------------------- */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.updates-layout .layout-main {
  min-width: 0;
}

.updates-layout .layout-aside {
  min-width: 0;
  position: sticky;
  top: 88px;
}

.updates-intro {
  margin-bottom: 36px;
}

.updates-timeline {
  margin-bottom: 36px;
}

.group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.updates-timeline .update-list {
  margin-bottom: 24px;
}

.updates-timeline .update-list:last-child {
  margin-bottom: 0;
}

.updates-timeline .update-row {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
}

.update-thumb {
  width: 76px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--accent-soft);
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.update-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

.updates-fields {
  margin-bottom: 36px;
}

.field-pairs {
  display: grid;
  gap: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-pair {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.field-pair:last-child {
  border-bottom: 0;
}

.field-value {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.updates-scope {
  margin-bottom: 0;
}

.updates-aside .aside-block {
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.updates-aside .aside-block:last-child {
  margin-bottom: 0;
}

.aside-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.aside-stats {
  display: grid;
  gap: 10px;
}

.aside-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.aside-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat-label {
  color: var(--text-sub);
}

.stat-value {
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.aside-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-sub);
}

.aside-links {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   pages · 人气位次
   -------------------------------------------------------------------------- */

.section {
  margin-bottom: 40px;
}

.section:last-child {
  margin-bottom: 0;
}

.basis-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.basis-item {
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.basis-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.basis-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.16s ease;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row:hover {
  background-color: var(--accent-soft);
}

.ranking-rank {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.ranking-cover {
  width: 64px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--accent-soft);
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ranking-name {
  font-size: 16px;
  font-weight: 600;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--text-sub);
}

.ranking-genre {
  color: var(--text-sub);
}

.section-ranking-boundary .boundary-item {
  margin-bottom: 12px;
}

.next-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.next-item a {
  display: block;
  min-height: 44px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-main);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.next-item a:hover,
.next-item a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages · 条目字段说明
   -------------------------------------------------------------------------- */

.field-figure-section {
  margin-bottom: 40px;
}

.field-figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-figure img {
  width: 100%;
  max-width: 720px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--accent-soft);
}

.field-figure-caption {
  font-size: 13px;
  color: var(--text-sub);
}

.field-table-section {
  margin-bottom: 40px;
}

.field-table-section .field-table {
  display: grid;
  gap: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.field-row:last-child {
  border-bottom: 0;
}

.field-rule-section {
  margin-bottom: 40px;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rule-item {
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rule-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rule-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.scope-section {
  margin-bottom: 40px;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.scope-item {
  padding: 14px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.scope-note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-sub);
}

.related-section {
  margin-bottom: 0;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.related-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-item a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.related-item a:hover,
.related-item a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.related-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages · 查阅路径
   -------------------------------------------------------------------------- */

.guide-intro {
  margin-bottom: 40px;
}

.precondition-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.precondition-item {
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.precondition-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.precondition-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
}

.guide-steps {
  margin-bottom: 40px;
}

.guide-figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.guide-figure img {
  width: 100%;
  max-width: 860px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--accent-soft);
}

.guide-figure figcaption {
  font-size: 13px;
  color: var(--text-sub);
}

.step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.guide-steps .step-item {
  align-items: flex-start;
  gap: 10px;
}

.guide-faq {
  margin-bottom: 40px;
}

.guide-next {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 24px;
}

.error-panel {
  max-width: 720px;
  padding: 40px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.error-panel h1 {
  font-size: 30px;
  margin-bottom: 14px;
}

.error-panel p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.error-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-main);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.error-link:hover,
.error-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 20px;
  }

  .nav-toggle {
    display: flex;
    order: 2;
  }

  .site-nav {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-start;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    width: 100%;
    padding: 0 12px;
    border-radius: var(--radius-sm);
  }

  .nav-list a.is-current {
    box-shadow: inset 3px 0 0 var(--accent);
    border-radius: var(--radius-sm);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 40px 20px;
  }

  .hero-title {
    font-size: 28px;
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .updates-layout .layout-aside {
    position: static;
  }

  .basis-list,
  .rule-list,
  .precondition-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-card {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .field-figure img,
  .guide-figure img {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .brand {
    font-size: 18px;
  }

  .fact-bar p {
    padding: 8px 16px;
  }

  .inner-main {
    padding: 18px 16px 48px;
  }

  .footer-inner {
    padding: 32px 16px 24px;
  }

  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .page-title,
  .error-panel h1 {
    font-size: 24px;
  }

  .hero-inner {
    padding: 32px 16px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .genre-overview,
  .path-overview {
    padding: 40px 0;
  }

  .home-split {
    padding: 36px 0;
  }

  .site-index {
    padding-bottom: 48px;
  }

  .genre-grid,
  .basis-list,
  .rule-list,
  .precondition-list,
  .step-list,
  .step-strip,
  .scope-list,
  .related-list,
  .next-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 14px;
  }

  .entry-status {
    text-align: left;
  }

  .update-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .updates-timeline .update-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .update-thumb {
    width: 64px;
  }

  .rank-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-row {
    grid-template-columns: 32px 52px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
  }

  .ranking-cover {
    width: 52px;
  }

  .field-table tr,
  .field-pair,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .scope-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .scope-card .scope-media {
    grid-column: 1;
    grid-row: auto;
    max-width: 220px;
  }

  .scope-fields {
    grid-column: 1;
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .error-main {
    padding: 40px 16px;
  }

  .error-panel {
    padding: 24px 20px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-link {
    justify-content: center;
  }
}
