/* ==========================================================================
   漫蛙漫画 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base —— 变量、重置、基础排版
   -------------------------------------------------------------------------- */
:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --text: #1f2328;
  --text-soft: #5b6470;
  --line: #e3e6ea;
  --line-strong: #d3d8de;
  --accent: #2b6cb0;
  --accent-soft: #eaf1f9;
  --status-ongoing: #2f7d63;
  --status-hiatus: #8a6d3b;
  --status-completed: #4a5568;
  --radius: 6px;
  --radius-sm: 4px;
  --content-width: 1120px;
  --shadow-card: 0 1px 2px rgba(31, 35, 40, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   layout —— 页头、导航、主容器、面包屑、页脚
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #ffffff;
  border-radius: 2px;
}

.brand-name {
  font-size: 17px;
  line-height: 1.4;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list > li {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text-soft);
  font-size: 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background-color: var(--surface-soft);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
  background-color: var(--accent-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle:hover {
  background-color: var(--surface-soft);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text);
  border-radius: 1px;
}

.site-main {
  display: block;
}

.inner-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text);
}

.page-header {
  padding: 0 0 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 26px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
}

.page-description {
  margin-top: 10px;
  max-width: 780px;
  font-size: 14px;
  color: var(--text-soft);
}

.page-description a {
  color: var(--accent);
}

.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.footer-brand {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.footer-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.footer-brand-desc {
  margin-top: 6px;
  max-width: 620px;
  font-size: 13px;
  color: var(--text-soft);
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 22px 0;
}

.footer-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-list a {
  display: inline-block;
  min-height: 24px;
  font-size: 13px;
  color: var(--text-soft);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
}

.footer-note {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-soft);
}

.footer-copy {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   components —— 通用按钮、状态标签、链接、区块头
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #245e9b;
  border-color: #245e9b;
  color: #ffffff;
}

.btn-ghost {
  background-color: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.status,
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
  border: 1px solid currentColor;
}

.status-ongoing {
  color: var(--status-ongoing);
  background-color: rgba(47, 125, 99, 0.08);
}

.status-hiatus {
  color: var(--status-hiatus);
  background-color: rgba(138, 109, 59, 0.08);
}

.status-completed {
  color: var(--status-completed);
  background-color: rgba(74, 85, 104, 0.08);
}

.link-more {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
}

.section-desc,
.section-lead,
.section-intro {
  margin-top: 6px;
  max-width: 820px;
  font-size: 14px;
  color: var(--text-soft);
}

.section-lead a,
.section-desc a {
  color: var(--accent);
}

.section-more {
  margin-top: 14px;
}

.col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   pages —— 首页
   -------------------------------------------------------------------------- */
.fact-bar {
  background-color: #eef1f4;
  border-bottom: 1px solid var(--line);
}

.fact-bar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 8px 20px;
}

.fact-bar p {
  font-size: 13px;
  color: var(--text-soft);
}

.home-main {
  padding-bottom: 48px;
}

.hero-section {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px 20px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: start;
}

.hero-copy {
  padding-top: 6px;
}

.hero-title {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}

.hero-lead {
  margin-top: 14px;
  max-width: 520px;
  font-size: 15px;
  color: var(--text-soft);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-panel {
  background-color: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  font-size: 13px;
  color: var(--text-soft);
}

.tag:hover,
.tag:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.hero-figure {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--surface);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.hero-covers {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cover-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cover-card:hover {
  background-color: #f2f5f8;
  border-color: var(--line-strong);
}

.cover-card a {
  display: block;
  padding: 8px;
  color: var(--text);
}

.cover-card a:hover,
.cover-card a:focus-visible {
  text-decoration: none;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
}

.cover-name {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.cover-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-soft);
}

.hero-update-line {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-soft);
}

.hero-update-line a {
  color: var(--accent);
}

.section {
  padding: 34px 0 0;
}

.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 题材分类总览 */
.genre-overview {
  border-top: 1px solid var(--line);
}

.genre-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.genre-row:hover {
  background-color: var(--surface-soft);
}

.genre-no {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  padding-top: 2px;
}

