/* ==========================================================================
   omofun动漫 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版
   -------------------------------------------------------------------------- */
:root {
  --paper: #fbfaf7;
  --ink: #1f2328;
  --ink-soft: #4a5158;
  --spine: #b4472f;
  --spine-dark: #8f3623;
  --shelf: #6b7280;
  --line: #e3ded4;
  --line-strong: #d3ccbe;
  --card: #ffffff;
  --tag-green: #2f7d4f;
  --tag-green-bg: #eaf5ee;
  --tag-gray: #6b7280;
  --tag-gray-bg: #eef0f2;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(31, 35, 40, 0.06);
  --shadow-hover: 0 6px 16px rgba(31, 35, 40, 0.1);
  --wrap: 1120px;
  --wrap-narrow: 960px;
  --gap: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--spine);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--spine-dark);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--spine);
  outline-offset: 2px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  text-align: left;
}

dl,
dd {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

time {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   layout：全站骨架（页头 / 主容器 / 内页 / 页脚）
   -------------------------------------------------------------------------- */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
}

/* 顶部事实条 */
.fact-bar,
.site-factbar,
.top-fact-bar {
  background-color: #f3efe7;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--shelf);
  line-height: 1.6;
}

.fact-bar {
  padding: 7px 16px;
  text-align: center;
}

.factbar-inner,
.top-fact-bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 7px 16px;
}

.factbar-text,
.top-fact-text {
  font-size: 13px;
  color: var(--shelf);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: saturate(140%) blur(6px);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 64px;
}

.site-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nav-item {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--spine);
  background-color: #f6f2ea;
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--spine);
}

/* 居中品牌标识：绝对定位在导航中间 */
.brand-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 12px;
  color: var(--ink);
}

.brand-mark:hover {
  color: var(--ink);
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--spine);
}

.brand-slogan {
  font-size: 12px;
  color: var(--shelf);
  line-height: 1.4;
  margin-top: 2px;
}

/* 汉堡按钮：桌面隐藏 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--card);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 1px;
  position: relative;
}

.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 4px;
}

.nav-toggle-text {
  font-size: 13px;
  color: var(--ink-soft);
}

/* 主内容 */
.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.home-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px 56px;
}

.inner-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px 56px;
}

.main-container {
  display: block;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 18px 0 10px;
  font-size: 13px;
  color: var(--shelf);
}

.breadcrumb a {
  color: var(--shelf);
}

.breadcrumb a:hover {
  color: var(--spine);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-soft);
}

