/* ==========================================================================
   贝勒漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版基础
   -------------------------------------------------------------------------- */
:root {
  --brand: #1F7A6B;
  --brand-dark: #175C51;
  --brand-soft: #E4F1EE;
  --accent: #E8863C;
  --accent-soft: #FBEDE0;
  --bg: #FBF8F2;
  --card: #FFFFFF;
  --text: #22312E;
  --text-soft: #5B6B67;
  --line: #E3DED3;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(34, 49, 46, 0.06);
  --shadow-hover: 0 6px 18px rgba(34, 49, 46, 0.12);
  --content-width: 1120px;
  --sidebar-width: 220px;
  --gap: 24px;
  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   layout：页面骨架、容器、侧栏、页头、页脚
   -------------------------------------------------------------------------- */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

/* 顶部事实条（首页） */
.fact-bar {
  background-color: var(--brand-soft);
  border-bottom: 1px solid var(--line);
}

.fact-bar p {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-soft);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background-color: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--brand-dark);
  white-space: nowrap;
}

.brand-slogan {
  font-size: 13px;
  color: var(--text-soft);
  white-space: nowrap;
}

/* 主导航 */
.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  min-height: 40px;
  line-height: 24px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background-color: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.nav-link.is-current {
  background-color: var(--brand);
  color: #fff;
}

.nav-link.is-current:hover {
  background-color: var(--brand-dark);
  color: #fff;
}

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--card);
  color: var(--text);
  position: relative;
}

.nav-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  background-color: var(--text);
  transform: translate(-50%, -8px);
  box-shadow: 0 6px 0 var(--text), 0 -6px 0 var(--text);
}

/* 页面主布局：默认主内容在前、侧栏在后 */
.page-layout {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: var(--gap);
  align-items: start;
}

.layout-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: var(--gap);
  align-items: start;
}

/* 侧栏在前的布局：sidebar-left 位于布局容器自身 */
.sidebar-left {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar-left .site-sidebar,
.sidebar-left .sidebar {
  grid-column: 1;
  grid-row: 1;
}

.sidebar-left .site-main,
.sidebar-left .content-column {
  grid-column: 2;
  grid-row: 1;
}

/* 侧栏在前的布局：sidebar-left 位于 body 或祖先节点 */
.sidebar-left .page-layout,
.sidebar-left .layout-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar-left .page-layout .site-sidebar,
.sidebar-left .page-layout .sidebar,
.sidebar-left .layout-shell .site-sidebar,
.sidebar-left .layout-shell .sidebar {
  grid-column: 1;
  grid-row: 1;
}

.sidebar-left .page-layout .site-main,
.sidebar-left .page-layout .content-column,
.sidebar-left .layout-shell .site-main,
.sidebar-left .layout-shell .content-column {
  grid-column: 2;
  grid-row: 1;
}

/* 侧栏在后的默认布局 */
.page-layout .site-main,
.page-layout .content-column {
  grid-column: 1;
  grid-row: 1;
}

.page-layout .site-sidebar,
.page-layout .sidebar {
  grid-column: 2;
  grid-row: 1;
}

/* 主内容区 */
.site-main {
  min-width: 0;
}

.inner-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px 20px 48px;
}

/* 内页带侧栏时，site-main 自身不再重复内边距 */
.layout-shell .site-main.inner-main,
.page-layout .site-main.inner-main {
  padding: 0;
  margin: 0;
  max-width: none;
}

.content-column {
  min-width: 0;
}

/* 侧栏 */
.site-sidebar,
.sidebar {
  min-width: 0;
}

.sidebar-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0 0 10px;
  padding: 0 0 8px;
  border-bottom: 2px solid var(--brand-soft);
}

