/* ==========================================================================
   棋牌财神到 · 帮助手册 — 共享站点样式 /assets/site.css
   ========================================================================== */

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

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

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

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

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

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

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

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

/* ---------- 2. 设计令牌 ---------- */
:root {
  --red: #C62828;
  --gold: #D4A017;
  --gold-deep: #7A4A0A;
  --ink-green: #123D33;
  --cream: #F7F1E3;
  --paper: #FFFDF7;
  --teal: #1F6F8B;
  --cinnabar: #8E1B1B;
  --ink: #1E1B18;
  --gold-light: #F1D48A;
  --ink-soft: #4A443C;

  --line: rgba(122, 74, 10, .22);
  --line-strong: rgba(122, 74, 10, .38);
  --line-gold: rgba(212, 160, 23, .5);

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 6% 2%, rgba(212, 160, 23, .12), transparent 44%),
    radial-gradient(circle at 97% 94%, rgba(18, 61, 51, .08), transparent 48%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
}

h4, h5 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

p { line-height: 1.75; }

strong { font-weight: 600; }

:target { scroll-margin-top: 6rem; }

/* ---------- 4. 无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
  background-color: var(--gold-light);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 300;
  padding: .7rem 1.15rem;
  border-radius: 2px;
  background: var(--ink-green);
  color: var(--gold-light);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(18, 61, 51, .28);
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
  color: var(--gold-light);
  background: var(--ink-green);
}

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(247, 241, 227, .97), rgba(247, 241, 227, .84));
  color: var(--ink-green);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
  transition: background-color .24s var(--ease),
              color .24s var(--ease),
              border-color .24s var(--ease),
              box-shadow .24s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: var(--ink-green);
  color: var(--cream);
  border-bottom-color: rgba(241, 212, 138, .35);
  box-shadow: 0 8px 26px rgba(18, 61, 51, .22);
  backdrop-filter: none;
}

.header-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: .72rem var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 2vw, 1.75rem);
}

/* 品牌印章 */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: .68rem;
  flex: 0 0 auto;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--red);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--gold), 0 1px 0 rgba(0, 0, 0, .16);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
}

.brand-lockup:hover .brand-mark {
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px var(--gold-light), 0 3px 10px rgba(142, 27, 27, .35);
}

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

.brand-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.06rem;
  letter-spacing: .02em;
}

.brand-tagline {
  margin-top: .2rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .16em;
  opacity: .68;
}

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

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .1rem;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: .5rem .6rem;
  border-radius: 2px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: inherit;
  transition: color .18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: .26rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease), background-color .22s var(--ease);
}

.nav-link:hover { color: var(--cinnabar); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] { color: var(--gold-deep); }
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--red);
}

.site-header[data-scrolled="true"] .nav-link:hover { color: var(--gold-light); }
.site-header[data-scrolled="true"] .nav-link[aria-current="page"] { color: var(--gold-light); }
.site-header[data-scrolled="true"] .nav-link[aria-current="page"]::after { background: var(--gold-light); }

