:root {
  --bg: #f5f1e9;
  --panel: #fffaf0;
  --paper: #ffffff;
  --ink: #17211b;
  --muted: #617067;
  --line: #d9d0bf;
  --line-strong: #b7ab95;
  --leaf: #2f684f;
  --leaf-dark: #1d4534;
  --vermillion: #bd4c35;
  --amber: #d99b36;
  --mist: #e9edf0;
  --shadow: 0 18px 50px rgba(38, 32, 23, 0.14);
  --shadow-strong: 0 24px 60px rgba(38, 32, 23, 0.2);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 33, 27, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 33, 27, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 46px 46px;
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
dl,
ol {
  margin: 0;
}

strong {
  color: var(--leaf-dark);
  font-weight: 800;
}

button {
  font: inherit;
}

.sr-only,
.skip-link {
  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:focus {
  z-index: 100;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.7rem 0.9rem;
  clip: auto;
  color: #fff;
  background: var(--leaf-dark);
  border-radius: var(--radius);
}

.topbar {
  position: fixed;
  z-index: 60;
  top: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 62px;
  padding: 0.55rem 0.65rem 0.55rem 0.75rem;
  color: #fff;
  background: rgba(23, 33, 27, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.topbar.is-scrolled,
.topbar.is-open {
  color: var(--ink);
  background: rgba(255, 250, 240, 0.94);
  border-color: rgba(23, 33, 27, 0.12);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  font-weight: 800;
  transition: transform 180ms var(--ease), color 180ms var(--ease);
}

.brand-mark:hover,
.brand-mark:focus-visible {
  color: #f4bf63;
  outline: 0;
  transform: translateY(-1px);
}

.brand-mark img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  object-fit: cover;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}

.brand-mark:hover img,
.brand-mark:focus-visible img {
  box-shadow: 0 0 0 3px rgba(244, 191, 99, 0.24);
  transform: scale(1.04);
}

.brand-mark span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: currentColor;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.menu-button:hover,
.menu-button:focus-visible {
  background: rgba(244, 191, 99, 0.16);
  box-shadow: inset 0 0 0 1px rgba(244, 191, 99, 0.16);
  outline: 0;
  transform: translateY(-1px);
}

.menu-button span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background: currentColor;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
  transform-origin: center;
}

.topbar.is-open .menu-button span:not(.sr-only):first-child {
  transform: translateY(4px) rotate(45deg);
}

.topbar.is-open .menu-button span:not(.sr-only):nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem;
  font-size: 0.92rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.mobile-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.48rem 0.72rem;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.mobile-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 220ms var(--ease), transform 360ms var(--ease);
}

.topbar.is-scrolled .mobile-nav,
.topbar.is-open .mobile-nav {
  background: rgba(29, 69, 52, 0.07);
  border-color: rgba(29, 69, 52, 0.12);
}

.topbar.is-scrolled .mobile-nav a,
.topbar.is-open .mobile-nav a {
  color: var(--ink);
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: #fff;
  background: rgba(244, 191, 99, 0.18);
  outline: 0;
  transform: translateY(-1px);
}

.mobile-nav a:hover::before,
.mobile-nav a:focus-visible::before {
  opacity: 1;
  transform: translateX(100%);
}

.topbar.is-scrolled .mobile-nav a:hover,
.topbar.is-scrolled .mobile-nav a:focus-visible,
.topbar.is-open .mobile-nav a:hover,
.topbar.is-open .mobile-nav a:focus-visible {
  color: var(--leaf-dark);
  background: rgba(47, 104, 79, 0.12);
}

.mobile-nav a:active {
  transform: translateY(1px);
}

.mobile-nav a:last-child {
  padding-right: 0.95rem;
  padding-left: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--vermillion), #d86543);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(189, 76, 53, 0.28);
}

.mobile-nav a:last-child:hover,
.mobile-nav a:last-child:focus-visible,
.topbar.is-scrolled .mobile-nav a:last-child:hover,
.topbar.is-open .mobile-nav a:last-child:hover {
  color: #fff;
  background: linear-gradient(135deg, #a93f2b, var(--vermillion));
  box-shadow: 0 12px 28px rgba(189, 76, 53, 0.34);
}

.cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(560px, 78vh) auto;
  min-height: 660px;
  background: #111813;
  overflow: hidden;
}

.cover-media {
  grid-column: 1 / -1;
  grid-row: 1 / 2;
}

