/* =========================================================
   yy漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================= */

/* ---------------------------------------------------------
   1. base 基础层
   --------------------------------------------------------- */

:root {
  --bg-page: #faf9f6;
  --bg-card: #ffffff;
  --bg-soft: #f3f1ea;
  --text-main: #1f2328;
  --text-muted: #5b6470;
  --accent: #1f6f5c;
  --accent-soft: #e6f0ec;
  --line: #e3e0d8;
  --line-strong: #d3cfc4;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(31, 35, 40, 0.05);
  --container: 1160px;
  --prose: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

h1 {
  font-size: 30px;
  line-height: 1.3;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 17px;
  line-height: 1.5;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: #16513f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

figure {
  margin: 0;
}

figcaption {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
}

button {
  font: inherit;
  color: inherit;
}

/* ---------------------------------------------------------
   2. layout 全站骨架
   --------------------------------------------------------- */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
}

/* 顶部事实条 */
.fact-bar,
.topbar {
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-muted);
}

.fact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 24px;
}

.fact-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 24px;
}

.fact-bar-text,
.fact-text,
.topbar-text {
  margin: 0;
  flex: 1 1 320px;
  min-width: 0;
}

.fact-bar-link,
.fact-link,
.topbar-link {
  flex: 0 0 auto;
  font-weight: 600;
  white-space: nowrap;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-main);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text-main);
  text-decoration: none;
}

.brand-name {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
}

.brand-tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 主导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-item {
  display: block;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-main);
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  background-color: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
  background-color: var(--accent-soft);
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 1px;
}

/* 主内容 */
.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.home-main {
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.inner-main {
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text-muted);
}

/* 页面标题区 */
.page-header {
  max-width: var(--prose);
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 12px;
}

.page-description {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

/* 页脚 */
.site-footer {
  background-color: var(--bg-soft);
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-group {
  min-width: 0;
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: inline-block;
  min-height: 24px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px 32px;
  border-top: 1px solid var(--line-strong);
}

.footer-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------------------------------------------------------
   3. components 通用组件
   --------------------------------------------------------- */

/* 区块标题组 */
.section-head {
  max-width: var(--prose);
  margin-bottom: 24px;
}

.section-heading {
  max-width: var(--prose);
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
}

.section-lead,
.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

.subsection-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* 区块容器 */
.section-section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

/* 更多入口 */
.section-more {
  margin: 20px 0 0;
  font-size: 15px;
}

.text-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 封面条目卡（首页 / 题材分类页共用基础） */
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(31, 35, 40, 0.08);
}

.entry-card .entry-figure,
.entry-card .entry-cover {
  width: 100%;
}

.entry-figure {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
}

.entry-figure img,
.entry-card .entry-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.entry-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.entry-genre,
.entry-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  line-height: 1.7;
}

.entry-status {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
}

.entry-status.is-serial {
  color: var(--accent);
  font-weight: 600;
}

.entry-status.is-done {
  color: var(--text-muted);
  font-weight: 600;
}

