:root {
  --paper: #FBFAF7;
  --ink: #1E1B18;
  --ink-soft: #3A342E;
  --spine: #C2542A;
  --spine-dark: #A3441F;
  --genre: #2C6E6A;
  --muted: #6B6560;
  --ongoing: #3F7A45;
  --line: #E3DED6;
  --line-strong: #CFC7BB;
  --card: #FFFFFF;
  --card-soft: #F5F2EC;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(30, 27, 24, 0.05);
  --shadow-lift: 0 4px 14px rgba(30, 27, 24, 0.09);
  --container: 1140px;
  --container-narrow: 960px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--spine);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--spine-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--genre);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl, dd, dt, figure, figcaption, table {
  margin: 0;
}

button {
  font-family: inherit;
}

/* ============ layout ============ */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.section,
.guide-section,
.genre-filter,
.genre-table-section,
.genre-rule-section,
.genre-archive,
.updates-intro,
.updates-group-section,
.updates-scope,
.archive-note {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 24px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 26px;
}

.section-title {
  font-size: 1.5rem;
  letter-spacing: 0;
}

.section-desc,
.section-note,
.section-lead {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.section-more {
  margin-top: 22px;
  font-size: 0.95rem;
}

.text-link {
  color: var(--spine);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--spine);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  padding: 10px 16px;
  background-color: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
  color: var(--paper);
}

/* ============ header / nav ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand:hover,
.brand:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-slogan {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.2;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 1px;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--spine);
  background-color: var(--card-soft);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--spine);
  font-weight: 700;
  border-bottom-color: var(--spine);
}

/* ============ footer ============ */

.site-footer {
  margin-top: 40px;
  background-color: var(--card-soft);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 40px;
}

.footer-brand {
  flex: 1 1 300px;
  min-width: 240px;
}

.footer-brand-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-brand-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-nav {
  flex: 0 1 auto;
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-nav-list a:hover,
.footer-nav-list a:focus-visible {
  color: var(--spine);
}

.footer-copy {
  flex: 1 1 100%;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ============ page header (inner) ============ */

.inner-main {
  display: block;
}

.breadcrumb {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--spine);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-soft);
  font-weight: 600;
}

.page-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px 0;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
}

