/* ==========================================================
   皮皮漫画 · 全站样式表
   几何编辑风：矩形分区、粗细线对比、多色点缀
   ========================================================== */

/* ==========================================================
   Base — 基础变量、重置、字体、颜色
   ========================================================== */
:root {
  --color-ink: #1E1E2A;
  --color-bg: #F7F3E8;
  --color-red: #D94F4F;
  --color-green: #2E6E6E;
  --color-blue: #3B5BA5;
  --color-panel: #E8E2D4;
  --color-panel-light: #F1EDE2;
  --color-line: #D8D2C4;
  --color-line-dark: #B8B2A4;
  --color-muted: #6B6B76;
  --color-white: #FFFFFF;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --container-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 8px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --shadow-card: 0 1px 3px rgba(30, 30, 42, 0.08);
  --shadow-card-hover: 0 4px 12px rgba(30, 30, 42, 0.12);
}

*,
*::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: 15px;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-ink);
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p {
  margin-bottom: 0;
}

/* ==========================================================
   Layout — 全站骨架：页头、主容器、页脚
   ========================================================== */

/* ---------- 页头 ---------- */
.site-header {
  background-color: var(--color-ink);
  border-bottom: 3px solid var(--color-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-shell {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--color-white);
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-white);
}

.brand-name::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-red);
  margin-right: 8px;
  vertical-align: 2px;
}

/* 主导航 */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  margin: 0;
}

.nav-list a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list a:hover {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--color-white);
  background-color: var(--color-red);
  font-weight: 600;
}

/* 汉堡按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- 主容器 ---------- */
.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.home-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.inner-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 24px 24px 48px;
  width: 100%;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a {
  color: var(--color-blue);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--color-line-dark);
  font-size: 12px;
}

.breadcrumb-current {
  color: var(--color-muted);
  font-weight: 500;
}

/* ---------- 页面标题区 ---------- */
.page-header {
  border-bottom: 2px solid var(--color-line-dark);
  padding-bottom: 16px;
  margin-bottom: 28px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-description {
  font-size: 15px;
  color: var(--color-muted);
  max-width: 760px;
  line-height: 1.7;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background-color: var(--color-ink);
  color: rgba(255, 255, 255, 0.8);
  border-top: 3px solid var(--color-red);
  margin-top: auto;
}

.footer-shell {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .footer-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

.footer-links h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

/* ---------- 通用双栏布局 ---------- */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.layout-main {
  min-width: 0;
}

.layout-aside {
  min-width: 0;
}

/* 书架页侧栏布局 */
.layout-shell.sidebar-right {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

.sidebar-content {
  min-width: 0;
}

/* ---------- 侧栏卡片通用 ---------- */
.sidebar-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-ink);
  margin-bottom: 14px;
}

/* ---------- 相关链接导航 ---------- */
.related-links {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}

.related-links-label {
  font-weight: 700;
  color: var(--color-ink);
  margin-right: 4px;
}

.related-links-item {
  color: var(--color-blue);
  padding: 4px 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  font-size: 13px;
}

.related-links-item:hover {
  border-color: var(--color-blue);
  text-decoration: none;
}

/* ==========================================================
   Components — 通用组件
   ========================================================== */

/* ---------- 区块标题 ---------- */
.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 800;
  position: relative;
  padding-left: 14px;
  margin-bottom: 6px;
}

.section-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background-color: var(--color-red);
}

.section-desc {
  font-size: 14px;
  color: var(--color-muted);
  max-width: 680px;
  line-height: 1.6;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* ---------- 卡片通用 ---------- */
.feature-card,
.teaser-card,
.summary-card,
.genre-card,
.update-card,
.rank-item,
.sidebar-card,
.tip-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover,
.teaser-card:hover,
.update-card:hover,
.rank-item:hover,
.sidebar-card:hover,
.tip-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-line-dark);
}

