/* ==========================================================================
   腐漫画网 fzghsb.cn — 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版基础
   -------------------------------------------------------------------------- */
:root {
  --bg: #F7F8FA;
  --text: #1F2933;
  --text-sub: #5C6B7A;
  --accent: #1F9D8B;
  --accent-soft: #E6F5F2;
  --line: #E4E8EC;
  --card: #FFFFFF;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.05);
  --shadow-md: 0 4px 14px rgba(31, 41, 51, 0.09);
  --content-width: 1200px;
  --gap: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #17806f;
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  background: var(--accent-soft);
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   layout：页头、主导航、主容器、面包屑、页标题区、页脚、通用分栏
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-brand::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.site-brand:hover,
.site-brand:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-list > li > a:hover,
.nav-list > li > a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.nav-list > li > a.is-current {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
}

.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px 56px;
}

.inner-main {
  padding-top: 20px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: #A9B4BF;
}

.breadcrumb-current {
  color: var(--text);
}

.page-header {
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.page-description {
  margin-top: 10px;
  max-width: 860px;
  color: var(--text-sub);
}

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 36px 20px 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) 2fr;
  gap: 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.footer-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col {
  min-width: 0;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col ul a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--text-sub);
}

.footer-col ul a:hover,
.footer-col ul a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 16px 20px 24px;
  font-size: 13px;
  color: var(--text-sub);
}

.footer-note {
  font-size: 13px;
  color: var(--text-sub);
}

/* 通用分栏：主内容在前，aside 在后 */
.two-col,
.page-layout,
.category-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.col-main,
.category-intro-main {
  min-width: 0;
}

