/* ==========================================================================
   樱花动漫 rdobw.cn — 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* ==========================================================================
   base
   ========================================================================== */

:root {
  --brand: #e85a8a;
  --brand-deep: #c9436f;
  --ink: #2b3a55;
  --accent: #2f9e8f;
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e3e6ec;
  --text: #3a4256;
  --text-soft: #6a7387;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(43, 58, 85, 0.06);
  --shadow-md: 0 6px 18px rgba(43, 58, 85, 0.1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 17px;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

strong,
b {
  font-weight: 700;
}

em {
  font-style: normal;
}

/* ==========================================================================
   layout — 全站骨架
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 1px;
}

.brand-mark::before {
  left: 8px;
  top: 7px;
  width: 3px;
  height: 16px;
}

.brand-mark::after {
  left: 13px;
  top: 7px;
  width: 9px;
  height: 3px;
  box-shadow: 0 6px 0 0 #fff, 0 12px 0 0 #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 17px;
  color: var(--ink);
}

.brand-text em {
  font-size: 12px;
  color: var(--text-soft);
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--ink);
}

.nav-list a:hover {
  background: #fdf1f5;
  color: var(--brand-deep);
}

.nav-list a.is-current {
  color: var(--brand-deep);
  font-weight: 700;
  background: #fdf1f5;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.page-layout {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 24px 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
}

.site-main {
  min-width: 0;
}

.inner-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* ==========================================================================
   layout — 页脚
   ========================================================================== */

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 36px 24px 22px;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-group h2 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--ink);
}

.footer-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-group a {
  font-size: 14px;
  color: var(--text-soft);
}

.footer-group a:hover {
  color: var(--brand-deep);
}

.footer-bottom {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

.footer-brand {
  font-size: 13px;
  color: var(--text-soft);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-soft);
}

/* ==========================================================================
   layout — 面包屑与页面标题
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--brand-deep);
}

.breadcrumb-sep {
  color: #b6bccb;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.page-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}

.page-description {
  margin-top: 10px;
  max-width: 760px;
  color: var(--text-soft);
  font-size: 15px;
}

.page-description a {
  color: var(--brand-deep);
  border-bottom: 1px solid rgba(201, 67, 111, 0.35);
}

.page-description a:hover {
  color: var(--brand);
}

/* ==========================================================================
   layout — 侧栏
   ========================================================================== */

.sidebar,
.site-sidebar,
.side-nav {
  min-width: 0;
}

.sidebar-nav,
.side-nav {
  position: sticky;
  top: 88px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title,
.side-nav-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sidebar-tree,
.tree-list,
.side-tree-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item,
.tree-item {
  display: block;
}

.sidebar-tree a,
.tree-list a,
.side-tree-list a,
.sidebar-item > a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  border-left: 3px solid transparent;
}

.sidebar-tree a:hover,
.tree-list a:hover,
.side-tree-list a:hover,
.sidebar-item > a:hover {
  background: #f4f6fa;
  color: var(--brand-deep);
}

.sidebar-tree a.is-current,
.tree-list a.is-current,
.side-tree-list a.is-current,
.sidebar-item > a.is-current {
  color: var(--brand-deep);
  font-weight: 700;
  background: #fdf1f5;
  border-left-color: var(--brand);
}

.sidebar-sub,
.tree-sub,
.side-tree-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px;
  padding-left: 12px;
  border-left: 1px dashed var(--line);
}

.sidebar-sub a,
.tree-sub a,
.side-tree-sub a {
  min-height: 36px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ==========================================================================
   components — 通用区块标题
   ========================================================================== */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 22px;
  position: relative;
  padding-left: 12px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--brand);
}

.section-head p {
  font-size: 14px;
  color: var(--text-soft);
}

.section-head p a {
  color: var(--brand-deep);
}

.section-head p a:hover {
  color: var(--brand);
}

