/* ==========================================================================
   虫虫漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版基础
   -------------------------------------------------------------------------- */

:root {
  --paper: #F5F4F0;
  --ink: #171717;
  --ink-soft: #5A5A5A;
  --line: #171717;
  --accent: #E8442E;
  --card: #FFFFFF;
  --line-soft: #D8D5CD;
  --shell-max: 1200px;
  --radius: 6px;
  --gap: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.visually-hidden,
.field-table-caption.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   layout：站点骨架（页头、导航、主体、面包屑、页脚）
   -------------------------------------------------------------------------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 3px solid var(--accent);
  line-height: 1.2;
}

.brand-logo:hover,
.brand-logo:focus-visible {
  color: var(--accent);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.nav-item {
  display: block;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 40px;
  line-height: 22px;
  color: var(--ink);
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--line);
  color: var(--ink);
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 700;
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.inner-main {
  max-width: 100%;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.breadcrumb-sep {
  color: var(--ink-soft);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 700;
}

.page-header {
  border-bottom: 2px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.page-description {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 68ch;
}

/* 内页两栏外壳：默认主内容在前、侧栏在后 */
.page-layout {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
  align-items: start;
}

.page-layout .inner-main {
  min-width: 0;
  order: 1;
}

.page-layout .sidebar,
.page-layout .tree-sidebar,
.page-layout .sidebar-tree {
  order: 2;
  min-width: 0;
}

/* 侧栏在前的布局：.sidebar-left 可能位于布局容器自身或祖先节点 */
.sidebar-left.page-layout,
.sidebar-left .page-layout,
.sidebar-left.layout-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar-left.page-layout > .inner-main,
.sidebar-left .page-layout > .inner-main,
.sidebar-left.layout-shell > .inner-main {
  order: 2;
}

.sidebar-left.page-layout > .sidebar,
.sidebar-left.page-layout > .tree-sidebar,
.sidebar-left.page-layout > .sidebar-tree,
.sidebar-left .page-layout > .sidebar,
.sidebar-left .page-layout > .tree-sidebar,
.sidebar-left .page-layout > .sidebar-tree,
.sidebar-left.layout-shell > .sidebar,
.sidebar-left.layout-shell > .tree-sidebar,
.sidebar-left.layout-shell > .sidebar-tree {
  order: 1;
}

/* --------------------------------------------------------------------------
   layout：页脚
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: #EDEBE6;
  border-top: 2px solid var(--line);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 28px 32px;
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #B9B5AC;
  max-width: 34ch;
}

.footer-group-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #3A3A3A;
}

.footer-list {
  display: grid;
  gap: 8px;
}

.footer-list a {
  color: #CFCBC2;
  font-size: 14px;
  display: inline-block;
  padding: 2px 0;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
}

.footer-boundary {
  grid-column: 1 / -1;
  border-top: 1px solid #3A3A3A;
  padding-top: 20px;
}

.footer-boundary-text {
  font-size: 13px;
  line-height: 1.8;
  color: #A9A59C;
  max-width: 90ch;
}

.footer-bottom {
  border-top: 1px solid #3A3A3A;
}

.footer-copy {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 16px 24px 22px;
  font-size: 13px;
  color: #8E8A82;
}

/* --------------------------------------------------------------------------
   components：按钮、标签、标题组、表格、FAQ、侧栏导航
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #C9351F;
  border-color: #C9351F;
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--ink);
  color: #FFFFFF;
}

.inline-link {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 1px solid var(--accent);
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-desc,
.section-intro,
.section-lead {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 78ch;
}

.sub-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.tag,
.rank-tag,
.update-tag,
.entry-tag,
.update-tags {
  display: inline-block;
  font-size: 13px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  line-height: 1.6;
}

.filter-tag {
  display: inline-block;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.filter-tag:hover,
.filter-tag:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tag.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* 字段对照表 */
.field-table {
  width: 100%;
  font-size: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-table-caption {
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field-table thead th {
  background: var(--ink);
  color: #FFFFFF;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}

.field-table tbody th,
.field-table tbody td {
  text-align: left;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
  font-weight: 400;
  color: var(--ink);
}

.field-table tbody th {
  font-weight: 700;
  white-space: nowrap;
  background: #FBFAF7;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.faq-question {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.faq-question:hover,
.faq-question:focus-visible {
  color: var(--accent);
}

.faq-answer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line-soft);
}

.faq-answer p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

/* 侧栏树状导航 */
.tree-sidebar,
.sidebar,
.sidebar-tree {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  position: sticky;
  top: 88px;
}

.tree-sidebar-title,
.sidebar-title,
.tree-nav-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.tree-list,
.tree-nav-list {
  display: grid;
  gap: 2px;
}

.tree-item,
.tree-nav-item {
  display: block;
}

.tree-link,
.tree-nav-link {
  display: block;
  padding: 9px 10px;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 40px;
  color: var(--ink);
}

.tree-link:hover,
.tree-link:focus-visible,
.tree-nav-link:hover,
.tree-nav-link:focus-visible {
  border-color: var(--line);
  color: var(--accent);
}

.tree-link.is-current,
.tree-nav-link.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
}

.tree-sub-list,
.tree-sublist,
.tree-sub-list {
  display: grid;
  gap: 2px;
  margin: 2px 0 6px 12px;
  padding-left: 10px;
  border-left: 2px solid var(--line-soft);
}

.tree-sub-item,
.tree-subitem {
  display: block;
}

.tree-sub-link,
.tree-sublink {
  display: block;
  padding: 7px 8px;
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: var(--radius);
  min-height: 36px;
}

.tree-sub-link:hover,
.tree-sub-link:focus-visible,
.tree-sublink:hover,
.tree-sublink:focus-visible {
  color: var(--accent);
}

.tree-item-open > .tree-link {
  font-weight: 700;
}

/* 步骤列表（通用容器，页面内再限定作用域） */
.step-list {
  display: grid;
  gap: 14px;
}

.step-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.step-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-weight: 700;
  font-size: 15px;
  background: var(--accent);
  color: #FFFFFF;
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}

/* 图片容器统一约束 */
.genre-cover,
.tese-group-media,
.entry-media,
.update-cover,
.rank-cover,
.pick-cover,
.hero-visual,
.media-figure {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.genre-cover img,
.tese-group-media img,
.entry-media img,
.update-cover img,
.rank-cover img,
.pick-cover img,
.media-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */

.top-fact-bar {
  background: var(--ink);
  color: #EDEBE6;
}

.top-fact-text {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 13px;
  line-height: 1.6;
}

.home-main {
  display: block;
}

/* 首屏 */
.hero-section {
  border-bottom: 2px solid var(--line);
  background: var(--paper);
}

.hero-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 44px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 3px 10px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 40px;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-summary {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 22px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-tag-item {
  display: block;
}

.hero-tag {
  display: inline-block;
  padding: 7px 14px;
  font-size: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  min-height: 40px;
  line-height: 22px;
}

.hero-tag:hover,
.hero-tag:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  margin: 0;
  min-width: 0;
}

.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-visual-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 2px solid var(--line);
  background: var(--card);
}

/* 通用 section 容器 */
.section {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 40px 24px;
}

.section-head {
  margin-bottom: 22px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 14px;
}

/* 题材分类总览：四栏 */
.section-genre .genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.genre-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}

.genre-card:hover {
  border-color: var(--accent);
}

.genre-cover {
  margin-bottom: 12px;
  aspect-ratio: 3 / 4;
}

.genre-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.genre-scope {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  flex: 1 1 auto;
}

.genre-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  align-self: flex-start;
  padding: 4px 0;
  min-height: 32px;
}

.genre-link:hover,
.genre-link:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

/* 并列区：日历 + 更新列表 */
.update-pair {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.update-calendar,
.update-list-wrap {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}

.calendar-list {
  display: grid;
  gap: 2px;
}

.calendar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.calendar-row:last-child {
  border-bottom: none;
}

.calendar-date {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.calendar-count {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.update-list {
  display: grid;
  gap: 2px;
}

.update-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.update-item:last-child {
  border-bottom: none;
}

.update-item:hover {
  background: #FBFAF7;
}

.update-date {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  font-size: 13px;
}

.update-name {
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.update-pos {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 人气榜单与编辑选题 */
.rank-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.rank-col,
.topic-col {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}

.rank-list {
  display: grid;
  gap: 2px;
}

.rank-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}

.rank-item:nth-child(-n+3) .rank-no {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.rank-name {
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.topic-list {
  display: grid;
  gap: 12px;
}

.topic-item {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #FBFAF7;
}

.topic-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.topic-desc {
  font-size: 14px;
  color: var(--ink-soft);
}

/* 阅读说明与反馈摘要 */
.guide-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}

.guide-col,
.feedback-col {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}

.guide-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.feedback-text {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.boundary-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.boundary-item {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
}

.boundary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

/* 站内栏目索引：五列 */
.column-index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap);
}

.column-index-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}

.column-index-item:hover {
  border-color: var(--accent);
}

.column-index-link {
  font-size: 16px;
  font-weight: 700;
}

.column-index-link:hover,
.column-index-link:focus-visible {
  color: var(--accent);
}

.column-index-desc {
  font-size: 13px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages：题材分类页（tese）
   -------------------------------------------------------------------------- */

.tese-groups,
.tese-entries,
.tese-path {
  margin-bottom: 40px;
}

.tese-groups .section-title,
.tese-entries .section-title,
.tese-path .section-title {
  margin-bottom: 8px;
}

.tese-groups .section-intro,
.tese-entries .section-intro,
.tese-path .section-intro {
  margin-bottom: 20px;
}

.tese-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.tese-group-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-areas:
    "media name"
    "media scope"
    "media rule";
  gap: 6px 16px;
  align-content: start;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  scroll-margin-top: 90px;
  min-width: 0;
}

.tese-group-card:hover {
  border-color: var(--accent);
}

.tese-group-media {
  grid-area: media;
  align-self: start;
  aspect-ratio: 3 / 4;
}

.tese-group-name {
  grid-area: name;
  font-size: 17px;
}

.tese-group-scope {
  grid-area: scope;
  font-size: 14px;
  color: var(--ink);
}

.tese-group-rule {
  grid-area: rule;
  font-size: 13px;
  color: var(--ink-soft);
}

.entry-list {
  display: grid;
  gap: 12px;
}

.entry-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 0;
}

.entry-row:hover {
  border-color: var(--accent);
}

.entry-media {
  aspect-ratio: 3 / 4;
}

.entry-body {
  min-width: 0;
}

.entry-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.entry-meta {
  font-size: 14px;
  color: var(--ink-soft);
}

/* 步骤（题材页） */
.tese-path .step-item {
  grid-template-columns: 44px minmax(0, 1fr);
}

.tese-path .step-body {
  min-width: 0;
}

.tese-path .step-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.tese-path .step-text {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   pages：最近更新页（gengxin）
   -------------------------------------------------------------------------- */

.update-log,
.log-criteria,
.update-by-theme {
  margin-bottom: 40px;
}

.update-log .section-title,
.log-criteria .section-title,
.update-by-theme .section-title {
  margin-bottom: 8px;
}

.update-log .section-intro,
.log-criteria .section-intro,
.update-by-theme .section-intro {
  margin-bottom: 20px;
}

.update-log .update-list {
  gap: 12px;
}

.update-log .update-item {
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.update-log .update-item:hover {
  border-color: var(--accent);
  background: var(--card);
}

.update-log .update-cover {
  aspect-ratio: 3 / 4;
}

.update-log .update-body {
  min-width: 0;
}

.update-log .update-date {
  display: block;
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.update-log .update-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.update-log .update-tags {
  margin-bottom: 6px;
  margin-right: 6px;
}

.update-log .update-position {
  font-size: 14px;
  color: var(--ink-soft);
}

.log-criteria .field-table {
  margin-bottom: 12px;
}

.criteria-note {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 78ch;
}

.theme-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.theme-group {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.theme-group-title {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.theme-group-list {
  display: grid;
  gap: 2px;
}

.theme-group-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 9px 4px;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.theme-group-item:last-child {
  border-bottom: none;
}

.theme-group-item a {
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.theme-group-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.theme-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
  margin-top: 12px;
}

.theme-more a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.theme-more a:hover,
.theme-more a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages：人气榜单页（bangdan）
   -------------------------------------------------------------------------- */

.rank-section,
.rank-basis,
.picks-section {
  margin-bottom: 40px;
}

.rank-section .section-title,
.rank-basis .section-title,
.picks-section .section-title {
  margin-bottom: 8px;
}

.rank-section .section-intro,
.rank-basis .section-intro,
.picks-section .section-intro {
  margin-bottom: 20px;
}

.rank-section .rank-list {
  gap: 12px;
}

.rank-section .rank-item {
  grid-template-columns: 44px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.rank-section .rank-item:hover {
  border-color: var(--accent);
}

.rank-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}

.rank-section .rank-item:nth-child(-n+3) .rank-index {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.rank-cover {
  aspect-ratio: 3 / 4;
}

.rank-body {
  min-width: 0;
}

.rank-name {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rank-desc {
  font-size: 14px;
  color: var(--ink-soft);
}

.rank-section .rank-tag {
  white-space: nowrap;
}

/* 榜单依据 */
.basis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.basis-row {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}

.basis-term {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.basis-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.basis-note {
  font-size: 14px;
  color: var(--ink-soft);
}

.basis-note a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.basis-note a:hover,
.basis-note a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

/* 编辑选题三栏 */
.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.pick-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}

.pick-card:hover {
  border-color: var(--accent);
}

.pick-cover {
  aspect-ratio: 4 / 3;
  margin-bottom: 12px;
}

.pick-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.pick-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 10px;
  flex: 1 1 auto;
}

.pick-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.picks-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.picks-note a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.picks-note a:hover,
.picks-note a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   pages：阅读说明页（shuoming）
   -------------------------------------------------------------------------- */

.reading-flow,
.field-legend,
.feedback-boundary {
  margin-bottom: 40px;
}

.reading-flow .section-title,
.field-legend .section-title,
.feedback-boundary .section-title {
  margin-bottom: 8px;
}

.reading-flow .section-lead,
.field-legend .section-lead,
.feedback-boundary .section-lead {
  margin-bottom: 20px;
}

.media-figure {
  margin-bottom: 22px;
}

.media-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 2px solid var(--line);
  background: var(--card);
}

.reading-flow .step-item {
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-areas:
    "index title"
    "index desc";
  align-items: start;
  row-gap: 4px;
}

.reading-flow .step-index {
  grid-area: index;
  margin: 0;
}

.reading-flow .step-title {
  grid-area: title;
  font-size: 16px;
}

.reading-flow .step-desc {
  grid-area: desc;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 74ch;
}

.reading-flow .step-desc a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.reading-flow .step-desc a:hover,
.reading-flow .step-desc a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.field-legend .field-table {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */

.site-error .error-main {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 48px 24px 56px;
  width: 100%;
}

.error-panel {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 32px 28px;
  margin-bottom: 28px;
}

.error-code {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.error-panel h1 {
  font-size: 26px;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 66ch;
  margin-bottom: 22px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-guide {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px;
}

.error-guide h2 {
  font-size: 18px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.error-guide-list {
  display: grid;
  gap: 10px;
}

.error-guide-list li {
  font-size: 15px;
}

.error-guide-list a {
  display: inline-block;
  padding: 6px 0;
  min-height: 36px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.error-guide-list a:hover,
.error-guide-list a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

/* 滚动出现动画：仅作增强，初始可见 */
@media (prefers-reduced-motion: no-preference) {
  .section,
  .tese-groups,
  .tese-entries,
  .tese-path,
  .update-log,
  .log-criteria,
  .update-by-theme,
  .rank-section,
  .rank-basis,
  .picks-section,
  .reading-flow,
  .field-legend,
  .feedback-boundary {
    animation: fade-rise 0.5s ease-out both;
  }
}

@keyframes fade-rise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 34px;
  }

  .section-genre .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .column-index-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tese-group-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .basis-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .page-layout,
  .sidebar-left.page-layout,
  .sidebar-left .page-layout,
  .sidebar-left.layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .page-layout .inner-main,
  .sidebar-left.page-layout > .inner-main,
  .sidebar-left .page-layout > .inner-main,
  .sidebar-left.layout-shell > .inner-main {
    order: 1;
  }

  .page-layout .sidebar,
  .page-layout .tree-sidebar,
  .page-layout .sidebar-tree,
  .sidebar-left.page-layout > .sidebar,
  .sidebar-left.page-layout > .tree-sidebar,
  .sidebar-left.page-layout > .sidebar-tree,
  .sidebar-left .page-layout > .sidebar,
  .sidebar-left .page-layout > .tree-sidebar,
  .sidebar-left .page-layout > .sidebar-tree,
  .sidebar-left.layout-shell > .sidebar,
  .sidebar-left.layout-shell > .tree-sidebar,
  .sidebar-left.layout-shell > .sidebar-tree {
    order: 2;
    position: static;
  }

  .update-pair,
  .rank-pair,
  .guide-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    justify-content: stretch;
  }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 2px solid var(--line);
    margin-top: 8px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 10px;
    min-height: 44px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 32px 16px 36px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-visual img {
    aspect-ratio: 3 / 2;
  }

  .section {
    padding: 30px 16px;
  }

  .section-title {
    font-size: 20px;
  }

  .section-genre .genre-grid,
  .picks-grid,
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .column-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-layout {
    padding: 20px 16px 36px;
  }

  .page-title {
    font-size: 24px;
  }

  .page-description {
    font-size: 14px;
  }

  .update-item,
  .update-log .update-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .update-item .update-tag,
  .update-item .update-pos {
    grid-column: 2;
  }

  .rank-section .rank-item {
    grid-template-columns: 36px 64px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-section .rank-tag {
    grid-column: 3;
    justify-self: start;
  }

  .tese-group-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 6px 14px;
  }

  .footer-inner {
    padding: 32px 16px 24px;
    gap: 24px;
  }

  .footer-copy {
    padding: 14px 16px 20px;
  }

  .field-table {
    font-size: 13px;
  }

  .field-table thead th,
  .field-table tbody th,
  .field-table tbody td {
    padding: 8px 10px;
  }

  .error-panel {
    padding: 24px 18px;
  }

  .error-code {
    font-size: 44px;
  }

  .site-error .error-main {
    padding: 32px 16px 40px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 25px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .column-index-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .tese-group-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "media"
      "name"
      "scope"
      "rule";
  }

  .tese-group-media {
    max-width: 160px;
  }

  .entry-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-section .rank-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-section .rank-cover {
    grid-column: 1 / -1;
    max-width: 120px;
  }

  .rank-section .rank-body,
  .rank-section .rank-tag {
    grid-column: 2;
  }

  .step-item,
  .reading-flow .step-item,
  .tese-path .step-item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }

  .reading-flow .step-index,
  .tese-path .step-index {
    margin-bottom: 8px;
  }

  .reading-flow .step-title,
  .reading-flow .step-desc {
    grid-area: auto;
  }

  .theme-group-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .update-item,
  .update-log .update-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-item .update-tag,
  .update-item .update-pos,
  .update-log .update-cover {
    grid-column: 1;
  }

  .update-log .update-cover {
    max-width: 120px;
  }
}