/* ---------- 标签 ---------- */
.tag-link {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tag-link:hover {
  background-color: var(--color-ink);
  color: var(--color-white);
  border-color: var(--color-ink);
  text-decoration: none;
}

/* ---------- 图片容器 ---------- */
figure {
  margin: 0;
}

figcaption {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ==========================================================
   Pages — 首页
   ========================================================== */

/* ---------- 首屏 Hero ---------- */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 48px 0 40px;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-slogan {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-green);
  margin-bottom: 12px;
  line-height: 1.4;
}

.hero-intro {
  font-size: 15px;
  color: var(--color-muted);
  margin-bottom: 20px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-updates-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--color-red);
  color: var(--color-white);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.hero-updates-link:hover {
  background-color: var(--color-ink);
  text-decoration: none;
  color: var(--color-white);
}

.hero-media {
  min-width: 0;
}

.hero-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
}

/* ---------- 题材分类模块 ---------- */
.genre-section {
  padding: 40px 0;
  border-top: 1px solid var(--color-line);
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.genre-card {
  padding: 20px;
  border-left: 4px solid var(--color-line-dark);
}

.genre-card.genre-shonen { border-left-color: var(--color-red); }
.genre-card.genre-shojo { border-left-color: #D4778A; }
.genre-card.genre-mystery { border-left-color: var(--color-blue); }
.genre-card.genre-scifi { border-left-color: var(--color-green); }

.genre-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.genre-card p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.genre-cover img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.genre-more {
  text-align: right;
  font-size: 14px;
}

/* ---------- 最近更新封面墙 ---------- */
.updates-wall-section {
  padding: 40px 0;
  border-top: 1px solid var(--color-line);
}

.updates-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.update-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.update-card:hover {
  transform: translateY(-2px);
}

.update-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.update-card h3 {
  font-size: 15px;
  font-weight: 700;
  padding: 12px 12px 4px;
  line-height: 1.4;
}

.update-type {
  font-size: 12px;
  color: var(--color-muted);
  padding: 0 12px 4px;
}

.update-card time {
  display: block;
  font-size: 12px;
  color: var(--color-red);
  font-weight: 600;
  padding: 0 12px 12px;
  font-family: var(--font-mono);
}

.wall-footer {
  text-align: center;
}

.wall-link {
  display: inline-block;
  padding: 8px 24px;
  border: 1px solid var(--color-line-dark);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  background-color: var(--color-white);
}

.wall-link:hover {
  background-color: var(--color-ink);
  color: var(--color-white);
  text-decoration: none;
}

/* ---------- 双栏主体 ---------- */
.home-two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 40px 0;
  border-top: 1px solid var(--color-line);
  align-items: start;
}

.rank-panel {
  min-width: 0;
}

.rank-list {
  counter-reset: rank-counter;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.rank-number {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-line-dark);
  width: 32px;
  flex-shrink: 0;
  text-align: center;
}

.rank-item:nth-child(1) .rank-number { color: var(--color-red); font-size: 24px; }
.rank-item:nth-child(2) .rank-number { color: var(--color-red); font-size: 22px; }
.rank-item:nth-child(3) .rank-number { color: var(--color-red); font-size: 20px; }

.rank-item img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.rank-info {
  min-width: 0;
  flex: 1;
}

.rank-info h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-tag {
  font-size: 12px;
  color: var(--color-muted);
}

.rank-more {
  margin-top: 12px;
  text-align: right;
  font-size: 14px;
}

/* 首页侧栏 */
.home-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.booklist-card,
.guide-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.booklist-card h2,
.guide-card h2 {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-ink);
  margin-bottom: 12px;
}

.booklist-card p,
.guide-card p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.booklist-card a,
.guide-card a {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-blue);
}

/* ---------- 阅读指南预告 ---------- */
.guide-teaser {
  padding: 40px 0;
  border-top: 1px solid var(--color-line);
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.teaser-card {
  padding: 20px;
  border-top: 3px solid var(--color-line-dark);
}

.teaser-card:nth-child(1) { border-top-color: var(--color-red); }
.teaser-card:nth-child(2) { border-top-color: var(--color-green); }
.teaser-card:nth-child(3) { border-top-color: var(--color-blue); }

.teaser-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.teaser-card p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.teaser-card a {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-blue);
}

/* ---------- 版权与反馈说明 ---------- */
.copyright-note {
  padding: 32px;
  background-color: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  margin-top: 40px;
}

.copyright-note h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.copyright-note p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.copyright-note p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   Pages — 书架页
   ========================================================== */

