/* ============================================================
   方方游艺 · 神话方舟｜共享站点套件  /assets/site.css
   ============================================================ */

/* ── 1. 重置 ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
}

/* ── 2. 变量 ───────────────────────────────────────────── */
:root {
  --c-ark: #0E1436;
  --c-hull: #1C2554;
  --c-paper: #F4EDDF;
  --c-letter: #E5D9C0;
  --c-gold: #C9A227;
  --c-gold-hi: #EFDDA4;
  --c-cinnabar: #B8372A;
  --c-jade: #2E7D6B;
  --c-ink: #241F18;
  --c-mist: #6B6255;

  --line-gold: rgba(201, 162, 39, 0.34);
  --line-soft: rgba(239, 221, 164, 0.14);

  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;

  --shell: 1280px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --radius-card: 18px;
  --radius-pill: 999px;

  --shadow-float: 0 26px 54px -38px #000, inset 0 1px 0 rgba(239, 221, 164, 0.08);
  --shadow-panel: 0 36px 70px -52px #000;

  --dur: 180ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ── 3. 页面底色与中文排版 ─────────────────────────────── */
body {
  background-color: var(--c-ark);
  background-image:
    radial-gradient(120% 68% at 8% -12%, rgba(46, 125, 107, 0.20), transparent 62%),
    radial-gradient(96% 60% at 96% 2%, rgba(201, 162, 39, 0.16), transparent 64%),
    radial-gradient(84% 58% at 46% 104%, rgba(184, 55, 42, 0.13), transparent 66%);
  background-repeat: no-repeat;
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(201, 162, 39, 0.72);
  color: #14172f;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); letter-spacing: -0.01em; }

strong, b { font-weight: 500; }

[id] {
  scroll-margin-top: 6.5rem;
}

:focus-visible {
  outline: 2px solid var(--c-gold-hi);
  outline-offset: 3px;
}

/* ── 4. 通用工具 ───────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono-tag {
  display: inline-block;
  padding: 0.1rem 0.42rem;
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.1);
  color: rgba(239, 221, 164, 0.86);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── 5. 跳转链接 ───────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 200;
  padding: 0.62rem 1.05rem;
  border-radius: var(--radius-pill);
  background: var(--c-gold);
  color: #171207;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ── 6. 头部 ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 0.85rem var(--gutter) 0.5rem;
  background: linear-gradient(180deg,
      rgba(9, 13, 38, 0.985) 0%,
      rgba(9, 13, 38, 0.9) 56%,
      rgba(9, 13, 38, 0) 100%);
  transition: padding var(--dur) var(--ease);
}

.site-header[data-shrunk="true"] {
  padding-top: 0.45rem;
  padding-bottom: 0.32rem;
}

.site-header__frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--shell);
  margin-inline: auto;
}

/* 品牌浮岛 */
.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0.95rem 0.42rem 0.46rem;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(34, 45, 96, 0.94), rgba(14, 20, 54, 0.94));
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--c-paper);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.brand-island:hover {
  border-color: rgba(239, 221, 164, 0.62);
  transform: translateY(-1px);
}

.brand-island__seal {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--c-gold-hi) 0%, var(--c-gold) 54%, #8d6f13 100%);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(239, 221, 164, 0.35);
  color: #131a3c;
}

.brand-island__seal svg {
  width: 21px;
  height: 21px;
}

.brand-island__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-island__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.03rem;
  letter-spacing: 0.1em;
  color: var(--c-paper);
}

.brand-island__line {
  margin-top: 0.18rem;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.16em;
  color: rgba(239, 221, 164, 0.66);
  white-space: nowrap;
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: rgba(28, 37, 84, 0.94);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: rgba(239, 221, 164, 0.6);
  background: rgba(40, 52, 110, 0.96);
}

