/* ==========================================================================
   漫蛙漫画 gaebm.cn — 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base — 变量、重置、排版基础
   -------------------------------------------------------------------------- */
:root {
  --brand: #1f7a6b;
  --brand-dark: #17604f;
  --brand-soft: #e7f2ef;
  --link: #2f6fb0;
  --link-dark: #245a92;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-alt: #eef4f2;
  --text: #1f2a2e;
  --text-soft: #5c6b70;
  --line: #dde5e3;
  --line-strong: #c6d5d1;
  --st-ongoing: #2f8f5b;
  --st-done: #6b7a80;
  --st-hiatus: #b07a2f;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(31, 42, 46, 0.05);
  --shadow-hover: 0 6px 16px rgba(31, 42, 46, 0.1);
  --container: 1180px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--link-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

time {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

dl, dt, dd {
  margin: 0;
}

details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* --------------------------------------------------------------------------
   layout — 骨架：body / header / nav / main / breadcrumb / page-header / footer
   -------------------------------------------------------------------------- */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
  color: var(--text);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
}

.brand-slogan {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.3;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--brand);
}

.nav-link.is-current {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.home-main,
.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 26px 20px 48px;
}

.inner-main {
  padding-top: 18px;
}

/* 面包屑 —— 全站统一 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  padding: 4px 0 14px;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text);
}

/* 页面标题区 —— 全站统一 */
.page-header {
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.page-description {
  font-size: 15px;
  color: var(--text-soft);
  max-width: 900px;
}

.page-media {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
}

.page-media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.page-media figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* 页脚 —— 全站统一 */
.site-footer {
  background: #16232a;
  color: #c4d2d0;
  margin-top: 12px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px 26px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.75;
  color: #9fb3b0;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  font-size: 13px;
  color: #a9bfbc;
}

.footer-list a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 20px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.footer-copy,
.footer-note {
  font-size: 12px;
  color: #8ea4a1;
}

/* --------------------------------------------------------------------------
   components — 全站通用：section 头、状态、按钮、链接、卡片
   -------------------------------------------------------------------------- */
.section {
  margin-bottom: 42px;
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.section-desc,
.section-lead {
  font-size: 14px;
  color: var(--text-soft);
  max-width: 860px;
}

.section-lead {
  margin-bottom: 16px;
}

.sub-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.subsection-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--link);
  font-weight: 500;
}

.link-more::after {
  content: "›";
  font-size: 16px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.link-more:hover {
  color: var(--link-dark);
}

.link-more:hover::after {
  transform: translateX(3px);
}

.section-more {
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  border: 1px solid var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
}

/* 连载状态标记 —— 全站统一 */
.status,
.work-status,
.status-tag,
.rank-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid currentColor;
}

.status-ongoing {
  color: var(--st-ongoing);
  background: rgba(47, 143, 91, 0.08);
}

.status-done,
.status-completed,
.status-finished {
  color: var(--st-done);
  background: rgba(107, 122, 128, 0.1);
}

.status-hiatus {
  color: var(--st-hiatus);
  background: rgba(176, 122, 47, 0.1);
}

/* 字段解释列表（首页 / 更新页共用） */
.field-list {
  border-top: 1px solid var(--line);
}

.field-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 0 2px;
}

.field-desc {
  font-size: 13px;
  color: var(--text-soft);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* 站内栏目索引 —— 内页通用 */
.site-index {
  margin-bottom: 40px;
}

.site-index-list,
.index-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.site-index-item a,
.index-item a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.site-index-item a:hover,
.index-item a:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.site-index-desc,
.index-note {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
  padding: 0 4px;
}

.index-item p {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
  padding: 0 4px;
}

/* --------------------------------------------------------------------------
   pages — 首页
   -------------------------------------------------------------------------- */
.fact-bar {
  background: var(--brand-soft);
  border-bottom: 1px solid var(--line);
}

.fact-bar-text,
.fact-bar-pos {
  max-width: var(--container);
  margin: 0 auto;
  padding: 7px 20px;
  font-size: 13px;
  color: var(--brand-dark);
}

.fact-bar-text {
  padding-bottom: 0;
}

.fact-bar-pos {
  padding-top: 2px;
  color: var(--text-soft);
}

/* 首屏 */
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.hero-main {
  min-width: 0;
}

.hero-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.hero-point {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text);
}

