/* ==========================================================================
   飞禽电玩 · /assets/site.css
   共享外壳：令牌 / 中文排版 / 悬浮胶囊页头 / 段位色谱页脚 / 基础组件
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 品牌色 */
  --ink: #0C2B23;
  --ink-2: #143C31;
  --ink-3: #0A0F0D;
  --gold: #C9A24B;
  --gold-bright: #E3C076;
  --cyan: #2FD8C6;
  --cinnabar: #C64A32;
  --paper: #F3EDE0;
  --slate: #6E7B75;
  --slate-soft: rgba(243, 237, 224, .62);

  /* 段位色谱：冷 → 暖 */
  --tier-1: #2E7F8C;
  --tier-2: #7FA0A6;
  --tier-3: #B98B4E;
  --tier-4: #D9B356;
  --tier-5: #C9542F;
  --tier-6: #3A2B3F;

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-section: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* 尺寸与材质 */
  --container: 1240px;
  --gutter: clamp(1rem, 3.4vw, 2.5rem);
  --shadow-hard: 8px 8px 0 var(--ink-3);
  --shadow-soft: 5px 5px 0 rgba(10, 15, 13, .55);
  --line-gold: 2px solid rgba(201, 162, 75, .42);
  --radius-pill: 999px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

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

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

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

/* ---------- 3. 中文排版基线 ---------- */
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--paper);
  background-color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  word-break: break-word;
  line-break: strict;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a {
  color: var(--cyan);
  text-decoration: none;
  text-underline-offset: .2em;
  transition: color .18s ease;
}

a:hover { color: var(--gold-bright); }

strong, b { font-weight: 700; color: var(--gold-bright); }

code, kbd, samp, .num {
  font-family: var(--font-mono);
  font-size: .94em;
  letter-spacing: .02em;
}

/* 统一焦点态：2px 电光青 + 2px 偏移 */
:where(a, button, summary, [tabindex], input, select, textarea):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--gold);
  color: var(--ink-3);
}

/* ---------- 4. 通用布局 ---------- */
.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin-inline: auto;
}

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.section--ink-2 {
  background:
    repeating-linear-gradient(135deg, rgba(47, 216, 198, .045) 0 1px, transparent 1px 22px),
    var(--ink-2);
}

.section--paper {
  background: var(--paper);
  color: var(--ink-3);
}

.section--paper a { color: #0C2B23; }
.section--paper a:hover { color: var(--cinnabar); }
.section--paper strong { color: #0C2B23; }
.section--paper .eyebrow { color: #8a6b1f; }
.section--paper .eyebrow::before { background: #8a6b1f; }

/* 9 + 3 错位标题组 */
.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-head__title {
  grid-column: 1 / span 9;
  font-family: var(--font-section);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: .08em;
  line-height: 1.3;
}

.section-head__index {
  grid-column: 10 / -1;
  justify-self: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 1.7rem;
  height: 2px;
  background: var(--gold);
}

.display-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.12;
}

.chapter-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--gold);
  padding: .1em .38em;
  border: 3px solid var(--ink-3);
  box-shadow: 6px 6px 0 var(--ink-3);
}

/* ---------- 5. 页头：悬浮胶囊浮岛 ---------- */
.skip-link {
  position: fixed;
  top: .6rem;
  left: .6rem;
  z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--gold);
  color: var(--ink-3);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  border: 3px solid var(--ink-3);
  box-shadow: var(--shadow-soft);
  transform: translateY(-220%);
  transition: transform .18s ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: .75rem var(--gutter) .4rem;
  background: linear-gradient(to bottom, rgba(12, 43, 35, .97) 58%, rgba(12, 43, 35, 0));
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(10, 15, 13, .5);
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.header-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45rem;
  width: min(100%, var(--container));
  margin-inline: auto;
  padding: .45rem .5rem .45rem .8rem;
  background: linear-gradient(180deg, #174135, #0F3128);
  border: 2px solid rgba(201, 162, 75, .55);
  border-radius: var(--radius-pill);
  box-shadow: 0 5px 0 rgba(10, 15, 13, .55), inset 0 1px 0 rgba(227, 192, 118, .18);
}

/* 品牌图腾 + 字标 */
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: none;
  color: var(--paper);
  text-decoration: none;
}

.brand:hover { color: var(--paper); }

.brand__glyph {
  width: 36px;
  height: 36px;
  flex: none;
  position: relative;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold) 58%, #8C6C2C);
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  box-shadow: inset 0 0 0 2px rgba(10, 15, 13, .35);
}

.brand__glyph::before {
  content: "";
  position: absolute;
  inset: 34% 32% 26% 32%;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.brand__glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12%;
  width: 2px;
  height: 76%;
  background: rgba(10, 15, 13, .3);
  transform: translateX(-50%);
}

