/* ============================================================
   漫蛙漫画 · 整站样式表
   视觉方向：研究报告风 · 纸张底色 · 章节编号 · 信息图表式布局
   ============================================================ */

/* ============================================================
   Base —— 基础变量、重置、全局排版
   ============================================================ */
:root {
  --paper: #f5f2e9;
  --ink: #2b2b2b;
  --accent: #b04a3e;
  --accent-dark: #93392f;
  --aux-blue: #4a6b8a;
  --aux-blue-dark: #3a5570;
  --line: #e8e2d5;
  --card-bg: #fbf9f3;
  --white: #ffffff;
  --muted: #6d675c;
  --shadow-sm: 0 1px 3px rgba(43, 43, 43, 0.06);
  --shadow-md: 0 4px 14px rgba(43, 43, 43, 0.08);
  --radius: 8px;
  --container: 1200px;
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--aux-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

ul,
ol {
  list-style: none;
}

/* ============================================================
   Layout —— 全站骨架、容器、页头、页脚、面包屑
   ============================================================ */

/* ---- 全站骨架 ---- */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
}

.site-main {
  flex: 1 0 auto;
}

/* ---- 页头 ---- */
.site-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-brand {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-brand:hover {
  color: var(--accent);
}

.site-slogan {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  display: none;
}

/* ---- 主导航 ---- */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 1px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--ink);
  border-radius: 4px;
  line-height: 1.5;
}

.nav-list li a:hover {
  background-color: rgba(176, 74, 62, 0.08);
  color: var(--accent);
}

.nav-list li a.is-current {
  color: var(--accent);
  font-weight: 600;
  background-color: rgba(176, 74, 62, 0.1);
}

/* ---- 页脚 ---- */
.site-footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--line);
  margin-top: 72px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.1fr;
  gap: 40px;
}

.footer-site-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer-slogan {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}

.footer-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}

.footer-links li,
.footer-tags li {
  margin-bottom: 6px;
}

.footer-links li a,
.footer-tags li a {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links li a:hover,
.footer-tags li a:hover {
  color: var(--accent);
}

.footer-help-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-help-link {
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-help-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.footer-help-link:hover::after {
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
  max-width: var(--container);
  margin: 0 auto;
}

/* ---- 面包屑 ---- */
.breadcrumb {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--aux-blue);
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--muted);
  opacity: 0.6;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 500;
}

/* ---- 内页主容器 ---- */
.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---- 页面标题区 ---- */
.page-header {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 10px;
}

.page-description {
  font-size: 15px;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.8;
}

/* ---- 章节标题 ---- */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-no,
.section-number,
.section-index {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  font-style: normal;
  letter-spacing: 0.03em;
}

.section-desc,
.section-intro {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 720px;
}

/* ---- 布局外壳（侧栏布局） ---- */
.layout-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* 左侧栏布局：DOM 顺序为 aside 在前、main 在后 */
.sidebar-left {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* 右侧栏布局（ranking）：DOM 顺序为 breadcrumb 后 main 在前、aside 在后 */
.sidebar-right {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* updates 页使用的右侧栏布局：main 在前、aside 在后 */
.page-layout.sidebar-right {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

/* ---- 内容区块 ---- */
.content-section {
  margin-bottom: 48px;
}

/* ---- 通用文本链接 ---- */
.text-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 12px;
}

.text-link:hover {
  text-decoration: underline;
}

/* ============================================================
   Components —— 首页组件、卡片、列表、按钮、标签
   ============================================================ */

/* ---- 按钮 ---- */
.btn-primary,
.btn-secondary,
.btn-outline,
.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  min-height: 44px;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--aux-blue);
  border-color: var(--aux-blue);
}

.btn-secondary:hover {
  background-color: var(--aux-blue);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--white);
}

/* ---- 首页 Hero ---- */
.hero-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 56px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-media {
  order: 2;
}

.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: var(--card-bg);
}

.hero-figure img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.hero-copy {
  order: 1;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- 题材标签组（首页） ---- */
.genres-tags {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--aux-blue);
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
  min-height: 40px;
}

.tag-item:hover {
  background-color: var(--aux-blue);
  color: var(--white);
  border-color: var(--aux-blue);
  transform: translateY(-1px);
}