.bookcase-features {
  margin-bottom: 32px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.feature-card {
  padding: 20px;
  border-top: 3px solid var(--color-line-dark);
}

.feature-card:nth-child(1) { border-top-color: var(--color-red); }
.feature-card:nth-child(2) { border-top-color: var(--color-green); }
.feature-card:nth-child(3) { border-top-color: var(--color-blue); }

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
}

.bookcase-example {
  margin-bottom: 24px;
}

.shelf-group {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shelf-row {
  background-color: var(--color-panel-light);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.shelf-row h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-green);
}

.shelf-covers {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.shelf-covers img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
}

.example-note {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 12px;
  line-height: 1.6;
}

/* 书架侧栏提示卡 */
.tip-card {
  padding: 20px;
}

.tip-card h2 {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-ink);
  margin-bottom: 14px;
}

.tip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.tip-list li {
  font-size: 13px;
  color: var(--color-ink);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.tip-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--color-red);
}

.tip-card > p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.tip-card a {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-blue);
  margin-right: 12px;
}

/* ==========================================================
   Pages — 题材分类页
   ========================================================== */

.genre-index {
  margin-bottom: 28px;
}

.genre-tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.genre-tag {
  display: inline-block;
  padding: 8px 18px;
  background-color: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  transition: all 0.2s ease;
}

.genre-tag:hover {
  background-color: var(--color-ink);
  color: var(--color-white);
  border-color: var(--color-ink);
  text-decoration: none;
}

.genre-tag-shonen { border-left: 4px solid var(--color-red); }
.genre-tag-shojo { border-left: 4px solid #D4778A; }
.genre-tag-mystery { border-left: 4px solid var(--color-blue); }
.genre-tag-sci-fi { border-left: 4px solid var(--color-green); }
.genre-tag-healing { border-left: 4px solid #8A9A3B; }
.genre-tag-adventure { border-left: 4px solid #B06A3B; }

/* 题材分组 */
.genre-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.genre-card {
  padding: 0;
  overflow: hidden;
}

.genre-card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-line);
}

.genre-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.genre-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
}

.genre-works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.genre-work {
  padding: 16px 20px;
  border-right: 1px solid var(--color-line);
}

.genre-work:last-child {
  border-right: none;
}

.genre-work img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.genre-work figcaption {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
  margin-top: 0;
}

/* 热门题材侧栏 */
.hot-genre-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hot-genre-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-line);
}

.hot-genre-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hot-genre-rank {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-red);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.hot-genre-info {
  min-width: 0;
}

.hot-genre-name {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.hot-genre-reason {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
}

.sidebar-note {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-line);
  line-height: 1.5;
}

.sidebar-related .sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links a {
  font-size: 14px;
  color: var(--color-blue);
}

.sidebar-links a:hover {
  text-decoration: underline;
}

/* ==========================================================
   Pages — 阅读指南页
   ========================================================== */

.guide-summary,
.guide-principle,
.guide-steps,
.guide-misconceptions {
  margin-bottom: 40px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.summary-card {
  padding: 20px;
  border-top: 3px solid var(--color-line-dark);
}

.summary-card:nth-child(1) { border-top-color: var(--color-red); }
.summary-card:nth-child(2) { border-top-color: var(--color-green); }
.summary-card:nth-child(3) { border-top-color: var(--color-blue); }

.summary-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.summary-card p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* 原理说明 */
.principle-content {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.principle-content p {
  font-size: 14px;
  line-height: 1.8;
}

/* 操作步骤 */
.steps-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.step-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-text h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-green);
}

.step-text p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
}

.step-figure img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
}

.step-figure figcaption {
  font-size: 12px;
}

/* 常见误区 */
.misconception-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.misconception-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.misconception-item summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style-position: inside;
  color: var(--color-ink);
}

.misconception-item summary::marker {
  color: var(--color-red);
}

.misconception-item p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
  margin-top: 10px;
  padding-left: 20px;
}

/* 指南相关链接 */
.guide-related .related-links {
  padding: 0;
  margin: 0;
}

.guide-related .related-links a {
  padding: 8px 16px;
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-blue);
}

.guide-related .related-links a:hover {
  border-color: var(--color-blue);
  text-decoration: none;
}