.genre-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.genre-scope {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
}

.genre-count {
  font-size: 13px;
  color: var(--text-soft);
  white-space: nowrap;
  padding-top: 2px;
}

/* 最近更新记录 */
.update-list {
  border-top: 1px solid var(--line);
}

.update-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 110px 84px;
  gap: 12px;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.update-row:hover {
  background-color: var(--surface-soft);
}

.update-date {
  font-size: 13px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.update-name {
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}

.update-name a {
  color: var(--text);
}

.update-name a:hover,
.update-name a:focus-visible {
  color: var(--accent);
}

.update-genre {
  font-size: 13px;
  color: var(--text-soft);
}

.update-row .status {
  justify-self: start;
}

/* 人气榜单与编辑推荐 */
.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.ranking-list-col,
.ranking-note-col {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.rank-no {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rank-name {
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}

.rank-name a {
  color: var(--text);
}

.rank-name a:hover,
.rank-name a:focus-visible {
  color: var(--accent);
}

.rank-genre {
  font-size: 12px;
  color: var(--text-soft);
  white-space: nowrap;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-item {
  padding: 10px 12px;
  background-color: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.note-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.note-item p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
}

.note-more {
  margin-top: 12px;
}

/* 阅读说明摘要 */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.guide-usage-col,
.guide-status-col {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.usage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.usage-item {
  padding-left: 14px;
  border-left: 3px solid var(--accent-soft);
}

.usage-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.usage-item p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
}

.status-explain {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-explain-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-soft);
}

.status-explain-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.status-explain-item .status {
  margin-right: 6px;
  vertical-align: 1px;
}

.guide-feedback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-soft);
}

.guide-more {
  margin-top: 10px;
}

/* 站内栏目索引 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.index-cell {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.index-cell:hover {
  border-color: var(--line-strong);
  background-color: var(--surface-soft);
}

.index-name {
  font-size: 14px;
  font-weight: 600;
}

.index-name a {
  color: var(--text);
}

.index-name a:hover,
.index-name a:focus-visible {
  color: var(--accent);
}

.index-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   pages —— 题材分类页
   -------------------------------------------------------------------------- */
.page-layout {
  display: block;
}

.genre-article {
  display: block;
}

.genre-scope,
.genre-groups,
.genre-method,
.related-links {
  padding: 26px 0 0;
}

.genre-scope .section-lead,
.genre-groups .section-lead,
.genre-method .section-lead {
  margin-bottom: 16px;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.scope-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.scope-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.scope-item p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.genre-group {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.genre-group-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.genre-group-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.genre-group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
}

.genre-group-desc {
  grid-column: 2;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.genre-group-figure {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.genre-group-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.genre-group-figure figcaption {
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.entry-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.entry-name a {
  color: var(--text);
}

.entry-name a:hover,
.entry-name a:focus-visible {
  color: var(--accent);
}

.entry-meta {
  font-size: 13px;
  color: var(--text-soft);
  white-space: nowrap;
}

.method-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.method-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.method-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.method-item p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.method-pitfall {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  color: var(--text-soft);
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-item a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  font-size: 13px;
  color: var(--text-soft);
}

.related-item a:hover,
.related-item a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.related-item span {
  margin-left: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   pages —— 最近更新页
   -------------------------------------------------------------------------- */
.update-list-section,
.update-method-section,
.status-rule-section,
.related-section {
  padding: 26px 0 0;
}

.update-list-section .section-head,
.update-method-section .section-head,
.status-rule-section .section-head,
.related-section .section-head {
  margin-bottom: 16px;
}

.update-feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--surface);
  margin-bottom: 18px;
}

.update-feature img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.update-feature figcaption {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.update-list-section .update-list {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
}

.update-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.update-item:last-child {
  border-bottom: 0;
}

.update-item:hover {
  background-color: var(--surface-soft);
}

.update-item .update-date {
  font-size: 13px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.update-body {
  min-width: 0;
}

.update-item .update-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.update-item .update-genre {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-soft);
}

.update-pager {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.pager-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  font-size: 14px;
  color: var(--text);
}

.pager-link:hover,
.pager-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.method-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.method-block {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.method-block .method-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.method-block .method-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.method-aside {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.method-aside-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.method-aside-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.method-aside-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-aside-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
  color: var(--accent);
}

.status-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.status-rule-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.status-rule-name {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.status-rule-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   pages —— 人气榜单页
   -------------------------------------------------------------------------- */
.ranking-section,
.ranking-method,
.ranking-usage,
.related-section {
  padding: 26px 0 0;
}

.ranking-section .section-head,
.ranking-method .section-head,
.ranking-usage .section-head {
  margin-bottom: 16px;
}

.ranking-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--surface);
  margin-bottom: 18px;
}

.ranking-visual img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.ranking-visual figcaption {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.ranking-section .ranking-list {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 18px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-item:hover {
  background-color: var(--surface-soft);
}

.ranking-position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ranking-body {
  min-width: 0;
}

.ranking-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.ranking-meta {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-soft);
}

.ranking-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.ranking-method .method-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranking-method .method-item .method-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.ranking-method .method-item .method-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.ranking-usage .usage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ranking-usage .usage-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-left: 1px solid var(--line);
}

.ranking-usage .usage-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.ranking-usage .usage-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   pages —— 阅读说明页
   -------------------------------------------------------------------------- */
.guide-visual,
.guide-faq,
.guide-feedback,
.related-links {
  padding: 26px 0 0;
}

.guide-visual .section-lead,
.guide-faq .section-lead {
  margin-bottom: 16px;
}

.guide-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--surface);
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 44px 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.faq-item[open] .faq-question::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-question:hover {
  background-color: var(--surface-soft);
}

.faq-answer {
  padding: 0 16px 14px;
  border-top: 1px solid var(--line);
}

.faq-answer p {
  padding-top: 12px;
  font-size: 14px;
  color: var(--text-soft);
}

.feedback-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feedback-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.feedback-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.feedback-item p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.feedback-note {
  margin-top: 16px;
  padding: 14px 16px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-soft);
}

.feedback-note a {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   pages —— 404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px 20px 72px;
}

.error-panel {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 680px;
}

.error-code {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.error-title {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
}

.error-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-soft);
}

.error-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-links {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-soft);
}

.error-links a:hover,
.error-links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive —— 960px / 640px 断点
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 14px;
    box-shadow: var(--shadow-card);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-width: var(--content-width);
    margin: 0 auto;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 15px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 26px;
  }

  .hero-title {
    font-size: 26px;
  }

  .ranking-layout,
  .guide-layout,
  .method-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scope-list,
  .method-list,
  .ranking-method .method-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-rule-grid,
  .feedback-list,
  .ranking-usage .usage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.site-body {
    font-size: 15px;
  }

  .header-inner {
    padding: 0 16px;
    min-height: 56px;
  }

  .brand-name {
    font-size: 16px;
  }

  .fact-bar-inner,
  .section-inner,
  .footer-inner,
  .inner-main,
  .error-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 23px;
  }

  .page-title,
  .error-title {
    font-size: 22px;
  }

  .hero-covers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .cover-card a {
    padding: 6px;
  }

  .cover-name {
    font-size: 12px;
  }

  .genre-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .genre-count {
    grid-column: 2;
    padding-top: 0;
  }

  .update-row {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
  }

  .update-row .update-genre,
  .update-row .status {
    grid-column: 2;
  }

  .update-row .status {
    justify-self: start;
  }

  .ranking-row {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
  }

  .rank-genre {
    grid-column: 2;
    white-space: normal;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-rule-grid,
  .feedback-list,
  .ranking-usage .usage-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-list-section .update-list,
  .ranking-section .ranking-list {
    padding: 4px 14px;
  }

  .update-item {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
  }

  .update-item .status-tag {
    grid-column: 2;
    justify-self: start;
  }

  .ranking-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-position {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .entry-meta {
    white-space: normal;
  }

  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .error-panel {
    padding: 24px 18px;
  }

  .hero-actions .btn,
  .error-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
