:root {
  --paper: #f5f2e9;
  --ink: #1b2a4a;
  --ink-soft: #3c4a66;
  --teal: #2f9d92;
  --teal-dark: #1f7a71;
  --orange: #e0743c;
  --grid: #cdc6b6;
  --deep: #101a2e;
  --panel: #fbf9f3;
  --shadow-hard: 2px 2px 0 var(--grid);
  --shadow-hard-ink: 2px 2px 0 var(--ink);
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Noto Sans Mono", monospace;
  --font-body: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 4px;
  --radius-sm: 3px;
  --wrap: 1120px;
}

/* ============ base ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--grid) 0.5px, transparent 0.5px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
}

h1,
h2,
h3 {
  font-family: var(--font-mono);
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 {
  font-size: 34px;
  font-weight: 700;
}

h2 {
  font-size: 22px;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 700;
}

p {
  margin: 0 0 1.1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--orange);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

figcaption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.6;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.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;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  z-index: 200;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--paper);
}

/* ============ layout shell ============ */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--teal);
  display: inline-block;
}

.brand:hover,
.brand:focus {
  color: var(--teal-dark);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  justify-content: flex-end;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--teal-dark);
  border-color: var(--grid);
  background: var(--panel);
}

.nav-link.is-current {
  color: var(--paper);
  background: var(--teal);
  border-color: var(--teal);
}

.nav-link.is-current:hover,
.nav-link.is-current:focus {
  color: var(--paper);
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
}

.menu-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
}

.site-main {
  display: block;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.home-main {
  padding-top: 36px;
}

.inner-main {
  padding-top: 28px;
}

/* ============ shared components ============ */
.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.section-head h2::before,
.section-title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--orange);
  display: inline-block;
  flex-shrink: 0;
}

.section-note,
.section-lead,
.section-desc,
.section-intro {
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 0 1.1em;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  padding: 3px 9px;
  border: 1px solid var(--grid);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink-soft);
  white-space: nowrap;
}

.chip-tag {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.chip-scene,
.chip-topic {
  border-color: var(--orange);
  color: #a94c1c;
}

.chip-length {
  border-color: var(--ink);
  color: var(--ink);
}

.chip-link {
  color: var(--teal-dark);
  border-color: var(--grid);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip-link:hover,
.chip-link:focus {
  color: var(--paper);
  background: var(--teal);
  border-color: var(--teal);
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-hard);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover,
.btn:focus {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--grid);
}

.btn-primary {
  background: var(--teal);
  border-color: var(--teal-dark);
  color: var(--paper);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--teal-dark);
  color: var(--paper);
}

.btn-ghost {
  background: var(--panel);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus {
  color: var(--ink);
  background: #ede8da;
}

.text-link {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--teal-dark);
  border-bottom: 1px solid var(--teal);
  padding-bottom: 1px;
}

.text-link:hover,
.text-link:focus {
  color: var(--orange);
  border-color: var(--orange);
}

.entry-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal-dark);
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.entry-link:hover,
.entry-link:focus {
  background: var(--teal);
  color: var(--paper);
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-row {
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 16px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.entry-row:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--grid);
}

.entry-name {
  margin: 0 0 6px;
  font-size: 17px;
}

.entry-meta,
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.entry-reason,
.entry-point {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 15px;
}

.entry-row .entry-link {
  margin-top: 2px;
}