/* 内页标题区 */
.page-header {
  padding: 6px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.page-title {
  font-size: 28px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.page-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 860px;
}

.page-description a {
  color: var(--spine);
  border-bottom: 1px solid rgba(180, 71, 47, 0.35);
}

.page-description a:hover {
  border-bottom-color: var(--spine);
}

/* 页脚 */
.site-footer {
  margin-top: auto;
  background-color: #f3efe7;
  border-top: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 16px 26px;
}

.footer-about {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 820px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 24px 0;
}

.footer-group {
  min-width: 0;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-list li {
  margin-bottom: 9px;
}

.footer-list a {
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-list a:hover {
  color: var(--spine);
}

.footer-copy {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--shelf);
}

/* --------------------------------------------------------------------------
   components：通用模块
   -------------------------------------------------------------------------- */

/* 区块标题组 */
.section-title {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.section-lead,
.section-intro,
.section-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 860px;
  margin-bottom: 22px;
}

.section-lead a,
.section-intro a,
.section-desc a {
  color: var(--spine);
  border-bottom: 1px solid rgba(180, 71, 47, 0.35);
}

.section-note {
  font-size: 13px;
  color: var(--shelf);
  margin-top: 14px;
  line-height: 1.8;
}

.section-note a {
  color: var(--spine);
  margin-right: 12px;
}

/* 状态标签 */
.tag-status,
.update-tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tag-updated,
.tag-new {
  color: var(--tag-green);
  background-color: var(--tag-green-bg);
  border: 1px solid #cfe6d8;
}

.tag-serial,
.tag-done {
  color: var(--tag-gray);
  background-color: var(--tag-gray-bg);
  border: 1px solid #dcdfe3;
}

.tag-genre,
.tag-cat,
.tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  color: var(--spine);
  background-color: #f7ece8;
  border: 1px solid #ecd4cc;
  white-space: nowrap;
}

.tag-update {
  color: var(--tag-green);
  background-color: var(--tag-green-bg);
}

/* 表格 */
.data-table,
.field-table,
.compare-table {
  width: 100%;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.table-caption,
.field-table-caption,
.compare-caption {
  caption-side: top;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--shelf);
  background-color: #f6f2ea;
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td,
.field-table th,
.field-table td,
.compare-table th,
.compare-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.data-table thead th,
.field-table thead th,
.compare-table thead th {
  background-color: #f6f2ea;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody th,
.field-table tbody th {
  font-weight: 700;
  color: var(--ink);
  background-color: #fcfbf8;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap,
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 相关条目列表 */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}

.related-item a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.related-item a:hover {
  color: var(--spine);
}

.related-note {
  display: block;
  font-size: 13px;
  color: var(--shelf);
  line-height: 1.7;
}

/* 步骤列表 */
.step-list,
.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step-item,
.guide-step {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  min-width: 0;
}

.step-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-desc,
.step-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.step-text a {
  color: var(--spine);
  border-bottom: 1px solid rgba(180, 71, 47, 0.35);
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */

/* 首屏：左文右索引 */
.hero-index {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 36px 0 44px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 34px;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 22px;
}

.hero-figure {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card);
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--shelf);
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

.hero-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.hero-path {
  min-width: 0;
}

.hero-path a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  background-color: var(--card);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--spine);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}

.hero-path a:hover {
  border-color: var(--spine);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* 年份归档索引 */
.hero-archive {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 14px;
}

.archive-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.archive-note {
  font-size: 13px;
  color: var(--shelf);
  line-height: 1.75;
  margin-bottom: 14px;
}

.archive-list {
  border-top: 1px solid var(--line);
}

.archive-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item:last-child {
  border-bottom: 0;
}

.archive-year {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--spine);
  min-width: 56px;
}

.archive-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 题材方向总览 */
.genre-overview {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.genre-block {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--spine);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.genre-block:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.genre-name {
  font-size: 17px;
  margin-bottom: 10px;
}

.genre-feature {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.genre-sample {
  font-size: 13px;
  line-height: 1.7;
  color: var(--shelf);
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  margin-bottom: 12px;
}

.genre-link {
  margin-top: auto;
}

.genre-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--spine);
}

.genre-link a:hover {
  color: var(--spine-dark);
}

/* 封面陈列墙 */
.cover-wall {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.cover-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.cover-figure {
  background-color: #f0ece4;
  border-bottom: 1px solid var(--line);
}

.cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cover-card:nth-child(3n + 1) .cover-figure img {
  aspect-ratio: 3 / 4;
}

.cover-card:nth-child(3n + 2) .cover-figure img {
  aspect-ratio: 4 / 3;
}

.cover-name {
  font-size: 16px;
  padding: 12px 14px 6px;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

/* 最近更新记录 */
.recent-updates {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.update-list {
  border-top: 1px solid var(--line);
}

.update-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.16s ease;
}

.update-row:hover {
  background-color: #f7f3ec;
}

.update-date {
  font-size: 13px;
  color: var(--shelf);
}

.update-work {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.update-genre,
.update-chapter {
  font-size: 13px;
  color: var(--shelf);
  min-width: 0;
}

/* 人气榜单速览 */
.rank-preview {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "num work"
    "num genre"
    "num note";
  gap: 2px 12px;
  align-items: baseline;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.rank-row:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.rank-num {
  grid-area: num;
  font-size: 18px;
  font-weight: 700;
  color: var(--spine);
  line-height: 1.4;
}

.rank-work {
  grid-area: work;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.rank-genre {
  grid-area: genre;
  font-size: 13px;
  color: var(--shelf);
}

.rank-note {
  grid-area: note;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* 条目字段与收录边界摘要 */
.field-summary {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line);
}

.field-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.field-col {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.col-title {
  font-size: 17px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.field-list {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  gap: 8px 14px;
}

.field-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.field-desc,
.field-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.field-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--spine);
}

/* 站内栏目索引 */
.site-index {
  padding: 44px 0 8px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-col {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.index-col:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.index-name {
  font-size: 16px;
  margin-bottom: 8px;
}

.index-name a {
  color: var(--ink);
}

.index-name a:hover {
  color: var(--spine);
}

.index-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--shelf);
}

/* --------------------------------------------------------------------------
   pages：题材分类
   -------------------------------------------------------------------------- */
.cat-directory,
.cat-covers,
.cat-traits,
.cat-compare,
.cat-more {
  margin-bottom: 44px;
}

.cat-dir-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cat-dir-item {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--spine);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "idx name"
    "idx desc"
    "idx link";
  gap: 4px 12px;
  align-items: start;
}

.cat-dir-index {
  grid-area: idx;
  font-size: 15px;
  font-weight: 700;
  color: var(--spine);
  line-height: 1.6;
}

.cat-dir-name {
  grid-area: name;
  font-size: 17px;
}

.cat-dir-desc {
  grid-area: desc;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.cat-dir-link {
  grid-area: link;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--spine);
}

.cat-feature-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card);
  margin-bottom: 26px;
}

.cat-feature-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.cat-feature-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--shelf);
  border-top: 1px solid var(--line);
}

.cat-cover-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cat-cover-group {
  min-width: 0;
}

.cat-cover-title {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.cover-list {
  display: grid;
  gap: 12px;
}

.cover-list .cover-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.cover-list .cover-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.cover-list .cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background-color: #f0ece4;
  border-bottom: 1px solid var(--line);
}

.cover-list .cover-name {
  font-size: 14px;
  padding: 10px 12px 4px;
}

.cover-list .cover-meta {
  padding: 0 12px 12px;
  gap: 6px;
}

.trait-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.trait-item {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.trait-name {
  font-size: 16px;
  margin-bottom: 8px;
}

.trait-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.more-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.more-item {
  min-width: 0;
}

.more-item a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.more-item a:hover {
  border-color: var(--spine);
  color: var(--spine);
}

/* --------------------------------------------------------------------------
   pages：最近更新
   -------------------------------------------------------------------------- */
.page-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card);
  margin-bottom: 32px;
}