/* ---- 封面墙 ---- */
.featured-wall {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.cover-card {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cover-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cover-figure {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--line);
}

.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 12px 14px 4px;
  line-height: 1.4;
}

.cover-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  padding: 0 14px 12px;
  font-weight: 500;
}

/* ---- 最近更新列表（首页） ---- */
.recent-list {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}

.update-items {
  display: flex;
  flex-direction: column;
}

.update-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.update-item:last-child {
  border-bottom: none;
}

.update-date {
  font-size: 13px;
  color: var(--muted);
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.update-link {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  flex: 1;
}

.update-link:hover {
  color: var(--accent);
}

/* ---- 编辑推荐（引用块） ---- */
.editor-note {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}

.editor-quote {
  background-color: var(--card-bg);
  border-left: 4px solid var(--accent);
  padding: 28px 32px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0;
}

.editor-quote p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 14px;
}

.editor-quote cite {
  font-style: normal;
  font-size: 14px;
  color: var(--muted);
  display: block;
  text-align: right;
}

/* ---- 排行摘要（首页 TOP5） ---- */
.ranking-summary {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}

.top-list {
  display: flex;
  flex-direction: column;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.top-item:last-child {
  border-bottom: none;
}

.top-rank {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}

.top-link {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  flex: 1;
}

.top-link:hover {
  color: var(--accent);
}

.trend-arrow {
  font-size: 14px;
  font-weight: 600;
}

.trend-arrow.up {
  color: var(--accent);
}

.trend-arrow.down {
  color: var(--aux-blue);
}

.trend-arrow.stable {
  color: var(--muted);
}

/* ---- 阅读帮助步骤（首页三步） ---- */
.guide-steps {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-item {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--accent);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 14px;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- 全站索引入口（首页） ---- */
.catalog-entry {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.catalog-entry .section-title {
  justify-content: center;
}

.entry-text {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.8;
}

/* ---- 相关链接（首页底部） ---- */
.related-links {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.related-links-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.related-links-item {
  font-size: 14px;
  color: var(--aux-blue);
}

.related-links-item:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   Pages —— 内页专属样式
   ============================================================ */

/* ---- 全站索引（catalog） ---- */
.page-catalog .inner-main {
  padding: 0;
}

.page-catalog .page-header {
  padding-left: 0;
  padding-right: 0;
}

.index-list {
  display: flex;
  flex-direction: column;
}

.index-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.index-item a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  min-width: 120px;
}

.index-item a:hover {
  color: var(--accent);
}

.item-desc {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.genre-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.genre-tag-list li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--aux-blue);
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 40px;
  transition: all 0.2s ease;
}

.genre-tag-list li a:hover {
  background-color: var(--aux-blue);
  color: var(--white);
  border-color: var(--aux-blue);
}

.index-figure {
  margin-top: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card-bg);
  border: 1px solid var(--line);
}

.index-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.index-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  background-color: var(--card-bg);
}

.entry-list {
  display: flex;
  flex-direction: column;
}

.entry-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.entry-list li a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  min-width: 140px;
}

.entry-list li a:hover {
  color: var(--accent);
}

