/* ============================================================
   皇冠现金CN导航 · /assets/site.css
   共享外壳：reset、变量、中文排版、页头、页脚、通用组件
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink: #0B0E12;
  --ink-deep: #151A21;
  --charcoal: #2A3038;
  --gold: #C9A24B;
  --gold-bright: #E8C77A;
  --cinnabar: #B23A32;
  --slate: #6F7C86;
  --cream: #F3EDE2;
  --gold-mist: #8C7442;
  --teal-deep: #26343A;

  --text: var(--cream);
  --text-dim: #ADA79B;
  --line: rgba(201, 162, 75, 0.24);
  --line-soft: rgba(243, 237, 226, 0.10);

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --pad-x: clamp(1.1rem, 4vw, 2.5rem);
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --pill: 999px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 70px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 8rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
img, picture, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
table { border-collapse: collapse; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold); color: #171207; }

[hidden] { display: none !important; }
[data-hidden] { display: none !important; }

/* ---------- 3. 中文排版与容器 ---------- */
.shell {
  width: min(1280px, 100% - 2 * var(--pad-x));
  margin-inline: auto;
}

.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--text-dim);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2,
.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
  margin-top: 1.9em;
}
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.prose h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
.prose strong { color: var(--cream); font-weight: 600; }
.prose a { color: var(--gold-bright); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 32fr) minmax(0, 68fr);
  gap: clamp(1.6rem, 4vw, 3.6rem);
  align-items: start;
}
.split-aside { position: sticky; top: 7.2rem; }

.grid-2,
.grid-3 {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 200;
  padding: 0.6rem 1.1rem;
  border-radius: var(--pill);
  background: var(--gold-bright);
  color: #171207;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(180deg, rgba(11, 14, 18, 0.9), rgba(11, 14, 18, 0.34));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.site-header[data-stuck] {
  background: var(--ink-deep);
  border-bottom-color: var(--line);
  box-shadow: 0 18px 42px -30px #000;
}

/* 5.1 顶部短路径条 */
.shortcut-rail {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 14, 18, 0.42);
}
.shortcut-rail__inner {
  width: min(1280px, 100% - 2 * var(--pad-x));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 38px;
}
.shortcut-rail__label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--gold-mist);
  text-transform: uppercase;
  flex: none;
}
.shortcut-rail__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(178, 58, 50, 0.18);
}
.shortcut-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.shortcut-bar a,
.shortcut-bar__switch {
  display: inline-block;
  padding: 0.24rem 0.7rem;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.shortcut-bar a:hover,
.shortcut-bar__switch:hover {
  color: var(--gold-bright);
  background: rgba(201, 162, 75, 0.13);
}
.shortcut-bar__switch {
  border: 1px dashed rgba(201, 162, 75, 0.32);
  color: var(--gold);
}
.shortcut-rail__note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  white-space: nowrap;
}

/* 5.2 主导航栏 */
.header-bar__inner {
  width: min(1280px, 100% - 2 * var(--pad-x));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.8rem);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream);
  flex: none;
}
.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 32% 24%, rgba(201, 162, 75, 0.4), rgba(11, 14, 18, 0.92) 72%);
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1;
}
.brand__text { display: grid; line-height: 1.16; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--gold-mist);
  white-space: nowrap;
}

.primary-nav { min-width: 0; }
.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1rem;
}
.primary-nav a {
  position: relative;
  display: inline-block;
  padding: 0.48rem 0.78rem;
  border-radius: var(--pill);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0.78rem;
  right: 0.78rem;
  bottom: 0.22rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}
.primary-nav a:hover {
  color: var(--cream);
  background: rgba(243, 237, 226, 0.06);
}
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a[aria-current="page"] { color: var(--gold-bright); }
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--gold-bright);
}

.nav-panel-tools,
.nav-panel-foot { display: none; }
.nav-panel-tools__label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--gold-mist);
  margin-bottom: 0.5rem;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
}

.device-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(42, 48, 56, 0.55);
}
.device-switch button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.78rem;
  border-radius: var(--pill);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.device-switch button:hover { color: var(--cream); }
