/* ============================================================
   樱花动漫 · uafxs.cn 全站样式
   base → layout → components → pages → responsive
   ============================================================ */

/* ------------------------------------------------------------
   base
   ------------------------------------------------------------ */
:root {
  --bg-page: #f6f7f9;
  --bg-card: #ffffff;
  --text-main: #1f2430;
  --text-sub: #5b6472;
  --accent: #2f6bd8;
  --accent-soft: #f0f4fb;
  --line: #e3e6eb;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(31, 36, 48, 0.05);
  --shadow-hover: 0 6px 16px rgba(31, 36, 48, 0.09);
  --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;
  --max-width: 1120px;
  --gutter: 24px;
}

*,
*::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.75;
  color: var(--text-main);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   layout · 全站骨架
   ------------------------------------------------------------ */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}

.home-main {
  width: 100%;
}

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 4px 0 16px;
}

.breadcrumb-sep {
  color: #b6bcc7;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 500;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-header-main,
.page-header-text {
  flex: 1 1 520px;
  min-width: 0;
}

.page-title {
  font-size: 32px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.page-lead {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
}

/* ------------------------------------------------------------
   components · 页头与导航
   ------------------------------------------------------------ */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 0;
  min-height: 44px;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
  color: var(--accent);
}

.brand-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  border-radius: 1px;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-list li {
  display: flex;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

/* ------------------------------------------------------------
   components · 通用元素
   ------------------------------------------------------------ */
.section-head {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  padding: 0 var(--gutter);
}

.section-head h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
}

.section-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-sub);
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}

.section-lead,
.section-intro,
.section-note {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 8px;
}

.section-note a {
  margin-right: 12px;
}

.column-title {
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.status {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 4px;
  background: #eef0f4;
  color: var(--text-sub);
  white-space: nowrap;
}

.status-tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-ongoing {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-completed {
  background: #eef0f4;
  color: var(--text-sub);
}

.text-link {
  font-size: 14px;
  font-weight: 500;
}

.wall-more {
  margin-top: 14px;
  font-size: 14px;
}

.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: 500;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #2559b8;
  text-decoration: none;
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ------------------------------------------------------------
   components · 页脚
   ------------------------------------------------------------ */
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--gutter) 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 28px;
}

.footer-name {
  font-size: 17px;
  font-weight: 600;
}

.footer-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
  max-width: 320px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-group ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-group a {
  display: inline-block;
  font-size: 14px;
  color: var(--text-sub);
  padding: 3px 0;
}

.footer-group a:hover,
.footer-group a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--gutter) 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--text-sub);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--accent);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   pages · 首页
   ------------------------------------------------------------ */
.hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 44px;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.15fr);
  gap: 40px;
  align-items: start;
}

.hero-lead {
  min-width: 0;
}

.hero-fact {
  display: inline-block;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 32px;
  line-height: 1.35;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-summary {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 480px;
}

.hero-entries {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-entries li {
  display: flex;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-sm);
}

.entry-link:hover,
.entry-link:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}

.hero-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 34px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.is-active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  border-color: var(--accent);
}

.hero-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-page);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-visual figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-card);
  border-top: 1px solid var(--line);
}