.related-bar {
  margin-top: 48px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.related-bar .section-title {
  font-size: 18px;
  margin-bottom: 14px;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-item,
.related-list > li {
  flex: 1 1 220px;
  min-width: 0;
}

.related-list a,
.related-link {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--grid);
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: 44px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.related-list a:hover,
.related-list a:focus,
.related-link:hover,
.related-link:focus {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.related-desc {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ header / footer ============ */
.site-footer {
  background: var(--deep);
  color: #e6e2d6;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #f5f2e9;
  margin: 0 0 6px;
}

.footer-slogan {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #8fd6ce;
  margin: 0 0 10px;
}

.footer-desc {
  font-size: 14px;
  color: #b6b2a6;
  margin: 0 0 12px;
  line-height: 1.75;
}

.footer-top {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8fd6ce;
  border-bottom: 1px solid #3c4a66;
  padding-bottom: 1px;
}

.footer-top:hover,
.footer-top:focus {
  color: var(--orange);
  border-color: var(--orange);
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #f5f2e9;
  margin: 0 0 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 14px;
  color: #b6b2a6;
  display: inline-block;
  min-height: 24px;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #8fd6ce;
}

.footer-bottom {
  border-top: 1px solid #2a3550;
}

.footer-copy {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8b877c;
}

/* ============ breadcrumb & page header ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--teal-dark);
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  color: var(--orange);
}

.breadcrumb-sep {
  color: var(--grid);
}

.breadcrumb-current {
  color: var(--ink-soft);
}

.page-header {
  margin-bottom: 12px;
}

.page-title {
  font-size: 34px;
  font-weight: 700;
  margin: 0;
}

.page-head {
  margin-bottom: 32px;
}

.page-lead {
  max-width: 720px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.meta-tags,
.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 3px 10px;
  border: 1px solid var(--grid);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: var(--panel);
}

/* ============ home: hero ============ */
.hero {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 44px;
  border-bottom: 1px dashed var(--grid);
  margin-bottom: 44px;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  margin: 0 0 12px;
}

.hero-copy h1 {
  font-size: 34px;
  margin: 0 0 12px;
}

.hero-slogan {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--teal-dark);
  margin: 0 0 14px;
}

.hero-lead {
  max-width: 560px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-media {
  min-width: 0;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--grid);
  background: var(--panel);
}

.hero-caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ============ home: scene bar ============ */
.scene-bar {
  margin-bottom: 48px;
}

.scene-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.scene-list > li {
  min-width: 0;
}

.scene-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.scene-card:hover,
.scene-card:focus {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--grid);
  border-color: var(--teal);
  color: var(--ink);
}

.scene-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.scene-desc {
  font-size: 14px;
  color: var(--ink-soft);
  flex: 1 1 auto;
  line-height: 1.7;
}

.scene-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
}

/* ============ home: cover wall ============ */
.cover-wall {
  margin-bottom: 48px;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cover-grid > li {
  min-width: 0;
}

.cover-card {
  height: 100%;
}

.cover-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cover-link:hover,
.cover-link:focus {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--grid);
  border-color: var(--teal);
  color: var(--ink);
}

.cover-figure {
  margin: 0;
  position: relative;
}

.cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #e6e0d0;
}

.cover-name {
  font-size: 16px;
  margin: 14px 16px 6px;
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 16px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============ home: select layout ============ */
.page-layout {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: 28px;
  align-items: start;
}

.select-layout {
  margin-bottom: 48px;
}

.select-list {
  min-width: 0;
}

.select-aside {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 22px;
}

.select-aside h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.aside-lead {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.aside-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-points li {
  border-top: 1px dashed var(--grid);
  padding-top: 14px;
}

.aside-points h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--teal-dark);
}

.aside-points p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ home: rank ============ */
.rank-block {
  margin-bottom: 48px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 6px 16px;
  align-items: baseline;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rank-row:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--grid);
}

.rank-num {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.3;
}

.rank-name {
  margin: 0;
  font-size: 17px;
}

.rank-reason {
  grid-column: 2;
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ home: rhythm ============ */
.rhythm-block {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 36px;
  align-items: center;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  margin-bottom: 48px;
}

.rhythm-copy {
  min-width: 0;
}

.rhythm-copy h2 {
  margin-bottom: 12px;
}

.rhythm-copy > p {
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.rhythm-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.rhythm-points h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--teal-dark);
}

.rhythm-points p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.rhythm-media {
  min-width: 0;
}

.rhythm-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #e6e0d0;
}

/* ============ home: dual entry ============ */
.dual-entry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.entry-block {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.entry-block h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.entry-block p {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

/* ============ inner: scene groups (changjing) ============ */
.scene-groups {
  margin-bottom: 48px;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 20px;
}

.scene-card {
  min-width: 0;
}

.scene-grid .scene-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  transition: box-shadow 0.15s ease;
}

.scene-grid .scene-card:hover {
  box-shadow: 3px 3px 0 var(--grid);
}

.scene-grid .scene-card:target {
  border-color: var(--orange);
  box-shadow: 3px 3px 0 var(--orange);
}

.scene-info {
  min-width: 0;
}

.scene-grid .scene-name {
  font-size: 18px;
  margin: 0 0 8px;
}

.scene-grid .scene-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.scene-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scene-fields li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  padding-left: 14px;
  position: relative;
}

.scene-fields li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--teal);
}

.scene-items {
  min-width: 0;
  border-top: 1px dashed var(--grid);
  padding-top: 16px;
}

.scene-items .entry-list {
  gap: 10px;
}

.scene-items .entry-row {
  padding: 12px 14px;
  box-shadow: none;
  background: var(--paper);
}

.scene-items .entry-row:hover {
  transform: none;
  border-color: var(--teal);
}

.scene-items .entry-name {
  font-size: 15px;
  margin-bottom: 4px;
}

.scene-items .entry-link {
  font-size: 12px;
  padding: 3px 10px;
}

/* ============ inner: compare table ============ */
.scene-table-section {
  margin-bottom: 44px;
}

.table-wrap,
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-hard);
  margin-top: 20px;
}