.page-description {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.page-lead {
  margin-top: 10px;
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.85;
}

/* ============ buttons ============ */

.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary,
.button-primary {
  background-color: var(--spine);
  border-color: var(--spine);
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.button-primary:hover,
.button-primary:focus-visible {
  background-color: var(--spine-dark);
  border-color: var(--spine-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-ghost,
.button-ghost {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible,
.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--spine);
  color: var(--spine);
  text-decoration: none;
}

/* ============ fact bar ============ */

.fact-bar {
  background-color: var(--ink);
  color: var(--paper);
}

.fact-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 24px;
  padding: 9px 24px;
  font-size: 0.82rem;
  line-height: 1.6;
}

.fact-bar-text {
  color: var(--paper);
}

.fact-bar-note {
  color: #C9C2B8;
}

/* ============ hero (home) ============ */

.hero {
  border-bottom: 1px solid var(--line);
  background-color: var(--card-soft);
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 2.2rem;
  line-height: 1.25;
  font-weight: 700;
}

.hero-desc {
  margin-top: 16px;
  max-width: 520px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.hero-meta li {
  padding: 5px 12px;
  background-color: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-media {
  min-width: 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background-color: var(--card);
  box-shadow: var(--shadow);
}

.hero-media figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

/* ============ genre list (shared) ============ */

.genre-list,
.genre-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.genre-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(140px, 220px) auto;
  align-items: center;
  gap: 8px 20px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.18s ease;
}

.genre-row:hover {
  background-color: var(--card-soft);
}

.genre-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--genre);
}

.genre-body {
  min-width: 0;
}

.genre-name {
  font-size: 1.02rem;
  font-weight: 700;
}

.genre-scope {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.genre-sample {
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.7;
}

.genre-sample a {
  color: var(--genre);
  font-weight: 600;
}

.status-tag,
.genre-status,
.update-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-ongoing,
.genre-status.is-ongoing,
.update-status.is-ongoing {
  background-color: #EAF3EB;
  border-color: #C6DEC8;
  color: var(--ongoing);
}

.status-completed,
.genre-status.is-completed {
  background-color: #E7F1F0;
  border-color: #C3DCDA;
  color: var(--genre);
}

.status-paused,
.genre-status.is-intermittent,
.update-status.is-intermittent {
  background-color: #F6EFE6;
  border-color: #E4D2BC;
  color: #8A5A22;
}

.update-status.is-new {
  background-color: #FBE9E1;
  border-color: #EEC7B5;
  color: var(--spine-dark);
}

.update-status.is-finished {
  background-color: #ECE9E4;
  border-color: #D7D1C7;
  color: var(--muted);
}

/* ============ updates ============ */

.update-groups,
.stage-groups {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.update-group,
.stage-group {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 8px;
  box-shadow: var(--shadow);
}

.update-stage,
.stage-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.stage-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.update-list {
  display: flex;
  flex-direction: column;
}

.update-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.update-item:last-child {
  border-bottom: none;
}

.update-name {
  font-weight: 600;
  color: var(--ink);
}

.update-genre {
  color: var(--genre);
  font-size: 0.85rem;
}

.update-progress {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.update-group .update-item {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
}

/* ============ rank + collections (home) ============ */

.dual-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.column {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.column-title {
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.rank-list {
  margin-top: 6px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-no {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--spine);
}

.rank-name {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.rank-genre {
  color: var(--genre);
  font-size: 0.82rem;
  white-space: nowrap;
}

.column-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.collection-cards {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.collection-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--card-soft);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.column-collections .collection-card {
  grid-template-columns: 96px minmax(0, 1fr);
}

.collection-card:hover,
.collection-card:focus-visible {
  border-color: var(--spine);
  background-color: var(--card);
  text-decoration: none;
}

.collection-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background-color: var(--card);
}

.collection-name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}

.collection-scope {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

/* ============ steps ============ */

.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.step-item {
  min-width: 0;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}

.step-no,
.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--genre);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.step-name {
  margin-top: 12px;
  font-size: 0.98rem;
  font-weight: 700;
}

.step-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
}

/* ============ field list / boundary ============ */

.field-list {
  margin-top: 14px;
}

.field-name {
  font-weight: 700;
  color: var(--genre);
  font-size: 0.9rem;
  padding-top: 10px;
}

.field-name:first-of-type {
  padding-top: 0;
}

.field-desc {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.boundary-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boundary-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.75;
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background-color: var(--spine);
}

/* ============ site index ============ */

.index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-item {
  min-width: 0;
}

.index-link {
  display: block;
  height: 100%;
  padding: 16px 16px 18px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.index-link:hover,
.index-link:focus-visible {
  border-color: var(--spine);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}

.index-name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}

.index-text {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

/* ============ genres page ============ */

.genre-filter-text {
  margin-top: 10px;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.genre-visual {
  margin-top: 22px;
}

.genre-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background-color: var(--card);
}

.genre-visual figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.genre-table-section .genre-row {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.genre-table-section .genre-sample {
  margin-top: 6px;
}

.genre-table-section .genre-sample a + a::before {
  content: "、";
  color: var(--muted);
}

.genre-rule-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.genre-rule-col {
  min-width: 0;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.genre-rule-col p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.genre-field-table,
.scope-table,
.field-table {
  width: 100%;
  margin-top: 26px;
  border-collapse: collapse;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.genre-field-table caption,
.scope-table caption,
.field-table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  background-color: var(--card-soft);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.genre-field-table th,
.genre-field-table td,
.scope-table th,
.scope-table td,
.field-table th,
.field-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 0.875rem;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}

.genre-field-table thead th,
.scope-table thead th,
.field-table thead th {
  background-color: var(--card-soft);
  color: var(--ink);
  font-weight: 700;
}

.genre-field-table tbody tr:last-child th,
.genre-field-table tbody tr:last-child td,
.scope-table tbody tr:last-child th,
.scope-table tbody tr:last-child td,
.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: none;
}

.scope-table tbody th,
.field-table tbody th {
  width: 34%;
  color: var(--genre);
  font-weight: 700;
  background-color: #FAF8F4;
}

.archive-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.archive-text a {
  color: var(--spine);
  font-weight: 600;
}

/* ============ updates page ============ */

.updates-visual {
  margin-top: 22px;
}

.updates-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background-color: var(--card);
}

.updates-visual figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.stage-group .update-item {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.scope-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.scope-text {
  min-width: 0;
}

.scope-text p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.scope-text p + p {
  margin-top: 12px;
}

.scope-body .scope-table {
  margin-top: 0;
}

.scope-hint {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.scope-hint a {
  color: var(--spine);
  font-weight: 600;
}

.scope-hint a + a::before {
  content: "·";
  margin: 0 8px;
  color: var(--line-strong);
}

.archive-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.archive-note a {
  color: var(--spine);
  font-weight: 600;
}

.archive-note a + a::before {
  content: "·";
  margin: 0 8px;
  color: var(--line-strong);
}

/* ============ collections page ============ */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.collection-grid .collection-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--card);
}

.collection-grid .collection-card:hover,
.collection-grid .collection-card:focus-visible {
  border-color: var(--spine);
  background-color: var(--card);
}

.collection-cover {
  min-width: 0;
}

.collection-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.collection-body {
  padding: 14px 16px 16px;
}

.collection-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.collection-count,
.collection-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
}

.collection-count {
  background-color: #E7F1F0;
  border: 1px solid #C3DCDA;
  color: var(--genre);
}

.collection-tag {
  background-color: #FBE9E1;
  border: 1px solid #EEC7B5;
  color: var(--spine-dark);
}

.basis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.basis-col {
  min-width: 0;
}

.basis-subtitle {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.basis-col p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.field-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
}

.field-table-wrap .field-table {
  margin-top: 0;
  min-width: 520px;
}

/* ============ reading guide ============ */

.guide-steps .step-list {
  margin-top: 4px;
}

.guide-steps .step-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.step-body {
  min-width: 0;
}

.guide-steps .step-name {
  margin-top: 0;
}

.step-text a {
  color: var(--spine);
  font-weight: 600;
}

.step-result {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  color: var(--genre);
  font-size: 0.82rem;
  line-height: 1.7;
}

.guide-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.guide-column {
  min-width: 0;
}

.guide-column .column-title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.guide-column-fields .field-table {
  margin-top: 16px;
}

.boundary-item {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.75;
}

.boundary-item + .boundary-item {
  margin-top: 10px;
}

.boundary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background-color: var(--genre);
}

.guide-figure {
  margin-top: 28px;
}

.guide-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background-color: var(--card);
}

.guide-figure-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "＋";
  flex: 0 0 auto;
  color: var(--spine);
  font-size: 1rem;
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "－";
}

.faq-item[open] .faq-question {
  border-bottom: 1px solid var(--line);
  background-color: var(--card-soft);
}

.faq-answer {
  padding: 14px 18px 16px;
}

.faq-answer p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.related-item {
  min-width: 0;
  padding: 14px 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-item a {
  font-weight: 700;
  color: var(--spine);
}

.related-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

/* ============ 404 ============ */

.error-main {
  display: flex;
  justify-content: center;
}

.error-panel {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--spine);
  line-height: 1;
}

.error-title {
  margin-top: 16px;
  font-size: 1.6rem;
  font-weight: 700;
}

.error-text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.error-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.error-links {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.error-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--spine);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============ responsive ============ */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-desc {
    max-width: none;
  }

  .genre-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .genre-row .genre-sample {
    grid-column: 2 / 3;
  }

  .index-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }

  body {
    font-size: 15px;
  }

  .fact-bar {
    padding: 8px 16px;
    font-size: 0.78rem;
    text-align: center;
  }

  .header-inner {
    padding: 10px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 46px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-link.is-current {
    border-bottom-color: var(--spine);
  }

  .breadcrumb,
  .page-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section,
  .guide-section,
  .genre-filter,
  .genre-table-section,
  .genre-rule-section,
  .genre-archive,
  .updates-intro,
  .updates-group-section,
  .updates-scope,
  .archive-note {
    padding: 30px 16px;
  }

  .hero-inner {
    padding: 28px 16px 32px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .dual-columns,
  .genre-rule-grid,
  .scope-body,
  .basis-layout,
  .guide-columns,
  .related-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .genre-row,
  .genre-table-section .genre-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 6px 12px;
    align-items: start;
  }

  .genre-row .genre-sample,
  .genre-table-section .genre-sample {
    grid-column: 2 / 3;
  }

  .genre-row .status-tag,
  .genre-table-section .genre-status {
    grid-column: 2 / 3;
    justify-self: start;
  }

  .update-item,
  .update-group .update-item,
  .stage-group .update-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: start;
  }

  .index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-card,
  .column-collections .collection-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .collection-card img {
    width: 84px;
    height: 84px;
  }

  .footer-inner {
    padding: 26px 16px 22px;
    gap: 16px;
  }

  .footer-nav-list {
    gap: 4px 16px;
  }

  .error-panel {
    padding: 52px 16px;
  }

  .field-table-wrap .field-table {
    min-width: 440px;
  }
}

@media (max-width: 420px) {
  .index-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .collection-card,
  .column-collections .collection-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .collection-card img {
    width: 72px;
    height: 72px;
  }
}
