/* ==========================================================================
   妖精漫画 · 全站样式表
   研究报告式编辑风格 · 暖纸张底色 · 珊瑚红强调
   ========================================================================== */

/* ==========================================================================
   Base — 基础变量、重置、全局字体与颜色
   ========================================================================== */

:root {
  --color-bg: #faf7f2;
  --color-text: #2b2b2b;
  --color-text-secondary: #5c5c5c;
  --color-accent: #e85d3d;
  --color-accent-dark: #c94a2e;
  --color-tag-bg: #f2b84b;
  --color-border: #e0dad1;
  --color-white: #ffffff;
  --color-card-bg: #fffdf9;
  --color-hero-overlay: rgba(43, 43, 43, 0.55);

  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", serif;

  --container-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;

  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-dark);
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.35;
  font-weight: 600;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

p {
  margin-bottom: 0.8em;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Layout — 全站布局骨架：页头、页脚、主容器、面包屑、页标题
   ========================================================================== */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 页头 ---------- */

.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-list li a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-list li a:hover {
  color: var(--color-accent);
  background-color: rgba(232, 93, 61, 0.06);
}

.nav-list li a.is-current {
  color: var(--color-accent);
  font-weight: 600;
  background-color: rgba(232, 93, 61, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: auto;
  background-color: #f1ece4;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-title {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 14px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links li a {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.footer-links li a:hover {
  color: var(--color-accent);
}

.footer-col p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 18px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ---------- 主容器与内页骨架 ---------- */

.site-main {
  flex: 1;
  width: 100%;
}

.inner-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-text-secondary);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb-sep {
  color: var(--color-border);
  font-size: 12px;
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- 内页标题区 ---------- */

.page-header {
  border-bottom: 2px solid var(--color-text);
  padding-bottom: 28px;
  margin-bottom: 40px;
}

.page-title {
  font-size: 32px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.page-description {
  font-size: 16px;
  color: var(--color-text-secondary);
  max-width: 760px;
  line-height: 1.75;
}

.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.page-tag {
  display: inline-block;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--color-tag-bg);
  color: var(--color-text);
}

/* ---------- 用途标签卡 ---------- */

.usage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.usage-tag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 140px;
}

.usage-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
}

.usage-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

/* ==========================================================================
   Components — 通用组件
   ========================================================================== */

/* ---------- 标签 ---------- */

.tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: var(--color-border);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.tag-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.tag-ongoing {
  background-color: rgba(242, 184, 75, 0.25);
  color: #8a6d1f;
}

.tag-finished {
  background-color: var(--color-border);
  color: var(--color-text-secondary);
}

.tag-genre {
  background-color: rgba(232, 93, 61, 0.1);
  color: var(--color-accent);
}

.tag-status {
  background-color: var(--color-border);
  color: var(--color-text-secondary);
}

/* ---------- 区块标题 ---------- */

.section-title {
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  max-width: 720px;
}

/* ---------- 封面卡（首页版） ---------- */

.cover-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(43, 43, 43, 0.08);
}

.cover-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--color-border);
}

.cover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-name {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
  padding: 12px 14px 4px;
  line-height: 1.4;
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 8px;
}

.cover-update {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 0 14px 14px;
  margin: auto 0 0;
}

/* ---------- 封面卡（分类页版） ---------- */

.cover-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background-color: var(--color-border);
}

.cover-title {
  font-size: 15px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
  padding: 10px 12px 2px;
  line-height: 1.4;
}

.cover-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 0 12px 12px;
  margin: 0;
}

/* ---------- 链接按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- 链接更多 ---------- */

.link-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0;
}

.link-more::after {
  content: " →";
}

/* ---------- 筛选按钮 ---------- */

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 20px;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background-color: transparent;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-btn.is-active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* ==========================================================================
   Pages — 首页
   ========================================================================== */

/* ---------- Hero 焦点区 ---------- */

.hero-section {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-text);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-title {
  font-size: 44px;
  color: var(--color-white);
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
  margin-bottom: 28px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .btn-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-white);
}

.hero-actions .btn-secondary:hover {
  border-color: var(--color-white);
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
}

/* ---------- 公告区 ---------- */

.notice-section {
  background-color: rgba(242, 184, 75, 0.14);
  border-bottom: 1px solid var(--color-border);
}

.notice-list {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.notice-item p {
  margin: 0;
}

.notice-badge {
  flex-shrink: 0;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--color-tag-bg);
  color: var(--color-text);
  margin-top: 3px;
}

/* ---------- 三列内容区：封面墙 / 更新列表 / 编辑侧记 ---------- */

.content-row {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 56px 24px 0;
  display: grid;
  grid-template-columns: 1.6fr 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}

.content-col {
  min-width: 0;
}

