/* ============================================================
   OMOFun动漫 · 全站样式表
   base → layout → components → pages → responsive
   ============================================================ */

/* ------------------------------------------------------------
   base：变量、重置、排版基础
   ------------------------------------------------------------ */
:root {
  --bg-page: #f6f7f9;
  --bg-dark: #161a22;
  --bg-dark-2: #1e232d;
  --bg-card: #ffffff;
  --bg-soft: #eef1f5;
  --brand: #2f6df6;
  --brand-dark: #1f52c4;
  --accent: #e0453c;
  --text: #232833;
  --text-mid: #4b5563;
  --text-soft: #6b7280;
  --line: #dfe3e8;
  --line-soft: #eaeef3;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(22, 26, 34, 0.06);
  --shadow-hover: 0 4px 14px rgba(22, 26, 34, 0.12);
  --container: 1180px;
  --container-narrow: 1080px;
  --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%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg-page);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   layout：外壳骨架（topbar / header / nav / main / footer）
   ------------------------------------------------------------ */

/* 顶部信息条 */
.topbar {
  background-color: var(--bg-dark);
  color: #c8cfda;
}

.topbar-text {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 13px;
  line-height: 1.6;
  color: #b3bccb;
}

/* 页头 */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  min-height: 44px;
}

.brand:hover {
  color: var(--brand);
  text-decoration: none;
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  display: block;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-mid);
  border-bottom: 3px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--brand);
  font-weight: 700;
  border-bottom-color: var(--brand);
}

/* 汉堡按钮（桌面默认隐藏） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background-color: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text);
  border-radius: 2px;
}

/* 主内容 */
.site-main {
  display: block;
}

.home-main {
  background-color: var(--bg-page);
}

.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}

.breadcrumb a {
  color: var(--text-mid);
  min-height: 24px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: #b6bdc8;
}

.breadcrumb-current {
  color: var(--text);
}

/* 页面标题区（内页统一） */
.page-header {
  padding: 20px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-description {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.page-lead,
.page-scope {
  max-width: 820px;
  font-size: 15px;
  color: var(--text-mid);
}

/* 页脚 */
.site-footer {
  background-color: var(--bg-dark);
  color: #aab3c0;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 24px 26px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid #2b323e;
}

.footer-brand {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.footer-brand:hover {
  color: #9dbcfb;
  text-decoration: none;
}

.footer-slogan {
  font-size: 14px;
  color: #8d97a5;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 26px 0 24px;
}

.footer-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  font-size: 14px;
  color: #a6b0be;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
  border-top: 1px solid #2b323e;
  font-size: 13px;
  color: #7d8794;
}

.footer-note,
.footer-copy {
  margin: 0;
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #ffffff;
  color: var(--text-mid);
  font-size: 13px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* ------------------------------------------------------------
   components：通用区块、表格、标签、卡片、列表
   ------------------------------------------------------------ */

.section {
  padding: 46px 0;
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section-head {
  margin-bottom: 22px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.section-desc {
  max-width: 860px;
  font-size: 15px;
  color: var(--text-mid);
}

.section-desc a {
  color: var(--brand);
}

.section-intro,
.section-lead {
  max-width: 860px;
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 20px;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-card);
}

.data-table {
  min-width: 640px;
  font-size: 14px;
}

.table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line-soft);
}

.data-table thead th {
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  background-color: var(--bg-soft);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-mid);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background-color: #fafbfd;
}

.cell-genre,
.field-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 13px;
  line-height: 1.6;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag-genre {
  color: var(--accent);
  background-color: #fdeceb;
  border-color: #f7d2cf;
}

.tag-status {
  color: var(--brand);
  background-color: #eaf0fe;
  border-color: #cfdcfb;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-link {
  color: var(--brand);
  border-bottom: 1px solid #c3d4fb;
}

.inline-link:hover {
  text-decoration: none;
  border-bottom-color: var(--brand);
}

/* 封面卡片（首页封面墙） */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  min-width: 0;
}