.page-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.figure-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--shelf);
  border-top: 1px solid var(--line);
}

.updates-list,
.tag-legend,
.follow-path,
.field-table,
.related-entry {
  margin-bottom: 44px;
}

.updates-list h2,
.tag-legend h2,
.follow-path h2,
.field-table h2,
.related-entry h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.update-day {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}

.update-day-title {
  font-size: 16px;
  color: var(--spine);
  margin-bottom: 6px;
}

.update-rows {
  border-top: 1px solid var(--line);
}

.update-rows .update-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.16s ease;
}

.update-rows .update-row:hover {
  background-color: #f7f3ec;
}

.update-thumb {
  width: 84px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #f0ece4;
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-rows .update-date {
  font-size: 13px;
  color: var(--shelf);
}

.update-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.update-rows .update-genre,
.update-rows .update-chapter {
  font-size: 13px;
  color: var(--shelf);
  min-width: 0;
}

.update-tag {
  justify-self: start;
}

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tag-item {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.tag-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   pages：人气榜单
   -------------------------------------------------------------------------- */
.ranking-list-section,
.ranking-notes-section,
.ranking-scope-section,
.ranking-compare-section {
  margin-bottom: 44px;
}

.ranking-list {
  border-top: 1px solid var(--line);
}

.ranking-item {
  display: grid;
  grid-template-columns: 46px 76px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.16s ease;
}

.ranking-item:hover {
  background-color: #f7f3ec;
}

.rank-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--spine);
  line-height: 1.4;
}

.rank-cover {
  width: 76px;
  height: 102px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #f0ece4;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-name {
  font-size: 17px;
  margin-bottom: 4px;
}

.rank-body .rank-genre {
  font-size: 13px;
  color: var(--shelf);
  margin-bottom: 6px;
}

.rank-body .rank-note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.notes-card {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.notes-card-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.notes-card-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.scope-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.scope-main {
  min-width: 0;
}

.scope-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.scope-list {
  display: grid;
  gap: 10px;
}

.scope-item {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.scope-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--spine);
}

.scope-aside {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.scope-aside-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.scope-aside-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.scope-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.scope-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--spine);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: #fcfbf8;
}

.scope-links a:hover {
  border-color: var(--spine);
  color: var(--spine-dark);
}

.compare-note {
  font-size: 13px;
  color: var(--shelf);
  line-height: 1.8;
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   pages：阅读说明
   -------------------------------------------------------------------------- */
.guide-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card);
  margin-bottom: 34px;
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.guide-figure-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--shelf);
  border-top: 1px solid var(--line);
}