.section-intro,
.section-lead,
.section-desc,
.section-note {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 14px;
  max-width: 880px;
}

.section-intro a,
.section-note a {
  color: var(--brand-deep);
}

.visually-title {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 10px;
}

.split-more {
  margin-top: 14px;
  font-size: 14px;
}

.split-more a {
  color: var(--brand-deep);
  font-weight: 600;
}

/* ==========================================================================
   components — 封面卡
   ========================================================================== */

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cover-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.cover-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #f0c6d6;
}

.cover-link {
  display: block;
  color: inherit;
}

.cover-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eef1f6;
}

.cover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-body {
  padding: 10px 12px 12px;
}

.cover-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.cover-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--brand-deep);
  background: #fdf1f5;
}

.cover-state {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   components — 更新清单
   ========================================================================== */

.update-list {
  display: flex;
  flex-direction: column;
}

.update-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.update-row:last-child {
  border-bottom: 0;
}

.update-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
}

.update-body {
  min-width: 0;
}

.update-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.update-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* ==========================================================================
   components — 位次列表
   ========================================================================== */

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-no {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.rank-body {
  min-width: 0;
}

.rank-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.rank-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.rank-note {
  font-size: 12px;
  color: var(--text-soft);
}

/* ==========================================================================
   components — 字段口径对照
   ========================================================================== */

.field-brief {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-brief dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.field-brief dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-soft);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.field-brief dd:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

/* ==========================================================================
   components — 步骤条
   ========================================================================== */

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  position: relative;
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: #fdf1f5;
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 14px;
  color: var(--text-soft);
}

.step-item p a {
  color: var(--brand-deep);
}

/* ==========================================================================
   components — 表格
   ========================================================================== */

.trait-table,
.field-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.trait-table caption,
.field-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.trait-table th,
.trait-table td,
.field-table th,
.field-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.trait-table thead th,
.field-table thead th {
  background: #f2f4f8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.trait-table tbody th,
.field-table tbody th {
  color: var(--ink);
  font-weight: 700;
  background: #fbfcfe;
  width: 22%;
  white-space: nowrap;
}

.trait-table tbody tr:last-child th,
.trait-table tbody tr:last-child td,
.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   components — FAQ 折叠块
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  padding-right: 26px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq-item p {
  padding: 0 0 16px;
  font-size: 14px;
  color: var(--text-soft);
}

/* ==========================================================================
   components — 站内栏目索引
   ========================================================================== */

.index-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.index-column a {
  display: block;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.index-column a:hover {
  border-color: #f0c6d6;
  box-shadow: var(--shadow-sm);
}

.index-column strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}

.index-column em {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ==========================================================================
   pages — 首页
   ========================================================================== */

.top-fact-bar {
  background: var(--ink);
}

.top-fact-bar p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 13px;
  color: #dde3ee;
}

.hero-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.hero-lead {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  background: #fdf1f5;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 30px;
  line-height: 1.32;
}

.hero-summary {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-soft);
  max-width: 560px;
}

.hero-paths {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-item {
  display: block;
}

.path-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  min-height: 48px;
}

.path-link:hover {
  border-color: #f0c6d6;
  background: #fdf7f9;
}

.path-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-deep);
  text-align: center;
}

.path-body {
  min-width: 0;
  font-size: 14px;
  color: var(--ink);
}

.hero-media {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef1f6;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-soft);
  background: var(--card);
}

.hero-wall-entry {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  min-height: 56px;
}

.hero-wall-entry:hover {
  border-color: #f0c6d6;
  background: #fdf7f9;
}

.wall-thumb {
  width: 76px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef1f6;
}

.wall-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wall-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wall-text strong {
  font-size: 14px;
  color: var(--ink);
}

