/* ==========================================================================
   贝勒漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. base —— 变量、重置、排版、通用元素
   -------------------------------------------------------------------------- */

:root {
  --brand: #2f6bff;
  --brand-dark: #1f4fd0;
  --accent: #ff5d47;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #1f2430;
  --ink-soft: #5b6474;
  --line: #e3e6ee;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(31, 36, 48, 0.06);
  --shadow-md: 0 4px 14px rgba(31, 36, 48, 0.08);
  --container: 1180px;
  --reading: 760px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.32;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
}

button {
  font-family: inherit;
}

.visually-hidden-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   2. layout —— 页头、导航、主容器、面包屑、页脚
   -------------------------------------------------------------------------- */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}

/* 页头 */
.site-header {
  position: relative;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
}

.brand:hover {
  color: var(--brand);
  text-decoration: none;
}

.brand-mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.9);
}

.brand-slogan {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

/* 主导航 */
.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list > li {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover {
  color: var(--brand);
  background: rgba(47, 107, 255, 0.07);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--brand);
  font-weight: 700;
  background: rgba(47, 107, 255, 0.1);
}

/* 汉堡按钮：桌面隐藏 */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

/* 主内容 */
.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.inner-main {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px 64px;
}

.section-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: #b7becd;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

/* 页面标题区（内页统一） */
.page-header {
  margin: 18px 0 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}

.page-description {
  max-width: var(--reading);
  font-size: 16px;
  color: var(--ink-soft);
}

/* 页脚 */
.site-footer {
  background: #1b2130;
  color: #c7cdda;
  font-size: 14px;
}

.footer-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 24px 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 40px;
}

.footer-brand {
  max-width: 320px;
}