.content-col .section-title {
  font-size: 22px;
}

.content-col .section-desc {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- 封面墙网格 ---------- */

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ---------- 更新列表 ---------- */

.update-list {
  border-top: 1px solid var(--color-border);
}

.update-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.update-rank {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  width: 22px;
  text-align: center;
}

.update-info {
  flex: 1;
  min-width: 0;
}

.update-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-chapter {
  font-size: 13px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.update-list .tag-status {
  flex-shrink: 0;
}

.chapter-update .link-more {
  margin-top: 16px;
}

/* ---------- 编辑侧记 ---------- */

.editorial {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.editorial .section-title {
  font-size: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-text);
  margin-bottom: 16px;
}

.editorial-body p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.editorial-body p:last-child {
  margin-bottom: 0;
}

/* ---------- 题材分类入口 ---------- */

.topic-section {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 56px 24px 0;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-card-bg);
  color: var(--color-text);
  transition: all 0.2s ease;
}

.topic-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- 人气榜单摘要 ---------- */

.rank-summary-section {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.rank-summary-list {
  border-top: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.rank-summary-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--color-border);
}

.rank-number {
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--color-accent);
  width: 40px;
  text-align: center;
}

.rank-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--color-text);
}

.rank-value {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ==========================================================================
   Pages — 题材分类页
   ========================================================================== */

.filter-bar {
  margin-bottom: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.filter-title {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 12px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* 侧栏在前：父级容器带 .sidebar-left */
.sidebar-left .page-layout {
  grid-template-columns: 220px 1fr;
}

.sidebar-left .page-layout .genre-index {
  order: 1;
}

.sidebar-left .page-layout .cover-group-wrap {
  order: 2;
}

/* ---------- 题材索引 ---------- */

.genre-index {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.genre-index-title {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}

.genre-index-list li {
  margin-bottom: 2px;
}

.genre-index-list li a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.genre-index-list li a:hover {
  background-color: rgba(232, 93, 61, 0.06);
  color: var(--color-accent);
}

/* ---------- 封面分组 ---------- */

.cover-group-wrap {
  min-width: 0;
}

.cover-group {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.genre-group-title {
  font-size: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}

.genre-group-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.cover-group .cover-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- 用途说明 ---------- */

.usage-note {
  margin-top: 48px;
  padding: 28px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.usage-note-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.usage-note p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.usage-note p a {
  margin-right: 12px;
}

/* ==========================================================================
   Pages — 最近更新页
   ========================================================================== */

.status-filter {
  margin-bottom: 32px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-list {
  margin-bottom: 48px;
}

.timeline-list > .section-title {
  font-size: 22px;
  margin-bottom: 20px;
}

.timeline-group {
  margin-bottom: 32px;
}

.timeline-date {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-accent);
  padding: 8px 0;
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: 12px;
}

.update-records {
  border-bottom: 1px solid var(--color-border);
}

.update-record {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.record-cover {
  flex-shrink: 0;
  width: 48px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--color-border);
}

.record-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-info {
  flex: 1;
  min-width: 0;
}

.record-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.record-chapter {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.update-record .tag {
  flex-shrink: 0;
}

/* ---------- 更新说明 ---------- */

.update-note {
  padding: 28px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.update-note .section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.update-note p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.update-note p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Pages — 人气榜单页
   ========================================================================== */

.rank-section {
  margin-bottom: 48px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head .section-title {
  font-size: 22px;
}

.section-head .section-desc {
  font-size: 14px;
  margin-bottom: 0;
}

/* ---------- 周榜条状图 ---------- */

.rank-bars {
  border-top: 1px solid var(--color-border);
}

.rank-bar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--color-border);
}

.rank-bar-item .rank-number {
  font-size: 20px;
  width: 32px;
}

.rank-bar-item .rank-name {
  flex: 0 0 180px;
  font-size: 15px;
}

.rank-bar-fill {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background-color: var(--color-border);
  position: relative;
  overflow: hidden;
}

.rank-bar-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--color-accent);
  border-radius: 999px;
}

.rank-bar-fill-96::before {
  width: 96%;
}

.rank-bar-fill-84::before {
  width: 84%;
}

.rank-bar-fill-72::before {
  width: 72%;
}

.rank-bar-fill-61::before {
  width: 61%;
}

.rank-bar-fill-53::before {
  width: 53%;
}

.rank-score {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  min-width: 44px;
  text-align: right;
}

/* ---------- 总榜表格 ---------- */

.rank-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--color-card-bg);
  font-size: 14px;
}

.rank-table th {
  background-color: #f1ece4;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.rank-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.rank-table tbody tr:last-child td {
  border-bottom: none;
}

.rank-pos {
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-size: 16px;
  width: 50px;
}

.rank-work {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-thumb {
  flex-shrink: 0;
  width: 36px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--color-border);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-work-name {
  font-weight: 600;
}

.rank-table .genre-tag,
.rank-table .status-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: rgba(232, 93, 61, 0.1);
  color: var(--color-accent);
  white-space: nowrap;
}

.rank-table .status-tag {
  background-color: var(--color-border);
  color: var(--color-text-secondary);
}

/* ---------- 榜单说明 ---------- */

.rank-note {
  padding: 28px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.rank-note .section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.note-content p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.note-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Pages — 阅读指南页
   ========================================================================== */

.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* ---------- 锚点目录 ---------- */

.guide-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.guide-nav-title {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}

.guide-nav-list li {
  margin-bottom: 2px;
}

.guide-nav-list li a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.guide-nav-list li a:hover {
  background-color: rgba(232, 93, 61, 0.06);
  color: var(--color-accent);
}

/* ---------- 指南内容 ---------- */

.guide-content {
  min-width: 0;
}

.guide-section {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.guide-section .section-title {
  font-size: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}

.guide-section .section-desc {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ---------- 步骤卡 ---------- */

.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-serif);
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
}

.step-body {
  flex: 1;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-sans);
  margin-bottom: 8px;
}

.step-body p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.step-figure {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--color-border);
}

.step-figure img {
  width: 100%;
  height: auto;
}

.step-figure figcaption {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 6px 10px;
  background-color: var(--color-card-bg);
}

/* ---------- 追更提示 ---------- */

.tips-block {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.tips-title {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-sans);
  margin-bottom: 10px;
}

.tips-block p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.tips-block p:last-child {
  margin-bottom: 0;
}

.tips-block a {
  font-weight: 600;
}

/* ---------- FAQ ---------- */

.faq-list {
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--color-accent);
}

.faq-item p {
  padding: 0 8px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ---------- 信任说明 ---------- */

.trust-note {
  margin-top: 40px;
  padding: 20px 24px;
  background-color: rgba(242, 184, 75, 0.1);
  border-left: 3px solid var(--color-tag-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.trust-note p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

.trust-note a {
  font-weight: 600;
}

/* ==========================================================================
   Pages — 版权说明页
   ========================================================================== */

.site-position {
  margin-bottom: 48px;
}

.site-position h2 {
  font-size: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}

.site-position p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  max-width: 760px;
}

.content-media {
  margin: 20px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-border);
}

.content-media img {
  width: 100%;
  height: auto;
}

.content-media figcaption {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 10px 14px;
  background-color: var(--color-card-bg);
  border-top: 1px solid var(--color-border);
}

.content-media-inline {
  max-width: 420px;
}

/* ---------- 权利清单 ---------- */

.rights-list {
  margin-bottom: 48px;
}

.rights-list > h2 {
  font-size: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}

.rights-list > p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.rights-items {
  border-top: 1px solid var(--color-border);
}

.rights-items li {
  padding: 16px 8px;
  border-bottom: 1px solid var(--color-border);
}

.rights-items li h3 {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 6px;
}

.rights-items li p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ---------- 反馈路径 ---------- */

.feedback-path {
  margin-bottom: 48px;
  padding: 28px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.feedback-path h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.feedback-path > p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.feedback-steps {
  margin-bottom: 16px;
}

.feedback-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--color-text);
  counter-increment: step;
}

.feedback-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  margin-top: 2px;
}