.wall-text em {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* 题材方向总览 */
.subject-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.subject-column {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.subject-column h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.subject-column > p {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.subject-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.subject-samples li {
  font-size: 13px;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #f4f6fa;
}

/* 更新批次状态条 */
.batch-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.batch-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
  border-left: 3px solid var(--line);
}

.batch-cell:first-child {
  border-left-color: var(--brand);
}

.batch-label {
  font-size: 12px;
  color: var(--text-soft);
}

.batch-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--mono);
}

.batch-value--open,
.status-open {
  color: var(--accent);
}

.batch-desc {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-soft);
}

/* 条目速览 + 更新记录 */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.split-main,
.split-side {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.split-title {
  font-size: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* 查阅路径 */
.path-guide .step-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.path-feedback {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

/* ==========================================================================
   pages — 题材分类
   ========================================================================== */

.subject-groups {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.subject-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.subject-group-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.subject-group-head h3 {
  font-size: 17px;
}

.subject-trait {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-soft);
}

.subject-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.subject-item {
  min-width: 0;
}

.subject-item .cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef1f6;
  margin-bottom: 8px;
}

.subject-item .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.item-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-soft);
}

.subject-traits {
  margin-top: 4px;
}

.subject-picks {
  margin-top: 4px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pick-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.pick-card .cover {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef1f6;
  margin-bottom: 10px;
}

.pick-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pick-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.pick-card p {
  font-size: 13px;
  color: var(--text-soft);
}

.subject-howto {
  margin-top: 4px;
}

/* ==========================================================================
   pages — 最近更新
   ========================================================================== */

.updates-batch .batch-bar,
.batch-status .batch-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.batch-status .batch-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.record-cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef1f6;
}

.record-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-body {
  min-width: 0;
}

.record-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--text-soft);
}

.record-meta .meta-subject {
  color: var(--brand-deep);
  background: #fdf1f5;
  border-radius: 999px;
  padding: 1px 9px;
}

.record-meta .meta-batch {
  font-family: var(--mono);
  color: var(--ink);
}

.record-meta .meta-status {
  color: var(--accent);
  font-weight: 600;
}

.record-note {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

.status-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
}

.status-open {
  background: #e8f5f2;
}

.status-done {
  color: var(--ink);
  background: #eef1f6;
}

.status-pause {
  color: #a8703a;
  background: #faf1e4;
}

.subject-cross .subject-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.subject-col {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.subject-name {
  font-size: 16px;
  margin-bottom: 6px;
}

.subject-name a {
  color: var(--ink);
}

.subject-name a:hover {
  color: var(--brand-deep);
}

.subject-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.subject-col .subject-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subject-col .subject-items li {
  font-size: 13px;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #f4f6fa;
}

.follow-guide .follow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.follow-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.step-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 8px;
}

.step-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-soft);
}

.follow-foot {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-soft);
}

.follow-foot a {
  color: var(--brand-deep);
  font-weight: 600;
}

/* ==========================================================================
   pages — 人气位次
   ========================================================================== */

.ranking-board,
.ranking-rule,
.ranking-tags,
.ranking-next {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-item .rank-no {
  font-size: 17px;
  color: var(--accent);
  background: #e8f5f2;
  border-radius: var(--radius-sm);
  padding: 4px 0;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef1f6;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-item .rank-name {
  font-size: 15px;
  margin-bottom: 4px;
}

.ranking-item .rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--text-soft);
}

.ranking-item .rank-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rule-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fbfcfe;
}

.rule-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.rule-card p {
  font-size: 14px;
  color: var(--text-soft);
}

.tag-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tag-legend-col {
  min-width: 0;
}

.tag-legend-col h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.tag-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}

.tag-subject {
  color: var(--brand-deep);
  background: #fdf1f5;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
}

.tag-status {
  color: var(--accent);
  background: #e8f5f2;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
}

.tag-legend-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-soft);
}

.next-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.next-links li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcfe;
}

.next-links a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.next-links a:hover {
  color: var(--brand-deep);
}

.next-links span {
  font-size: 13px;
  color: var(--text-soft);
}