.compare-table {
  min-width: 640px;
  font-size: 15px;
}

.compare-table caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}

.compare-table th,
.compare-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--grid);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 14px;
  background: #ece7d9;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.compare-table tbody th {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--teal-dark);
  white-space: nowrap;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============ inner: scene figure & advice ============ */
.scene-figure {
  margin: 0 0 44px;
}

.scene-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #e6e0d0;
}

.scene-figure figcaption {
  margin-top: 10px;
}

.scene-advice {
  margin-bottom: 8px;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.advice-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.advice-name {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--teal-dark);
}

.advice-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ============ inner: tag row & chip list (lianzai) ============ */
.tag-row {
  margin-bottom: 32px;
}

.tag-row .section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list > li {
  min-width: 0;
}

/* ============ inner: lianzai layout ============ */
.layout-main {
  min-width: 0;
}

.layout-aside {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 22px;
}

.layout-aside .section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-item {
  border-top: 1px dashed var(--grid);
  padding-top: 14px;
}

.aside-item h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--teal-dark);
}

.aside-item p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-foot {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--grid);
}

.entry-body {
  min-width: 0;
}

.plan-section {
  margin: 44px 0 8px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.plan-item {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.plan-name {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--teal-dark);
}

.plan-item p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ============ inner: duanpian ============ */
.section {
  margin-bottom: 48px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 20px;
}

.topic-group {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.topic-group:target {
  border-color: var(--orange);
  box-shadow: 3px 3px 0 var(--orange);
}

.topic-title {
  font-size: 18px;
  margin: 0 0 6px;
}

.topic-note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.topic-group .entry-list {
  gap: 10px;
}

.topic-group .entry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  box-shadow: none;
  background: var(--paper);
}

.topic-group .entry-row:hover {
  transform: none;
  border-color: var(--teal);
}

.topic-group .entry-name {
  flex: 1 1 100%;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.topic-group .entry-link {
  margin-left: auto;
  font-size: 12px;
  padding: 3px 10px;
}

.media-block {
  margin: 0 0 48px;
}

.media-block img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #e6e0d0;
}

.media-block figcaption {
  margin-top: 10px;
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.tip-block {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.tip-title {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--teal-dark);
}

.tip-text {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ============ inner: jiezou ============ */
.plan-summary {
  margin-bottom: 44px;
}

.plan-summary h2 {
  margin-bottom: 10px;
}

.qa-group {
  max-width: 720px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px dashed var(--grid);
}

.qa-group:last-of-type {
  border-bottom: none;
}

.qa-group h2 {
  margin-bottom: 10px;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.qa-item {
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.qa-item summary {
  cursor: pointer;
  padding: 15px 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 44px;
  min-height: 44px;
}

.qa-item summary::-webkit-details-marker {
  display: none;
}

.qa-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--orange);
}

.qa-item[open] summary::after {
  content: "–";
}

.qa-item summary:hover,
.qa-item summary:focus {
  color: var(--teal-dark);
}

.qa-body {
  padding: 0 18px 16px;
  border-top: 1px dashed var(--grid);
  padding-top: 14px;
}

.qa-body p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink-soft);
}

.qa-body p:last-child {
  margin-bottom: 0;
}

.entry-strip {
  max-width: 720px;
  margin-bottom: 8px;
}

.entry-strip h2 {
  margin-bottom: 14px;
}

.entry-strip .entry-list {
  flex-direction: row;
  flex-wrap: wrap;
}

.entry-strip .entry-item {
  flex: 1 1 200px;
  min-width: 0;
}

.entry-strip .entry-item a {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.entry-strip .entry-item a:hover,
.entry-strip .entry-item a:focus {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--grid);
  border-color: var(--teal);
  color: var(--teal-dark);
}

/* ============ inner: bianxuan ============ */
.classify-section {
  margin-bottom: 48px;
}

.classify-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.classify-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 24px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.classify-name {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--teal-dark);
}