.cover-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 17, 13, 0.64), rgba(9, 17, 13, 0.5) 42%, rgba(9, 17, 13, 0.7)),
    linear-gradient(180deg, rgba(9, 17, 13, 0.42), rgba(9, 17, 13, 0.1) 42%, rgba(9, 17, 13, 0.86));
}

.cover-media img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  animation: coverDrift 16s var(--ease) infinite alternate;
}

.cover-copy {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  grid-row: 1 / 2;
  align-self: center;
  justify-self: center;
  width: min(860px, calc(100% - 32px));
  padding: 7rem 0 3rem;
  color: #fff;
  text-align: center;
}

.kicker {
  margin-bottom: 0.7rem;
  color: var(--vermillion);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cover-copy .kicker {
  color: #f4bf63;
}

.cover h1 {
  max-width: 13ch;
  margin: 0 auto;
  color: #f4bf63;
  font-size: clamp(2.7rem, 5.8vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.44);
}

.cover-copy p:not(.kicker) {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  margin-top: 1.4rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.68rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  position: relative;
  overflow: hidden;
  transition: color 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.action::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  opacity: 0;
  transform: translateX(-110%);
  transition: opacity 220ms var(--ease), transform 420ms var(--ease);
}

.action:hover,
.action:focus-visible {
  outline: 0;
  transform: translateY(-2px);
}

.action:hover::after,
.action:focus-visible::after {
  opacity: 1;
  transform: translateX(110%);
}

.action.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--vermillion), #d86543);
  box-shadow: 0 14px 30px rgba(189, 76, 53, 0.28);
}

.action.primary:hover,
.action.primary:focus-visible {
  background: linear-gradient(135deg, #a93f2b, var(--vermillion));
  box-shadow: 0 18px 36px rgba(189, 76, 53, 0.34);
}

.action.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.action.ghost:hover,
.action.ghost:focus-visible {
  border-color: rgba(244, 191, 99, 0.72);
  background: rgba(244, 191, 99, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.cover-stats {
  position: relative;
  z-index: 3;
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1120px, calc(100% - 32px));
  margin: -56px auto 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cover-stats div {
  padding: 1.2rem 1.35rem;
  border-right: 1px solid var(--line);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.cover-stats div:hover {
  background: rgba(244, 191, 99, 0.1);
  transform: translateY(-2px);
}

.cover-stats div:last-child {
  border-right: 0;
}

.cover-stats dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.cover-stats dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.page-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2.2rem;
  width: min(1120px, calc(100% - 32px));
  margin: 4rem auto 0;
  align-items: start;
}

.side-index {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1rem;
}

.side-card,
.side-note,
.chapter {
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(38, 32, 23, 0.08);
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease), background 220ms var(--ease);
}

.side-card:hover,
.side-note:hover,
.chapter:hover {
  background: rgba(255, 250, 240, 0.96);
  border-color: rgba(47, 104, 79, 0.2);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 1rem;
}

.side-label,
.side-note span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.side-card nav {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.8rem;
}

.side-card a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.58rem 0.85rem;
  color: var(--ink);
  background: rgba(29, 69, 52, 0.04);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.25;
  transition: color 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.side-card a:hover,
.side-card a.is-active {
  color: var(--leaf-dark);
  background: rgba(47, 104, 79, 0.12);
  border-color: rgba(47, 104, 79, 0.18);
  box-shadow: inset 0 0 0 1px rgba(47, 104, 79, 0.08);
  transform: translateX(3px);
}

.side-card a:focus-visible {
  color: var(--leaf-dark);
  background: rgba(47, 104, 79, 0.12);
  border-color: var(--leaf);
  outline: 0;
}

.side-card a:active {
  transform: translateY(1px);
}

.side-card a.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--leaf-dark), var(--leaf));
  border-color: var(--leaf);
  box-shadow: 0 10px 22px rgba(29, 69, 52, 0.18);
}

.side-card a:last-child {
  color: #fff;
  background: linear-gradient(135deg, var(--vermillion), #d86543);
  border-color: var(--vermillion);
  box-shadow: 0 10px 22px rgba(189, 76, 53, 0.2);
}

.side-card a:last-child:hover,
.side-card a:last-child:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #a93f2b, var(--vermillion));
  border-color: var(--vermillion);
  box-shadow: 0 12px 26px rgba(189, 76, 53, 0.28);
}