/* ==========================================================
   Pages — 最近更新页
   ========================================================== */

.updates-main {
  min-width: 0;
}

.updates-timeline {
  margin-bottom: 32px;
}

.updates-timeline .section-desc,
.updates-summary .section-desc {
  margin-bottom: 16px;
}

.update-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.update-item:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-line-dark);
}

.update-cover {
  flex-shrink: 0;
  width: 56px;
}

.update-cover img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.update-info {
  flex: 1;
  min-width: 0;
}

.update-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.update-type {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.update-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-meta {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}

.update-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background-color: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
}

/* 更新摘要 */
.updates-summary .summary-grid {
  grid-template-columns: repeat(4, 1fr);
}

.updates-summary .summary-card h3 {
  font-size: 14px;
}

.updates-summary .summary-card a {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-blue);
}

/* 侧栏题材筛选 */
.updates-sidebar .sidebar-card p {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.sidebar-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-tags a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--color-ink);
  border-left: 3px solid var(--color-line);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sidebar-tags a:hover {
  border-left-color: var(--color-red);
  background-color: var(--color-panel-light);
  text-decoration: none;
}

/* ==========================================================
   Pages — 人气排行页
   ========================================================== */

.rank-dimensions {
  margin-bottom: 24px;
}

.dimension-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.dimension-list a {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink);
}

.dimension-list a:hover {
  background-color: var(--color-ink);
  color: var(--color-white);
  text-decoration: none;
}

.dimension-list a.tag-active {
  background-color: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.rank-main {
  min-width: 0;
}

.rank-intro {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.rank-main .rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-main .rank-item {
  display: grid;
  grid-template-columns: 48px 56px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
}

.rank-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-line-dark);
  text-align: center;
}

.rank-item:nth-child(1) .rank-num { color: var(--color-red); font-size: 26px; }
.rank-item:nth-child(2) .rank-num { color: var(--color-red); font-size: 24px; }
.rank-item:nth-child(3) .rank-num { color: var(--color-red); font-size: 22px; }

.rank-cover img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.rank-info {
  min-width: 0;
}

.rank-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-ink);
}

.tag-hot {
  background-color: #FDECEA;
  border-color: #F0C4C0;
  color: var(--color-red);
}

.tag-new {
  background-color: #E8F0FA;
  border-color: #C4D4EC;
  color: var(--color-blue);
}

.tag-week,
.tag-month,
.tag-biweek {
  background-color: var(--color-panel);
  border-color: var(--color-line);
}

.tag-collect {
  background-color: #EAF2F0;
  border-color: #C4DCD8;
  color: var(--color-green);
}

.rank-reason {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
}

.rank-note {
  background-color: var(--color-panel-light);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.note-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rank-note p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}

.rank-note p:last-child {
  margin-bottom: 0;
}

/* 排行侧栏 */
.rank-sidebar .sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-line);
  font-size: 13px;
  line-height: 1.6;
}

.sidebar-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-list strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ink);
}

.sidebar-list span {
  color: var(--color-muted);
  font-size: 12px;
}

/* ==========================================================
   Pages — 关于页
   ========================================================== */

.about-location {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
}

.location-copy h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.location-copy p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 10px;
  color: var(--color-ink);
}

.location-media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
}

.location-media figcaption {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 8px;
}

.about-scope,
.about-boundary,
.about-feedback {
  margin-bottom: 40px;
}

.about-scope h2,
.about-boundary h2,
.about-feedback h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 4px solid var(--color-red);
}

.scope-list,
.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scope-list li,
.boundary-list li {
  position: relative;
  padding: 10px 16px 10px 28px;
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  width: 6px;
  height: 6px;
  background-color: var(--color-green);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  width: 6px;
  height: 6px;
  background-color: var(--color-red);
}

.about-feedback p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
  color: var(--color-ink);
}

.about-feedback a {
  display: inline-block;
  margin-right: 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-blue);
}

/* ==========================================================
   Pages — 404 页
   ========================================================== */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  flex: 1;
}

.error-panel {
  background-color: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 48px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 800;
  color: var(--color-red);
  line-height: 1;
  margin-bottom: 16px;
}

