/* ============================================================
   动漫天堂 · 全站样式
   分组：base / layout / components / pages / responsive
   ============================================================ */

/* ------------------------------------------------------------
   base
   ------------------------------------------------------------ */

:root {
  --bg-page: #f6f7fa;
  --bg-card: #ffffff;
  --text-main: #1c2333;
  --text-sub: #5b6478;
  --brand: #3b5bdb;
  --brand-dark: #2f49b3;
  --warm: #c2703c;
  --line: #e3e6ee;
  --line-soft: #eef1f6;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(28, 35, 51, 0.05);
  --shadow-hover: 0 6px 18px rgba(28, 35, 51, 0.1);
  --container: 1180px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  font-feature-settings: "tnum" 1;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

time {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   layout · 全站骨架
   ------------------------------------------------------------ */

.site-main {
  display: block;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.inner-main {
  padding-top: 20px;
}

.fact-bar {
  background: var(--text-main);
  color: #d9dde8;
  font-size: 13px;
}

.fact-bar p {
  max-width: var(--container);
  margin: 0 auto;
  padding: 9px 24px;
  line-height: 1.6;
}

/* --- 页头 --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 62px;
}

.brand {
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--brand);
  vertical-align: 2px;
}

.brand:hover {
  color: var(--brand);
}

.site-nav {
  margin-left: auto;
}

.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;
  font-size: 15px;
  color: var(--text-sub);
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  color: var(--brand);
}

.nav-list a.is-current {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
}

.nav-toggle::before {
  content: "☰";
  line-height: 1;
}

.nav-toggle[aria-expanded="true"]::before {
  content: "✕";
}

/* ------------------------------------------------------------
   components · 通用元件
   ------------------------------------------------------------ */

.section-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.section-lead,
.section-desc,
.section-intro {
  max-width: 720px;
  margin-bottom: 18px;
  color: var(--text-sub);
  font-size: 14.5px;
}

.section-lead a,
.section-desc a,
.section-intro a {
  border-bottom: 1px solid rgba(59, 91, 219, 0.35);
}

.subsection-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.column-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.column-lead {
  margin-bottom: 12px;
  color: var(--text-sub);
  font-size: 13.5px;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}

.tag-warm {
  background: rgba(194, 112, 60, 0.12);
  color: var(--warm);
}

.tag-fantasy {
  background: rgba(59, 91, 219, 0.12);
  color: var(--brand);
}

.tag-ancient {
  background: rgba(194, 112, 60, 0.14);
  color: #a05a2c;
}

.tag-urban {
  background: rgba(45, 138, 118, 0.14);
  color: #2d7a68;
}

.tag-mystery {
  background: rgba(103, 78, 167, 0.14);
  color: #5f46a0;
}

.tag-status {
  background: var(--line-soft);
  color: var(--text-sub);
}

.status {
  color: var(--text-sub);
  font-size: 12.5px;
}

.status-ongoing {
  color: #2d7a68;
}

.status-finished {
  color: var(--text-sub);
}

/* --- 面包屑 --- */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 14px;
  font-size: 13px;
  color: var(--text-sub);
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: #b3bacb;
}

.breadcrumb-current {
  color: var(--text-main);
}

/* --- 内页标题区 --- */

.page-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.page-title {
  font-size: 30px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.page-description {
  max-width: 720px;
  color: var(--text-sub);
  font-size: 15px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 16px 0 0;
}

.page-meta-item,
.page-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.page-meta dt,
.page-meta .meta-label {
  font-size: 12.5px;
  color: var(--text-sub);
}

.page-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.page-meta .meta-item {
  font-size: 14px;
  font-weight: 600;
}

/* --- 相关入口 --- */

.related-entry,
.related-section {
  margin-top: 40px;
}

.entry-grid,
.entry-list,
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.entry-item,
.related-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.entry-link {
  display: block;
  padding: 16px 18px;
  color: var(--text-main);
}

.entry-link:hover {
  color: var(--brand);
}

.entry-name {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.entry-desc {
  display: block;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.65;
}

.entry-title {
  font-size: 16px;
  margin: 0;
}

.entry-title a {
  display: block;
  padding: 16px 18px 6px;
}

.entry-list .entry-item > p {
  padding: 0 18px 16px;
  margin: 0;
  font-size: 13.5px;
  color: var(--text-sub);
}

.related-item a {
  display: block;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--text-main);
}

.related-item a:hover {
  color: var(--brand);
}

.related-name {
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
}

.related-desc {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   components · 页脚
   ------------------------------------------------------------ */

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-title {
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  font-size: 13.5px;
  color: var(--text-sub);
}

.footer-list a:hover {
  color: var(--brand);
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px 30px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-sub);
}

.footer-brand {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.footer-note {
  margin-bottom: 4px;
}

.footer-copy {
  color: #8b93a7;
}

/* ------------------------------------------------------------
   pages · 首页
   ------------------------------------------------------------ */

.home-main {
  padding-top: 34px;
}

.hero-section {
  margin-bottom: 52px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.hero-intro {
  padding-top: 6px;
}

.hero-intro .page-title {
  font-size: 30px;
  margin-bottom: 14px;
}

.hero-summary {
  color: var(--text-sub);
  font-size: 15px;
  margin-bottom: 22px;
}

.hero-paths {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-paths a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 14.5px;
  box-shadow: var(--shadow-card);
}

.hero-paths a:hover {
  color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.hero-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cover-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.cover-card:hover {
  border-color: rgba(59, 91, 219, 0.4);
  box-shadow: var(--shadow-hover);
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--line-soft);
}

.cover-card figcaption {
  padding: 10px 12px 12px;
}

.cover-title {
  font-size: 14.5px;
  margin-bottom: 4px;
}

.cover-meta {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

.cover-card-main {
  grid-row: span 2;
}

.cover-card-main .cover-title {
  font-size: 16px;
}

/* --- 题材方向总览 --- */

.genre-overview {
  margin-bottom: 52px;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.genre-column {
  padding: 18px 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid var(--warm);
  box-shadow: var(--shadow-card);
}

.genre-name {
  font-size: 16px;
  margin-bottom: 8px;
}

.genre-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.genre-audience {
  font-size: 13px;
  color: #8b93a7;
  margin-bottom: 12px;
}

.genre-entry a {
  font-size: 13.5px;
  font-weight: 600;
}

.genre-entry a::after {
  content: " →";
}

/* --- 主推荐封面墙 --- */

.recommend-section {
  margin-bottom: 52px;
}

.cover-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cover-card-large {
  display: flex;
  flex-direction: column;
}

.cover-card-large figure {
  margin: 0;
}

.cover-card-large img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.cover-card-large .cover-title {
  padding: 12px 16px 0;
  font-size: 16px;
}

.cover-card-large .cover-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 0;
}

.cover-note {
  padding: 8px 16px 16px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 24px;
  margin-top: 10px;
}

.compact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.compact-row a {
  color: var(--text-main);
  font-weight: 500;
}

.compact-row a:hover {
  color: var(--brand);
}

.compact-row time {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-sub);
  white-space: nowrap;
}

/* --- 更新 + 榜单并列区 --- */

.dual-section {
  margin-bottom: 52px;
}

.dual-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.update-column,
.rank-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.update-list li.update-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.update-list li.update-row:last-child {
  border-bottom: 0;
}

.update-list .update-row time {
  flex: 0 0 auto;
  color: var(--text-sub);
  font-size: 12.5px;
}

.update-list .update-row a {
  color: var(--text-main);
  font-weight: 500;
}

.update-list .update-row a:hover {
  color: var(--brand);
}

.update-list .chapter {
  color: var(--text-sub);
  font-size: 12.5px;
}

.update-list .status {
  margin-left: auto;
  white-space: nowrap;
}

.rank-list li.rank-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.rank-list li.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  flex: 0 0 22px;
  font-weight: 600;
  color: var(--warm);
  font-variant-numeric: tabular-nums;
}

.rank-list .rank-row a {
  color: var(--text-main);
  font-weight: 500;
}

.rank-list .rank-row a:hover {
  color: var(--brand);
}

.rank-reason {
  flex: 1 1 auto;
  color: var(--text-sub);
  font-size: 12.5px;
  line-height: 1.6;
}

/* --- 字段口径与收录边界摘要 --- */

.field-summary {
  margin-bottom: 52px;
}

.field-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.field-column,
.boundary-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.field-list li.field-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.field-list li.field-row:last-child {
  border-bottom: 0;
}

.field-name {
  flex: 0 0 84px;
  font-weight: 600;
}

.field-desc {
  flex: 1 1 auto;
  color: var(--text-sub);
}

.boundary-column > p {
  margin-bottom: 10px;
  color: var(--text-sub);
  font-size: 13.5px;
}

.boundary-list li {
  position: relative;
  padding: 5px 0 5px 16px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--brand);
}

/* --- 站内栏目索引 --- */

.site-index {
  margin-bottom: 20px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.index-block {
  display: block;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-main);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.index-block:hover {
  color: var(--brand);
  border-color: rgba(59, 91, 219, 0.4);
  box-shadow: var(--shadow-hover);
}

.index-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.index-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ------------------------------------------------------------
   pages · 题材分类
   ------------------------------------------------------------ */

.topic-groups {
  margin-bottom: 44px;
}

.topic-group {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.topic-group:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.topic-name {
  font-size: 19px;
  margin-bottom: 12px;
}

.topic-cover {
  margin: 0 0 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.topic-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--line-soft);
}

.topic-cover figcaption {
  padding: 8px 12px 10px;
  font-size: 12.5px;
  color: var(--text-sub);
  background: var(--bg-card);
}

.topic-trait {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.topic-audience {
  font-size: 13px;
  color: #8b93a7;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  align-content: start;
}

.work-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  font-size: 13px;
}

.work-link {
  flex: 1 1 100%;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

.work-link:hover {
  color: var(--brand);
}

.work-tag,
.work-status,
.work-chapters {
  font-size: 12.5px;
  color: var(--text-sub);
}

.work-chapters {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* --- 字段说明表 --- */

.field-guide {
  margin-bottom: 44px;
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.field-table caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--line-soft);
}

.field-table th,
.field-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.field-table thead th {
  background: #f0f2f7;
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 600;
}

.field-table tbody th {
  width: 130px;
  font-weight: 600;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

/* --- 查阅顺序 --- */

.browse-order {
  margin-bottom: 20px;
}

.order-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.order-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.order-column h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.order-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.order-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
}

/* ------------------------------------------------------------
   pages · 最近更新
   ------------------------------------------------------------ */

.date-anchor-bar {
  margin-bottom: 26px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.anchor-bar-title {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anchor-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.anchor-list a:hover {
  color: var(--brand);
  border-color: rgba(59, 91, 219, 0.4);
}

.update-log {
  margin-bottom: 40px;
}

.date-group {
  margin-bottom: 26px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 80px;
}

.date-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.date-heading time {
  font-size: 16px;
  font-weight: 600;
}

.date-count {
  font-size: 12.5px;
  color: var(--text-sub);
  font-weight: 400;
}

.update-log .update-list li.update-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.update-log .update-list li.update-row:last-child {
  border-bottom: 0;
}

.update-date {
  flex: 0 0 84px;
  color: var(--text-sub);
  font-size: 12.5px;
}

.update-work {
  color: var(--text-main);
  font-weight: 500;
}

.update-work:hover {
  color: var(--brand);
}

.update-chapter {
  color: var(--text-sub);
  font-size: 12.5px;
}

.update-log .status {
  margin-left: auto;
  white-space: nowrap;
}

/* --- 整理方式说明 --- */

.log-guide {
  margin-bottom: 40px;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-item {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.guide-item-title {
  font-size: 15px;
  margin-bottom: 8px;
}

.guide-item p {
  font-size: 13.5px;
  color: var(--text-sub);
}

/* --- 更新密集题材 --- */

.dense-topics {
  margin-bottom: 40px;
}

.dense-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.dense-item {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.dense-item .tag {
  margin-bottom: 8px;
}

.dense-item p {
  font-size: 13.5px;
  color: var(--text-sub);
}

/* --- 更新配图 --- */

.update-media {
  margin-bottom: 20px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.media-item {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.media-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--line-soft);
}

.media-caption {
  padding: 10px 14px 12px;
  font-size: 13px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   pages · 人气榜单
   ------------------------------------------------------------ */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 32px;
  align-items: start;
}

.ranklist-section {
  margin-bottom: 40px;
}

.ranklist {
  display: grid;
  gap: 14px;
}

.rank-item {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.rank-item-top {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.rank-cover {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--line-soft);
}

.rank-body {
  min-width: 0;
}

.rank-position {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--warm);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.rank-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.rank-name a {
  color: var(--text-main);
}

.rank-name a:hover {
  color: var(--brand);
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rank-reason {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* --- 排序口径 --- */

.rank-rule-section {
  margin-bottom: 40px;
}

.rule-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.rule-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.rule-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--brand);
}

.rule-note {
  font-size: 13.5px;
  color: var(--text-sub);
}

/* --- 主推荐与次推荐 --- */

.rank-tier-section {
  margin-bottom: 20px;
}

.tier-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tier-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.tier-column p {
  font-size: 13.5px;
  color: var(--text-sub);
}

/* --- 榜单页侧栏 --- */

.page-layout .related-section {
  margin-top: 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.page-layout .related-section .section-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.page-layout .related-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.page-layout .related-item {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}

.page-layout .related-item:last-child {
  border-bottom: 0;
}

.page-layout .related-item a {
  padding: 8px 0;
}

/* ------------------------------------------------------------
   pages · 阅读说明
   ------------------------------------------------------------ */

.layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 32px;
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-side {
  display: grid;
  gap: 16px;
}

.side-block {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.side-title {
  font-size: 15px;
  margin-bottom: 10px;
}

.side-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--text-sub);
}

.side-list li:last-child {
  border-bottom: 0;
}

.side-list a {
  color: var(--text-sub);
}

.side-list a:hover {
  color: var(--brand);
}

.section {
  margin-bottom: 40px;
}

.field-figure {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.field-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--line-soft);
}

.field-figure figcaption {
  padding: 10px 16px 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.boundary-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.boundary-title {
  font-size: 15px;
  margin-bottom: 10px;
}

.boundary-in .boundary-list li::before {
  background: #2d7a68;
}

.boundary-out .boundary-list li::before {
  background: var(--warm);
}

.reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.reading-column {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.reading-title {
  font-size: 15px;
  margin-bottom: 10px;
}

.reading-steps {
  counter-reset: step;
}

.reading-steps li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 13.5px;
  color: var(--text-sub);
  counter-increment: step;
}

.reading-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(59, 91, 219, 0.12);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.reading-text {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.reading-list li {
  position: relative;
  padding: 5px 0 5px 16px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.reading-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--brand);
}

/* --- FAQ 折叠 --- */

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-item[open] {
  border-color: rgba(59, 91, 219, 0.35);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: "＋";
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 400;
}

.faq-item[open] .faq-question::before {
  content: "－";
}

.faq-answer {
  padding: 0 18px 16px 42px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* ------------------------------------------------------------
   pages · 404
   ------------------------------------------------------------ */

.error-main {
  padding-top: 56px;
  padding-bottom: 72px;
}

.error-panel {
  max-width: 620px;
  margin-bottom: 40px;
}

.error-code {
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  color: var(--brand);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.error-panel h1 {
  font-size: 26px;
  margin-bottom: 12px;
}

.error-text {
  color: var(--text-sub);
  font-size: 15px;
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #ffffff;
}

.btn-ghost {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--text-main);
}

.btn-ghost:hover {
  color: var(--brand);
  border-color: rgba(59, 91, 219, 0.4);
}

.error-paths h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.error-path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.error-path-list a {
  display: block;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-main);
  font-size: 14.5px;
  box-shadow: var(--shadow-card);
}

.error-path-list a:hover {
  color: var(--brand);
  border-color: rgba(59, 91, 219, 0.4);
  box-shadow: var(--shadow-hover);
}

/* ------------------------------------------------------------
   responsive
   ------------------------------------------------------------ */

@media (max-width: 1024px) {
  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cover-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-main {
    padding: 0 16px 44px;
  }

  .fact-bar p {
    padding: 8px 16px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(28, 35, 51, 0.08);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 16px 12px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    min-height: 46px;
    padding: 0 6px;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-list a.is-current {
    border-bottom-color: var(--line-soft);
    border-left: 3px solid var(--brand);
    padding-left: 12px;
  }

  .page-title,
  .hero-intro .page-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 19px;
  }

  .subsection-title {
    font-size: 16px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-covers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cover-card-main {
    grid-row: auto;
  }

  .genre-grid,
  .cover-wall,
  .guide-list,
  .media-grid,
  .order-columns,
  .rule-columns,
  .tier-columns,
  .boundary-grid,
  .reading-grid,
  .dual-layout,
  .field-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .work-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-layout,
  .layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .rank-item-top {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
  }

  .field-table tbody th {
    width: 96px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 22px;
  }

  .footer-bottom {
    padding: 16px 16px 26px;
  }

  .content-side {
    order: 2;
  }
}

@media (max-width: 480px) {
  .hero-covers {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-log .update-list li.update-row,
  .update-list li.update-row {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .update-log .status,
  .update-list .status {
    margin-left: 0;
  }

  .update-date {
    flex: 0 0 auto;
  }

  .rank-item-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .rank-cover {
    max-width: 160px;
  }

  .error-code {
    font-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