.entry-desc {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

/* ---- 侧栏（catalog） ---- */
.page-sidebar {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 88px;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.sidebar-nav li {
  margin-bottom: 4px;
}

.sidebar-nav li a {
  display: block;
  padding: 8px 12px;
  font-size: 15px;
  color: var(--ink);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-nav li a:hover {
  background-color: rgba(176, 74, 62, 0.08);
  color: var(--accent);
  padding-left: 16px;
}

.sidebar-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

/* ---- 题材百科（genres） ---- */
.page-genres .inner-main {
  padding: 0;
}

.page-genres .page-header {
  padding-left: 0;
  padding-right: 0;
}

.intro {
  margin-bottom: 48px;
}

.intro-text {
  font-size: 15px;
  color: var(--ink);
  max-width: 760px;
  margin-bottom: 16px;
  line-height: 1.9;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.genre-grid .section-title {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.genre-card {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.genre-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.genre-card-media {
  overflow: hidden;
}

.genre-figure {
  position: relative;
}

.genre-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.genre-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--white);
  background: linear-gradient(to top, rgba(43, 43, 43, 0.75), transparent);
}

.genre-card-body {
  padding: 24px;
}

.genre-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.genre-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-tags li {
  font-size: 12px;
  color: var(--aux-blue);
  background-color: rgba(74, 107, 138, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
}

.relation {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.relation-text {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.8;
  margin-bottom: 20px;
}

.relation-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.relation-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--aux-blue);
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 44px;
  transition: all 0.2s ease;
}

.relation-link:hover {
  background-color: var(--aux-blue);
  color: var(--white);
  border-color: var(--aux-blue);
}

.relation-note {
  font-size: 14px;
  color: var(--muted);
}

.relation-note a {
  color: var(--accent);
  font-weight: 500;
}

/* ---- 更新日志（updates） ---- */
.updates-content {
  min-width: 0;
}

.recent-additions {
  margin-bottom: 48px;
}

.update-highlight {
  display: flex;
  gap: 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.update-thumb {
  flex-shrink: 0;
  width: 140px;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--line);
}

.update-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.update-info {
  flex: 1;
  min-width: 0;
}

.update-info h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.5;
}

.update-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.update-info p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- 时间线 ---- */
.timeline-list {
  position: relative;
  padding-left: 24px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background-color: var(--line);
}

.timeline-item {
  position: relative;
  padding: 16px 0 16px 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent);
  border: 2px solid var(--paper);
}

.timeline-date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.timeline-body {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
}

.update-note {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.update-note p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.update-note .related-links {
  padding: 0;
  border-top: none;
  margin-top: 16px;
  justify-content: flex-start;
}

.update-note .related-links p {
  margin-bottom: 0;
}

.update-note .related-links a {
  font-size: 14px;
  color: var(--aux-blue);
  margin-right: 16px;
}

.update-note .related-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---- 侧栏（updates 热门标签） ---- */
.sidebar-area {
  min-width: 0;
}

.sidebar-card {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 88px;
}

.sidebar-card h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.sidebar-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.sidebar-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag-list li a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--aux-blue);
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 36px;
  transition: all 0.2s ease;
}

.sidebar-tag-list li a:hover {
  background-color: var(--aux-blue);
  color: var(--white);
  border-color: var(--aux-blue);
}

/* ---- 排行周报（ranking） ---- */
.page-ranking .inner-main {
  padding: 0;
}

.page-ranking .page-header {
  padding-left: 0;
  padding-right: 0;
}

.rank-section {
  margin-bottom: 48px;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}

.rank-thumb {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background-color: var(--line);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.5;
}

.rank-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.rank-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-trend {
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.trend-up {
  color: var(--accent);
}

.trend-flat {
  color: var(--muted);
}

/* ---- 上榜理由 ---- */
.reason-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.reason-card {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.reason-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.reason-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.reason-note {
  font-size: 14px;
  color: var(--muted);
}

.reason-note a {
  color: var(--accent);
  font-weight: 500;
  margin-right: 16px;
}

/* ---- 相关阅读（ranking） ---- */
.rank-related {
  margin-bottom: 0;
}

.related-list {
  display: flex;
  flex-direction: column;
}

.related-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list li a {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  display: block;
  padding: 4px 0;
}

.related-list li a:hover {
  color: var(--accent);
}

/* ---- 侧栏（ranking 热度对比） ---- */
.rank-aside {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 88px;
  min-width: 0;
}

.aside-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.aside-intro {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-item {
  display: grid;
  grid-template-columns: 64px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.compare-label {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-bar {
  height: 10px;
  background-color: var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background-color: var(--aux-blue);
  border-radius: 5px;
}

.bar-fill-82 { width: 82%; }
.bar-fill-74 { width: 74%; }
.bar-fill-65 { width: 65%; }
.bar-fill-58 { width: 58%; }
.bar-fill-47 { width: 47%; }
.bar-fill-39 { width: 39%; }

.compare-value {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.aside-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

/* ---- 阅读帮助（guide） ---- */
.guide-figure {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  background-color: var(--card-bg);
  border: 1px solid var(--line);
}

.guide-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  background-color: var(--card-bg);
}

.guide-steps-section {
  margin-bottom: 48px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: guide-step;
}

.guide-step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.guide-step:last-child {
  border-bottom: none;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--aux-blue);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.step-content a {
  color: var(--accent);
  font-weight: 500;
  font-size: 14px;
}

/* ---- FAQ ---- */
.faq-section {
  margin-bottom: 48px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 48px;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item p {
  padding: 0 24px 18px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---- 反馈区（guide） ---- */
.feedback-content {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.feedback-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.feedback-content a {
  color: var(--accent);
  font-weight: 500;
}

/* ---- 版权说明（about） ---- */
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.section-heading .section-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.principle-section p,
.copyright-section p,
.feedback-section p,
.index-note-section p {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.9;
  margin-bottom: 16px;
  max-width: 760px;
}

.principle-list {
  margin: 20px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.principle-list li {
  font-size: 15px;
  color: var(--ink);
  padding-left: 24px;
  position: relative;
  line-height: 1.7;
}

.principle-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 2px;
}

.content-figure {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card-bg);
  border: 1px solid var(--line);
}

.content-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.content-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  background-color: var(--card-bg);
}

.copyright-quote {
  background-color: var(--card-bg);
  border-left: 4px solid var(--aux-blue);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.copyright-quote p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 0;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

.feedback-list li {
  font-size: 15px;
  color: var(--ink);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.feedback-list li a {
  color: var(--accent);
  font-weight: 500;
}

.feedback-list li a:hover {
  text-decoration: underline;
}

/* ---- 404 页面 ---- */
.error-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}

.error-panel {
  max-width: 520px;
  text-align: center;
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 40px;
}

.error-code {
  font-size: 64px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 8px;
}

.error-panel h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

.error-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-btn {
  background-color: var(--accent);
  color: var(--white);
}

.error-btn:hover {
  background-color: var(--accent-dark);
  color: var(--white);
}

.error-btn-secondary {
  background-color: transparent;
  color: var(--aux-blue);
  border-color: var(--aux-blue);
}

.error-btn-secondary:hover {
  background-color: var(--aux-blue);
  color: var(--white);
}

/* ---- 侧栏布局（catalog 左侧栏） ---- */
.sidebar-left .page-sidebar {
  grid-column: 1;
}

.sidebar-left .inner-main {
  grid-column: 2;
  padding: 0;
}

/* ---- 右侧栏布局（ranking） ---- */
.sidebar-right .inner-main {
  grid-column: 1;
  padding: 0;
}

.sidebar-right .rank-aside {
  grid-column: 2;
}

/* ---- 右侧栏布局（updates） ---- */
.page-layout.sidebar-right .main-content {
  grid-column: 1;
  min-width: 0;
}

.page-layout.sidebar-right .sidebar-area {
  grid-column: 2;
}

/* ============================================================
   Responsive —— 响应式断点
   ============================================================ */

/* ---- 1024px：平板 ---- */
@media (max-width: 1024px) {
  .wall-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reason-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* ---- 768px：移动端 ---- */
@media (max-width: 768px) {
  .header-inner {
    min-height: 60px;
    padding: 0 16px;
  }

  .site-slogan {
    display: none;
  }

  /* 汉堡菜单 */
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    display: none;
    box-shadow: var(--shadow-md);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li a {
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 6px;
  }

  /* 面包屑 */
  .breadcrumb {
    padding: 12px 16px 0;
    font-size: 13px;
  }

  .inner-main {
    padding: 0 16px;
  }

  .layout-shell {
    padding: 0 16px;
  }

  /* 页面标题 */
  .page-header {
    padding: 24px 0 20px;
    margin-bottom: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .page-description {
    font-size: 14px;
  }

  /* Hero */
  .hero-section {
    padding: 32px 16px;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-media {
    order: 1;
  }

  .hero-copy {
    order: 2;
  }

  .hero-figure img {
    height: 220px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  /* 首页区块 */
  .genres-tags,
  .featured-wall,
  .recent-list,
  .editor-note,
  .ranking-summary,
  .guide-steps,
  .catalog-entry {
    padding: 32px 16px;
  }

  .wall-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .steps-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .update-item {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 14px 0;
  }

  .update-date {
    min-width: 0;
  }

  .top-item {
    gap: 12px;
  }

  .top-rank {
    min-width: 32px;
    font-size: 16px;
  }

  .related-links {
    padding: 16px;
    gap: 10px;
  }

  /* 侧栏布局：移动端侧栏后置 */
  .sidebar-left,
  .sidebar-right,
  .page-layout.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .sidebar-left .page-sidebar {
    order: 2;
    position: static;
  }

  .sidebar-left .inner-main {
    order: 1;
  }

  .sidebar-right .rank-aside,
  .page-layout.sidebar-right .sidebar-area {
    order: 2;
    position: static;
  }

  .sidebar-right .inner-main,
  .page-layout.sidebar-right .main-content {
    order: 1;
  }

  /* 题材百科 */
  .genre-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .genre-figure img {
    height: 200px;
  }

  .genre-card-body {
    padding: 20px;
  }

  .relation {
    padding: 24px;
  }

  .relation-list {
    flex-direction: column;
    align-items: stretch;
  }

  .relation-link {
    width: 100%;
    justify-content: center;
  }

  /* 更新日志 */
  .update-highlight {
    flex-direction: column;
    gap: 14px;
  }

  .update-thumb {
    width: 100%;
  }

  .update-thumb img {
    height: 180px;
  }

  .timeline-list {
    padding-left: 20px;
  }

  .timeline-item {
    padding-left: 16px;
  }

  .timeline-item::before {
    left: -17px;
  }

  /* 排行 */
  .rank-item {
    flex-wrap: wrap;
    gap: 12px;
  }

  .rank-num {
    min-width: 32px;
    font-size: 20px;
  }

  .rank-thumb {
    width: 60px;
    height: 80px;
  }

  .rank-info {
    flex: 1;
    min-width: calc(100% - 110px);
  }

  .rank-trend {
    margin-left: 44px;
  }

  .reason-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .compare-item {
    grid-template-columns: 56px 1fr 32px;
  }

  /* 阅读帮助 */
  .guide-figure img {
    height: 200px;
  }

  .guide-step {
    gap: 14px;
    padding: 16px 0;
  }

  .faq-item summary {
    padding: 16px 44px 16px 18px;
    font-size: 14px;
  }

  .faq-item p {
    padding: 0 18px 16px;
  }

  /* 版权说明 */
  .content-figure img {
    height: 200px;
  }

  .copyright-quote {
    padding: 20px;
  }

  /* 页脚 */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 16px 24px;
  }

  .footer-bottom {
    padding: 14px 16px;
  }

  .footer-bottom p {
    font-size: 12px;
  }

  /* 404 */
  .error-main {
    padding: 48px 16px;
  }

  .error-panel {
    padding: 36px 24px;
  }

  .error-code {
    font-size: 48px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-btn {
    width: 100%;
  }

  /* 全站索引 */
  .index-item {
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
  }

  .index-item a {
    min-width: 0;
  }

  .entry-list li {
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
  }

  .entry-list li a {
    min-width: 0;
  }

  .index-figure img {
    height: 200px;
  }
}

/* ---- 480px：小屏手机 ---- */
@media (max-width: 480px) {
  .wall-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .cover-title {
    font-size: 14px;
    padding: 10px 10px 2px;
  }

  .cover-tag {
    font-size: 11px;
    padding: 0 10px 10px;
  }

  .tag-group {
    gap: 8px;
  }

  .tag-item {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 36px;
  }

  .section-title {
    font-size: 19px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: 11px 20px;
    font-size: 14px;
  }

  .update-link {
    font-size: 14px;
  }

  .top-link {
    font-size: 14px;
  }

  .rank-title {
    font-size: 15px;
  }

  .rank-meta,
  .rank-note {
    font-size: 12px;
  }

  .rank-thumb {
    width: 52px;
    height: 70px;
  }

  .rank-info {
    min-width: calc(100% - 90px);
  }

  .timeline-body {
    font-size: 14px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .step-content h3 {
    font-size: 15px;
  }

  .genre-name {
    font-size: 18px;
  }

  .genre-desc {
    font-size: 13px;
  }

  .footer-site-name {
    font-size: 18px;
  }
}
