/* ==========================================================================
   动漫之家 fucunren.cn — 全站样式表
   base → layout → components → pages → responsive
   ========================================================================== */

/* ==========================================================================
   base
   ========================================================================== */

:root {
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --bg-soft: #eef0f3;
  --ink-title: #1c2a3a;
  --ink-body: #33383f;
  --ink-muted: #6b7280;
  --line: #e3e6ea;
  --line-strong: #ccd2da;
  --accent: #2f6fb0;
  --accent-soft: #e7eff8;
  --tag-genre: #4a8f8a;
  --tag-status: #7c8794;
  --mark-orange: #c97a3a;
  --radius: 6px;
  --radius-sm: 4px;
  --shell: 1180px;
  --shell-narrow: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink-title);
  font-weight: 600;
  line-height: 1.35;
}

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: #1d5289;
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

: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 {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: var(--ink-title);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover,
.brand:focus-visible {
  color: var(--ink-title);
  text-decoration: none;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.3;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  flex: 0 0 auto;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: var(--ink-title);
  border-radius: 1px;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 20px 14px 18px;
  font-size: 15px;
  color: var(--ink-body);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--ink-title);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.site-main {
  display: block;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 64px;
  min-width: 0;
}

.breadcrumb {
  padding: 20px 0 6px;
  font-size: 13px;
  color: var(--ink-muted);
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  margin: 0 8px;
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-body);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin: 0 8px;
  color: var(--line-strong);
}

.breadcrumb-item.is-current {
  color: var(--ink-body);
}

.page-header {
  padding: 8px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-title);
}

.page-description {
  margin-top: 12px;
  max-width: 68ch;
  color: var(--ink-muted);
  font-size: 15px;
}

.page-lead {
  margin-top: 10px;
  max-width: 68ch;
  color: var(--ink-body);
  font-size: 15px;
}

.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 36px 24px 26px;
}

.footer-top {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-title);
}

.footer-desc {
  margin-top: 8px;
  max-width: 66ch;
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-back {
  margin-top: 12px;
  font-size: 14px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 32px;
  padding: 26px 0 20px;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 10px;
}

.footer-list li + li {
  margin-top: 7px;
}

.footer-list a {
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
}

.footer-copy {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

/* 内页双栏外壳：默认正文在前，侧栏在后 */
.page-layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 44px;
  align-items: start;
}

/* 侧栏在前的变体 */
.sidebar-left {
  grid-template-columns: 250px minmax(0, 1fr);
}

.page-layout.sidebar-left .page-aside,
.sidebar-left .page-aside {
  order: -1;
}

.page-layout.sidebar-left .inner-main,
.sidebar-left .inner-main,
.page-layout.sidebar-left .page-content,
.sidebar-left .page-content {
  order: 1;
}

/* ==========================================================================
   components
   ========================================================================== */

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #1d5289;
  border-color: #1d5289;
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: #1d5289;
  text-decoration: none;
}

/* --- 区块标题 --- */
.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-title);
}

.section-intro {
  margin-top: 10px;
  max-width: 68ch;
  font-size: 15px;
  color: var(--ink-muted);
}

.section-desc {
  margin-top: 10px;
  max-width: 68ch;
  font-size: 15px;
  color: var(--ink-muted);
}

.section-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 68ch;
}

.sub-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 10px;
}

.subsection-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 10px;
}

/* --- 标签 --- */
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.7;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.tag-genre {
  background: #e8f2f1;
  color: var(--tag-genre);
}

.tag-status {
  background: #edeff2;
  color: var(--tag-status);
}

.genre-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: #e8f2f1;
  color: var(--tag-genre);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.serial-state {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: #edeff2;
  color: var(--tag-status);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* --- 封面卡 --- */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cover-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.cover-card:hover,
.cover-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(28, 42, 58, 0.07);
}

.cover-figure {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.cover-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-title);
}

.cover-desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.65;
}

.cover-caption {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* --- 表格 --- */
.field-table {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.field-table caption {
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.field-table th,
.field-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  background: var(--bg-soft);
  color: var(--ink-title);
  font-weight: 600;
  font-size: 13px;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-title);
  white-space: nowrap;
}

.table-caption {
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* --- 相关链接 --- */
.related-links,
.related-nav,
.related-section {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 12px;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.related-item a,
.related-list li a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--accent);
}

.related-item a:hover,
.related-list li a:hover,
.related-item a:focus-visible,
.related-list li a:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}

/* --- 页内目录 --- */
.page-aside,
.page-sidebar {
  position: sticky;
  top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
}

.aside-title,
.sidebar-title,
.toc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 10px;
}

.toc-list li + li {
  margin-top: 6px;
}