.error-panel h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 24px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.error-home,
.error-genres {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}

.error-home {
  background-color: var(--color-red);
  color: var(--color-white);
}

.error-home:hover {
  background-color: var(--color-ink);
  color: var(--color-white);
  text-decoration: none;
}

.error-genres {
  background-color: var(--color-white);
  border: 1px solid var(--color-line-dark);
  color: var(--color-ink);
}

.error-genres:hover {
  border-color: var(--color-ink);
  text-decoration: none;
}

/* ==========================================================
   Responsive — 响应式
   ========================================================== */

/* ---------- 平板 1024px ---------- */
@media (max-width: 1024px) {
  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .updates-scroll {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-two-col {
    grid-template-columns: 1fr;
  }

  .home-aside {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
  }

  .layout-shell.sidebar-right {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .about-location {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ---------- 手机 768px ---------- */
@media (max-width: 768px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }

  .header-shell {
    padding: 0 16px;
    min-height: 56px;
    flex-wrap: wrap;
  }

  .brand-name {
    font-size: 20px;
  }

  /* 汉堡菜单 */
  .nav-toggle {
    display: flex;
    order: 2;
  }

  .site-nav {
    order: 3;
    width: 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 8px 0 16px;
    gap: 2px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 10px 12px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }

  .nav-list a.is-current {
    background-color: transparent;
    color: var(--color-red);
  }

  /* 主容器 */
  .home-main,
  .inner-main {
    padding: 16px 16px 32px;
  }

  /* 首页 Hero */
  .hero-section {
    grid-template-columns: 1fr;
    padding: 24px 0 32px;
    gap: 20px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-media img {
    height: 220px;
  }

  /* 题材分类 */
  .genre-section {
    padding: 28px 0;
  }

  .genre-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .genre-cover img {
    height: 140px;
  }

  /* 封面墙 */
  .updates-wall-section {
    padding: 28px 0;
  }

  .updates-scroll {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .update-card img {
    height: 160px;
  }

  /* 双栏 */
  .home-two-col {
    padding: 28px 0;
    gap: 20px;
  }

  .home-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* 指南预告 */
  .guide-teaser {
    padding: 28px 0;
  }

  .teaser-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .copyright-note {
    padding: 20px;
    margin-top: 28px;
  }

  /* 内页布局 */
  .page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .layout-shell.sidebar-right {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar-content {
    order: 2;
  }

  /* 书架页 */
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shelf-covers {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .shelf-covers img {
    height: 80px;
  }

  /* 题材页 */
  .genre-tag-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .genre-tag {
    flex-shrink: 0;
  }

  .genre-works {
    grid-template-columns: 1fr;
  }

  .genre-work {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
  }

  .genre-work:last-child {
    border-bottom: none;
  }

  .genre-work img {
    height: 160px;
  }

  /* 指南页 */
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .principle-content {
    padding: 16px;
  }

  .step-item {
    padding: 16px;
  }

  /* 更新页 */
  .update-item {
    align-items: flex-start;
    padding: 12px;
  }

  .update-cover img {
    width: 48px;
    height: 64px;
  }

  .update-desc {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .update-meta {
    display: none;
  }

  .updates-summary .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 排行页 */
  .rank-main .rank-item {
    grid-template-columns: 32px 48px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .rank-cover img {
    width: 48px;
    height: 64px;
  }

  .rank-reason {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 关于页 */
  .about-location {
    gap: 16px;
  }

  .location-media img {
    height: 200px;
  }

  /* 页脚 */
  .footer-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 16px 24px;
  }

  .footer-links ul {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 404 */
  .error-panel {
    padding: 32px 24px;
  }

  .error-code {
    font-size: 48px;
  }

  .related-links {
    padding: 16px 16px 0;
  }
}

/* ---------- 小屏手机 390px ---------- */
@media (max-width: 390px) {
  .updates-scroll {
    grid-template-columns: 1fr;
  }

  .update-card img {
    height: 180px;
  }

  .shelf-covers {
    grid-template-columns: repeat(2, 1fr);
  }

  .dimension-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .dimension-list a {
    flex-shrink: 0;
  }

  .footer-links ul {
    grid-template-columns: repeat(2, 1fr);
  }
}