.side-note {
  padding: 1rem;
}

.side-note strong {
  display: block;
  margin: 0.3rem 0 0.45rem;
  color: var(--ink);
  font-size: 1.2rem;
}

.side-note p {
  color: var(--muted);
  font-size: 0.92rem;
}

.content-flow {
  display: grid;
  gap: 1.3rem;
}

.chapter {
  scroll-margin-top: 98px;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.chapter:hover {
  transform: translateY(-2px);
}

.chapter-head {
  max-width: 760px;
  margin-bottom: 1.2rem;
}

.chapter h2 {
  margin: 0;
  color: var(--leaf-dark);
  font-size: clamp(1.55rem, 2.45vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.chapter-head > p:last-child {
  margin-top: 0.75rem;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
  gap: 1.3rem;
  align-items: stretch;
}

.copy-block {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}

.copy-block:hover {
  border-color: rgba(47, 104, 79, 0.18);
  box-shadow: 0 14px 30px rgba(38, 32, 23, 0.08);
  transform: translateY(-2px);
}

.portrait-card,
.wide-panel,
.gallery-strip figure {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease);
}

.portrait-card:hover,
.wide-panel:hover,
.gallery-strip figure:hover {
  border-color: rgba(47, 104, 79, 0.24);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.portrait-card img,
.gallery-strip img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 520ms var(--ease), filter 220ms var(--ease);
}

.portrait-card:hover img,
.gallery-strip figure:hover img,
.wide-panel:hover img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.035);
}

figcaption {
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.system-list {
  display: grid;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.system-list article {
  display: grid;
  grid-template-columns: 56px minmax(170px, 0.36fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.system-list article:hover {
  background: rgba(47, 104, 79, 0.06);
  transform: translateX(4px);
}

.system-list article:last-child {
  border-bottom: 0;
}

.system-list span {
  color: var(--vermillion);
  font-weight: 900;
}

.system-list h3,
.guide-board h3,
.record-list h3 {
  margin: 0;
  line-height: 1.28;
}

.system-list p,
.guide-board p,
.record-list p,
.faq-stack p {
  color: var(--muted);
}

.wide-panel {
  margin-top: 1.2rem;
}

.wide-panel img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  transition: transform 520ms var(--ease), filter 220ms var(--ease);
}

.gallery-strip {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.gallery-strip figure:first-child {
  transform: translateY(18px);
}

.guide-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.guide-board article {
  min-height: 220px;
  padding: 1.1rem;
  background: var(--paper);
  transition: background 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.guide-board article:hover {
  z-index: 1;
  background: #fffdf7;
  box-shadow: 0 16px 34px rgba(38, 32, 23, 0.12);
  transform: translateY(-3px);
}

.guide-board article::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 1rem;
  background: var(--amber);
  transition: width 180ms var(--ease), background 180ms var(--ease);
}

.guide-board article:hover::before {
  width: 68px;
  background: var(--vermillion);
}

.record-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.record-list li {
  position: relative;
  padding: 1rem 1rem 1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease), background 180ms var(--ease);
}

.record-list li:hover {
  background: #fffdf7;
  border-color: rgba(47, 104, 79, 0.22);
  box-shadow: 0 14px 30px rgba(38, 32, 23, 0.08);
  transform: translateX(4px);
}

.record-list li::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0;
  width: 4px;
  background: var(--leaf);
  border-radius: 0 4px 4px 0;
  transition: background 180ms var(--ease), width 180ms var(--ease);
}

.record-list li:hover::before {
  width: 6px;
  background: var(--vermillion);
}

.record-list time {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: var(--vermillion);
  font-size: 0.86rem;
  font-weight: 900;
}

.faq-stack {
  display: grid;
  gap: 0.75rem;
}

.faq-stack details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.faq-stack details:hover,
.faq-stack details[open] {
  background: #fffdf7;
  border-color: rgba(47, 104, 79, 0.2);
  box-shadow: 0 12px 28px rgba(38, 32, 23, 0.07);
}

.faq-stack summary {
  position: relative;
  padding: 1rem;
  padding-right: 2.6rem;
  cursor: pointer;
  font-weight: 900;
  transition: color 180ms var(--ease);
}

.faq-stack summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--leaf);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.faq-stack details[open] summary {
  color: var(--leaf-dark);
}

.faq-stack details[open] summary::after {
  background: var(--vermillion);
  transform: translateY(-50%) rotate(45deg);
}

.faq-stack details p {
  padding: 0 1rem 1rem;
}

.bottom-action {
  margin-top: 1rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 32px));
  margin: 2rem auto;
  padding: 1.2rem 0;
  color: var(--muted);
  border-top: 1px solid var(--line-strong);
}