.nav-toggle__bars {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 14px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.nav-toggle__bars::before {
  top: 0;
  box-shadow: 0 6px 0 currentColor;
}

.nav-toggle__bars::after {
  top: 12px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  box-shadow: none;
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle__label {
  line-height: 1;
}

/* 导航浮岛 */
.nav-island {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.28rem 0.3rem;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: rgba(20, 27, 66, 0.92);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav-island__list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-island__item {
  display: block;
}

.nav-link {
  display: inline-block;
  padding: 0.48rem 0.72rem;
  border-radius: var(--radius-pill);
  color: rgba(244, 237, 223, 0.74);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--c-gold-hi);
  background: rgba(201, 162, 39, 0.12);
}

.nav-link[aria-current="page"] {
  color: #17120a;
  font-weight: 500;
  background: linear-gradient(150deg, var(--c-gold-hi), var(--c-gold) 78%);
  box-shadow: 0 6px 14px -10px rgba(201, 162, 39, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav-island__divider {
  width: 1px;
  height: 20px;
  margin: 0 0.34rem;
  background: linear-gradient(180deg, transparent, var(--line-gold), transparent);
}

.nav-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(239, 221, 164, 0.48);
  border-radius: var(--radius-pill);
  background: rgba(201, 162, 39, 0.14);
  color: var(--c-gold-hi);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.nav-shortcut:hover {
  background: var(--c-gold);
  color: #17120a;
  transform: translateY(-1px);
}

.nav-shortcut__mark {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: currentColor;
  transform: rotate(45deg);
}

/* 滚动进度 */
.site-header__progress {
  max-width: var(--shell);
  margin: 0.5rem auto 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(239, 221, 164, 0.1);
  overflow: hidden;
}

.site-header__progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-jade), var(--c-gold) 58%, var(--c-gold-hi));
}

/* ── 7. 页脚 ───────────────────────────────────────────── */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--line-gold);
  background: linear-gradient(180deg, #0B1030 0%, #131A40 44%, #0A0F2A 100%);
  color: rgba(244, 237, 223, 0.82);
}

.site-footer__ruler {
  height: 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  background-image:
    repeating-linear-gradient(90deg, rgba(201, 162, 39, 0.55) 0 1px, transparent 1px 32px),
    linear-gradient(180deg, rgba(201, 162, 39, 0.24), transparent);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.75fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.2rem, 5vw, 3.6rem) var(--gutter) clamp(1.6rem, 3vw, 2.4rem);
}

.site-footer__brand {
  min-width: 0;
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: 0.14em;
  line-height: 1.2;
  color: var(--c-paper);
}

.footer-brand__line {
  margin-top: 0.85rem;
  max-width: 26em;
  font-size: 0.88rem;
  line-height: 1.85;
  color: rgba(244, 237, 223, 0.66);
}

.footer-brand__id {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(239, 221, 164, 0.66);
  word-break: break-all;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  min-width: 0;
}

.footer-col {
  min-width: 0;
}