.device-switch button[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #171207;
  font-weight: 600;
}
.device-switch--panel { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: transparent;
  color: var(--cream);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold-bright); }
.nav-toggle__bars { display: grid; gap: 4px; width: 16px; }
.nav-toggle__bars span {
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}
.site-header[data-open] .nav-toggle__bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.scroll-progress {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s linear;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  background: linear-gradient(180deg, var(--ink-deep), #0E1319 58%, var(--ink));
  border-top: 1px solid var(--line);
  color: var(--text-dim);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 3%, var(--gold) 28%, var(--gold-bright) 50%, var(--gold) 72%, transparent 97%);
  opacity: 0.75;
}
.site-footer__inner {
  width: min(1280px, 100% - 2 * var(--pad-x));
  margin-inline: auto;
  padding: clamp(2.6rem, 6vw, 4.4rem) 0 1.8rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.footer-brand__name {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.footer-brand__line {
  margin-top: 0.75rem;
  max-width: 26ch;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.footer-brand__meta {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gold-mist);
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  color: var(--gold-bright);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.footer-cta:hover {
  background: rgba(201, 162, 75, 0.12);
  border-color: var(--gold);
  color: var(--cream);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.footer-col__title {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.footer-col li + li { margin-top: 0.5rem; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.footer-col a:hover { color: var(--gold-bright); }

.footer-lower {
  display: grid;
  grid-template-columns: minmax(0, 66fr) minmax(0, 34fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 3.2rem);
  padding-top: clamp(1.6rem, 3vw, 2.2rem);
  border-top: 1px solid var(--line-soft);
}
.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0.85rem 1.6rem;
}
.footer-contact__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  color: var(--slate);
  margin-bottom: 0.18rem;
}
.footer-contact__value {
  display: block;
  font-size: 0.9rem;
  color: var(--cream);
  line-height: 1.55;
  word-break: break-word;
}

.collect-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(201, 162, 75, 0.14), rgba(38, 52, 58, 0.5) 70%);
}
.collect-note__text {
  font-size: 0.87rem;
  line-height: 1.65;
  color: var(--text-dim);
}
.collect-note__close {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-bright);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.collect-note__close:hover { background: var(--gold); color: #171207; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line-soft);
}
.footer-bottom__copy,
.footer-bottom__icp {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--slate);
}

/* ---------- 7. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(0.9rem, 3.5vw, 2rem);
  bottom: clamp(0.9rem, 3.5vw, 2rem);
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.68rem 1.15rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(21, 26, 33, 0.94);
  color: var(--gold-bright);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), background 0.18s var(--ease);
}
.to-top[data-visible] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover { background: var(--charcoal); color: var(--cream); }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn--gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #171207;
}
.btn--gold:hover { filter: brightness(1.07); }
.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--cream);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(201, 162, 75, 0.1);
}
.btn--ink {
  background: var(--ink-deep);
  border-color: var(--line);
  color: var(--cream);
}
.btn--ink:hover { border-color: var(--gold); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.55rem;
  margin-bottom: 1.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--slate);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.55rem; }
.breadcrumb li + li::before { content: "/"; color: var(--gold-mist); }
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.breadcrumb a:hover { color: var(--gold-bright); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

/* ---------- 10. 编辑语汇组件 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem 1rem;
  margin-bottom: 1.7rem;
}
.section-head__index {
  flex: none;
  padding: 0.14rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.section-head__title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.22;
  color: var(--cream);
}
.section-head__desc {
  margin-left: auto;
  max-width: 36ch;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--slate);
}

.num {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.rule {
  border: 0;
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg, var(--line), rgba(201, 162, 75, 0.05) 70%, transparent);
}

.note {
  padding: 0.9rem 0 0.9rem 1.1rem;
  border-left: 2px solid var(--cinnabar);
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--text-dim);
}
.note strong { color: var(--cream); }

.card {
  position: relative;
  padding: clamp(1.2rem, 2.4vw, 1.85rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(42, 48, 56, 0.55), rgba(21, 26, 33, 0.92));
  color: var(--text-dim);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { border-color: rgba(201, 162, 75, 0.5); }
.card--light {
  background: var(--cream);
  border-color: rgba(11, 14, 18, 0.14);
  color: #23282F;
}
.card--light :where(h2, h3, h4, strong) { color: #12161B; }
.card--flat {
  background: transparent;
  border-color: var(--line-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.6rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(201, 162, 75, 0.1);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.tag--alert {
  border-color: rgba(178, 58, 50, 0.5);
  background: rgba(178, 58, 50, 0.16);
  color: #E28C84;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.9rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.pill-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(201, 162, 75, 0.1);
}

/* 章节目录 */
.chapter-nav {
  display: grid;
  gap: 0.1rem;
  border-left: 1px solid var(--line);
}
.chapter-link {
  position: relative;
  display: block;
  padding: 0.62rem 0 0.62rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.chapter-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.2s var(--ease);
}
.chapter-link:hover { color: var(--cream); }
.chapter-link[aria-current] { color: var(--gold-bright); }
.chapter-link[aria-current]::before { background: var(--gold); }
.chapter-link__num {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--gold-mist);
  margin-right: 0.5rem;
}