/* 数字等宽 */
.rank-no,
.ranking-index,
.update-batch,
.update-progress {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------
   4. pages 各页面业务模块
   --------------------------------------------------------- */

/* ---------- 4.1 首页 ---------- */

/* 首屏 */
.hero {
  padding: 48px 0 36px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.hero-text {
  min-width: 0;
  max-width: 560px;
}

.hero-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 16px;
}

.hero-summary {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-action {
  display: block;
}

.action-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(--bg-card);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.action-link:hover,
.action-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.action-link-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.action-link-primary:hover,
.action-link-primary:focus-visible {
  background-color: #16513f;
  border-color: #16513f;
  color: #ffffff;
}

.hero-visual {
  min-width: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.hero-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-tag {
  display: block;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: var(--bg-card);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.tag-link:hover,
.tag-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* 题材方向总览（首页） */
.genre-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.genre-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.genre-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.genre-scope {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.genre-figure {
  margin-top: 4px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
}

.genre-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.genre-cover-caption {
  margin-top: 8px;
  font-size: 12px;
}

/* 封面条目速览（首页） */
.entry-glance .entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.entry-grid .entry-card {
  min-width: 0;
}

/* 最近更新记录（首页） */
.update-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.update-group {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.update-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 14px;
  line-height: 1.6;
}

.update-name {
  font-weight: 600;
  color: var(--text-main);
  flex: 1 1 120px;
  min-width: 0;
}

.update-genre {
  font-size: 12px;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: 999px;
  padding: 1px 8px;
}

.update-progress {
  font-size: 13px;
  color: var(--text-muted);
}

.update-status {
  font-size: 12px;
  color: var(--text-muted);
}

/* 人气位次与字段口径（首页） */
.rank-fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.rank-column,
.field-column {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rank-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-no {
  flex: 0 0 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.rank-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--text-main);
}

.rank-genre {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-muted);
}

.field-list {
  display: grid;
  grid-template-columns: minmax(80px, auto) minmax(0, 1fr);
  gap: 10px 16px;
}

.field-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.field-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* 查阅路径与反馈入口（首页） */
.path-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.path-step {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.path-step .step-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.step-link {
  font-size: 14px;
  font-weight: 600;
}

.feedback-block {
  max-width: var(--prose);
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 12px;
}

/* 站内栏目索引（首页） */
.index-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.index-column {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.index-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.index-link {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 4.2 题材分类页 ---------- */

.page-genres .genre-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.genre-scope-card {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.genre-scope-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.genre-scope-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.genre-scope-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 13px;
}

.genre-scope-meta dt {
  color: var(--text-muted);
}

.genre-scope-meta dd {
  color: var(--text-main);
}

.genre-entries .genre-group {
  margin-bottom: 32px;
}

.genre-group:last-child {
  margin-bottom: 0;
}

.genre-group-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.entry-card-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.genre-rhythm .rhythm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.rhythm-block {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rhythm-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.rhythm-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 12px;
}

.rhythm-note {
  margin: 0;
  font-size: 14px;
}

/* ---------- 4.3 最近更新页 ---------- */

.page-updates .update-section,
.page-updates .batch-section,
.page-updates .rule-section,
.page-updates .related-section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.page-updates .update-section {
  border-top: 0;
  padding-top: 0;
}

.page-updates .update-group {
  margin-bottom: 24px;
}

.page-updates .update-group:last-child {
  margin-bottom: 0;
}

.update-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.update-group-head .update-date {
  margin: 0;
  padding: 0;
  border-bottom: 0;
  font-size: 17px;
}

.update-batch {
  font-size: 13px;
  color: var(--text-muted);
}

.page-updates .update-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-updates .update-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.page-updates .update-row:last-child {
  border-bottom: 0;
}

.update-thumb {
  flex: 0 0 48px;
  width: 48px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
}

.update-thumb img {
  width: 100%;
  height: 64px;
  object-fit: cover;
}

.update-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  flex: 1 1 220px;
  min-width: 0;
}

.update-row-main .update-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.update-row-main .update-name:hover,
.update-row-main .update-name:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.update-row-main .update-genre {
  font-size: 12px;
}

.page-updates .update-progress {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-muted);
}

.page-updates .update-status {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  background-color: var(--bg-soft);
}

.page-updates .update-status.is-serial {
  background-color: var(--accent-soft);
  color: var(--accent);
}

.page-updates .update-status.is-done {
  background-color: var(--bg-soft);
  color: var(--text-muted);
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.batch-card {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.batch-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.batch-card-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.rule-item {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.rule-item-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.related-card-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
  flex: 1 1 auto;
}

.related-link {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 4.4 人气位次页 ---------- */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 36px;
  align-items: start;
  padding-top: 4px;
}

.ranking-list-section {
  min-width: 0;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ranking-row {
  display: grid;
  grid-template-columns: 40px 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-index {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  padding-top: 2px;
}

.ranking-cover {
  width: 64px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
}

.ranking-cover img {
  width: 100%;
  height: 86px;
  object-fit: cover;
}

.ranking-body {
  min-width: 0;
}

.ranking-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 4px;
}

.ranking-genre {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 6px;
}

.ranking-note {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.ranking-aside {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 14px;
}

.scope-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scope-item {
  min-width: 0;
}

.scope-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 4px;
}

.scope-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.aside-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.ranking-compare-section {
  padding: 36px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-card);
}

.compare-table {
  min-width: 560px;
  font-size: 14px;
}

.table-caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
  vertical-align: top;
}

.compare-table thead th {
  background-color: var(--bg-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.compare-table tbody td {
  color: var(--text-muted);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.compare-note .inline-link {
  margin-right: 12px;
}

/* ---------- 4.5 查阅指引页 ---------- */

.guide-section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.guide-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.fields-section .field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field-item {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-item .field-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.field-meaning {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 10px;
}

.field-sample {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background-color: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0;
}

.guide-figure {
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-soft);
}

.guide-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-caption {
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step-item {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  margin: 0 0 12px;
  border-radius: 999px;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.step-item .step-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.step-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 12px;
}

.step-link {
  font-size: 14px;
  font-weight: 600;
}

.path-note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.feedback-section .feedback-block {
  max-width: none;
  padding: 0;
  background-color: transparent;
  border: 0;
}

.feedback-subtitle {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 12px;
}

.feedback-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.feedback-item {
  min-width: 0;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}

.feedback-note {
  font-size: 14px;
  color: var(--text-muted);
  max-width: var(--prose);
  margin: 0 0 32px;
}

.faq-block {
  max-width: var(--prose);
}

.faq-subtitle {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-card);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 600;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 12px 16px 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
  border-top: 1px solid var(--line);
}

.more-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.more-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  min-width: 0;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.more-link {
  font-size: 15px;
  font-weight: 600;
}

.more-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- 4.6 404 页 ---------- */

.error-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 24px 96px;
}

.error-inner {
  max-width: var(--prose);
  width: 100%;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}

.error-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0 0 14px;
}

.error-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 24px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.button {
  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(--bg-card);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.button-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background-color: #16513f;
  border-color: #16513f;
  color: #ffffff;
}

.error-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------------------------------------------------------
   5. responsive 响应式
   --------------------------------------------------------- */

@media (max-width: 960px) {
  .fact-bar,
  .topbar,
  .header-inner,
  .home-main,
  .inner-main,
  .footer-inner,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0 12px;
    justify-content: flex-start;
  }

  .hero {
    padding: 32px 0 28px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-text {
    max-width: none;
  }

  .genre-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-glance .entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .update-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-fields-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .index-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-genres .genre-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .batch-grid,
  .rule-list,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .feedback-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 19px;
  }

  h3 {
    font-size: 16px;
  }

  .brand-name {
    font-size: 19px;
  }

  .header-inner {
    gap: 10px 16px;
  }

  .page-title,
  .hero-title,
  .error-title {
    font-size: 24px;
  }

  .hero {
    padding: 24px 0 22px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-action {
    width: 100%;
  }

  .action-link {
    width: 100%;
    justify-content: center;
  }

  .hero-tags {
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
  }

  .section-section,
  .section,
  .guide-section {
    padding: 28px 0;
  }

  .page-updates .update-section,
  .page-updates .batch-section,
  .page-updates .rule-section,
  .page-updates .related-section {
    padding: 26px 0;
  }

  .genre-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-glance .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .update-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .path-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-genres .genre-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-rhythm .rhythm-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-grid,
  .rule-list,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ranking-row {
    grid-template-columns: 32px 56px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-cover {
    width: 56px;
  }

  .ranking-cover img {
    height: 76px;
  }

  .fields-section .field-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .more-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 32px;
  }

  .error-main {
    padding: 48px 16px 72px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .page-updates .update-row {
    gap: 10px 12px;
  }

  .update-thumb {
    flex-basis: 44px;
    width: 44px;
  }

  .update-thumb img {
    height: 58px;
  }
}