/* 页头动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
}

.header-actions .btn { white-space: nowrap; }

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .58rem 1rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.3;
  transition: background-color .18s var(--ease),
              color .18s var(--ease),
              border-color .18s var(--ease),
              box-shadow .18s var(--ease);
}

.btn-primary {
  background: var(--red);
  color: #FFF6E9;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), 0 1px 0 rgba(0, 0, 0, .1);
}

.btn-primary:hover {
  background: var(--cinnabar);
  color: #FFF6E9;
}

.site-header[data-scrolled="true"] .btn-primary {
  background: var(--gold);
  color: var(--ink-green);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .16);
}

.site-header[data-scrolled="true"] .btn-primary:hover {
  background: var(--gold-light);
  color: var(--ink-green);
}

.btn-ghost {
  background: transparent;
  color: var(--gold-deep);
  border-color: rgba(122, 74, 10, .45);
}

.btn-ghost:hover {
  background: rgba(212, 160, 23, .16);
  color: var(--cinnabar);
  border-color: var(--gold);
}

.site-header[data-scrolled="true"] .btn-ghost {
  color: var(--gold-light);
  border-color: rgba(241, 212, 138, .5);
}

.site-header[data-scrolled="true"] .btn-ghost:hover {
  background: rgba(241, 212, 138, .16);
  color: var(--gold-light);
  border-color: var(--gold-light);
}

/* ---------- 7. 移动菜单按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .48rem .68rem;
  border: 1px solid rgba(122, 74, 10, .42);
  border-radius: 3px;
  color: inherit;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  line-height: 1;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav-toggle:hover { background: rgba(212, 160, 23, .14); }

.site-header[data-scrolled="true"] .nav-toggle {
  border-color: rgba(241, 212, 138, .5);
}

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

.site-header[data-open="true"] .nav-toggle-bars {
  transform: rotate(90deg);
  background: var(--gold-light);
  box-shadow: 0 -5px 0 var(--gold-light), 0 5px 0 var(--gold-light);
}

.nav-toggle-label {
  font-weight: 500;
  letter-spacing: .16em;
}

/* ---------- 8. 阅读进度刻度 ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--red) 100%);
}

.site-header[data-scrolled="true"] .scroll-progress-bar {
  background: linear-gradient(90deg, var(--gold-light) 0%, var(--gold) 60%, var(--red) 100%);
}

/* ---------- 9. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(2.25rem, 5vw, 4rem); }
.section--tight { padding-block: clamp(1.4rem, 3vw, 2.25rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

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

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

.section-title {
  margin: .55rem 0 .4rem;
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
}

.section-lede {
  max-width: 38em;
  font-size: 1rem;
  color: var(--ink-soft);
}

.rule {
  height: 1px;
  border: 0;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0;
  background: linear-gradient(90deg, var(--line-strong), rgba(212, 160, 23, .18) 60%, transparent);
}

/* ---------- 10. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

/* ---------- 11. 面包屑 ---------- */
.breadcrumbs {
  padding-block: .85rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: .4rem;
  color: rgba(122, 74, 10, .42);
}

.breadcrumbs a {
  color: var(--gold-deep);
  border-bottom: 1px solid transparent;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.breadcrumbs a:hover {
  color: var(--cinnabar);
  border-bottom-color: var(--gold);
}

.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ---------- 12. 正文 ---------- */
.prose {
  max-width: 42em;
  font-size: 1.0625rem;
  line-height: 1.85;
}

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

.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  list-style: disc;
  padding-left: 1.35em;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: .4em; }