/* ---------- 11. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 120% at 8% 0%, rgba(201, 162, 75, 0.18), transparent 58%),
    repeating-linear-gradient(90deg, rgba(201, 162, 75, 0.12) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(201, 162, 75, 0.08) 0 1px, transparent 1px 44px),
    var(--teal-deep);
}
.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame__cap {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  padding: 0.26rem 0.62rem;
  border-radius: var(--pill);
  background: rgba(11, 14, 18, 0.74);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

/* 显现动画 */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
[data-reveal][data-in] { opacity: 1; transform: none; }

/* ---------- 12. 断点 ---------- */
@media (max-width: 1080px) {
  .primary-nav a { font-size: 0.82rem; padding: 0.44rem 0.6rem; }
  .primary-nav a::after { left: 0.6rem; right: 0.6rem; }
  .brand__sub { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  html { scroll-padding-top: 7rem; }

  .shortcut-rail__note { display: none; }
  .shortcut-rail__inner { gap: 0.5rem; }

  .header-bar__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: var(--header-h);
    gap: 0.6rem;
  }
  .nav-toggle { display: inline-flex; }
  .header-tools > .device-switch { display: none; }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 1rem var(--pad-x) 1.4rem;
    background: var(--ink-deep);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -34px #000;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
  }
  .site-header[data-open] .primary-nav { display: block; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
    justify-content: flex-start;
  }
  .primary-nav a {
    padding: 0.78rem 0.9rem;
    font-size: 0.98rem;
    border-radius: var(--r-md);
  }
  .primary-nav a::after { display: none; }
  .primary-nav a[aria-current="page"] {
    background: rgba(201, 162, 75, 0.12);
    color: var(--gold-bright);
  }

  .nav-panel-tools {
    display: block;
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .device-switch--panel { display: inline-flex; }
  .nav-panel-foot {
    display: block;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line-soft);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--slate);
  }

  .split-layout { grid-template-columns: 1fr; }
  .split-aside { position: static; }
  .footer-top,
  .footer-lower { grid-template-columns: 1fr; }
  .section-head__desc { margin-left: 0; max-width: none; }
}

@media (max-width: 640px) {
  .shortcut-rail__label { display: none; }
  .shortcut-bar { gap: 0.05rem; }
  .shortcut-bar a,
  .shortcut-bar__switch { font-size: 0.72rem; padding: 0.22rem 0.5rem; }
  .brand__mark { width: 32px; height: 32px; border-radius: 11px; font-size: 0.9rem; }
  .brand__name { font-size: 0.94rem; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 0.46rem 0.62rem; }

  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { padding: 0.6rem 0.95rem; font-size: 0.74rem; }
}

@media (max-width: 380px) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ---------- 13. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .to-top { transition: none; }
  .scroll-progress { transition: none; }
}