.classify-basis {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.classify-note {
  grid-column: 2;
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.rules-section {
  margin-bottom: 48px;
}

.rules-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.rules-col {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.rules-subtitle {
  font-size: 16px;
  margin: 0 0 14px;
  color: var(--teal-dark);
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rule-item {
  border-top: 1px dashed var(--grid);
  padding-top: 12px;
}

.rule-item:first-child {
  border-top: none;
  padding-top: 0;
}

.rule-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}

.rule-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.correct-section {
  margin-bottom: 8px;
}

.correct-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 18px;
}

.correct-card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.correct-name {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--teal-dark);
}

.correct-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.entry-bar {
  margin-bottom: 8px;
}

.entry-bar .entry-list {
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 18px;
}

.entry-bar .entry-item {
  flex: 1 1 260px;
  min-width: 0;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.entry-bar .entry-link {
  margin-bottom: 10px;
}

.entry-bar .entry-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ inner: fankui ============ */
.page-hero {
  margin-bottom: 36px;
}

.process-section {
  margin-bottom: 48px;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  background: var(--orange);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.step-title {
  font-size: 16px;
  margin: 0 0 8px;
}

.step-text {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.feedback-types {
  margin-bottom: 48px;
}

.type-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.type-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 24px;
  align-items: baseline;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.type-label {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--teal-dark);
}

.type-text {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.local-record {
  margin-bottom: 8px;
}

.record-layout {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 36px;
  align-items: center;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.record-text {
  min-width: 0;
}

.record-text h2 {
  margin-bottom: 12px;
}

.record-text > p {
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.record-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.record-point h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--teal-dark);
}

.record-point p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.record-alt {
  margin: 0;
  padding-top: 16px;
  border-top: 1px dashed var(--grid);
  font-size: 14px;
  color: var(--ink-soft);
}

.record-figure {
  min-width: 0;
}

.record-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #e6e0d0;
}

/* ============ inner media blocks (lianzai / bianxuan / jiezou) ============ */
.content-media {
  margin: 0;
}

.content-media-inline {
  margin-top: 24px;
}

.content-media-inline img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #e6e0d0;
}

.content-media-inline figcaption {
  margin-top: 10px;
}

/* ============ 404 ============ */
.error-main {
  padding-top: 64px;
  padding-bottom: 80px;
}

.error-panel {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 32px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--grid);
  text-align: left;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--orange);
  margin: 0 0 8px;
  line-height: 1;
}

.error-title {
  font-size: 26px;
  margin: 0 0 12px;
}

.error-text {
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.error-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.error-item a {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--grid);
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: 44px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.error-item a:hover,
.error-item a:focus {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.error-actions {
  margin: 0;
}

/* ============ responsive: 1080px ============ */
@media (max-width: 1080px) {
  .header-inner {
    padding: 12px 20px;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 15px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .scene-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .cover-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .rhythm-block {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .dual-entry {
    grid-template-columns: 1fr;
  }

  .scene-grid {
    grid-template-columns: 1fr;
  }

  .advice-grid,
  .plan-grid,
  .tip-grid,
  .process-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .rules-columns {
    grid-template-columns: 1fr;
  }

  .record-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

/* ============ responsive: 720px ============ */
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  .site-main {
    padding: 24px 16px 48px;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .brand {
    font-size: 18px;
  }

  .page-title {
    font-size: 25px;
  }

  .hero-copy h1 {
    font-size: 25px;
  }

  .hero-slogan {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 12px 16px;
  }

  .scene-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .scene-list > li {
    flex: 0 0 76%;
    scroll-snap-align: start;
  }

  .cover-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cover-name {
    font-size: 15px;
    margin: 12px 12px 6px;
  }

  .cover-tags {
    margin: 0 12px 12px;
    font-size: 11px;
  }

  .rank-row {
    grid-template-columns: 36px 1fr;
    gap: 4px 12px;
    padding: 12px 14px;
  }

  .rank-num {
    font-size: 18px;
  }

  .rhythm-block,
  .record-layout {
    padding: 20px;
  }

  .advice-grid,
  .plan-grid,
  .tip-grid,
  .process-list,
  .correct-grid,
  .rules-columns {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .scene-grid .scene-card,
  .topic-group,
  .classify-row,
  .type-row {
    padding: 16px;
  }

  .classify-row,
  .type-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .classify-name,
  .type-label {
    grid-row: auto;
  }

  .classify-note {
    grid-column: 1;
  }

  .related-list {
    flex-direction: column;
  }

  .related-item,
  .related-list > li {
    flex: 1 1 auto;
  }

  .entry-strip .entry-list,
  .entry-bar .entry-list {
    flex-direction: column;
  }

  .entry-strip .entry-item,
  .entry-bar .entry-item {
    flex: 1 1 auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 16px 20px;
  }

  .footer-copy {
    padding: 14px 16px;
  }

  .error-panel {
    padding: 28px 20px;
  }

  .error-code {
    font-size: 40px;
  }

  .error-title {
    font-size: 22px;
  }
}

/* ============ responsive: 390px ============ */
@media (max-width: 400px) {
  .cover-grid {
    grid-template-columns: 1fr;
  }

  .scene-list > li {
    flex: 0 0 86%;
  }

  .rank-row {
    grid-template-columns: 30px 1fr;
    padding: 12px;
  }

  .qa-item summary {
    font-size: 14px;
    padding-right: 38px;
  }

  .compare-table {
    min-width: 560px;
    font-size: 14px;
  }
}