.hero-point::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-side {
  min-width: 0;
}

.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.hero-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.hero-caption {
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.hero-tags {
  margin-top: 16px;
}

.hero-tags-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 12px;
  font-size: 13px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid transparent;
  border-radius: 14px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.tag:hover {
  border-color: var(--brand);
  background: #dcece8;
}

/* 题材分类总览 */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.genre-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.genre-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.genre-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-dark);
}

.genre-scope {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
}

.genre-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.genre-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.genre-item a {
  color: var(--text);
  font-weight: 500;
}

.genre-item a:hover {
  color: var(--brand);
}

/* 封面墙 */
.coverwall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.cover-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.cover-figure {
  background: var(--surface-alt);
  overflow: hidden;
}

.cover-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.cover-card:nth-child(3n + 2) .cover-figure img {
  height: 250px;
}

.cover-name {
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px 4px;
}

.cover-name a {
  color: var(--text);
}

.cover-name a:hover {
  color: var(--brand);
}

.cover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 12px;
  font-size: 12px;
}

.cover-genre {
  color: var(--text-soft);
}

/* 最近更新记录 */
.update-list {
  border-top: 1px solid var(--line);
}

.update-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 110px 84px;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.update-row:hover {
  background: var(--surface);
}

.update-date {
  font-size: 13px;
  color: var(--text-soft);
}

.update-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-name:hover {
  color: var(--brand);
}

.update-genre {
  font-size: 13px;
  color: var(--text-soft);
}

/* 人气榜单与编辑推荐 */
.ranking-layout,
.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.ranking-main,
.reading-main {
  min-width: 0;
}

.ranking-aside,
.reading-aside {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.rank-list {
  border-top: 1px solid var(--line);
}

.rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.1fr) 92px minmax(0, 1.4fr);
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.rank-item:nth-child(-n + 3) .rank-no {
  background: var(--brand);
  color: #ffffff;
}

.rank-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name:hover {
  color: var(--brand);
}

.rank-genre {
  font-size: 13px;
  color: var(--text-soft);
}

.rank-note {
  font-size: 13px;
  color: var(--text-soft);
}

.aside-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}

.topic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface-alt);
}

.topic-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.topic-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* 阅读方式与内容反馈 */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.feedback-item {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
}

.feedback-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
}

.aside-note {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.75;
  padding: 12px 0 14px;
  border-top: 1px solid var(--line);
  margin-bottom: 12px;
}

/* 站内栏目索引（首页） */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.index-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.index-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.index-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.index-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   pages — 题材分类页
   -------------------------------------------------------------------------- */
.genre-groups,
.genre-featured,
.genre-filter {
  margin-bottom: 40px;
}

.genre-group-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.genre-group {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.18s ease;
}

.genre-group:hover {
  border-color: var(--line-strong);
}

.genre-group-head {
  min-width: 0;
}

.genre-group-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.genre-group-scope {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.75;
}

.genre-work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  align-content: start;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.genre-work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

.genre-work-item a {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-work-item a:hover {
  color: var(--brand);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.featured-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.featured-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.featured-cover {
  background: var(--surface-alt);
  overflow: hidden;
}

.featured-cover img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.featured-body {
  padding: 14px 16px 16px;
}

.featured-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.featured-name a {
  color: var(--text);
}

.featured-name a:hover {
  color: var(--brand);
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.featured-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
}

.genre-filter-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.genre-filter-text {
  min-width: 0;
}

.genre-filter-text p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 8px;
}

.genre-filter-text p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   pages — 最近更新页
   -------------------------------------------------------------------------- */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 40px;
}

.updates-main,
.ranking-main,
.guide-body {
  min-width: 0;
}

.updates-aside,
.ranking-side,
.guide-aside {
  min-width: 0;
}

.updates-main > .section-title {
  margin-top: 26px;
}

.updates-main > .section-title:first-child {
  margin-top: 0;
}

.updates-main > .section-desc {
  margin-bottom: 14px;
}

