/* ==========================================================================
   J9体育站 /assets/site.css — 夜间赛场指挥中心 共享外壳与基础组件
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #061C18;
}

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

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

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

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

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

hr { border: 0; }

::selection { background: #35F2D0; color: #04120F; }

/* ---------- 变量 ---------- */
:root {
  --ink: #061C18;
  --ink-deep: #04120F;
  --panel: #0E3B32;
  --panel-soft: #08211C;
  --cyan: #35F2D0;
  --signal: #FF5A2A;
  --wine: #5A1E33;
  --indigo: #1C2450;
  --steel: #9FB0BF;
  --sand: #E6D5B8;
  --ivory: #F4F0E6;

  --line: rgba(159, 176, 191, 0.22);
  --line-strong: rgba(159, 176, 191, 0.42);
  --cyan-line: rgba(53, 242, 208, 0.45);

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;

  --shell: 1280px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-head: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "DIN Alternate", "Roboto Mono", "SFMono-Regular", ui-monospace, monospace;
}

/* ---------- 中文排版基础 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--ivory);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--ivory);
}

h1 { font-size: clamp(2.1rem, 4.8vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.35; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1.4;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

.lede {
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.72;
  color: var(--sand);
  max-width: 34em;
}

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

/* ---------- 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--cyan);
  color: #04120F;
  font-weight: 800;
  font-size: 14px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 28, 24, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px clamp(14px, 3vw, 36px);
  min-height: 66px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 4px 4px;
  border-radius: 14px;
  transition: background 0.18s var(--ease);
}

.brand-mark:hover { background: rgba(53, 242, 208, 0.08); }

.brand-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 14px 5px 14px 5px;
  background: linear-gradient(140deg, var(--cyan) 0%, #12B79C 62%, var(--signal) 100%);
  color: #04120F;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-glyph--footer { width: 46px; height: 46px; font-size: 17px; }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ivory);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  line-height: 1.3;
}

.version-badge {
  align-self: flex-start;
  margin-top: 3px;
  padding: 2px 8px;
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  background: rgba(53, 242, 208, 0.08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.header-grid {
  flex: 1 1 auto;
  min-width: 24px;
  height: 22px;
  opacity: 0.5;
  background-image:
    linear-gradient(90deg, rgba(159, 176, 191, 0.24) 1px, transparent 1px),
    linear-gradient(0deg, rgba(159, 176, 191, 0.24) 1px, transparent 1px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}

.header-nav-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  background: rgba(53, 242, 208, 0.08);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-entry:hover {
  background: rgba(53, 242, 208, 0.18);
  border-color: var(--cyan);
}

.nav-entry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 90, 42, 0.2);
}

.site-nav { display: block; }

.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sand);
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.nav-link:hover {
  color: var(--cyan);
  background: rgba(53, 242, 208, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--ivory);
  background: rgba(53, 242, 208, 0.14);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.nav-link--entry { color: var(--cyan); }

.nav-entry-tag {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--signal);
  color: #04120F;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
}

.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  background: rgba(53, 242, 208, 0.1);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}

.nav-toggle:hover { background: rgba(53, 242, 208, 0.2); }

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}

.nav-toggle-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-header[data-open="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: linear-gradient(180deg, #061C18 0%, #04120F 100%);
  border-top: 1px solid var(--line);
  color: var(--ivory);
}

.footer-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 68px) clamp(16px, 4vw, 40px) 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(240px, 1.05fr) minmax(300px, 1.55fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.footer-brand-name {
  margin-top: 14px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ivory);
}

.footer-brand-note {
  margin: 8px 0 14px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.72;
  color: var(--steel);
}

.footer-pin {
  position: relative;
  display: block;
  padding: clamp(18px, 2.4vw, 24px);
  border: 1px solid var(--cyan-line);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(53, 242, 208, 0.16), rgba(14, 59, 50, 0.62) 62%, rgba(28, 36, 80, 0.5));
  color: var(--ivory);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.footer-pin:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

.footer-pin-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-pin-title {
  display: block;
  margin: 6px 0 4px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ivory);
}

.footer-pin-desc {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  color: var(--steel);
  max-width: 24em;
}

.footer-pin-arrow {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--cyan);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 20px;
}

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

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
}

.footer-col-title::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--cyan);
}

.footer-links { display: grid; gap: 6px; }

.footer-link {
  display: inline-block;
  padding: 3px 0;
  font-size: 15px;
  color: var(--sand);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: rgba(53, 242, 208, 0.5);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: clamp(26px, 4vw, 40px);
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: rgba(14, 59, 50, 0.42);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
}

.contact-value {
  font-size: 14px;
  line-height: 1.65;
  color: var(--sand);
  overflow-wrap: anywhere;
}

.contact-value--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ivory);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(20px, 3vw, 28px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--steel);
}

.footer-copy { margin: 0; }

.footer-icp {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

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

.btn--signal {
  background: var(--signal);
  color: #04120F;
  box-shadow: 0 12px 26px -16px rgba(255, 90, 42, 0.95);
}

.btn--signal:hover { background: #FF7043; }

.btn--cyan {
  background: var(--cyan);
  color: #04120F;
}

.btn--cyan:hover { background: #5AF6DA; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--sand);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--sm {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
}

/* ---------- 容器与面板堆叠 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.panel {
  position: relative;
  padding: clamp(20px, 3.2vw, 44px);
  border: 1px solid var(--line);
  border-radius: clamp(16px, 2.4vw, 30px);
  background: var(--panel);
  color: var(--ivory);
}

.panel--ink {
  background: var(--ink-deep);
  border-color: rgba(159, 176, 191, 0.16);
}

.panel--wine { background: linear-gradient(150deg, #5A1E33 0%, #3B1424 100%); }
.panel--indigo { background: linear-gradient(150deg, #1C2450 0%, #111634 100%); }

.panel--light {
  background: var(--ivory);
  color: #0B211C;
  border-color: rgba(6, 28, 24, 0.14);
}

.panel--light h2,
.panel--light h3,
.panel--light h4 { color: #0B211C; }

.panel--light p,
.panel--light .lede { color: #2C4038; }

.panel--light .eyebrow { color: #0E6B58; }
.panel--light .eyebrow::before { background: #0E6B58; }

.panel--notch { border-radius: 6px clamp(20px, 3vw, 36px) 6px clamp(20px, 3vw, 36px); }

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 24px);
  padding: clamp(18px, 2.6vw, 30px) clamp(18px, 3vw, 40px);
  border: 1px solid rgba(230, 213, 184, 0.22);
  border-radius: clamp(14px, 2vw, 24px);
  background: linear-gradient(100deg, #5A1E33 0%, #1C2450 62%, #0E3B32 100%);
}

/* ---------- 区块标题 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: clamp(18px, 2.6vw, 28px);
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.section-note {
  max-width: 34em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--steel);
}

.divider {
  height: 1px;
  background: var(--line);
  margin-block: clamp(24px, 4vw, 52px);
}

/* ---------- 栅格 ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- 标签与筛选 chips ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(159, 176, 191, 0.08);
  color: var(--sand);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.tag--cyan {
  border-color: var(--cyan-line);
  background: rgba(53, 242, 208, 0.12);
  color: var(--cyan);
}

.tag--signal {
  border-color: rgba(255, 90, 42, 0.5);
  background: rgba(255, 90, 42, 0.14);
  color: #FFB79F;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  appearance: none;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease), transform 0.18s var(--ease);
}

.chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.chip[aria-pressed="true"],
.chip.is-active {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04120F;
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--steel);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(159, 176, 191, 0.5);
}

.breadcrumb-link {
  color: var(--steel);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.breadcrumb-link:hover {
  color: var(--cyan);
  border-bottom-color: rgba(53, 242, 208, 0.5);
}

.breadcrumb-current { color: var(--sand); }

/* ---------- 正文排版 ---------- */
.prose { max-width: 64ch; }
.prose > *:last-child { margin-bottom: 0; }