.brand__text { display: block; }

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.2;
  color: var(--paper);
}

.brand__line {
  display: block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  line-height: 1.5;
  color: rgba(243, 237, 224, .5);
  white-space: nowrap;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  padding: .48rem .8rem;
  background: transparent;
  color: var(--gold-bright);
  border: 2px solid rgba(201, 162, 75, .6);
  border-radius: var(--radius-pill);
  font-family: var(--font-section);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.nav-toggle:hover,
.site-header[data-open] .nav-toggle {
  background: rgba(201, 162, 75, .16);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.nav-toggle__bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  transition: transform .2s ease, box-shadow .2s ease;
}

.site-header[data-open] .nav-toggle__bars {
  transform: rotate(45deg);
  box-shadow: 0 0 0 currentColor, 0 0 0 currentColor;
}

/* 主导航 */
.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: .1rem;
  flex-wrap: nowrap;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: .42rem .62rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-section);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(243, 237, 224, .78);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.site-nav__link:hover {
  color: var(--gold-bright);
  background: rgba(201, 162, 75, .12);
  border-color: rgba(201, 162, 75, .35);
}

.site-nav__link[aria-current="page"] {
  color: var(--ink-3);
  background: var(--gold);
  border-color: var(--gold-bright);
  font-weight: 900;
}

.site-nav__link[aria-current="page"]:hover {
  background: var(--gold-bright);
  color: var(--ink-3);
}

/* 页头行动入口 */
.header-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .3rem;
  padding: .52rem .95rem;
  background: var(--cyan);
  color: #04241F;
  border: 2px solid var(--cyan);
  border-radius: var(--radius-pill);
  font-family: var(--font-section);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .05em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(10, 15, 13, .6);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.header-cta:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--ink-3);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(10, 15, 13, .6);
}