.updates-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  margin: 4px 0 20px;
}

.updates-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.updates-media figcaption {
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.updates-list {
  border-top: 1px solid var(--line);
}

.update-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.update-item:hover {
  background: var(--surface);
}

.update-item .update-date {
  font-size: 13px;
  color: var(--text-soft);
  padding-top: 2px;
}

.update-body {
  min-width: 0;
}

.update-body .update-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.update-body .update-name a {
  color: var(--text);
}

.update-body .update-name a:hover {
  color: var(--brand);
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.status-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.status-legend-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.status-legend-item p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-top: 8px;
}

.field-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.field-item .field-name {
  padding: 0 0 4px;
  border: 0;
}

.field-item .field-desc {
  padding: 0;
  border: 0;
}

/* 更新页侧栏 */
.updates-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 84px;
}

.aside-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.updates-aside .aside-title:not(:first-child) {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.aside-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 12px;
}

.aside-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aside-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.aside-step .step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.aside-step p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-links a {
  font-size: 14px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-left: 14px;
  position: relative;
}

.aside-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--brand);
}

.aside-links a:hover {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   pages — 人气榜单页
   -------------------------------------------------------------------------- */
.ranking-hero {
  margin-bottom: 30px;
}

.ranking-hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.ranking-hero-figure img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.ranking-hero-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.ranking-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.ranking-list {
  border-top: 1px solid var(--line);
}

.ranking-item {
  display: grid;
  grid-template-columns: 34px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.ranking-item .rank-no {
  margin-top: 2px;
}

.ranking-item:nth-child(-n + 3) .rank-no {
  background: var(--brand);
  color: #ffffff;
}

.rank-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-alt);
}

.rank-cover img {
  width: 72px;
  height: 96px;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.rank-body .rank-note {
  font-size: 13px;
  line-height: 1.7;
}

.editor-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.editor-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.editor-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.editor-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.editor-title a {
  color: var(--text);
}

.editor-title a:hover {
  color: var(--brand);
}

.editor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.editor-reason {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.75;
}

.ranking-side .topic-card {
  margin-bottom: 0;
}

.topic-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.topic-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--link);
}

.topic-link::after {
  content: "›";
  font-size: 15px;
  line-height: 1;
}

.topic-link:hover {
  color: var(--link-dark);
}

.ranking-method {
  margin-bottom: 40px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}

.method-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.method-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.method-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
}

.method-note {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
}

.method-note a {
  margin-right: 12px;
}

/* --------------------------------------------------------------------------
   pages — 阅读说明页
   -------------------------------------------------------------------------- */
.guide-layout {
  align-items: start;
}

.guide-section {
  margin-bottom: 36px;
}

.guide-section .section-lead {
  margin-bottom: 14px;
}

.guide-fields {
  scroll-margin-top: 84px;
}

.guide-browse,
.guide-status,
.guide-feedback {
  scroll-margin-top: 84px;
}

.field-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
}

.field-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.field-summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--brand);
  line-height: 1;
  transition: transform 0.2s ease;
}

.field-item[open] .field-summary::after {
  transform: rotate(45deg);
}

.field-summary:hover {
  color: var(--brand);
}

.field-detail {
  padding: 0 16px 14px;
  border-top: 1px solid var(--line);
}

.field-detail p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
  padding-top: 12px;
}

.guide-figure {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.guide-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.browse-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.browse-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.browse-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
}

.browse-note,
.status-note,
.feedback-note {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
  background: var(--surface-alt);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.status-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.status-item .status-tag {
  justify-self: start;
}

.status-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 14px;
}

.feedback-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.feedback-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feedback-col .feedback-list {
  margin-bottom: 0;
}

.feedback-col .feedback-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.feedback-col .feedback-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* 阅读说明页侧栏 */
.guide-aside {
  position: sticky;
  top: 84px;
}

.aside-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.aside-block:last-child {
  margin-bottom: 0;
}

.aside-block .aside-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}

.aside-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--brand);
}

.aside-list a:hover {
  color: var(--brand);
}