.toc-link {
  display: block;
  padding: 5px 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.toc-link:hover,
.toc-link:focus-visible {
  color: var(--accent);
}

.toc-link.is-active {
  color: var(--ink-title);
  font-weight: 600;
}

.toc-progress {
  margin-top: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.toc-progress-bar,
.toc-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.12s linear;
}

.toc-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* --- 内容区通用间距 --- */
.content-section,
.content-block {
  margin-top: 44px;
}

.content-section:first-of-type,
.content-block:first-of-type {
  margin-top: 0;
}

.section-media {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.section-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.section-media figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.content-figure {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.content-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.content-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* --- 更新条目 --- */
.update-list {
  display: block;
}

.update-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}

.update-item:last-child {
  border-bottom: 0;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  min-width: 62px;
}

.update-name,
.update-body .update-name {
  color: var(--ink-title);
  font-weight: 600;
}

.update-thumb {
  width: 46px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.update-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 220px;
}

.update-desc {
  font-size: 14px;
  color: var(--ink-muted);
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

/* ==========================================================================
   pages — 首页
   ========================================================================== */

.home-main {
  display: block;
}

.section {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 52px 24px 0;
}

.section-head {
  margin-bottom: 24px;
}

/* --- 首屏 --- */
.hero-section {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 46px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-title);
}

.hero-lead {
  margin-top: 14px;
  max-width: 46ch;
  font-size: 16px;
  color: var(--ink-body);
}

.hero-figure {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-genres {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.hero-genres-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 6px;
}

.genre-list {
  display: block;
}

.genre-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.genre-row:last-child {
  border-bottom: 0;
}

.genre-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-title);
  min-width: 84px;
}

.genre-link:hover,
.genre-link:focus-visible {
  color: var(--accent);
}

.genre-desc {
  font-size: 14px;
  color: var(--ink-muted);
  flex: 1 1 180px;
}

.section-more {
  display: inline-block;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* --- 最近更新目录 --- */
.update-month {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.update-month:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.update-month-title,
.month-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 6px;
}

/* --- 榜单速览 --- */
.ranking-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.ranking-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.ranking-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-title);
}

.ranking-basis {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-muted);
}

.ranking-list {
  margin-top: 14px;
}

.ranking-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mark-orange);
  min-width: 20px;
}

.ranking-title {
  font-size: 15px;
  color: var(--ink-title);
  flex: 1 1 120px;
}

/* --- 阅读说明摘要 --- */
.guide-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
}

.guide-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.guide-col-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 12px;
}

.guide-text {
  font-size: 15px;
  color: var(--ink-body);
}

.boundary-list {
  margin-top: 12px;
}

.boundary-item {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}

.boundary-item:last-child {
  border-bottom: 0;
}

/* --- 站内页面索引 --- */
.page-index {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 52px 24px 0;
}

.index-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.index-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.index-col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 10px;
}

.index-list li + li {
  margin-top: 7px;
}

.index-list a {
  font-size: 14px;
}

/* ==========================================================================
   pages — 题材分类
   ========================================================================== */

.genre-table-section,
.genre-wall-section,
.genre-notes-section {
  margin-top: 44px;
}

.genre-table-section {
  margin-top: 0;
}

.genre-table {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.genre-table-caption {
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.genre-table th,
.genre-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.genre-table thead th {
  background: var(--bg-soft);
  color: var(--ink-title);
  font-weight: 600;
  font-size: 13px;
}

.genre-table tbody th {
  color: var(--ink-title);
  font-weight: 600;
  white-space: nowrap;
}

.genre-table tbody tr:last-child th,
.genre-table tbody tr:last-child td {
  border-bottom: 0;
}

.genre-block {
  margin-top: 30px;
}

.genre-block-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 14px;
}

.genre-note {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 16px;
}

.genre-note-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 8px;
}

.genre-note p {
  font-size: 15px;
}

/* ==========================================================================
   pages — 最近更新
   ========================================================================== */

#updates-archive .update-month {
  padding: 20px 0;
}

#updates-archive .update-item {
  align-items: flex-start;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  margin-top: 20px;
}

.status-col {
  min-width: 0;
}

/* ==========================================================================
   pages — 榜单排行
   ========================================================================== */

.ranking-intro p + p {
  margin-top: 12px;
}

.ranking-lists .ranking-board {
  margin-top: 26px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.ranking-board:first-of-type {
  margin-top: 20px;
}

.board-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-title);
}