.prose p {
  margin-bottom: 1.05em;
  line-height: 1.78;
  max-width: 36em;
}

.prose h2,
.prose h3 { margin: 1.5em 0 0.5em; }

.prose h2:first-child,
.prose h3:first-child { margin-top: 0; }

.prose ul,
.prose ol {
  display: grid;
  gap: 0.45em;
  margin-bottom: 1.1em;
}

.prose li {
  position: relative;
  padding-left: 1.35em;
  line-height: 1.75;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--cyan);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--cyan);
  background: rgba(53, 242, 208, 0.07);
  border-radius: 0 12px 12px 0;
  color: var(--sand);
}

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(53, 242, 208, 0.45);
}

.reading {
  padding: clamp(20px, 4vw, 44px);
  border-radius: clamp(14px, 2vw, 26px);
  background: var(--ivory);
  color: #0B211C;
}

.reading h2,
.reading h3 { color: #0B211C; }

.reading .prose p,
.reading .prose li { color: #2C4038; }

.reading .prose li::before { background: #0E6B58; }

.reading .prose a {
  color: #0E6B58;
  border-bottom-color: rgba(14, 107, 88, 0.45);
}

/* ---------- 图片容器（供页面阶段放置占位） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: clamp(14px, 2.4vw, 28px);
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(53, 242, 208, 0.18), transparent 62%),
    linear-gradient(160deg, #0E3B32 0%, #061C18 68%, #1C2450 100%);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, rgba(244, 240, 230, 0.5) 1px, transparent 1px),
    linear-gradient(0deg, rgba(244, 240, 230, 0.5) 1px, transparent 1px);
  background-size: 44px 44px;
}

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

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--steel);
}

/* ---------- JS 注入：滚动进度与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  background: rgba(159, 176, 191, 0.12);
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--signal));
  transition: width 0.12s linear;
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 190;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--cyan-line);
  border-radius: 14px;
  background: rgba(14, 59, 50, 0.94);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease);
}

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

.to-top:hover {
  background: var(--cyan);
  color: var(--ink);
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1180px) {
  .header-grid { opacity: 0.3; }
  .nav-link { padding: 8px 10px; font-size: 14px; }
  .brand-sub { font-size: 9px; }
}

/* ---------- 响应式：移动导航 ---------- */
@media (max-width: 980px) {
  .header-grid { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--panel-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px -30px #000;
    transition: max-height 0.3s var(--ease);
  }

  .site-header[data-open="true"] .site-nav {
    max-height: min(76vh, 560px);
    overflow: auto;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px clamp(14px, 4vw, 28px) 22px;
  }

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

  .nav-link {
    justify-content: space-between;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
  }

  .nav-link--entry { background: rgba(53, 242, 208, 0.1); }
  .nav-cta { margin-top: 14px; width: 100%; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-column: 1 / -1; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .header-shell { min-height: 60px; padding-block: 10px; }
  .brand-glyph { width: 34px; height: 34px; font-size: 13px; }
  .brand-name { font-size: 16px; }
  .brand-sub { display: none; }
  .version-badge { font-size: 10px; }
  .nav-entry { padding: 6px 11px; font-size: 12px; }
  .nav-toggle { padding: 8px 12px; }
  .footer-contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .to-top { width: 42px; height: 42px; }
}

/* ---------- 减少动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .btn:hover,
  .footer-pin:hover,
  .chip:hover,
  .to-top { transform: none; }
}