/* ==========================================================================
   pages — 查阅指引
   ========================================================================== */

.guide-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef1f6;
}

.guide-visual img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.guide-visual figcaption {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-soft);
  background: var(--card);
}

.guide-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.guide-section h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.guide-links .link-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-links .link-list a {
  display: block;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.guide-links .link-list a:hover {
  border-color: #f0c6d6;
  color: var(--brand-deep);
  background: #fdf7f9;
}

/* ==========================================================================
   pages — 404
   ========================================================================== */

.error-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.error-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.error-code {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.error-block h1 {
  font-size: 26px;
  margin-top: 14px;
}

.error-lead {
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-soft);
}

.error-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.error-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: #f0c6d6;
  color: var(--brand-deep);
}

.error-paths {
  margin-top: 26px;
}

.error-paths h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.error-path-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error-path-list a {
  display: block;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.error-path-list a:hover {
  border-color: #f0c6d6;
  color: var(--brand-deep);
}

/* ==========================================================================
   responsive — 平板（≤1024px）
   ========================================================================== */

@media (max-width: 1024px) {
  .header-inner {
    padding: 0 18px;
    gap: 14px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 8px 18px 14px;
    margin-left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    display: none;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    min-height: 46px;
    padding: 0 12px;
  }

  .page-layout,
  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 18px 40px;
    gap: 22px;
  }

  .sidebar-nav,
  .side-nav {
    position: static;
  }

  .hero-workbench {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }

  .subject-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-items,
  .pick-grid,
  .subject-cross .subject-grid,
  .guide-links .link-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-grid,
  .rule-grid,
  .follow-guide .follow-steps,
  .next-links,
  .step-list,
  .path-guide .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .batch-bar,
  .batch-status .batch-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   responsive — 手机（≤640px）
   ========================================================================== */

@media (max-width: 640px) {
  body.site-body {
    font-size: 14px;
    line-height: 1.72;
  }

  h1,
  .page-title,
  .hero-title {
    font-size: 24px;
  }

  h2,
  .section-head h2 {
    font-size: 19px;
  }

  h3 {
    font-size: 16px;
  }

  .top-fact-bar p {
    padding: 8px 16px;
    font-size: 12px;
  }

  .header-inner {
    padding: 0 16px;
    min-height: 58px;
  }

  .brand-text em {
    display: none;
  }

  .page-layout,
  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    padding: 16px 16px 34px;
    gap: 18px;
  }

  .page-header {
    padding-bottom: 14px;
  }

  .page-description {
    font-size: 14px;
  }

  .hero-workbench {
    padding: 18px;
    gap: 20px;
  }

  .hero-summary {
    font-size: 14px;
  }

  .path-link {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .hero-wall-entry {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .wall-thumb {
    width: 64px;
  }

  .subject-columns,
  .subject-items,
  .pick-grid,
  .subject-cross .subject-grid,
  .guide-links .link-list,
  .cover-grid,
  .rule-grid,
  .tag-legend,
  .error-path-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .batch-bar,
  .batch-status .batch-bar {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .split-main,
  .split-side,
  .guide-section,
  .subject-group,
  .ranking-board,
  .ranking-rule,
  .ranking-tags,
  .ranking-next {
    padding: 14px;
  }

  .record-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .ranking-item {
    grid-template-columns: 38px 60px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-item .rank-no {
    font-size: 15px;
  }

  .index-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .footer-inner {
    padding: 26px 16px 18px;
  }

  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }

  .error-main {
    padding: 34px 16px 48px;
  }

  .error-block {
    padding: 22px 16px;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn {
    width: 100%;
  }

  .trait-table,
  .field-table {
    font-size: 13px;
  }

  .trait-table th,
  .trait-table td,
  .field-table th,
  .field-table td {
    padding: 9px 10px;
  }

  .trait-table tbody th,
  .field-table tbody th {
    white-space: normal;
    width: 34%;
  }
}