.ranking-board-editor .board-title {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.ranking-board-heat .board-title {
  border-left: 3px solid var(--tag-genre);
  padding-left: 10px;
}

.ranking-board-active .board-title {
  border-left: 3px solid var(--mark-orange);
  padding-left: 10px;
}

.board-basis {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

.board-list {
  margin-top: 16px;
}

.board-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.board-item:last-child {
  border-bottom: 0;
}

.board-thumb {
  width: 52px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.board-index {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--mark-orange);
  flex: 0 0 auto;
  min-width: 22px;
}

.board-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-title);
  flex: 1 1 140px;
  min-width: 0;
}

.rules-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  margin-top: 20px;
}

.rules-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.rules-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-title);
  margin-bottom: 12px;
}

.rules-list dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-title);
  margin-top: 12px;
}

.rules-list dt:first-child {
  margin-top: 0;
}

.rules-list dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.rules-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ==========================================================================
   pages — 阅读说明
   ========================================================================== */

.page-figure {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.page-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.page-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.rule-columns,
.scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  margin-top: 20px;
}

.rule-col,
.scope-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.rule-list li,
.scope-list li {
  position: relative;
  padding-left: 16px;
  margin-top: 9px;
  font-size: 14px;
  color: var(--ink-body);
}

.rule-list li:first-child,
.scope-list li:first-child {
  margin-top: 0;
}

.rule-list li::before,
.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.faq-group {
  margin-top: 24px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 10px;
  overflow: hidden;
}

.faq-question {
  display: block;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-title);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  float: right;
  font-family: var(--font-mono);
  color: var(--accent);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 16px 16px;
  font-size: 15px;
  color: var(--ink-body);
}

.faq-answer p + p {
  margin-top: 10px;
}

.print-action {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--ink-title);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.print-button:hover,
.print-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.print-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ==========================================================================
   pages — 404
   ========================================================================== */

.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.error-panel {
  max-width: 620px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--mark-orange);
}

.error-title {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-title);
}

.error-text {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-muted);
}

.error-actions {
  margin-top: 22px;
}

.error-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.error-button:hover,
.error-button:focus-visible {
  background: #1d5289;
  color: #ffffff;
  text-decoration: none;
}

.error-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.error-links a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.error-links a:hover,
.error-links a:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 20px;
    gap: 10px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    border-left: 0;
    font-size: 16px;
  }

  .nav-link.is-current {
    border-bottom-color: var(--line);
    border-left: 3px solid var(--accent);
    padding-left: 10px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding-top: 34px;
  }

  .hero-title {
    font-size: 27px;
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .ranking-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-columns,
  .status-grid,
  .rules-columns,
  .rule-columns,
  .scope-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-layout,
  .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 0 20px 52px;
  }

  .sidebar-left .page-aside,
  .sidebar-left .page-sidebar {
    order: 0;
  }

  .sidebar-left .inner-main,
  .sidebar-left .page-content {
    order: 0;
  }

  .page-aside,
  .page-sidebar {
    position: static;
  }

  .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .toc-list li + li {
    margin-top: 0;
  }

  .toc-link {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
  }

  .inner-main {
    padding: 0 20px 52px;
  }

  .section,
  .page-index {
    padding-left: 20px;
    padding-right: 20px;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 640px) {
  body.site-body {
    font-size: 15px;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-section,
  .section,
  .page-index {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-section {
    padding-top: 26px;
  }

  .hero-title {
    font-size: 24px;
  }

  .page-title,
  .error-title {
    font-size: 23px;
  }

  .section-title {
    font-size: 19px;
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .inner-main,
  .page-layout,
  .sidebar-left {
    padding-left: 16px;
    padding-right: 16px;
  }

  .error-main {
    padding: 36px 16px 60px;
  }

  .error-panel {
    padding: 22px;
  }

  .field-table,
  .genre-table {
    font-size: 13px;
  }

  .field-table th,
  .field-table td,
  .genre-table th,
  .genre-table td {
    padding: 9px 10px;
  }

  .board-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .update-item {
    gap: 4px 10px;
  }

  .footer-inner {
    padding: 28px 16px 22px;
  }

  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .related-list {
    flex-direction: column;
    align-items: stretch;
  }

  .related-item a,
  .related-list li a {
    display: block;
    text-align: center;
  }
}

/* ==========================================================================
   print — 阅读说明页打印版
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .page-aside,
  .page-sidebar,
  .breadcrumb,
  .print-action,
  .related-links,
  .related-nav,
  .related-section,
  .toc-progress {
    display: none !important;
  }

  body.site-body {
    background: #ffffff;
    color: #000000;
  }

  .page-layout,
  .sidebar-left {
    display: block;
    max-width: none;
    padding: 0;
  }

  .inner-main,
  .page-content {
    max-width: none;
    padding: 0;
  }

  a {
    color: #000000;
    text-decoration: none;
  }
}