.footer-col__title {
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
  color: var(--c-gold);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-link {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: rgba(244, 237, 223, 0.76);
  font-size: 0.9rem;
  line-height: 1.7;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-link:hover {
  color: var(--c-gold-hi);
  border-bottom-color: rgba(239, 221, 164, 0.5);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-list__item {
  display: grid;
  grid-template-columns: 2.9rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.86rem;
  line-height: 1.7;
}

.contact-list__key {
  color: rgba(239, 221, 164, 0.58);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.contact-list__val {
  color: rgba(244, 237, 223, 0.88);
  word-break: break-all;
}

.copy-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.5rem 0.95rem;
  border: 1px dashed rgba(201, 162, 39, 0.5);
  border-radius: var(--radius-pill);
  color: var(--c-gold-hi);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.copy-email:hover {
  background: rgba(201, 162, 39, 0.14);
}

.copy-email[data-copied="true"] {
  border-color: var(--c-jade);
  background: var(--c-jade);
  color: #eaf6f2;
}

.contact-note {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  line-height: 1.8;
  color: rgba(244, 237, 223, 0.54);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1rem var(--gutter) 1.7rem;
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  color: rgba(244, 237, 223, 0.5);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.site-footer__legal {
  color: rgba(239, 221, 164, 0.74);
}

.site-footer__copy {
  color: rgba(244, 237, 223, 0.52);
}

/* ── 8. 按钮 ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn--gold {
  background: linear-gradient(150deg, var(--c-gold-hi), var(--c-gold) 72%);
  color: #171207;
  box-shadow: 0 8px 0 -4px rgba(107, 79, 10, 0.55), 0 20px 32px -24px rgba(201, 162, 39, 0.9);
}

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

.btn--ghost {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.06);
  color: var(--c-gold-hi);
}

.btn--ghost:hover {
  background: rgba(201, 162, 39, 0.16);
  border-color: rgba(239, 221, 164, 0.8);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: none;
  transition-duration: 180ms;
}

/* ── 9. 面包屑 ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: rgba(239, 221, 164, 0.55);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.breadcrumb a {
  color: rgba(239, 221, 164, 0.72);
  transition: color var(--dur) var(--ease);
}

.breadcrumb a:hover {
  color: var(--c-gold-hi);
}

.breadcrumb__sep {
  color: rgba(201, 162, 39, 0.45);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-paper);
}

/* ── 10. 阅读面板与正文 ────────────────────────────────── */
.paper-panel {
  padding: clamp(1.4rem, 3vw, 2.7rem);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-card);
  background: var(--c-paper);
  box-shadow: var(--shadow-panel);
  color: var(--c-ink);
}

.paper-panel h2,
.paper-panel h3,
.paper-panel h4 {
  color: #101636;
}

.paper-panel a {
  color: #8a3a12;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.prose {
  max-width: 38em;
  font-size: 1.02rem;
  line-height: 1.9;
  color: rgba(244, 237, 223, 0.86);
}

.prose > * + * {
  margin-top: 1.05em;
}

.prose strong {
  color: var(--c-paper);
  font-weight: 500;
}

.prose a {
  color: var(--c-gold-hi);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.prose--on-paper {
  color: var(--c-ink);
}

.prose--on-paper strong {
  color: #0E1436;
}

.prose--on-paper a {
  color: #8a3a12;
}

/* ── 11. 图片容器基础 ──────────────────────────────────── */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-card);
  background-color: var(--c-hull);
  background-image:
    radial-gradient(90% 80% at 18% 8%, rgba(201, 162, 39, 0.18), transparent 62%),
    repeating-linear-gradient(135deg, rgba(239, 221, 164, 0.05) 0 1px, transparent 1px 16px);
  box-shadow: var(--shadow-panel);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img,
.media-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--portrait {
  aspect-ratio: 3 / 4;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

/* ── 12. 栅格 ──────────────────────────────────────────── */
.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--split {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: start;
}

/* ── 13. 章节索引 ──────────────────────────────────────── */
.toc {
  position: sticky;
  top: 6.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.9rem 0 0.9rem 1rem;
  border-left: 1px solid rgba(201, 162, 39, 0.28);
}

.toc__title {
  margin-bottom: 0.55rem;
  color: rgba(239, 221, 164, 0.5);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.toc__link {
  position: relative;
  padding: 0.32rem 0 0.32rem 0.9rem;
  color: rgba(244, 237, 223, 0.55);
  font-size: 0.84rem;
  line-height: 1.6;
  transition: color var(--dur) var(--ease);
}

.toc__link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: var(--c-gold);
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease);
}

.toc__link:hover {
  color: rgba(244, 237, 223, 0.9);
}

.toc__link[aria-current="true"] {
  color: var(--c-gold-hi);
}

.toc__link[aria-current="true"]::before {
  height: 1.1rem;
}

.toc__num {
  margin-right: 0.5rem;
  color: rgba(201, 162, 39, 0.6);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

/* ── 14. 显现动画 ──────────────────────────────────────── */
.reveal {
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal[data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* ── 15. 返回顶部 ──────────────────────────────────────── */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 50%;
  background: rgba(20, 27, 66, 0.94);
  box-shadow: var(--shadow-float);
  color: var(--c-gold-hi);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--c-gold);
  color: #171207;
}

/* ── 16. 响应式 ────────────────────────────────────────── */
@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-island {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
    padding: 0.7rem;
    border-radius: 22px;
    background: linear-gradient(165deg, rgba(28, 37, 84, 0.99), rgba(14, 20, 54, 0.99));
    box-shadow: 0 30px 60px -34px #000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }

  .nav-island[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-island__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav-link {
    display: block;
    padding: 0.72rem 0.95rem;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .nav-island__divider {
    width: auto;
    height: 1px;
    margin: 0.4rem 0.2rem;
    background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
  }

  .nav-shortcut {
    justify-content: center;
    padding: 0.72rem 0.95rem;
    font-size: 0.8rem;
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.6rem, 4vw, 2.4rem);
  }
}

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--split {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .brand-island__line {
    display: none;
  }

  .brand-island__name {
    font-size: 0.98rem;
  }

  .site-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__cols > .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .site-footer__base {
    justify-content: flex-start;
  }

  .to-top {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 380px) {
  .brand-island__seal {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .nav-toggle__label {
    display: none;
  }
}

/* ── 17. 动效降级 ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
