/* ==========================================================================
   age动漫 · 全站样式表
   结构：base → layout → components → pages → responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. base 基础变量与重置
   -------------------------------------------------------------------------- */
:root {
  --paper: #faf9f6;
  --ink: #1f1d1a;
  --ink-soft: #6b6560;
  --accent: #b4462f;
  --accent-deep: #8f3521;
  --green: #2f5d50;
  --line: #e4e0d8;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(31, 29, 26, .06);
  --shadow-md: 0 4px 14px rgba(31, 29, 26, .09);
  --radius: 6px;
  --radius-sm: 4px;
  --wrap: 1120px;
  --gutter: 24px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s ease;
}

a:hover {
  color: var(--accent-deep);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

.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;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. layout 全站骨架：页头 / 导航 / 主容器 / 面包屑 / 页脚
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(250, 249, 246, .96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wrap);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .82);
}

.brand-name {
  font-size: 18px;
  line-height: 1.2;
}

.site-nav {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.is-current {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background-color: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.site-main {
  display: block;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.inner-main {
  padding-top: 20px;
  padding-bottom: 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  font-size: 13px;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

.page-header {
  padding: 14px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  line-height: 1.3;
  font-weight: 700;
}

.page-description {
  margin-top: 10px;
  max-width: 760px;
  font-size: 15px;
  color: var(--ink-soft);
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  background-color: #f4f2ec;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px var(--gutter) 32px;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.footer-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.footer-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  display: inline-block;
  min-height: 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.footer-copy {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   3. components 通用组件
   -------------------------------------------------------------------------- */
.section-head {
  margin-bottom: 22px;
}

.section-title {
  font-size: 22px;
  line-height: 1.4;
}

.section-desc {
  margin-top: 8px;
  max-width: 780px;
  font-size: 14px;
  color: var(--ink-soft);
}

.section-intro,
.section-lead {
  margin: 8px 0 20px;
  max-width: 780px;
  font-size: 14px;
  color: var(--ink-soft);
}

.section-intro a,
.section-lead a {
  color: var(--accent);
}

.section-more {
  margin-top: 18px;
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  font-size: 14px;
  color: var(--accent);
}

.text-link::after {
  content: "→";
  font-size: 13px;
  transition: transform .18s ease;
}

.text-link:hover::after {
  transform: translateX(3px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-deep);
  color: #fff;
}

.btn-secondary {
  background-color: var(--green);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #244a3f;
  color: #fff;
}

.btn-ghost {
  background-color: transparent;
  border-color: rgba(255, 255, 255, .7);
  color: #fff;
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, .16);
  color: #fff;
}

.tag,
.cover-tag,
.update-tag,
.rank-tag,
.rank-genre,
.genre-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: #f6f4ef;
  font-size: 12px;
  line-height: 1.6;
  color: var(--green);
}

/* --------------------------------------------------------------------------
   4. pages 首页
   -------------------------------------------------------------------------- */
.home-main {
  padding-bottom: 56px;
}

/* hero */
.hero {
  position: relative;
  display: grid;
  margin: 24px 0 56px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #2a2724;
  box-shadow: var(--shadow-md);
}

.hero-figure {
  grid-area: 1 / 1;
  width: 100%;
}

.hero-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-content {
  grid-area: 1 / 1;
  align-self: end;
  padding: 40px 40px 36px;
  background-color: rgba(28, 25, 22, .62);
  color: #fff;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: .04em;
  color: #f0d9d2;
}

.hero-title {
  margin-top: 10px;
  max-width: 720px;
  font-size: 34px;
  line-height: 1.3;
  font-weight: 700;
  color: #fff;
}

.hero-lead {
  margin-top: 12px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: #ece7e0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-actions .btn-ghost {
  border-color: rgba(255, 255, 255, .55);
}

/* 题材速览 */
.genre-overview {
  margin-bottom: 56px;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.genre-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}

.genre-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.genre-name {
  font-size: 17px;
  line-height: 1.5;
}

.genre-name a {
  color: var(--ink);
}

.genre-name a:hover {
  color: var(--accent);
}

.genre-trait {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.genre-scope {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--green);
}

/* 封面墙 */
.cover-wall {
  margin-bottom: 56px;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 20px;
}

.cover-card {
  min-width: 0;
}

.cover-link {
  display: block;
  color: var(--ink);
}

.cover-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #eeeae2;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}

.cover-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.cover-card:nth-child(3n + 2) .cover-image {
  height: 300px;
}

.cover-card:nth-child(3n) .cover-image {
  height: 232px;
}

.cover-link:hover .cover-figure {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.cover-name {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.cover-link:hover .cover-name {
  color: var(--accent);
}

.cover-tag {
  margin-top: 8px;
}

/* 最近更新 */
.recent-updates {
  margin-bottom: 56px;
}

.update-list {
  border-top: 1px solid var(--line);
}

.update-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.update-date {
  flex: 0 0 96px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.update-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  color: var(--ink);
}

.update-tag {
  flex: 0 0 auto;
}

.update-status {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--green);
}

/* 榜单与编辑选题 */
.ranking-and-feature,
.guide-summary {
  margin-bottom: 56px;
}

.ranking-and-feature > .section-title,
.guide-summary > .section-title,
.site-index > .section-title {
  margin-bottom: 22px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.col-ranking,
.col-feature,
.col-fields,
.col-boundary {
  min-width: 0;
}

.col-title {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.5;
}

.col-desc {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

.rank-list {
  border-top: 1px solid var(--line);
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-no {
  flex: 0 0 30px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rank-item:nth-child(n + 4) .rank-no {
  color: var(--ink-soft);
  font-weight: 600;
}

.rank-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  color: var(--ink);
}

.rank-tag {
  flex: 0 0 auto;
}

.col-more {
  margin-top: 16px;
}

.feature-card {
  padding: 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.feature-card + .feature-card {
  margin-top: 16px;
}

.feature-name {
  font-size: 16px;
  line-height: 1.5;
}

.feature-name a {
  color: var(--ink);
}

.feature-name a:hover {
  color: var(--accent);
}

.feature-scope {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.feature-count {
  margin-top: 8px;
  font-size: 13px;
  color: var(--green);
}

.feature-more {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* 阅读说明摘要 */
.field-table {
  width: 100%;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.field-table th,
.field-table td {
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.field-table th {
  width: 96px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.field-table td {
  color: var(--ink-soft);
}

.boundary-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.boundary-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boundary-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* 站内栏目索引 */
.site-index {
  margin-bottom: 8px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.index-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.index-name {
  font-size: 15px;
  font-weight: 600;
}

.index-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   5. pages 题材分类页
   -------------------------------------------------------------------------- */
.genre-overview-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.genre-overview-item {
  min-width: 0;
}

.genre-overview-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.genre-overview-item a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.genre-chip {
  align-self: flex-start;
  font-size: 13px;
  color: var(--accent);
  background-color: #faf1ee;
  border-color: #f0dcd6;
}

.genre-chip-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.genre-list {
  margin-bottom: 48px;
}

.genre-block {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.genre-block-media {
  min-width: 0;
}

.genre-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #eeeae2;
  box-shadow: var(--shadow-sm);
}

.genre-figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.genre-caption {
  padding: 10px 12px;
  background-color: var(--card);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.genre-block-body {
  min-width: 0;
}

.genre-block-body .genre-name {
  font-size: 20px;
}

.genre-block-body .genre-trait {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}

.genre-block-body .genre-scope {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--green);
}

.genre-entries {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.genre-entries-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.entry-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.entry-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.entry-tag {
  font-size: 12px;
  color: var(--green);
}

.entry-status {
  font-size: 12px;
  color: var(--ink-soft);
}

/* 相关入口（题材分类页） */
.related-entry {
  margin-bottom: 8px;
}

.related-entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.related-entry-item {
  min-width: 0;
}

.related-entry-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.related-entry-item a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.related-entry-name {
  font-size: 16px;
  font-weight: 600;
}

.related-entry-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   6. pages 最近更新页
   -------------------------------------------------------------------------- */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.date-groups {
  min-width: 0;
}

.date-group {
  margin-bottom: 32px;
}

.date-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.date-title {
  font-size: 17px;
  font-weight: 600;
}

.date-title time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.date-count {
  font-size: 13px;
  color: var(--ink-soft);
}

.date-group .update-list {
  border-top: 0;
}

.date-group .update-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.update-thumb {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: #eeeae2;
}

.update-thumb img {
  width: 84px;
  height: 84px;
  object-fit: cover;
}

.update-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.update-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.update-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.update-entry {
  flex: 0 0 auto;
  align-self: center;
  min-height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
  transition: border-color .18s ease, color .18s ease;
}

.update-entry:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.status-note {
  margin-bottom: 40px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.status-item {
  padding: 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.status-new {
  border-left-color: var(--accent);
}

.status-ongoing {
  border-left-color: var(--green);
}

.status-paused {
  border-left-color: #b08a3e;
}

.status-completed {
  border-left-color: #6b6560;
}

.status-name {
  font-size: 15px;
  font-weight: 600;
}

.status-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.related-name {
  font-size: 16px;
  font-weight: 600;
}

.related-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   7. pages 人气榜单页
   -------------------------------------------------------------------------- */
.layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.layout-main {
  min-width: 0;
}

.layout-aside {
  min-width: 0;
}

.ranking-list-section,
.ranking-rule-section {
  margin-bottom: 40px;
}

.ranking-list {
  border-top: 1px solid var(--line);
}

.ranking-item {
  display: grid;
  grid-template-columns: 40px 80px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-number {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.ranking-item:nth-child(n + 4) .rank-number {
  color: var(--ink-soft);
  font-weight: 600;
}

.rank-cover {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: #eeeae2;
}

.rank-cover img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-body .rank-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.rank-body .rank-genre {
  align-self: flex-start;
}

.rank-heat {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rule-card {
  padding: 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.rule-title {
  font-size: 15px;
  font-weight: 600;
}

.rule-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.aside-feature .feature-card {
  padding: 0;
  overflow: hidden;
}

.aside-feature .feature-cover {
  overflow: hidden;
  background-color: #eeeae2;
}

.aside-feature .feature-cover img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.aside-feature .feature-name,
.aside-feature .feature-meta,
.aside-feature .feature-count,
.aside-feature .feature-text {
  padding: 0 18px;
}

.aside-feature .feature-name {
  margin-top: 14px;
}

.aside-feature .feature-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--green);
}

.aside-feature .feature-count {
  margin-top: 6px;
}

.aside-feature .feature-text {
  margin-top: 8px;
  padding-bottom: 18px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.aside-note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.aside-note a {
  margin-right: 12px;
}

/* --------------------------------------------------------------------------
   8. pages 阅读说明页
   -------------------------------------------------------------------------- */
.guide-fields,
.guide-diagram {
  margin-bottom: 40px;
}

.field-table {
  border-top: 1px solid var(--line);
}

.field-row {
  border-bottom: 1px solid var(--line);
}

.field-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.field-summary::-webkit-details-marker {
  display: none;
}

.field-summary::before {
  content: "+";
  flex: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  text-align: center;
}

.field-row[open] .field-summary::before {
  content: "−";
}

.field-summary:hover {
  color: var(--accent);
}

.field-body {
  padding: 0 4px 16px 34px;
}

.field-name {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: #f6f4ef;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--green);
}

.field-hint {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}

.field-example {
  margin-top: 8px;
  padding: 10px 12px;
  background-color: #f7f5f0;
  border-left: 3px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.diagram-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--card);
  border: 1px solid var(--line);
}

.diagram-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.diagram-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.boundary-block,
.feedback-block {
  margin-bottom: 32px;
}

.boundary-lead,
.feedback-lead {
  margin: 8px 0 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.boundary-group + .boundary-group {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.boundary-subtitle {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

.boundary-block .boundary-list li {
  font-size: 13px;
}

.boundary-list-exclude li::before {
  background-color: var(--ink-soft);
}

.feedback-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.feedback-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-index {
  flex: 0 0 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #f6f4ef;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.step-text {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.copy-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

.copy-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-link-status {
  font-size: 13px;
  color: var(--green);
}

.copy-link-status:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   9. pages 404
   -------------------------------------------------------------------------- */
.error-main {
  padding-top: 48px;
  padding-bottom: 56px;
}

.error-block {
  max-width: 640px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

.error-title {
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.4;
}

.error-desc {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.error-actions .btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}

.error-actions .btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: transparent;
}

.error-guide {
  margin-top: 36px;
}

.error-guide-title {
  margin-bottom: 16px;
  font-size: 20px;
}

.error-guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.error-guide-list a {
  display: block;
  padding: 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.error-guide-list a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   10. responsive 断点
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .genre-overview-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .genre-block {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
  }

  .entry-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid,
  .error-guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .two-col {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .site-header {
    position: static;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 0 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 46px;
    padding: 0 6px;
    border-bottom: 1px solid var(--line);
  }

  .nav-link.is-current {
    border-bottom-color: var(--accent);
  }

  .site-main {
    padding-bottom: 40px;
  }

  .breadcrumb {
    font-size: 12px;
  }

  .page-header {
    padding: 12px 0 20px;
    margin-bottom: 24px;
  }

  .page-title {
    font-size: 26px;
  }

  .hero {
    margin: 16px 0 40px;
  }

  .hero-image {
    height: 300px;
  }

  .hero-content {
    padding: 22px 18px 24px;
    background-color: rgba(28, 25, 22, .72);
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 128px;
  }

  .genre-grid,
  .cover-grid,
  .index-grid,
  .genre-overview-list,
  .status-grid,
  .related-grid,
  .related-entry-list,
  .error-guide-list,
  .rule-grid,
  .entry-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-image,
  .cover-card:nth-child(3n + 2) .cover-image,
  .cover-card:nth-child(3n) .cover-image {
    height: 220px;
  }

  .update-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
  }

  .update-date {
    flex: none;
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .update-name {
    grid-column: 1 / 2;
  }

  .update-tag {
    grid-column: 1 / 2;
  }

  .update-status {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    align-self: start;
  }

  .genre-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 22px 0;
  }

  .genre-figure img {
    height: 180px;
  }

  .date-group .update-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .update-thumb img {
    width: 64px;
    height: 64px;
  }

  .update-entry {
    grid-column: 2 / 3;
    justify-self: start;
    margin-top: 4px;
  }

  .ranking-item {
    grid-template-columns: 30px 64px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .rank-cover img {
    width: 64px;
    height: 64px;
  }

  .aside-feature .feature-cover img {
    height: 180px;
  }

  .field-summary {
    font-size: 14px;
  }

  .field-body {
    padding-left: 4px;
  }

  .diagram-figure img {
    height: 180px;
  }

  .error-code {
    font-size: 34px;
  }

  .error-title {
    font-size: 22px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px var(--gutter) 24px;
  }

  .footer-nav .footer-list,
  .footer-help .footer-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}