/* 阅读说明页栏目索引 */
.channel-index {
  margin-bottom: 40px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.channel-col {
  min-width: 0;
}

.channel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-list a {
  font-size: 13px;
  color: var(--text-soft);
}

.channel-list a:hover {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   pages — 404
   -------------------------------------------------------------------------- */
.site-error .site-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.error-main {
  min-height: 50vh;
}

.error-panel {
  max-width: 620px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 44px 32px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 14px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 6px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.error-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.error-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   responsive — 桌面收窄 / 平板 / 手机
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .genre-grid,
  .index-grid,
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ranking-layout,
  .reading-layout,
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .updates-aside,
  .guide-aside {
    position: static;
  }

  .genre-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .genre-work-list {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    min-height: 58px;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 16px 16px;
    margin-left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.24s ease;
  }

  .nav-list.is-open {
    max-height: 420px;
  }

  .nav-link {
    height: 48px;
    padding: 0 6px;
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
    justify-content: flex-start;
  }

  .nav-link.is-current {
    border-bottom-color: var(--line);
    border-left-color: var(--brand);
    padding-left: 12px;
  }

  .home-main,
  .inner-main {
    padding: 18px 16px 40px;
  }

  .fact-bar-text,
  .fact-bar-pos {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 22px 18px;
    margin-bottom: 32px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-figure img {
    height: 200px;
  }

  .page-title {
    font-size: 23px;
  }

  .page-media img {
    height: 200px;
  }

  .section {
    margin-bottom: 34px;
  }

  .section-title {
    font-size: 19px;
  }

  .genre-grid,
  .featured-grid,
  .index-grid,
  .channel-grid,
  .genre-filter-body,
  .method-grid,
  .browse-grid,
  .feedback-grid,
  .status-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-work-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .coverwall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cover-figure img,
  .cover-card:nth-child(3n + 2) .cover-figure img {
    height: 180px;
  }

  .update-row {
    grid-template-columns: 84px minmax(0, 1fr);
    grid-template-areas:
      "date name"
      "genre status";
    gap: 4px 12px;
    align-items: center;
  }

  .update-row .update-date {
    grid-area: date;
  }

  .update-row .update-name {
    grid-area: name;
  }

  .update-row .update-genre {
    grid-area: genre;
    padding-left: 0;
  }

  .update-row .status {
    grid-area: status;
    justify-self: start;
  }

  .rank-item {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas:
      "no name genre"
      "no note note";
    gap: 4px 10px;
    align-items: center;
  }

  .rank-item .rank-no {
    grid-area: no;
  }

  .rank-item .rank-name {
    grid-area: name;
  }

  .rank-item .rank-genre {
    grid-area: genre;
    justify-self: end;
  }

  .rank-item .rank-note {
    grid-area: note;
  }

  .update-item {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-item {
    grid-template-columns: 30px 60px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover img {
    width: 60px;
    height: 80px;
  }

  .status-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 32px 16px 22px;
  }

  .footer-bottom {
    padding: 14px 16px 22px;
    flex-direction: column;
    gap: 6px;
  }

  .error-panel {
    padding: 34px 22px;
  }

  .error-code {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14.5px;
  }

  .brand-mark {
    font-size: 18px;
  }

  .brand-slogan {
    font-size: 11px;
  }

  .hero {
    padding: 18px 14px;
  }

  .hero-title {
    font-size: 21px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .coverwall {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-figure img,
  .cover-card:nth-child(3n + 2) .cover-figure img {
    height: 210px;
  }

  .ranking-item {
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-areas:
      "no title"
      "cover body";
    gap: 10px 12px;
  }

  .ranking-item .rank-no {
    grid-area: no;
  }

  .ranking-item .rank-cover {
    grid-area: cover;
    align-self: start;
  }

  .ranking-item .rank-body {
    grid-area: body;
  }

  .update-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "date"
      "name"
      "genre"
      "status";
    gap: 2px;
  }

  .update-row .status {
    margin-top: 4px;
  }

  .update-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .page-title {
    font-size: 20px;
  }

  .section-title {
    font-size: 18px;
  }

  .error-links {
    flex-direction: column;
    align-items: stretch;
  }

  .error-links a {
    justify-content: center;
  }
}