.feedback-steps {
  counter-reset: step;
}

.feedback-steps li a {
  font-weight: 600;
}

.feedback-path > p:last-child {
  margin-bottom: 0;
}

/* ---------- 结论 ---------- */

.conclusion {
  padding: 24px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.conclusion h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.conclusion p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

.conclusion a {
  font-weight: 600;
}

/* ==========================================================================
   Pages — 404
   ========================================================================== */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  flex: 1;
}

.error-inner {
  max-width: 560px;
  text-align: center;
  padding: 48px 32px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.error-code {
  font-size: 64px;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 12px;
}

.error-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.error-link {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: background-color 0.2s ease;
}

.error-link:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-white);
}

.error-more {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 20px;
}

.error-more a {
  margin: 0 8px;
}

/* ==========================================================================
   Responsive — 响应式
   ========================================================================== */

/* ---------- 平板及以下 ---------- */

@media (max-width: 1024px) {
  .content-row {
    grid-template-columns: 1.4fr 1fr;
  }

  .editorial {
    grid-column: 1 / -1;
  }

  .cover-group .cover-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-card:last-child {
    grid-column: 1 / -1;
  }
}

/* ---------- 手机端断点 768px ---------- */

@media (max-width: 767px) {
  /* 页头 */

  .header-inner {
    padding: 0 16px;
    height: 60px;
  }

  .site-logo {
    font-size: 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 0;
    box-shadow: 0 8px 16px rgba(43, 43, 43, 0.06);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li a {
    padding: 12px 8px;
    font-size: 16px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }

  .nav-list li:last-child a {
    border-bottom: none;
  }

  /* 页脚 */

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 16px 24px;
  }

  .footer-bottom {
    padding: 14px 16px;
  }

  /* 内页 */

  .inner-main {
    padding: 24px 16px 48px;
  }

  .breadcrumb {
    margin-bottom: 16px;
  }

  .page-header {
    padding-bottom: 20px;
    margin-bottom: 28px;
  }

  .page-title {
    font-size: 26px;
  }

  .usage-tags {
    flex-direction: column;
    align-items: stretch;
  }

  .usage-tag {
    min-width: 0;
  }

  /* 首页 Hero */

  .hero-section {
    min-height: 360px;
  }

  .hero-content {
    padding: 56px 16px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* 首页公告 */

  .notice-list {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  /* 首页三列 → 单列（章节列表在前） */

  .content-row {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 16px 0;
  }

  .content-col {
    min-width: 0;
  }

  .cover-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cover-group .cover-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 首页题材与榜单 */

  .topic-section {
    padding: 40px 16px 0;
  }

  .rank-summary-section {
    padding: 40px 16px 56px;
  }

  .rank-summary-item {
    padding: 10px 4px;
  }

  .rank-number {
    font-size: 20px;
    width: 32px;
  }

  /* 分类页：侧栏移到内容之后 */

  .page-layout {
    display: block;
  }

  .sidebar-left .page-layout {
    display: block;
  }

  .genre-index {
    position: static;
    margin-top: 32px;
  }

  .cover-group-wrap {
    width: 100%;
  }

  .filter-bar {
    margin-bottom: 24px;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* 更新页 */

  .update-record {
    gap: 10px;
  }

  .record-cover {
    width: 40px;
    height: 54px;
  }

  .record-title {
    font-size: 14px;
  }

  .record-chapter {
    font-size: 12px;
  }

  .update-record .tag {
    font-size: 11px;
    padding: 2px 8px;
  }

  /* 榜单页 */

  .rank-bar-item {
    gap: 8px;
    padding: 12px 4px;
  }

  .rank-bar-item .rank-name {
    flex: 0 0 90px;
    font-size: 14px;
  }

  .rank-bar-fill {
    height: 10px;
  }

  .rank-score {
    font-size: 12px;
    min-width: 36px;
  }

  .rank-table-wrap {
    overflow-x: auto;
  }

  .rank-table {
    min-width: 640px;
  }

  /* 阅读指南页 */

  .guide-layout {
    display: block;
  }

  .guide-nav {
    position: static;
    margin-top: 32px;
  }

  .guide-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .guide-nav-list li {
    margin: 0;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .step-card:last-child {
    grid-column: auto;
  }

  .step-card {
    padding: 20px 16px;
  }

  /* 版权页 */

  .site-position,
  .rights-list,
  .feedback-path {
    margin-bottom: 36px;
  }

  .content-media-inline {
    max-width: 100%;
  }

  /* 404 */

  .error-main {
    padding: 48px 16px;
  }

  .error-inner {
    padding: 32px 20px;
  }

  .error-code {
    font-size: 48px;
  }
}

/* ---------- 小屏手机 390px 优化 ---------- */

@media (max-width: 420px) {
  .cover-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cover-name {
    font-size: 14px;
    padding: 8px 10px 2px;
  }

  .cover-tags {
    padding: 0 10px 6px;
    gap: 4px;
  }

  .cover-update {
    font-size: 12px;
    padding: 0 10px 10px;
  }

  .cover-title {
    font-size: 14px;
    padding: 8px 10px 2px;
  }

  .cover-meta {
    font-size: 12px;
    padding: 0 10px 10px;
  }

  .tag {
    font-size: 11px;
    padding: 2px 8px;
  }

  .rank-bar-item .rank-name {
    flex: 0 0 76px;
    font-size: 13px;
  }

  .rank-score {
    font-size: 11px;
  }

  .notice-item {
    font-size: 13px;
  }

  .update-name {
    font-size: 13px;
  }

  .update-chapter {
    font-size: 12px;
  }

  .update-time {
    font-size: 11px;
  }

  .record-cover {
    width: 36px;
    height: 48px;
  }
}

/* ---------- 打印样式 ---------- */

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .notice-section,
  .filter-bar,
  .genre-index,
  .guide-nav {
    display: none;
  }

  body {
    background-color: var(--color-white);
  }

  .inner-main {
    padding: 0;
    max-width: 100%;
  }

  .page-header {
    border-bottom-color: var(--color-text);
  }
}