.genre-wall,
.update-batches,
.rank-and-fields,
.reading-path,
.site-index {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px var(--gutter) 0;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.cover-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cover-card:hover {
  transform: translateY(-2px);
  border-color: #cdd4e0;
  box-shadow: var(--shadow-hover);
}

.cover-media {
  background: #eceff3;
}

.cover-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cover-name {
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px 4px;
  line-height: 1.5;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 12px;
}

.batch-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.batch-group {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.batch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.batch-code {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.batch-date {
  font-size: 13px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.batch-summary {
  font-size: 13px;
  color: var(--text-sub);
  flex: 1 1 240px;
}

.batch-items {
  display: flex;
  flex-direction: column;
}

.batch-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.batch-item:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 500;
  flex: 1 1 180px;
  min-width: 0;
}

.progress {
  font-size: 13px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.change {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.change-new {
  background: var(--accent-soft);
  color: var(--accent);
}

.change-add {
  background: #eaf6ee;
  color: #2f7d4f;
}

.change-fix {
  background: #fdf1e3;
  color: #a56217;
}

.change-status {
  background: #eef0f4;
  color: var(--text-sub);
}

.rank-fields-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(400px, 1.4fr);
  gap: 32px;
  align-items: start;
}

.rank-column,
.fields-column {
  min-width: 0;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-no {
  flex: 0 0 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.rank-row .item-name {
  flex: 1 1 auto;
}

.rank-move {
  font-size: 12px;
  white-space: nowrap;
}

.move-up {
  color: #2f7d4f;
}

.move-down {
  color: #b4453c;
}

.move-flat {
  color: var(--text-sub);
}

.field-table {
  font-size: 14px;
}

.field-table caption {
  text-align: left;
  font-size: 13px;
  color: var(--text-sub);
  padding-bottom: 8px;
}

.field-table th,
.field-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.field-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--bg-page);
}

.field-table tbody th,
.field-table tbody td:first-child {
  font-weight: 500;
  white-space: nowrap;
}

.fields-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.path-inner {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: start;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.step-no {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

.step-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 14px;
  color: var(--text-sub);
}

.feedback-note {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.feedback-note > p {
  font-size: 14px;
  color: var(--text-sub);
}

.feedback-scope {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-scope li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.feedback-scope li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.index-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.index-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.index-col p {
  font-size: 13px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   pages · 内页通用
   ------------------------------------------------------------ */
.page-anchor,
.page-anchors,
.anchor-nav {
  flex: 0 0 auto;
  align-self: flex-start;
}

.anchor-list,
.page-anchor ul,
.page-anchors ul,
.anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anchor-list a,
.page-anchor a,
.page-anchors a,
.anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.anchor-list a:hover,
.page-anchor a:hover,
.page-anchors a:hover,
.anchor-nav a:hover,
.anchor-list a:focus-visible,
.page-anchor a:focus-visible,
.page-anchors a:focus-visible,
.anchor-nav a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.page-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
}

.page-layout > aside,
.page-layout > section {
  min-width: 0;
}

/* ------------------------------------------------------------
   pages · 题材分类
   ------------------------------------------------------------ */
.genre-aside {
  position: sticky;
  top: 84px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.aside-title {
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.genre-dir {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.genre-dir a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
}

.genre-dir a:hover,
.genre-dir a:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.genre-dir a.is-current {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.aside-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-sub);
}

.genre-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.genre-detail > .section-title,
.genre-detail > .section-lead {
  margin: 0;
}

.genre-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  scroll-margin-top: 84px;
}

.genre-block-body {
  min-width: 0;
}

.genre-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.genre-meta {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px 14px;
  font-size: 14px;
}

.genre-meta dt {
  color: var(--text-sub);
  font-size: 13px;
}

.genre-meta dd {
  color: var(--text-main);
}

.genre-cover {
  margin: 0;
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.genre-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.genre-cover-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.genre-cover-name {
  font-weight: 500;
  min-width: 0;
}

.genre-next {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.next-item {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.next-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.next-desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-sub);
}

.choice-help {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.help-steps {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.help-step {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-sub);
}

.choice-faq {
  margin-top: 28px;
}

.faq-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-question {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.faq-answer {
  font-size: 14px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   pages · 最近更新
   ------------------------------------------------------------ */
.batch-rule {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 32px;
}

.batch-rule h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.batch-rule > p {
  font-size: 14px;
  color: var(--text-sub);
}

.rule-points {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.rule-points li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.rule-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.batch-list > h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.batch-list > .section-note {
  margin-bottom: 20px;
}

.batch-list .batch-group {
  scroll-margin-top: 84px;
}

.batch-thumb {
  flex: 0 0 48px;
  margin: 0;
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.batch-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.batch-item-body {
  flex: 1 1 220px;
  min-width: 0;
}

.batch-work {
  font-size: 14px;
  font-weight: 500;
}

.batch-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-change {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-change-new {
  background: var(--accent-soft);
  color: var(--accent);
}

.tag-change-progress {
  background: #eaf6ee;
  color: #2f7d4f;
}

.tag-change-field {
  background: #fdf1e3;
  color: #a56217;
}

.tag-status {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 4px;
  background: #eef0f4;
  color: var(--text-sub);
  white-space: nowrap;
}

.feedback-note > h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feedback-points {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-points li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.feedback-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.feedback-more {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}

.batch-list ~ .feedback-note,
.section-note + .feedback-note {
  margin-top: 32px;
}

/* ------------------------------------------------------------
   pages · 人气位次
   ------------------------------------------------------------ */
.rank-list-section {
  margin-bottom: 40px;
}

.rank-list-section > h2 {
  font-size: 22px;
  font-weight: 600;
}

.rank-list-section > .section-intro {
  margin-bottom: 18px;
}

.rank-list-section .rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.rank-list-section .rank-item:hover {
  border-color: #cdd4e0;
  transform: translateY(-1px);
}

.rank-num {
  flex: 0 0 32px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.rank-cover {
  flex: 0 0 44px;
  margin: 0;
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-body {
  flex: 1 1 200px;
  min-width: 0;
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
}

.rank-meta {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

.tag-genre {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.rank-status {
  font-size: 13px;
  color: var(--text-sub);
}

.rank-change {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.rank-change.is-up {
  color: #2f7d4f;
}

.rank-change.is-down {
  color: #b4453c;
}

.rank-change.is-hold {
  color: var(--text-sub);
}

.rank-change.is-new {
  color: var(--accent);
}

.method-section,
.boundary-section {
  padding-top: 32px;
  border-top: 1px solid var(--line);
  margin-bottom: 32px;
}

.method-section > h2,
.boundary-section > h2 {
  font-size: 22px;
  font-weight: 600;
}

.method-section > .section-intro,
.boundary-section > .section-intro {
  margin-bottom: 18px;
}

.method-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.method-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.method-col h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.method-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-list li {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.method-list strong {
  color: var(--text-main);
  font-weight: 600;
}

.boundary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.boundary-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}

.boundary-list h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.boundary-list p {
  font-size: 14px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   pages · 阅读说明
   ------------------------------------------------------------ */
.field-toc {
  position: sticky;
  top: 84px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.toc-title {
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
}

.toc-list a:hover,
.toc-list a:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.field-body {
  min-width: 0;
  max-width: 720px;
}

.field-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  scroll-margin-top: 84px;
}

.field-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 26px 0 8px;
  scroll-margin-top: 84px;
}

.field-body p {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.field-figure {
  margin: 18px 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.field-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
}

.field-body .field-table {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.boundary-block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.boundary-block > h2 {
  font-size: 22px;
  font-weight: 600;
}

.boundary-block > p {
  font-size: 14px;
  color: var(--text-sub);
  margin: 8px 0 18px;
}

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.boundary-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.boundary-col h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.boundary-block .boundary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boundary-block .boundary-list li {
  position: relative;
  padding: 0 0 0 16px;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 14px;
  color: var(--text-sub);
}

.boundary-block .boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.faq-block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.faq-block > h2 {
  font-size: 22px;
  font-weight: 600;
}

.faq-block > p {
  font-size: 14px;
  color: var(--text-sub);
  margin: 8px 0 18px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding-right: 44px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  color: var(--text-sub);
}

.faq-item[open] summary::after {
  content: "–";
  color: var(--accent);
}

.faq-item summary:hover,
.faq-item summary:focus-visible {
  color: var(--accent);
}

.faq-item p {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.feedback-block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.feedback-block > h2 {
  font-size: 22px;
  font-weight: 600;
}

.feedback-block > p {
  font-size: 14px;
  color: var(--text-sub);
  margin: 8px 0 18px;
}

.feedback-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feedback-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.feedback-col h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feedback-block .path-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: path;
}

.feedback-block .path-steps li {
  position: relative;
  padding-left: 30px;
  min-width: 0;
}

.feedback-block .path-steps li::before {
  counter-increment: path;
  content: counter(path);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-block .step-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.feedback-block .path-steps p {
  font-size: 14px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   pages · 404
   ------------------------------------------------------------ */
.error-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
}

.error-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 720px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.error-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 560px;
}

.error-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-help {
  margin-top: 40px;
}

.error-help-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-help-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.error-help-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}

.error-help-list a {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.error-help-list p {
  font-size: 14px;
  color: var(--text-sub);
}

/* ------------------------------------------------------------
   responsive
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .rank-fields-inner,
  .path-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }

  .header-inner {
    min-height: 56px;
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-bottom: 12px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    width: 100%;
    padding: 0 12px;
    border-radius: var(--radius-sm);
  }

  .inner-main {
    padding: 16px var(--gutter) 48px;
  }

  .page-title {
    font-size: 24px;
  }

  .hero {
    padding: 28px 0 32px;
  }

  .hero-title {
    font-size: 24px;
  }

  .genre-wall,
  .update-batches,
  .rank-and-fields,
  .reading-path,
  .site-index {
    padding-top: 32px;
  }

  .section-head {
    margin-bottom: 16px;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .wall-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .rank-fields-inner,
  .path-inner {
    gap: 24px;
  }

  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-aside,
  .field-toc {
    position: static;
    top: auto;
  }

  .genre-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  .genre-cover {
    max-width: 180px;
  }

  .genre-meta {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .field-body {
    max-width: none;
  }

  .error-panel {
    padding: 28px 20px;
  }

  .error-title {
    font-size: 24px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 32px var(--gutter) 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-entries li,
  .entry-link {
    width: 100%;
  }

  .entry-link {
    justify-content: center;
  }

  .filter-bar {
    gap: 6px;
  }

  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cover-name {
    font-size: 14px;
    padding: 8px 10px 4px;
  }

  .cover-meta {
    padding: 0 10px 10px;
  }

  .batch-group {
    padding: 14px;
  }

  .batch-item {
    gap: 8px;
  }

  .rank-list-section .rank-item {
    gap: 10px;
    padding: 10px 12px;
  }

  .rank-num {
    flex: 0 0 24px;
    font-size: 14px;
  }

  .rank-cover {
    flex: 0 0 38px;
  }

  .field-table th,
  .field-table td {
    padding: 8px 8px;
    font-size: 13px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