.sidebar-nav {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.sidebar-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-item,
.tree-node,
.sidebar-item {
  min-width: 0;
}

.tree-link,
.sidebar-link {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  line-height: 26px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.tree-link:hover,
.sidebar-link:hover {
  background-color: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.tree-link.is-current,
.sidebar-link.is-current {
  background-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.tree-link.is-current:hover,
.sidebar-link.is-current:hover {
  background-color: var(--brand-dark);
  color: #fff;
}

/* 侧栏二级列表 */
.tree-sub,
.sidebar-sub {
  margin: 2px 0 4px 12px;
  padding-left: 10px;
  border-left: 2px solid var(--brand-soft);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tree-sub-link {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
  min-height: 40px;
  line-height: 26px;
}

.tree-sub-link:hover {
  background-color: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.sidebar-item.is-open > .sidebar-link {
  color: var(--brand-dark);
  font-weight: 600;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-soft);
}

.breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* 页面标题区 */
.page-header {
  margin: 0 0 28px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.3;
}

.page-description {
  margin: 0;
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.75;
  max-width: 860px;
}

.page-description a {
  color: var(--brand);
}

/* 内页通用 section 标题 */
.section-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.section-lead,
.section-intro,
.section-desc {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* 页脚 */
.site-footer {
  margin-top: auto;
  background-color: var(--brand-soft);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 36px 20px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.footer-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

.footer-group {
  min-width: 0;
}

.footer-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0 0 10px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
  display: inline-block;
  padding: 3px 0;
}

.footer-links a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.footer-bottom {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--line);
}

.copyright {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   components：按钮、卡片、标签、表格、列表等复用组件
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background-color: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-primary:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--brand-dark);
  border-color: var(--brand);
}

.btn-ghost:hover {
  background-color: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.link-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.link-more:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* 更新状态标签 */
.status-ongoing,
.status-new,
.status-paused,
.entry-status,
.entry-status--new,
.entry-status--ongoing,
.entry-status--paused,
.tag-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
  background-color: var(--accent-soft);
  color: #A85A18;
  white-space: nowrap;
}

.status-paused,
.entry-status--paused {
  background-color: #EEEAE2;
  color: var(--text-soft);
}

.tag-genre {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
  background-color: var(--brand-soft);
  color: var(--brand-dark);
  white-space: nowrap;
}

/* 字段口径简表 */
.field-table {
  width: 100%;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.field-table caption {
  caption-side: top;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  background-color: var(--brand-soft);
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.field-table thead th {
  background-color: #F4F1EA;
  font-weight: 600;
  color: var(--brand-dark);
  font-size: 13px;
}

.field-table tbody tr:last-child td {
  border-bottom: none;
}

/* 站内栏目索引块 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.index-cell {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.index-cell:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.index-link {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0 0 6px;
  text-decoration: none;
}

.index-link:hover {
  text-decoration: underline;
}

.index-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.65;
}

/* 字段 details 手风琴（阅读说明页） */
.field-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-summary {
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-dark);
  cursor: pointer;
  list-style: none;
  position: relative;
  min-height: 44px;
  line-height: 1.6;
}

.field-summary::-webkit-details-marker {
  display: none;
}

.field-summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--brand);
  font-weight: 700;
}

.field-item[open] .field-summary::after {
  content: "–";
}

.field-item[open] .field-summary {
  border-bottom: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.field-body {
  padding: 14px 18px 18px;
}

.field-meaning {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
}

.field-meta {
  margin: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 14px;
}

.field-meta dt {
  color: var(--text-soft);
  font-weight: 600;
}

.field-meta dd {
  margin: 0;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   pages：首页与各内页模块
   -------------------------------------------------------------------------- */

/* ---- 首页 index.html ---- */
.home-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section {
  scroll-margin-top: 80px;
}

.section-head {
  margin: 0 0 20px;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* 首屏作品索引区：左文右图 */
.hero-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.3;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.75;
  margin: 0 0 16px;
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 22px;
}

.hero-points li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.hero-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  background-color: var(--card);
  border-top: 1px solid var(--line);
}

.hero-covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-cover {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hero-cover:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.hero-cover img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.hero-cover-link {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  line-height: 1.5;
}

.hero-cover-link:hover {
  text-decoration: underline;
}

/* 题材方向总览 */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.genre-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.genre-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.genre-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.genre-trait {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.7;
}

.genre-scope {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 12px;
  line-height: 1.65;
}

.genre-sample {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.genre-sample a {
  font-weight: 600;
}

/* 封面墙 */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.cover-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.cover-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: var(--brand-soft);
}

.cover-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 14px 16px 6px;
}

.cover-genre {
  margin: 0 16px 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.cover-status {
  margin: 0 16px 8px;
}

.cover-note {
  margin: 0 16px 16px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

.section-more {
  margin: 20px 0 0;
  text-align: right;
}

/* 最近更新与人气榜单并列区 */
.dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.dual-col {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.col-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-soft);
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.update-row:last-child {
  border-bottom: none;
}

.update-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.update-name {
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}

.update-genre {
  color: var(--text-soft);
  font-size: 13px;
}

.update-status {
  font-size: 13px;
  color: var(--text-soft);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-no {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  color: #A85A18;
  font-weight: 700;
  font-size: 14px;
}

.rank-name {
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}

.rank-genre {
  font-size: 13px;
  color: var(--text-soft);
}

.col-more {
  margin: 14px 0 0;
  text-align: right;
}

/* 阅读说明与收录边界摘要 */
.notes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.notes-col {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.notes-col .col-title {
  margin-bottom: 14px;
}

.notes-col p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* 站内栏目索引区 */
.site-index {
  padding-bottom: 8px;
}

/* ---- 题材分类 tese.html ---- */
.page-tese .tese-groups {
  margin: 0 0 36px;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.group-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.group-figure {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 0 14px;
  background-color: var(--brand-soft);
}

.group-figure img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.group-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.group-feature {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.7;
}

.group-scope {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 8px;
  line-height: 1.65;
}

.group-count {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background-color: #FAF7F1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.entry-link {
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
}

.entry-link:hover {
  text-decoration: underline;
}

.entry-tag {
  font-size: 12px;
  color: var(--text-soft);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}

.entry-point {
  flex: 1 1 100%;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.65;
}

.entry-status {
  margin-left: auto;
}

/* 题材选择建议 */
.tese-advice {
  margin: 0 0 36px;
}

.advice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.advice-item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.advice-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.advice-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.tese-note {
  margin: 0 0 8px;
}

.note-text {
  margin: 0;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* ---- 最近更新 gengxin.html ---- */
.page-gengxin .update-section {
  margin: 0 0 36px;
}

.update-group {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}

.update-group .update-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-soft);
}

.update-group .update-list {
  gap: 0;
}

.update-group .update-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.update-group .update-row:last-child {
  border-bottom: none;
}

.update-thumb {
  grid-row: span 2;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--brand-soft);
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-body {
  min-width: 0;
}

.update-body .update-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.update-note {
  flex: 1 1 100%;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.65;
}

/* 追更线索提示 */
.clue-section {
  margin: 0 0 36px;
}

.clue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.clue-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.clue-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.clue-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* 整理口径说明 */
.policy-section {
  margin: 0 0 36px;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.policy-block {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.policy-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.policy-block p {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* 相关栏目 */
.related-section {
  margin: 0 0 8px;
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.related-item a {
  font-weight: 600;
  color: var(--brand-dark);
}

.related-desc {
  color: var(--text-soft);
  font-size: 13px;
}

/* ---- 人气榜单 bangdan.html ---- */
.page-bangdan .rank-section {
  margin: 0 0 36px;
}

.rank-section .rank-list {
  gap: 0;
}

.rank-item {
  display: grid;
  grid-template-columns: 40px 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.rank-item:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.rank-item .rank-no {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  color: #A85A18;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.rank-thumb {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--brand-soft);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-body .rank-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.rank-body .rank-genre {
  font-size: 13px;
  color: var(--text-soft);
}

.rank-tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  background-color: var(--brand-soft);
  color: var(--brand-dark);
}

.rank-state {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.rank-note {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

/* 编辑选题说明 */
.editor-pick-section {
  margin: 0 0 36px;
}

.editor-pick-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.editor-pick-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 10px;
}

.editor-pick-card .editor-pick-name:not(:first-child) {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.editor-pick-text {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.editor-pick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0 0 12px;
}

.editor-pick-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.editor-pick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand);
}

/* 排序口径与阅读建议 */
.rank-rule-section {
  margin: 0 0 8px;
}

.rank-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rank-rule-col {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.sub-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 10px;
}

.rank-rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-rule-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.rank-rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* ---- 阅读说明 shuoming.html ---- */
.page-shuoming .fields-section {
  margin: 0 0 36px;
}

.field-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
  margin: 0 0 20px;
}

.field-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.field-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  background-color: var(--card);
  border-top: 1px solid var(--line);
}

.boundary-section {
  margin: 0 0 36px;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.boundary-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.boundary-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 10px;
}

.boundary-card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.boundary-card p:last-child {
  margin-bottom: 0;
}

.correction-section {
  margin: 0 0 36px;
}

.correction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px;
}

.correction-item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 0;
}

.correction-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 6px;
}

.correction-item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.correction-note {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.index-section {
  margin: 0 0 8px;
}

.index-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.index-link-item {
  min-width: 0;
}

.index-link-item a {
  display: block;
  padding: 14px 12px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.index-link-item a:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

/* ---- 404.html ---- */
.site-error {
  background-color: var(--bg);
}

.error-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.error-panel {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.error-code {
  font-family: var(--font-head);
  font-size: 56px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 8px;
  line-height: 1;
}

.error-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.error-desc {
  max-width: 620px;
  margin: 0 auto 22px;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.75;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.error-links {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.error-links-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 14px;
}

.error-link-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.error-link-list a {
  display: block;
  padding: 14px 12px;
  background-color: #FAF7F1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.error-link-list a:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive：平板与手机断点
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .page-layout,
  .layout-shell,
  .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 4% 40px;
  }

  .sidebar-left .page-layout,
  .sidebar-left .layout-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 4% 40px;
  }

  .sidebar-left .site-sidebar,
  .sidebar-left .sidebar,
  .sidebar-left .site-main,
  .sidebar-left .content-column,
  .page-layout .site-main,
  .page-layout .content-column,
  .page-layout .site-sidebar,
  .page-layout .sidebar {
    grid-column: 1;
    grid-row: auto;
  }

  /* 移动端：主内容始终排在侧栏之前 */
  .sidebar-left .site-main,
  .sidebar-left .content-column,
  .page-layout .site-main,
  .page-layout .content-column {
    order: 1;
  }

  .sidebar-left .site-sidebar,
  .sidebar-left .sidebar,
  .page-layout .site-sidebar,
  .page-layout .sidebar {
    order: 2;
  }

  .header-inner {
    padding: 10px 4%;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    min-height: 44px;
    line-height: 28px;
    padding: 8px 12px;
  }

  .hero-index {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dual-grid,
  .notes-grid,
  .group-grid,
  .clue-grid,
  .policy-grid,
  .rank-rule-grid,
  .boundary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .advice-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid,
  .index-links,
  .error-link-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 30px 4% 20px;
  }

  .footer-bottom {
    padding: 14px 4% 22px;
  }

  .inner-main {
    padding: 22px 4% 40px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  h1,
  .hero-title,
  .page-title {
    font-size: 24px;
  }

  h2,
  .section-title {
    font-size: 19px;
  }

  h3 {
    font-size: 16px;
  }

  .fact-bar p {
    padding: 8px 4%;
    font-size: 13px;
  }

  .brand-slogan {
    display: none;
  }

  .page-layout,
  .layout-shell,
  .sidebar-left,
  .sidebar-left .page-layout,
  .sidebar-left .layout-shell {
    padding: 18px 3% 34px;
    gap: 18px;
  }

  .inner-main {
    padding: 18px 3% 34px;
  }

  .page-header {
    margin-bottom: 22px;
    padding-bottom: 16px;
  }

  .hero-index {
    padding: 18px;
    gap: 22px;
  }

  .hero-figure img {
    height: 180px;
  }

  .hero-covers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-cover img {
    height: 110px;
  }

  .genre-grid,
  .wall-grid,
  .index-grid,
  .index-links,
  .error-link-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .update-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .update-group .update-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .update-thumb {
    width: 64px;
    height: 64px;
  }

  .rank-item {
    grid-template-columns: 32px 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
  }

  .rank-item .rank-no {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .rank-thumb {
    width: 64px;
    height: 64px;
  }

  .field-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .field-meta dt {
    margin-top: 6px;
  }

  .editor-pick-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .error-main {
    padding: 36px 3% 44px;
  }

  .error-code {
    font-size: 44px;
  }

  .error-title {
    font-size: 22px;
  }

  .error-panel {
    padding: 28px 18px;
  }
}