.guide-section {
  margin-bottom: 44px;
  scroll-margin-top: 88px;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.scope-card {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.scope-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.feedback-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feedback-item {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--spine);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.feedback-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.feedback-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
}

.faq-item[open] {
  border-color: var(--line-strong);
}

.faq-question {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  margin-left: auto;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 400;
  color: var(--spine);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.guide-related .related-list {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: var(--wrap-narrow);
  margin: 0 auto;
  padding: 0 16px 64px;
}

.error-panel {
  padding: 56px 0 40px;
  text-align: left;
}

.error-code {
  font-size: 44px;
  font-weight: 700;
  color: var(--spine);
  line-height: 1.1;
  margin-bottom: 12px;
}

.error-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.error-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 24px;
}

.error-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.error-paths a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  background-color: var(--card);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--spine);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.error-paths a:hover {
  border-color: var(--spine);
  color: var(--spine);
}

.error-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  background-color: var(--spine);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
}

.error-home-link:hover {
  background-color: var(--spine-dark);
  color: #fff;
}

/* --------------------------------------------------------------------------
   responsive：平板与手机
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-cover-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  /* 移动导航：按钮显示，列表默认收起 */
  .header-inner {
    padding: 10px 16px;
    min-height: 58px;
    justify-content: flex-start;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-self: flex-start;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-top: 8px;
    background-color: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 6px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item {
    display: block;
  }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 0 12px;
    font-size: 16px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
  }

  .nav-link.is-current {
    border-left-color: var(--spine);
    background-color: #f7f3ec;
  }

  .brand-mark {
    position: static;
    transform: none;
    margin-left: auto;
    padding: 0 0 0 12px;
    align-items: flex-end;
    text-align: right;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-slogan {
    font-size: 11px;
  }

  /* 内页标题区 */
  .page-title {
    font-size: 24px;
  }

  .page-header {
    padding: 4px 0 20px;
    margin-bottom: 26px;
  }

  .section-title,
  .updates-list h2,
  .tag-legend h2,
  .follow-path h2,
  .field-table h2,
  .related-entry h2 {
    font-size: 19px;
  }

  /* 首页 */
  .home-main,
  .inner-main {
    padding: 0 16px 44px;
  }

  .hero-index {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 24px 0 32px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .genre-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .cover-name {
    font-size: 15px;
  }

  .update-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date tag"
      "work work"
      "genre chapter";
    gap: 4px 10px;
    padding: 12px 0;
  }

  .update-row .update-date {
    grid-area: date;
  }

  .update-row .update-work {
    grid-area: work;
  }

  .update-row .update-genre {
    grid-area: genre;
  }

  .update-row .update-chapter {
    grid-area: chapter;
  }

  .update-row .tag-status {
    grid-area: tag;
    justify-self: end;
  }

  .rank-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .field-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px 0;
  }

  .field-desc {
    margin-bottom: 10px;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 内页 */
  .cat-dir-list,
  .trait-list,
  .notes-grid,
  .scope-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cat-cover-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .update-rows .update-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name tag"
      "thumb genre chapter"
      "thumb date date";
    gap: 4px 12px;
    align-items: start;
  }

  .update-rows .update-thumb {
    grid-area: thumb;
    width: 64px;
    height: 86px;
  }

  .update-rows .update-name {
    grid-area: name;
  }

  .update-rows .update-genre {
    grid-area: genre;
  }

  .update-rows .update-chapter {
    grid-area: chapter;
  }

  .update-rows .update-date {
    grid-area: date;
  }

  .update-rows .update-tag {
    grid-area: tag;
    justify-self: end;
  }

  .ranking-item {
    grid-template-columns: 36px 64px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover {
    width: 64px;
    height: 86px;
  }

  .rank-number {
    font-size: 18px;
  }

  .rank-name {
    font-size: 16px;
  }

  .error-code {
    font-size: 36px;
  }

  .error-title {
    font-size: 24px;
  }

  /* 页脚 */
  .footer-inner {
    padding: 28px 16px 22px;
  }

  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 20px 0;
  }
}

@media (max-width: 420px) {
  .wall-grid,
  .cat-cover-groups,
  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-paths,
  .related-list,
  .more-list,
  .tag-list,
  .scope-grid,
  .feedback-list,
  .step-list,
  .guide-steps,
  .error-paths {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-rows .update-row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "thumb name"
      "thumb tag"
      "genre genre"
      "chapter chapter"
      "date date";
  }

  .update-rows .update-thumb {
    width: 56px;
    height: 76px;
  }

  .update-rows .update-tag {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