.footer strong {
  color: var(--ink);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-weight: 800;
}

.footer nav a {
  transition: color 160ms var(--ease), transform 160ms var(--ease);
}

.footer nav a:hover,
.footer nav a:focus-visible {
  color: var(--vermillion);
  outline: 0;
  transform: translateY(-1px);
}

@keyframes coverDrift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 920px) {
  .topbar {
    top: 10px;
    width: min(100% - 20px, 720px);
  }

  .topbar.is-open::before {
    content: "";
    position: fixed;
    inset: -10px;
    z-index: -1;
    background: rgba(17, 24, 19, 0.28);
    backdrop-filter: blur(4px);
  }

  .menu-button {
    display: grid;
  }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 20px));
    display: none;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.85rem;
    color: var(--ink);
    background:
      linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(244, 239, 228, 0.98)),
      var(--panel);
    border: 1px solid rgba(29, 69, 52, 0.18);
    border-radius: var(--radius);
    box-shadow: 0 22px 56px rgba(23, 33, 27, 0.22);
    transform-origin: top right;
  }

  .mobile-nav.is-open {
    display: grid;
    animation: mobileMenuIn 220ms var(--ease) both;
  }

  .topbar.is-open .mobile-nav {
    background:
      linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(244, 239, 228, 0.98)),
      var(--panel);
    border-color: rgba(29, 69, 52, 0.18);
  }

  .mobile-nav a {
    justify-content: flex-start;
    min-height: 50px;
    padding: 0.78rem 0.95rem;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(29, 69, 52, 0.12);
    border-radius: var(--radius);
    white-space: normal;
    line-height: 1.25;
    text-align: left;
    box-shadow: 0 8px 18px rgba(38, 32, 23, 0.05);
  }

  .mobile-nav a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    opacity: 0.42;
    transform: rotate(45deg);
    transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  }

  .mobile-nav a:hover::after,
  .mobile-nav a:focus-visible::after {
    opacity: 0.85;
    transform: translateX(2px) rotate(45deg);
  }

  .mobile-nav a:last-child {
    justify-content: center;
    color: #fff;
    border-color: var(--vermillion);
    box-shadow: 0 14px 28px rgba(189, 76, 53, 0.25);
  }

  .mobile-nav a:last-child::after {
    display: none;
  }

  .cover {
    display: block;
    min-height: auto;
  }

  .cover-media {
    position: relative;
    height: 70vh;
    min-height: 560px;
  }

  .cover-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100px;
    width: min(100% - 32px, 640px);
    padding: 0;
    margin: 0 auto;
    text-align: center;
  }

  .cover h1 {
    max-width: 12ch;
    font-size: clamp(2.3rem, 11vw, 4rem);
  }

  .cover-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -58px;
  }

  .cover-stats div:nth-child(2) {
    border-right: 0;
  }

  .cover-stats div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .page-shell {
    display: block;
    margin-top: 2rem;
  }

  .side-index {
    position: static;
    margin-bottom: 1.2rem;
  }

  .side-card nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-grid,
  .gallery-strip,
  .guide-board {
    grid-template-columns: 1fr;
  }

  .gallery-strip figure:first-child {
    transform: none;
  }

  .system-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .system-list p {
    grid-column: 2 / 3;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body {
    background-size: 32px 32px;
  }

  .brand-mark span {
    max-width: 9em;
  }

  .cover-media {
    height: 76vh;
    min-height: 600px;
  }

  .cover-copy {
    bottom: 116px;
  }

  .cover-copy p:not(.kicker) {
    font-size: 1rem;
  }

  .cover-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cover-stats {
    width: calc(100% - 20px);
    font-size: 0.92rem;
  }

  .cover-stats div {
    padding: 0.9rem;
  }

  .page-shell,
  .footer {
    width: calc(100% - 20px);
  }

  .chapter {
    padding: 1rem;
  }

  .side-card nav,
  .mobile-nav {
    grid-template-columns: 1fr;
  }

  .system-list article {
    gap: 0.6rem;
    padding: 0.9rem;
  }
}

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
