:root {
  --bg: #0f1319;
  --panel: #161b23;
  --panel-2: #1b212b;
  --line: #262f3b;
  --line-soft: #1f2732;
  --text: #dfe5ec;
  --muted: #8f9bab;
  --accent: #3ddc84;
  --warn: #e5b567;
  --stop: #e06c75;
  --link: #6fb1ff;
  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --wrap: 1120px;
  --wrap-narrow: 900px;
  --wrap-read: 720px;
}

/* ============================================================
   base
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

code,
.mono,
.cell-date,
.terminal-line,
.terminal-text {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 8px 14px;
  background: var(--accent);
  color: #0b0f14;
  border-radius: var(--radius);
  font-size: 14px;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ============================================================
   layout — shell
   ============================================================ */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 19, 25, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header.is-compact .header-inner {
  min-height: 54px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent);
  flex: 0 0 auto;
}

.brand-name {
  letter-spacing: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.primary-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-link.is-current::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 1px;
  background: var(--accent);
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.home-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.inner-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0 0;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list a {
  color: var(--muted);
}

.breadcrumb-list a:hover {
  color: var(--link);
}

.breadcrumb-sep {
  color: #55606e;
}

.breadcrumb-current {
  color: var(--text);
}

.page-header {
  padding: 14px 0 0;
}

.page-title {
  font-size: 26px;
  line-height: 1.5;
  font-weight: 600;
  color: #fff;
}

.page-head {
  padding: 12px 0 0;
}

.page-lead {
  margin-top: 12px;
  color: var(--muted);
  max-width: 40em;
}

.page-meta,
.field-line,
.field-row {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   layout — sections & shared blocks
   ============================================================ */

section {
  margin-top: 56px;
  scroll-margin-top: 84px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-title::before {
  content: "#";
  margin-right: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 400;
}

h2:not(.section-title):not(.page-title) {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-note,
.section-desc,
.section-intro,
.section-lead {
  margin-top: 14px;
  color: var(--muted);
  max-width: 46em;
}

.section-more {
  margin-top: 18px;
}

.text-link {
  font-family: var(--mono);
  font-size: 14px;
}

.text-link::after {
  content: " →";
}

.related-list,
.entry-list,
.result-list,
.exception-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.related-item,
.entry-item,
.result-item,
.exception-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.related-item a,
.entry-item a,
.result-item a,
.exception-item h3 {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
}

.related-item a:hover,
.entry-item a:hover {
  color: var(--link);
}

.related-note,
.related-desc,
.entry-item p,
.result-item p,
.exception-item p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.link-inline {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 14px;
}

/* ============================================================
   components — tables
   ============================================================ */

.table-scroll {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.data-table,
.field-table {
  min-width: 620px;
  font-size: 14px;
}

.table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.data-table thead th,
.field-table thead th {
  text-align: left;
  padding: 11px 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table tbody td,
.field-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.data-table tbody tr:last-child td,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr,
.field-table tbody tr {
  position: relative;
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover,
.field-table tbody tr:hover {
  background: #1d2530;
}

.data-table tbody tr:hover td:first-child,
.field-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.cell-link {
  color: var(--text);
  font-weight: 500;
}

.cell-link:hover {
  color: var(--link);
}

.cell-date {
  white-space: nowrap;
  color: var(--muted);
}

.cell-work {
  color: var(--text);
}

.exception-table {
  margin-top: 16px;
  min-width: 560px;
}

/* ============================================================
   components — status pills & tags
   ============================================================ */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.status-serial,
.status-ongoing,
.status-pill.is-serial {
  color: var(--accent);
  border-color: rgba(61, 220, 132, 0.4);
  background: rgba(61, 220, 132, 0.08);
}

.status-extra,
.status-update,
.status-pill.is-extra {
  color: var(--warn);
  border-color: rgba(229, 181, 103, 0.4);
  background: rgba(229, 181, 103, 0.08);
}

.status-delay,
.status-pill.is-delay {
  color: var(--warn);
  border-style: dashed;
  border-color: rgba(229, 181, 103, 0.55);
  background: transparent;
}

.status-fix,
.status-pill.is-fix {
  color: var(--link);
  border-color: rgba(111, 177, 255, 0.4);
  background: rgba(111, 177, 255, 0.08);
}

.status-stop {
  color: var(--stop);
  border-color: rgba(224, 108, 117, 0.4);
  background: rgba(224, 108, 117, 0.08);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag,
.genre-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tag:hover,
.genre-tag:hover {
  color: var(--accent);
  border-color: rgba(61, 220, 132, 0.5);
  text-decoration: none;
}

/* ============================================================
   components — terminal blocks
   ============================================================ */

.terminal-block {
  margin-top: 16px;
  background: #10151c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.terminal-line {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-prompt,
.terminal-mark {
  color: var(--accent);
  flex: 0 0 auto;
}

.terminal-label {
  color: var(--muted);
}

.terminal-text {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.terminal-ok {
  color: var(--accent);
}

/* ============================================================
   components — figures & media
   ============================================================ */

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.hero-figure,
.content-media,
.cover-figure,
.genre-thumb,
.schedule-cover,
.log-figure,
.rule-figure,
.media-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.hero-figure img,
.content-media img,
.cover-figure img,
.genre-thumb img,
.schedule-cover img,
.log-figure img,
.rule-figure img,
.media-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.cover-figure img,
.genre-thumb img {
  aspect-ratio: 3 / 4;
}

/* ============================================================
   components — buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 14px;
  border: 1px solid var(--line);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0f14;
  font-weight: 600;
}

.btn-primary:hover {
  background: #31c875;
  border-color: #31c875;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-plain {
  color: var(--muted);
  background: transparent;
}

.btn-plain:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* ============================================================
   components — FAQ
   ============================================================ */

.faq-list,
.faq-group {
  margin-top: 18px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q,
.faq-item > summary {
  position: relative;
  display: block;
  padding: 14px 44px 14px 16px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-q::after,
.faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  transition: transform 0.2s ease;
}

.faq-item[open] > summary::after,
.faq-item[open] .faq-q::after {
  content: "−";
  color: var(--accent);
}

.faq-a,
.faq-body {
  padding: 0 16px 16px;
  font-size: 15px;
  color: var(--muted);
}

.faq-body p {
  margin-bottom: 8px;
}

.faq-source {
  font-size: 14px;
}

/* ============================================================
   pages — home
   ============================================================ */

.hero {
  margin-top: 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.hero-fields h1 {
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.5;
  font-weight: 600;
  color: #fff;
}

.hero-lede {
  margin-top: 12px;
  color: var(--muted);
  max-width: 34em;
}

.hero-table {
  min-width: 560px;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-caption {
  padding: 0 2px;
}

.status-legend {
  display: grid;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.legend-text {
  min-width: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.content-media-primary {
  margin-top: 32px;
}

.status-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.status-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.status-card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.status-notice {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--warn);
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  color: var(--muted);
}

.recent-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.recent-item {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.recent-item:hover {
  border-color: #33404f;
}

.recent-date {
  font-size: 13px;
  color: var(--muted);
}

.recent-line {
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.recent-line .mono {
  font-size: 13px;
  color: var(--muted);
}

.recent-note {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.recent-link {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

.genre-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.genre-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.genre-card:hover {
  border-color: #33404f;
  transform: translateY(-2px);
}

.genre-name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.genre-desc,
.genre-trait,
.genre-rhythm {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.genre-rep,
.genre-works {
  margin-top: 10px;
  font-size: 14px;
}

.genre-works {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-works a {
  font-family: var(--mono);
  font-size: 13px;
}

.works-table {
  min-width: 620px;
}

.rules-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.rules-summary {
  background: #10151c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.term-line {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
  display: flex;
  gap: 10px;
}

.term-prompt {
  color: var(--accent);
  flex: 0 0 auto;
}

.rules-actions {
  display: grid;
  gap: 12px;
}

.entry-card {
  display: block;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s ease;
}

.entry-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.entry-name {
  display: block;
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
}

.entry-desc {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   pages — inner shared
   ============================================================ */

.inner-main > .breadcrumb,
.content-main > .breadcrumb {
  padding-top: 24px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
  margin-top: 0;
}

.content-main {
  min-width: 0;
}

.content-aside {
  min-width: 0;
  display: grid;
  gap: 28px;
  align-content: start;
}

.content-aside section {
  margin-top: 0;
}

.field-notes .status-legend {
  margin-top: 16px;
}

.tag-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-list {
  margin-top: 14px;
}

/* ============================================================
   pages — paiban
   ============================================================ */

.week-schedule .day-group {
  margin-top: 26px;
}

.week-schedule .day-group h3 {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.week-schedule .day-group h3::before {
  content: "›";
  margin-right: 8px;
  color: var(--accent);
}

.week-schedule .field-table {
  min-width: 600px;
}

.schedule-cover {
  margin-top: 28px;
}

.note-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.note-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.note-item p {
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}

.schedule-handling .terminal-block {
  margin-top: 14px;
}

/* ============================================================
   pages — zuopin
   ============================================================ */

.covers {
  margin-top: 32px;
}

.cover-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.cover-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cover-card:hover {
  border-color: #33404f;
  transform: translateY(-2px);
}

.cover-name {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}

.cover-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.compare-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.compare-list li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.compare-list h3 {
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
}

.compare-list p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   pages — ticai
   ============================================================ */

.genre-groups .genre-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.genre-groups .genre-card {
  padding: 0 0 16px;
  overflow: hidden;
}

.genre-groups .genre-card:hover {
  transform: none;
}

.genre-groups .genre-thumb {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.genre-groups .genre-name,
.genre-groups .genre-trait,
.genre-groups .genre-rhythm,
.genre-groups .genre-works {
  padding: 0 16px;
}

.genre-groups .genre-name {
  margin-top: 14px;
}

.tag-band {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crosstag-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.usage-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.usage-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.sub-title {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.sub-title::before {
  content: "#";
  margin-right: 8px;
  color: var(--accent);
  font-weight: 400;
}

.usage-item p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   pages — jilu
   ============================================================ */

.legend-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.log-legend .legend-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.log-legend .legend-item p {
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}

.log-figure {
  margin-top: 16px;
}

.log-table {
  min-width: 640px;
}

.log-table .cell-date {
  white-space: nowrap;
}

.exception-item h3 {
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
}

.exception-item p + p {
  margin-top: 6px;
}

.related-links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.related-links-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.related-links-item {
  font-family: var(--mono);
  font-size: 14px;
}

/* ============================================================
   pages — guize
   ============================================================ */

.toc {
  margin-top: 24px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc-title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.toc-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.toc-list a {
  font-family: var(--mono);
  font-size: 14px;
}

.rule-item {
  margin-top: 28px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.rule-name::before {
  content: "#";
  margin-right: 8px;
  color: var(--accent);
  font-weight: 400;
}

.rule-reason {
  margin-top: 10px;
  color: var(--text);
}

.rule-figure {
  margin-top: 14px;
}

.rule-example {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.rule-example-label {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.rule-exceptions .exception-table {
  min-width: 520px;
}

/* ============================================================
   pages — jiacuo
   ============================================================ */

.scope-columns {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.scope-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.scope-yes {
  border-top: 3px solid var(--accent);
}

.scope-no {
  border-top: 3px solid var(--stop);
}

.scope-title {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.scope-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.scope-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
}

.scope-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--muted);
}

.scope-yes .scope-list li::before {
  content: "✓";
  color: var(--accent);
}

.scope-no .scope-list li::before {
  content: "×";
  color: var(--stop);
}

.media-figure {
  margin-top: 18px;
}

.materials-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.materials-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.materials-no {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}

.materials-body {
  min-width: 0;
}

.materials-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.materials-body p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.result-item .result-name {
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
}

/* ============================================================
   pages — changjian
   ============================================================ */

.faq-group + .faq-group {
  margin-top: 40px;
}

.faq-media {
  margin-top: 18px;
}

.faq-group .faq-item {
  margin-top: 10px;
  margin-bottom: 0;
}

/* ============================================================
   pages — 404
   ============================================================ */

.error-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.error-panel {
  margin-top: 56px;
  max-width: 640px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.error-panel h1 {
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.5;
  font-weight: 600;
  color: #fff;
}

.error-lead {
  margin-top: 12px;
  color: var(--muted);
}

.error-list {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.error-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  color: var(--muted);
}

.error-mono {
  color: var(--accent);
  flex: 0 0 auto;
}

.error-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--line);
  background: #12171e;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-col {
  min-width: 0;
}

.footer-brandname {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.footer-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  max-width: 30em;
}

.footer-title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.footer-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.footer-list a {
  font-size: 14px;
  color: var(--muted);
}

.footer-list a:hover {
  color: var(--link);
}

.back-to-top {
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, border-color 0.15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: var(--accent);
}

.back-to-top span {
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--text);
  border-top: 2px solid var(--text);
  transform: rotate(45deg) translate(1px, 1px);
}

.footer-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
}

.footer-copy {
  font-family: var(--mono);
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 1200px) {
  .home-main,
  .inner-main,
  .error-main,
  .header-inner,
  .footer-inner,
  .footer-bottom {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    background: #12171e;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 14px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list:not(.is-open) {
    display: none;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link.is-current {
    border-bottom-color: var(--line-soft);
  }

  .hero-grid,
  .rules-grid,
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-groups .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .back-to-top {
    justify-self: start;
  }

  .recent-item {
    grid-template-columns: 96px 1fr;
  }

  .recent-link {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .header-inner,
  .home-main,
  .inner-main,
  .error-main,
  .footer-inner,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }

  section {
    margin-top: 36px;
  }

  .page-title,
  .hero-fields h1,
  .error-panel h1 {
    font-size: 22px;
  }

  .hero-grid {
    gap: 24px;
  }

  .content-media-primary {
    margin-top: 24px;
  }

  .status-grid,
  .genre-grid,
  .genre-groups .genre-grid,
  .scope-columns,
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .recent-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .recent-link {
    grid-column: auto;
  }

  .materials-item {
    grid-template-columns: 32px 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .error-actions .btn {
    width: 100%;
  }

  .page-layout {
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