.cover-link {
  display: block;
  padding: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cover-link:hover {
  transform: translateY(-3px);
  border-color: #c3d4fb;
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.cover-figure {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
  margin-bottom: 10px;
}

.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 首页：最近更新 / 榜单并列 */
.duo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.duo-col {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.duo-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.duo-desc {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 16px;
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.update-month {
  min-width: 0;
}

.update-month-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.update-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.update-date {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-soft);
}

.update-link {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
}

.update-link:hover {
  color: var(--brand);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-no {
  flex: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.rank-link {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
}

.rank-link:hover {
  color: var(--brand);
}

/* 首页：阅读说明摘要 */
.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.notes-col {
  min-width: 0;
}

.notes-subtitle {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.notes-text {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 14px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-item {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--text-mid);
}

.notes-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand);
}

/* 首页：站内页面索引 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.index-col {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.index-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.index-item {
  min-width: 0;
}

.index-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 14px;
  color: var(--text-mid);
}

.index-link:hover {
  color: var(--brand);
}

/* 浏览历史 */
.history-panel {
  padding: 22px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-text {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 14px;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 30px;
}

.history-empty {
  font-size: 14px;
  color: var(--text-soft);
}

.history-clear {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  color: var(--text-mid);
  background-color: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-clear:hover {
  color: var(--brand);
  border-color: #c3d4fb;
}

.history-feedback,
.history-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ------------------------------------------------------------
   pages：首页
   ------------------------------------------------------------ */

.hero {
  background-color: var(--bg-dark);
  color: #e8ecf3;
  padding: 52px 0 46px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #8fa8e8;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.hero-lead {
  max-width: 560px;
  font-size: 16px;
  color: #b8c1cf;
  margin-bottom: 24px;
}

.hero-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-path {
  min-width: 0;
}

.hero-path-link {
  display: block;
  min-height: 64px;
  padding: 12px 14px;
  background-color: var(--bg-dark-2);
  border: 1px solid #2c333f;
  border-radius: var(--radius);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.hero-path-link:hover {
  background-color: #232936;
  border-color: var(--brand);
  text-decoration: none;
}

.hero-path-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.hero-path-desc {
  display: block;
  font-size: 13px;
  color: #98a3b2;
}

.hero-figure {
  min-width: 0;
  background-color: var(--bg-dark-2);
  border: 1px solid #2c333f;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: #98a3b2;
  border-top: 1px solid #2c333f;
}

/* 题材方向总览 */
.section-genres {
  background-color: var(--bg-page);
}

/* 封面墙 */
.section-coverwall {
  background-color: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* 并列模块 */
.section-duo {
  background-color: var(--bg-page);
}

/* 阅读说明摘要 */
.section-notes {
  background-color: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* 站内索引 */
.section-index {
  background-color: var(--bg-page);
}

/* 浏览历史 */
.section-history {
  background-color: #ffffff;
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------
   pages：内页通用模块
   ------------------------------------------------------------ */

/* 题材分组说明 */
.group-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.group-column {
  min-width: 0;
  padding: 22px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.group-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.group-figure {
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-soft);
}

.group-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.group-caption {
  padding: 8px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}

.group-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-points li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--text-mid);
}

.group-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand);
}

/* 路径区块 */
.path-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.path-item {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.path-text {
  font-size: 15px;
  color: var(--text-mid);
}

/* 最近更新：分组列表 */
.update-section,
.update-legend,
.update-howto {
  padding: 0 0 42px;
}

.update-groups {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.update-group {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.update-group-title {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.update-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.update-row {
  display: grid;
  grid-template-columns: 92px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.update-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-soft);
}

.update-thumb {
  width: 96px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.update-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.update-note {
  font-size: 14px;
  color: var(--text-mid);
}

/* 图例说明 */
.legend-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.legend-item {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legend-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legend-text {
  font-size: 15px;
  color: var(--text-mid);
}

/* 查阅说明 + 侧栏 */
.howto-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.howto-text {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.howto-text:last-child {
  margin-bottom: 0;
}

.update-aside {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--text-mid);
}

.aside-link:hover {
  color: var(--brand);
}

/* 榜单页 */
.board-section,
.basis-section,
.relation-section,
.entry-section {
  padding: 0 0 42px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.board-column {
  min-width: 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.board-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.board-basis {
  font-size: 14px;
  color: var(--text-mid);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.board-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-row {
  display: grid;
  grid-template-columns: 24px 56px minmax(0, 1fr);
  grid-template-areas:
    "rank thumb entry"
    "rank thumb tag";
  gap: 4px 12px;
  align-items: center;
  min-width: 0;
}

.board-rank {
  grid-area: rank;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.board-thumb {
  grid-area: thumb;
  width: 56px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
}

.board-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.board-entry {
  grid-area: entry;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.board-row .tag-genre {
  grid-area: tag;
  justify-self: start;
}

/* 排序依据说明 */
.basis-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.basis-item {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.basis-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.basis-text {
  font-size: 15px;
  color: var(--text-mid);
}

/* 关系说明 */
.relation-body {
  max-width: 860px;
}

.relation-text {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.relation-text:last-child {
  margin-bottom: 0;
}

/* 相关入口卡片 */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.entry-card {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.entry-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.entry-text {
  font-size: 15px;
  color: var(--text-mid);
}

/* 阅读说明页 */
.section-fields,
.section-boundary,
.section-related {
  padding: 0 0 42px;
}

.field-figure {
  margin-top: 22px;
  max-width: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--bg-card);
}

.field-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.figure-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px solid var(--line-soft);
}

/* FAQ 折叠 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "展开";
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--brand);
}

.faq-item[open] .faq-question::after {
  content: "收起";
}

.faq-question:hover {
  background-color: #fafbfd;
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 15px;
  color: var(--text-mid);
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

/* 相关帮助 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-column {
  min-width: 0;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 14px;
  color: var(--text-mid);
}

.related-link:hover {
  color: var(--brand);
}

.related-back {
  margin-top: 20px;
  font-size: 15px;
}

/* 404 */
.error-main {
  display: block;
}

.error-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 88px;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  margin-bottom: 8px;
}

.error-panel h1 {
  font-size: 26px;
  margin-bottom: 12px;
}

.error-text {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 22px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.error-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-mid);
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-link:hover {
  color: var(--brand);
  border-color: #c3d4fb;
  text-decoration: none;
}

.error-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  color: #ffffff;
  background-color: var(--brand);
  border-radius: var(--radius);
}

.error-home:hover {
  background-color: var(--brand-dark);
  color: #ffffff;
  text-decoration: none;
}

/* ------------------------------------------------------------
   responsive：900px / 600px 两级断点
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    background-color: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-hover);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 14px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    min-height: 48px;
    padding: 0 8px;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link.is-current {
    border-bottom-color: var(--line-soft);
    background-color: #f3f7ff;
  }

  .header-inner {
    position: relative;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .hero-title {
    font-size: 28px;
  }

  .duo-layout,
  .notes-layout,
  .group-columns,
  .path-list,
  .legend-list,
  .board-grid,
  .basis-list,
  .entry-grid,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .howto-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-title {
    font-size: 27px;
  }

  .section-title {
    font-size: 20px;
  }
}

@media (max-width: 600px) {
  .topbar-text,
  .header-inner,
  .section-inner,
  .inner-main,
  .footer-inner,
  .hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 34px 0 32px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-paths {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 32px 0;
  }

  .page-header {
    padding: 16px 0 20px;
    margin-bottom: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 19px;
  }

  .cover-grid,
  .index-grid,
  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .duo-col,
  .group-column,
  .board-column,
  .update-group,
  .history-panel {
    padding: 16px;
  }

  .update-row {
    grid-template-columns: 84px minmax(0, 1fr);
    grid-template-areas:
      "date thumb"
      "body body";
    gap: 10px;
    align-items: start;
  }

  .update-row .update-date {
    grid-area: date;
    align-self: center;
  }

  .update-row .update-thumb {
    grid-area: thumb;
  }

  .update-row .update-body {
    grid-area: body;
  }

  .board-row {
    grid-template-columns: 22px 52px minmax(0, 1fr);
  }

  .board-thumb {
    width: 52px;
  }

  .error-panel {
    padding: 48px 16px 64px;
  }

  .error-code {
    font-size: 38px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
  }
}