.prose a {
  color: var(--teal);
  border-bottom: 1px solid rgba(31, 111, 139, .35);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.prose a:hover {
  color: var(--cinnabar);
  border-bottom-color: var(--cinnabar);
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose blockquote {
  margin: 1.6em 0;
  padding: .9rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: rgba(241, 212, 138, .22);
  font-size: 1rem;
  color: var(--ink-soft);
}

/* ---------- 13. 通用小件 ---------- */
.panel {
  padding: clamp(1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border: 1px solid rgba(122, 74, 10, .25);
  border-radius: 2px;
  background: var(--gold-light);
  color: var(--gold-deep);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  line-height: 1.4;
}

.tag--red {
  background: var(--red);
  color: #FFF6E9;
  border-color: var(--cinnabar);
}

.tag--green {
  background: rgba(18, 61, 51, .1);
  color: var(--ink-green);
  border-color: rgba(18, 61, 51, .32);
}

.mono { font-family: var(--font-mono); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

/* ---------- 14. 图片容器（页面阶段放图） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 4px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(18, 61, 51, .05) 0 8px,
    transparent 8px 16px
  );
  isolation: isolate;
}

.media-frame > * {
  position: relative;
  z-index: 1;
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: .5rem;
  z-index: 2;
  border: 1px solid rgba(212, 160, 23, .45);
  border-radius: 2px;
  pointer-events: none;
}

.media-frame figcaption {
  position: absolute;
  left: .8rem;
  bottom: .8rem;
  z-index: 3;
  padding: .26rem .55rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 253, 247, .94);
  color: var(--ink-green);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  line-height: 1.4;
}

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

/* ---------- 15. 页脚 ---------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--ink-green);
  color: var(--cream);
  border-top: 3px solid var(--gold);
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(2rem, 4.5vw, 3.4rem) var(--gutter) clamp(1.4rem, 3vw, 2.2rem);
}

.footer-lead {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(241, 212, 138, .22);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--red);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--gold);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.16rem;
  letter-spacing: .02em;
  color: var(--cream);
  line-height: 1.35;
}

.footer-brand-summary {
  margin-top: .5rem;
  max-width: 34em;
  font-size: .9rem;
  line-height: 1.72;
  color: rgba(247, 241, 227, .78);
}

.footer-kicker {
  margin-bottom: .8rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--gold-light);
}

.footer-step-list {
  counter-reset: step;
  display: grid;
  gap: .6rem;
}

.footer-step {
  counter-increment: step;
  position: relative;
  padding-left: 2rem;
  font-size: .875rem;
  line-height: 1.62;
  color: rgba(247, 241, 227, .82);
}

.footer-step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .12rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(241, 212, 138, .45);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .02em;
  color: var(--gold-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

.footer-col-title {
  margin-bottom: .8rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--gold-light);
}

.footer-link {
  display: block;
  padding: .26rem 0;
  font-size: .875rem;
  color: rgba(247, 241, 227, .8);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-link:hover {
  color: var(--gold-light);
  border-bottom-color: rgba(212, 160, 23, .55);
}

.footer-contact p {
  margin-bottom: .5rem;
  font-size: .875rem;
  line-height: 1.68;
  color: rgba(247, 241, 227, .78);
}

.footer-contact strong {
  display: inline-block;
  min-width: 2.9rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--gold-light);
}

.footer-contact .footer-contact-note {
  margin-top: .7rem;
  font-size: .8rem;
  line-height: 1.66;
  color: rgba(247, 241, 227, .58);
}

.copy-mail {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .35rem;
  padding: .3rem .65rem;
  border: 1px solid rgba(241, 212, 138, .45);
  border-radius: 2px;
  background: transparent;
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  line-height: 1.4;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.copy-mail:hover {
  background: rgba(241, 212, 138, .16);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.copy-mail[data-copied="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-green);
}

.footer-bar {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1rem var(--gutter) 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  border-top: 1px solid rgba(241, 212, 138, .18);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: rgba(247, 241, 227, .62);
}

.footer-copyright,
.footer-icp { margin: 0; }

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1080px) {
  .header-actions .btn-ghost { display: none; }
  .nav-link { padding-inline: .48rem; font-size: .86rem; }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    padding: .85rem var(--gutter) 1.2rem;
    background: var(--ink-green);
    border-top: 1px solid rgba(241, 212, 138, .25);
    border-bottom: 1px solid rgba(241, 212, 138, .25);
    box-shadow: 0 18px 32px rgba(18, 61, 51, .26);
    max-height: min(72vh, 32rem);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-.5rem);
    transition: opacity .2s var(--ease),
                transform .2s var(--ease),
                visibility .2s var(--ease);
  }

  .site-header[data-open="true"] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: .72rem .4rem;
    color: var(--cream);
    font-size: .95rem;
    border-bottom: 1px solid rgba(241, 212, 138, .14);
  }

  .nav-link::after { display: none; }

  .nav-link:hover {
    color: var(--gold-light);
    background: rgba(241, 212, 138, .1);
  }

  .nav-link[aria-current="page"] {
    color: var(--gold-light);
    background: rgba(241, 212, 138, .14);
    border-bottom-color: rgba(241, 212, 138, .4);
  }

  .site-header[data-scrolled="true"] .nav-link[aria-current="page"] {
    color: var(--gold-light);
  }

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

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

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

@media (max-width: 640px) {
  .header-actions .btn-primary { display: none; }

  .brand-mark { width: 2.25rem; height: 2.25rem; font-size: 1.15rem; }
  .brand-title { font-size: .98rem; }
  .brand-tagline { letter-spacing: .1em; font-size: .58rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

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

@media (max-width: 420px) {
  .brand-tagline { display: none; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: .55rem .6rem; }
}

/* ---------- 17. 动效降级 ---------- */
@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;
  }

  .brand-lockup:hover .brand-mark { transform: none; }
  .site-header[data-open="true"] .nav-toggle-bars { transform: none; }
}