/* ---------- 6. 页脚：服务台第二入口 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  color: var(--paper);
  background:
    radial-gradient(120% 140% at 10% 0%, rgba(47, 216, 198, .09), transparent 55%),
    radial-gradient(90% 120% at 92% 8%, rgba(201, 162, 75, .13), transparent 62%),
    var(--ink-3);
  border-top: 3px solid var(--gold);
}

.footer-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 6px;
}

.footer-rail span:nth-child(1) { background: var(--tier-1); }
.footer-rail span:nth-child(2) { background: var(--tier-2); }
.footer-rail span:nth-child(3) { background: var(--tier-3); }
.footer-rail span:nth-child(4) { background: var(--tier-4); }
.footer-rail span:nth-child(5) { background: var(--tier-5); }
.footer-rail span:nth-child(6) { background: var(--tier-6); }

.footer-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin-inline: auto;
  padding-block: clamp(2rem, 4vw, 3.25rem) 1.75rem;
}

.footer-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.25rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid rgba(243, 237, 224, .14);
}

.brand--footer .brand__name { font-size: 1.2rem; }
.brand--footer .brand__line { color: rgba(243, 237, 224, .45); }

.footer-deck {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  color: var(--slate-soft);
  padding-left: .85rem;
  border-left: 3px solid var(--gold);
  max-width: 32ch;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.footer-col__title {
  font-family: var(--font-section);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .9rem;
  padding-left: .65rem;
  border-left: 3px solid var(--gold);
  line-height: 1.3;
}

.footer-links { display: grid; gap: .3rem; }

.footer-link {
  display: inline-block;
  padding: .15rem 0;
  font-size: .94rem;
  color: rgba(243, 237, 224, .8);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-contact {
  display: grid;
  gap: .7rem;
  font-style: normal;
}

.footer-contact__item { display: grid; gap: .1rem; }

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate-soft);
}

.footer-contact__value {
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(243, 237, 224, .88);
  word-break: break-all;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1.75rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(243, 237, 224, .14);
  font-size: .78rem;
  color: rgba(243, 237, 224, .56);
}

.footer-meta__icp {
  font-family: var(--font-mono);
  letter-spacing: .06em;
  color: var(--gold);
}

.footer-meta__note { flex-basis: 100%; }

/* ---------- 7. 基础组件 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  font-family: var(--font-section);
  font-size: .94rem;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink-3);
  background: var(--gold);
  border: 3px solid var(--ink-3);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.btn:hover {
  background: var(--gold-bright);
  color: var(--ink-3);
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 var(--ink-3);
}

.btn:active { animation: btn-pulse .42s ease-out; }

.btn--ghost {
  background: transparent;
  color: var(--gold-bright);
  border-color: var(--gold);
}

.btn--ghost:hover {
  background: rgba(201, 162, 75, .16);
  color: var(--gold-bright);
}

@keyframes btn-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 216, 198, .62), 8px 8px 0 var(--ink-3); }
  100% { box-shadow: 0 0 0 11px rgba(47, 216, 198, 0), 8px 8px 0 var(--ink-3); }
}

.collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .48rem .95rem;
  background: transparent;
  color: var(--gold-bright);
  border: 2px solid var(--gold);
  border-radius: 2px;
  font-family: var(--font-section);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.collapse-toggle::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
}

.collapse-toggle[aria-expanded="true"]::after { content: "–"; }

.collapse-toggle:hover {
  background: rgba(201, 162, 75, .16);
  border-color: var(--gold-bright);
}

.collapse-panel { margin-top: 1rem; }

.collapse-panel[hidden] { display: none; }

.panel {
  background: var(--ink-2);
  border: var(--line-gold);
  border-left: 3px solid var(--gold);
  padding: clamp(1.05rem, 2.4vw, 1.75rem);
  box-shadow: var(--shadow-soft);
}

.prose {
  font-size: clamp(1rem, 1.1vw, 1.0625rem);
  line-height: 1.78;
  max-width: 68ch;
}

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

.prose h2,
.prose h3 {
  padding-left: .8rem;
  border-left: 4px solid var(--gold);
  font-size: 1.22rem;
  line-height: 1.4;
}

.prose p { color: rgba(243, 237, 224, .86); }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(47, 216, 198, .55);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  display: grid;
  gap: .4rem;
}

.prose ul li { list-style: none; position: relative; padding-left: .9rem; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: .42rem;
  height: .42rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--gold); font-family: var(--font-mono); }

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .58rem;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--paper);
}

.tier-chip::before {
  content: "";
  width: .62rem;
  height: .62rem;
  flex: none;
  background: var(--tier-color, var(--gold));
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(10, 15, 13, .5);
}

.tier-strip {
  height: 8px;
  width: 100%;
  background: linear-gradient(90deg,
    var(--tier-1), var(--tier-2), var(--tier-3),
    var(--tier-4), var(--tier-5), var(--tier-6));
}

.rule-note {
  border-left: 4px solid var(--cinnabar);
  background: rgba(198, 74, 50, .1);
  padding: .9rem 1.05rem;
  font-size: .94rem;
  line-height: 1.7;
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--slate-soft);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem;
}

.breadcrumbs__list > li + li::before {
  content: "/";
  margin-right: .45rem;
  color: var(--gold);
}

.breadcrumbs__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumbs__link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.breadcrumbs__current {
  color: currentColor;
  font-weight: 700;
  opacity: .92;
}

/* ---------- 8. 图片容器基础规则（页面阶段复用） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, rgba(47, 216, 198, .08) 0 2px, transparent 2px 14px),
    var(--ink-2);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-soft);
}

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

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 9. 显现动效协议 ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .18s ease-out, transform .18s ease-out;
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.link-underline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(47, 216, 198, .55);
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1024px) {
  .site-nav__link { font-size: .78rem; padding: .4rem .5rem; }
  .brand__line { display: none; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-header { padding-top: .6rem; }

  .header-pill {
    flex-wrap: wrap;
    padding: .5rem .6rem;
    border-radius: 20px;
  }

  .brand { flex: 1 1 auto; }
  .brand__name { font-size: 1rem; letter-spacing: .12em; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
    display: none;
    padding-top: .55rem;
    border-top: 1px dashed rgba(201, 162, 75, .35);
  }

  .site-header[data-open] .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: .18rem;
  }

  .site-nav__link {
    display: block;
    padding: .62rem .8rem;
    border-radius: 10px;
    font-size: .92rem;
    letter-spacing: .08em;
  }

  .header-cta {
    order: 4;
    flex: 1 0 100%;
    display: none;
    margin: .6rem 0 .1rem;
    padding: .7rem 1rem;
    font-size: .88rem;
  }

  .site-header[data-open] .header-cta { display: flex; }

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

  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-head__title { grid-column: 1 / -1; }
  .section-head__index { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-masthead { align-items: flex-start; }
  .footer-deck { border-left-width: 2px; }
}

@media (max-width: 560px) {
  :root { --shadow-hard: 5px 5px 0 var(--ink-3); }

  .site-header { padding-inline: .7rem; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-meta { font-size: .74rem; }
  .footer-meta__note { flex-basis: auto; }
  .chapter-index { font-size: 1.4rem; }
  .btn { width: 100%; }
}

/* ---------- 12. 减弱动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .btn:active { animation: none; }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .skip-link { transition: none; }
}