.footer-name {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.footer-desc {
  margin-top: 10px;
  color: #98a2b6;
  line-height: 1.7;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-group-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-list li + li {
  margin-top: 8px;
}

.footer-list a {
  color: #aab3c4;
  font-size: 14px;
}

.footer-list a:hover {
  color: #fff;
}

.footer-bottom {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  color: #8d97ab;
  font-size: 13px;
}

.footer-top {
  font-size: 13px;
}

.footer-top a {
  color: #aab3c4;
}

.footer-top a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. components —— 通用区块头、按钮、卡片、列表、表格、步骤、FAQ
   -------------------------------------------------------------------------- */

/* 区块头 */
.section-head {
  margin-bottom: 22px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}

.section-desc {
  margin-top: 10px;
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 15px;
}

.section-intro {
  margin: 0 0 18px;
  max-width: 820px;
  color: var(--ink-soft);
  font-size: 15px;
}

.sub-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: rgba(47, 107, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(47, 107, 255, 0.08);
  border-color: var(--brand);
  color: var(--brand-dark);
}

/* 标签 */
.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.tag-link:hover {
  color: var(--brand);
  border-color: rgba(47, 107, 255, 0.5);
  background: rgba(47, 107, 255, 0.06);
  text-decoration: none;
}

/* 通用卡片 hover 增强（仅视觉，不改尺寸） */
.cover-card,
.genre-card,
.index-card,
.related-card,
.pick-card,
.genre-entry {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cover-card:hover,
.genre-card:hover,
.index-card:hover,
.related-card:hover,
.pick-card:hover,
.genre-entry:hover {
  border-color: rgba(47, 107, 255, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* 封面卡（首页封面墙） */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cover-figure {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eceff6;
}

.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-title {
  font-size: 16px;
  font-weight: 700;
  margin: 14px 14px 0;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 14px 16px;
  font-size: 13px;
}

.cover-genre {
  color: var(--brand);
  background: rgba(47, 107, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.cover-progress {
  color: var(--accent);
  background: rgba(255, 93, 71, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-family: var(--font-mono);
}

/* 最近更新条目行（首页） */
.update-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 96px 132px;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.18s ease;
}

.update-item:last-child {
  border-bottom: 0;
}

.update-item:hover {
  background: rgba(47, 107, 255, 0.05);
}

.update-date {
  color: var(--ink-soft);
  font-size: 13px;
  font-family: var(--font-mono);
}

.update-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.update-genre {
  font-size: 13px;
  color: var(--brand);
}

.update-progress {
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
  text-align: right;
}

/* 位次条目行（首页榜单列） */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: rank;
}

.ranking-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.ranking-item .rank-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.ranking-item .rank-title {
  font-weight: 600;
  color: var(--ink);
}

.ranking-item .rank-genre {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
}

.ranking-item .rank-note {
  font-size: 13px;
  color: var(--ink-soft);
}

/* 编辑选题卡 */
.editorial-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.editorial-card + .editorial-card {
  margin-top: 14px;
}

.editorial-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.editorial-reason {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.editorial-link {
  margin-top: 10px;
  font-size: 14px;
}

/* 字段摘要 dl */
.field-summary {
  margin: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px 16px;
  font-size: 14px;
}

.field-summary dt {
  font-weight: 700;
  color: var(--ink);
}

.field-summary dd {
  margin: 0;
  color: var(--ink-soft);
}

/* 反馈列表（首页） */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-list .feedback-item {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}

.feedback-list .feedback-type {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.feedback-list .feedback-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.feedback-entry {
  margin-top: 16px;
  font-size: 14px;
}

/* 栏目索引卡 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-card {
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.index-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.index-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.index-link {
  margin-top: 12px;
  font-size: 14px;
}

/* 步骤流程 */
.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step-item {
  position: relative;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step-num,
.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  margin-bottom: 10px;
  background: rgba(47, 107, 255, 0.1);
  color: var(--brand);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.step-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.step-desc,
.step-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* 字段说明表 */
.field-table,
.method-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.field-caption,
.method-caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: #f1f3f9;
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td,
.method-table th,
.method-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.field-table thead th,
.method-table thead th {
  background: #f1f3f9;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td,
.method-table tbody tr:last-child th,
.method-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-name {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.field-desc {
  color: var(--ink-soft);
}

.field-sample {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* FAQ 折叠 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--brand);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 16px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* 图片容器通用约束 */
.media-figure,
.guide-figure,
.showcase-card {
  background: #eceff6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-figure img,
.guide-figure img,
.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-figure {
  aspect-ratio: 16 / 10;
  margin: 0 0 14px;
}

.media-caption {
  display: none;
}

/* 通用区块间距 */
.section {
  margin-bottom: 44px;
}

/* --------------------------------------------------------------------------
   4. pages —— 首页与各内页专属模块
   -------------------------------------------------------------------------- */

/* ---------------------------- 首页 ---------------------------- */

.home-main {
  padding-bottom: 64px;
}

/* 首屏 */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 46px 24px 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  background: rgba(47, 107, 255, 0.1);
  color: var(--brand);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.hero-title {
  font-size: 38px;
  line-height: 1.28;
  color: var(--ink);
}

.hero-lead {
  margin-top: 16px;
  max-width: 560px;
  font-size: 16px;
  color: var(--ink-soft);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eceff6;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: rgba(27, 33, 48, 0.72);
  color: #fff;
  font-size: 13px;
}

/* 首页各区块间距 */
.genre-overview,
.cover-wall,
.recent-updates,
.ranking-editorial,
.guide-feedback,
.site-index {
  margin-top: 52px;
}

/* 题材方向总览（首页四栏） */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.genre-overview .genre-card {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.genre-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.genre-scope {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.genre-samples {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 榜单与编辑选题两栏 */
.ranking-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* 阅读说明与反馈两栏 */
.guide-feedback-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ---------------------------- 题材分类页 ---------------------------- */

.genre-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.genre-overview-grid .genre-card {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.genre-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.genre-card-scope {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.genre-card-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.genre-card-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}

.genre-card-meta {
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

.genre-card-daily {
  border-top: 3px solid var(--brand);
}

.genre-card-action {
  border-top: 3px solid var(--accent);
}

.genre-card-mystery {
  border-top: 3px solid #6b5bd6;
}

.genre-card-romance {
  border-top: 3px solid #e0699b;
}

/* 各题材条目列表 */
.genre-list-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.genre-list-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.entry-list {
  display: flex;
  flex-direction: column;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 132px;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.entry-row:first-child {
  border-top: 0;
}

.entry-name {
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.entry-genre {
  font-size: 13px;
  color: var(--brand);
}

.entry-progress {
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
  text-align: right;
}

/* 题材封面展示 */
.genre-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.showcase-card {
  display: flex;
  flex-direction: column;
}

.showcase-card img {
  aspect-ratio: 16 / 9;
}

.showcase-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  font-size: 14px;
}

.showcase-name {
  font-weight: 700;
  color: var(--ink);
}

.showcase-genre {
  color: var(--brand);
  font-size: 13px;
}

/* 关联题材 */
.related-genres-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-card {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.related-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.related-card-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.related-card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
}

.related-genres-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------------------------- 最近更新页 ---------------------------- */

.section-legend,
.section-update-list,
.section-update-distribution,
.section-follow-method,
.section-related-genres {
  margin-bottom: 44px;
}

.field-table {
  margin-top: 4px;
}

/* 更新条目（内页：日期 + 条目） */
.section-update-list .update-list {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-update-list .update-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section-update-list .update-item:last-child {
  border-bottom: 1px solid var(--line);
}

.section-update-list .update-date {
  padding-top: 2px;
}

.update-entry {
  min-width: 0;
}

.update-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.update-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.update-meta .tag {
  color: var(--brand);
  background: rgba(47, 107, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.update-meta .tag-genre {
  color: var(--accent);
  background: rgba(255, 93, 71, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

/* 更新分布 */
.distribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.distribution-col {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.distribution-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.distribution-text {
  font-size: 14px;
  color: var(--ink-soft);
}

.distribution-text + .distribution-text {
  margin-top: 10px;
}

/* 相关题材入口（四列） */
.genre-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.genre-entry {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.genre-entry-name {
  font-size: 16px;
  font-weight: 700;
}

.genre-entry-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------------------------- 人气榜单页 ---------------------------- */

.ranking-section,
.ranking-method,
.editorial-picks,
.cross-genres {
  margin-bottom: 44px;
}

.ranking-section .ranking-list {
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px 96px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  border-color: rgba(47, 107, 255, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 93, 71, 0.12);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.rank-cover {
  width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eceff6;
  border: 1px solid var(--line);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.rank-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.rank-genre {
  color: var(--brand);
  background: rgba(47, 107, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.rank-progress {
  color: var(--accent);
  background: rgba(255, 93, 71, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-family: var(--font-mono);
}

.rank-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* 榜单口径 */
.method-table-wrap {
  margin-bottom: 22px;
}

.method-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.method-col {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.method-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.method-col p {
  font-size: 14px;
  color: var(--ink-soft);
}

/* 编辑选题三栏 */
.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pick-card {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pick-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.pick-reason {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.pick-link {
  margin-top: 12px;
  font-size: 14px;
}

/* 榜单与题材交叉入口（四列） */
.cross-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cross-col {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cross-name {
  font-size: 16px;
  font-weight: 700;
}

.cross-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------------------------- 阅读说明页 ---------------------------- */

.guide-section {
  margin-bottom: 44px;
}

.guide-section > h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  margin-bottom: 12px;
}

.guide-figure {
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
}

.guide-figure figcaption {
  display: none;
}

.field-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* 题材标签 / 更新标记两栏 */
.tag-legend-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tag-legend-col {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.tag-legend-col h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.tag-legend-col p {
  font-size: 14px;
  color: var(--ink-soft);
}

.tag-list {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-list li {
  padding: 8px 12px;
  background: #f4f6fb;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
}

.tag-list strong {
  color: var(--brand);
  font-weight: 700;
}

.method-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* 内容反馈 */
.feedback-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feedback-section .feedback-item {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.feedback-section .feedback-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.feedback-section .feedback-item p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.feedback-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.feedback-note a + a {
  margin-left: 10px;
}

/* ---------------------------- 404 ---------------------------- */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
}

.error-panel {
  width: 100%;
  max-width: 640px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--brand);
}

.error-title {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}

.error-text {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-soft);
}

.error-links {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.error-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: #f4f6fb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.error-links a:hover {
  color: var(--brand);
  border-color: rgba(47, 107, 255, 0.45);
  background: rgba(47, 107, 255, 0.07);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. responsive —— 平板与手机断点（统一 768px）
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 32px;
  }

  .genre-grid,
  .genre-overview-grid,
  .genre-entry-grid,
  .cross-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  h1,
  .page-title,
  .hero-title {
    font-size: 25px;
  }

  h2,
  .section-title,
  .guide-section > h2 {
    font-size: 20px;
  }

  /* 页头与移动导航 */
  .header-inner {
    min-height: 60px;
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-slogan {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list > li {
    display: block;
  }

  .nav-link {
    width: 100%;
    padding: 0 12px;
    justify-content: flex-start;
  }

  /* 主容器 */
  .inner-main,
  .section-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .inner-main {
    padding-bottom: 44px;
  }

  .page-header {
    margin: 14px 0 26px;
    padding-bottom: 18px;
  }

  .page-description {
    font-size: 15px;
  }

  /* 首页首屏：单列，文案在前 */
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 28px 16px 32px;
  }

  .hero-lead {
    max-width: none;
  }

  .hero-visual {
    aspect-ratio: 16 / 10;
  }

  /* 首页各区块间距 */
  .genre-overview,
  .cover-wall,
  .recent-updates,
  .ranking-editorial,
  .guide-feedback,
  .site-index {
    margin-top: 36px;
  }

  /* 多栏统一堆叠 */
  .genre-grid,
  .genre-overview-grid,
  .genre-entry-grid,
  .cross-grid,
  .genre-showcase-grid,
  .distribution-grid,
  .related-genres-grid,
  .picks-grid,
  .feedback-layout,
  .tag-legend-layout,
  .method-columns,
  .guide-feedback-grid,
  .ranking-editorial-grid,
  .index-grid,
  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 首页更新条目：日期在上 */
  .update-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 14px;
  }

  .update-progress {
    text-align: left;
  }

  .section-update-list .update-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  /* 题材条目行 */
  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .entry-progress {
    text-align: left;
  }

  /* 榜单条目行 */
  .ranking-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  /* 字段摘要 */
  .field-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px 0;
  }

  .field-summary dd {
    margin-bottom: 8px;
  }

  /* 表格：允许横向滚动，避免挤压 */
  .method-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .field-table,
  .method-table {
    min-width: 520px;
  }

  .field-table th,
  .field-table td,
  .method-table th,
  .method-table td {
    padding: 10px 12px;
  }

  /* 页脚 */
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 32px 16px 20px;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .footer-bottom {
    padding: 14px 16px 22px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .error-main {
    padding: 44px 16px;
  }

  .error-panel {
    padding: 28px 20px;
  }

  .error-code {
    font-size: 36px;
  }

  .error-title {
    font-size: 21px;
  }
}

@media (max-width: 390px) {
  .hero-tags {
    gap: 8px;
  }

  .tag-link {
    padding: 0 12px;
    font-size: 13px;
  }

  .btn {
    padding: 0 16px;
    font-size: 14px;
  }

  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 滚动出现动画：仅作为增强，不改变初始可见性 */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-in 0.45s ease-out both;
  }

  @keyframes reveal-in {
    from {
      transform: translateY(10px);
    }
    to {
      transform: translateY(0);
    }
  }
}