.col-side,
.category-intro-side {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.section {
  margin-bottom: 40px;
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
}

.section-desc,
.section-lead,
.section-intro {
  margin-top: 8px;
  color: var(--text-sub);
  max-width: 860px;
}

.section-foot {
  margin-top: 16px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.link-more::after {
  content: "→";
  margin-left: 6px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   components：按钮、卡片、列表条目、表格、FAQ、关联入口
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #17806f;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.link-card {
  display: block;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.link-card h3,
.link-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.link-card p,
.link-card-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-sub);
}

.link-card:hover h3,
.link-card:hover .link-card-title {
  color: var(--accent);
}

/* 表格：字段口径 / 更新字段说明 */
.field-table,
.guide-table {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}

.field-table caption,
.guide-table caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td,
.guide-table th,
.guide-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.field-table thead th,
.guide-table thead th {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.field-table tbody tr:last-child td,
.guide-table tbody tr:last-child td {
  border-bottom: 0;
}

.guide-table tbody td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

/* FAQ 折叠 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  margin-left: auto;
  padding-left: 12px;
  font-size: 18px;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item p {
  padding: 0 0 16px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* 相关内容条 */
.related-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 40px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-links-label {
  font-size: 14px;
  color: var(--text-sub);
}

.related-links-item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.related-links-item:hover,
.related-links-item:focus-visible {
  background: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */
.fact-bar {
  margin: 16px 0 0;
  padding: 10px 16px;
  background: var(--accent-soft);
  border: 1px solid #CDE9E3;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #14655A;
}

.hero-section {
  padding: 32px 0 8px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.hero-main {
  min-width: 0;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.hero-summary {
  margin-top: 14px;
  max-width: 720px;
  color: var(--text-sub);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-figure {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
}

.hero-side {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.hero-side-title {
  font-size: 18px;
  font-weight: 700;
}

.hero-cat-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-cat-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.hero-cat-list a:hover,
.hero-cat-list a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.hero-explore {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero-explore-title {
  font-size: 16px;
  font-weight: 600;
}

.hero-explore p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

/* 题材方向总览 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.cat-card-title {
  font-size: 17px;
  font-weight: 700;
}

.cat-card-title a {
  color: var(--text);
}

.cat-card-title a:hover,
.cat-card-title a:focus-visible {
  color: var(--accent);
}

.cat-card-feature {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

.cat-card-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sub);
}

.cat-count {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.cat-card-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* 封面墙 */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cover-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.cover-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.cover-link {
  display: block;
  color: var(--text);
}

.cover-link:hover,
.cover-link:focus-visible {
  text-decoration: none;
}

.cover-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cover-title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.cover-link:hover .cover-title {
  color: var(--accent);
}

.cover-cat {
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent);
}

.cover-update {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-sub);
}

/* 最近更新记录 */
.update-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.update-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.update-date {
  font-size: 14px;
  color: var(--text-sub);
}

.update-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

a.update-name:hover,
a.update-name:focus-visible {
  color: var(--accent);
}

.update-cat,
.update-genre {
  font-size: 13px;
  color: var(--accent);
}

.update-chapter {
  font-size: 13px;
  color: var(--text-sub);
  text-align: right;
}

/* 榜单与编辑选题 */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rank-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.rank-reason {
  font-size: 13px;
  color: var(--text-sub);
}

.col-title {
  font-size: 18px;
  font-weight: 700;
}

.col-main > .col-title + .update-list,
.col-main > .col-title + .rank-list {
  margin-top: 14px;
}

.col-side p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-sub);
}

.col-foot {
  margin-top: 14px;
}

/* 站内栏目索引 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-col {
  min-width: 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.index-col:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.index-col-title {
  font-size: 16px;
  font-weight: 700;
}

.index-col-title a {
  color: var(--text);
}

.index-col-title a:hover,
.index-col-title a:focus-visible {
  color: var(--accent);
}

.index-col p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages：题材分类
   -------------------------------------------------------------------------- */
.category-intro-side .side-title {
  font-size: 16px;
  font-weight: 700;
}

.tip-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tip-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.tip-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.category-block {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.category-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.category-name {
  font-size: 20px;
  font-weight: 700;
}

.category-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.category-meta .meta-label {
  color: var(--text-sub);
}

.category-meta .meta-value {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.category-desc {
  margin-top: 14px;
  color: var(--text-sub);
}

.category-points {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.category-points li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.category-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.category-entries {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.entry-cover {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.entry-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.entry-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.entry-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.category-enter {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
}

.category-enter::after {
  content: "→";
  margin-left: 6px;
  font-size: 14px;
}

.related-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.related-entry-card {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.related-entry-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.related-entry-name {
  font-size: 17px;
  font-weight: 700;
}

.related-entry-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

.related-entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   pages：最近更新
   -------------------------------------------------------------------------- */
.updates-list-section,
.updates-field-section,
.updates-links-section {
  margin-bottom: 36px;
}

.updates-list-section h2,
.updates-field-section h2,
.updates-links-section h2 {
  font-size: 22px;
  font-weight: 700;
}

.updates-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.updates-list .update-item {
  grid-template-columns: 96px minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 1fr);
}

.updates-figure {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.updates-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.updates-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
}

.link-cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* --------------------------------------------------------------------------
   pages：人气榜单
   -------------------------------------------------------------------------- */
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.page-meta-item {
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.ranking-section,
.ranking-rule-section,
.editor-section,
.link-section {
  margin-bottom: 40px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 96px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ranking-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.ranking-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.ranking-cover {
  min-width: 0;
}

.ranking-cover img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.ranking-body {
  min-width: 0;
}

.ranking-name {
  font-size: 17px;
  font-weight: 700;
}

.ranking-name a {
  color: var(--text);
}

.ranking-name a:hover,
.ranking-name a:focus-visible {
  color: var(--accent);
}

.ranking-tag {
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent);
}

.ranking-reason {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-sub);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.rule-item {
  min-width: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-title {
  font-size: 16px;
  font-weight: 700;
}

.rule-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

.rule-note {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--accent-soft);
  border: 1px solid #CDE9E3;
  border-radius: var(--radius);
}

.rule-note-title {
  font-size: 16px;
  font-weight: 700;
  color: #14655A;
}

.rule-note-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.rule-note-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: #14655A;
}

.rule-note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.editor-item {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.editor-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.editor-title {
  font-size: 17px;
  font-weight: 700;
}

.editor-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* --------------------------------------------------------------------------
   pages：阅读说明
   -------------------------------------------------------------------------- */
.guide-section {
  margin-bottom: 40px;
}

.guide-section h2 {
  font-size: 22px;
  font-weight: 700;
}

.guide-figure {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.guide-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
}

.guide-scope-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scope-block {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-block h3 {
  font-size: 17px;
  font-weight: 700;
}

.scope-block p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

.guide-rules-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rule-block {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-block h3 {
  font-size: 17px;
  font-weight: 700;
}

.rule-block p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

.guide-link-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-link-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.guide-link-list a {
  font-size: 15px;
  font-weight: 600;
}

.guide-link-list span {
  font-size: 14px;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */
.error-main {
  padding-top: 48px;
}

.error-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.error-code {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.error-panel h1 {
  margin-top: 14px;
  font-size: 26px;
}

.error-text {
  margin-top: 12px;
  color: var(--text-sub);
}

.error-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.error-btn:hover,
.error-btn:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.error-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   responsive：1024px 与 768px 断点
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

  .cat-grid,
  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    min-height: 60px;
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 0 0 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-bottom: 12px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list > li > a {
    width: 100%;
    padding: 0 12px;
    font-size: 16px;
  }

  .site-main {
    padding: 0 16px 44px;
  }

  .page-header {
    padding: 2px 0 18px;
    margin-bottom: 22px;
  }

  .page-title {
    font-size: 24px;
  }

  .section-title,
  .updates-list-section h2,
  .updates-field-section h2,
  .updates-links-section h2,
  .guide-section h2 {
    font-size: 20px;
  }

  .hero-section {
    padding: 22px 0 4px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-layout,
  .two-col,
  .page-layout,
  .category-intro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-side {
    order: 2;
  }

  .cover-grid,
  .cat-grid,
  .rule-grid,
  .editor-grid,
  .link-grid,
  .link-cards,
  .related-entry-grid,
  .category-entries,
  .category-points,
  .rule-note-list,
  .guide-scope-grid,
  .guide-rules-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .update-item,
  .updates-list .update-item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 12px;
  }

  .update-date {
    grid-column: 1 / -1;
    font-size: 13px;
  }

  .update-name {
    grid-column: 1 / -1;
  }

  .update-chapter {
    text-align: left;
  }

  .rank-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .rank-reason {
    grid-column: 2 / -1;
  }

  .ranking-item {
    grid-template-columns: 36px 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .ranking-cover img {
    width: 72px;
    height: 96px;
  }

  .ranking-name {
    font-size: 16px;
  }

  .field-table,
  .guide-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .footer-inner {
    padding: 28px 16px 20px;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .footer-bottom p {
    padding: 14px 16px 20px;
  }
}

@media (max-width: 480px) {
  .index-grid,
  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .ranking-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .ranking-cover {
    grid-column: 2 / -1;
  }

  .ranking-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    max-width: 180px;
  }
}
