/* ============================================================
   KAPP手机 中文官网 · 共享基础样式
   文件：/assets/site.css
   职责：reset、变量、排版、头部/页脚、通用组件
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --c-ink: #0a1628;
  --c-night: #0f2e2a;
  --c-gold: #c9a227;
  --c-gold-bright: #e3bd45;
  --c-cyan: #00e5cc;
  --c-text: #e6e9f0;
  --c-muted: #8899aa;
  --c-card: #1c2838;
  --c-danger: #ff4d4f;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", "JetBrains Mono", monospace;

  --radius-soft: 0.75rem;
  --radius-card: 1rem;
  --radius-pill: 999px;

  --border-soft: 1px solid rgba(230, 233, 240, 0.12);
  --border-gold: 1px solid rgba(201, 162, 39, 0.35);
  --border-cyan: 1px solid rgba(0, 229, 204, 0.35);

  --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --content-max: 1200px;
  --content-gutter: clamp(1rem, 4vw, 2rem);
  --header-offset: 130px;
}

/* ---------- Reset 与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--c-ink);
  background-image:
    radial-gradient(circle at 16% 0%, rgba(0, 229, 204, 0.05), transparent 32%),
    radial-gradient(circle at 86% 10%, rgba(201, 162, 39, 0.05), transparent 28%);
  background-repeat: no-repeat;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: rgba(201, 162, 39, 0.35);
  color: var(--c-text);
}

:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 中文排版 ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.28;
  color: var(--c-text);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }

strong {
  font-weight: 700;
}

/* ---------- 布局容器 ---------- */
.container,
.main-content,
.site-header__inner,
.site-footer__inner,
.site-footer__bottom-inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-gutter);
}

.main-content {
  flex: 1 0 auto;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}

#main-content {
  scroll-margin-top: var(--header-offset);
}

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

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  color: var(--c-gold);
  background: transparent;
  border: 1px solid var(--c-gold);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.4rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  background: var(--c-gold);
  color: var(--c-ink);
  border-color: var(--c-gold);
}

.btn:focus-visible {
  box-shadow: 0 0 0 6px rgba(0, 229, 204, 0.18);
}

.btn--primary {
  background: var(--c-gold);
  color: var(--c-ink);
  border-color: transparent;
}

.btn--primary:hover {
  background: var(--c-gold-bright);
  color: var(--c-ink);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.35);
}

.btn--ghost {
  color: var(--c-cyan);
  border-color: rgba(0, 229, 204, 0.45);
}

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

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  padding-block: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--c-muted);
}

.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-cyan); }
.breadcrumbs__sep { color: rgba(230, 233, 240, 0.22); }
.breadcrumbs__current { color: var(--c-text); }

/* ---------- 栅格 ---------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

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

/* ---------- 卡片与章节 ---------- */
.card {
  background: var(--c-card);
  border: var(--border-soft);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.card:hover {
  background: #223049;
  border-color: rgba(201, 162, 39, 0.4);
}

.card--night { background: var(--c-night); }
.card--night:hover { background: #163d37; border-color: rgba(0, 229, 204, 0.3); }

.chapter {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.chapter + .chapter {
  border-top: 1px solid rgba(230, 233, 240, 0.06);
}

.chapter__band {
  display: block;
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, var(--c-gold), rgba(0, 229, 204, 0.55), transparent 75%);
  margin-bottom: 1.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.section-label::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  flex: none;
}

.divider-ribbon {
  display: block;
  height: 3px;
  border: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 162, 39, 0.75) 18%, rgba(0, 229, 204, 0.55) 48%, transparent 78%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 5%) 100%, 5% 100%);
}

/* ---------- 图片容器与装饰 ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 9;
  background-color: var(--c-card);
  background-image:
    linear-gradient(135deg, rgba(0, 229, 204, 0.07) 0%, rgba(10, 22, 40, 0) 55%),
    linear-gradient(315deg, rgba(201, 162, 39, 0.08) 0%, rgba(10, 22, 40, 0) 60%),
    repeating-linear-gradient(90deg, rgba(230, 233, 240, 0.04) 0 1px, transparent 1px 28px);
  isolation: isolate;
}

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

.media::after {
  content: attr(data-caption);
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 2rem 1rem 0.6rem;
  background: linear-gradient(180deg, transparent, rgba(10, 22, 40, 0.85));
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.media:hover::after {
  opacity: 1;
}

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

/* ---------- 长文排版 ---------- */
.prose {
  font-size: 0.95rem;
  line-height: 1.85;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table,
.prose .table-wrap {
  margin-bottom: 1.2em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding-bottom: 0.4em;
  border-bottom: var(--border-soft);
}

.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  color: var(--c-gold);
}

.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(0, 229, 204, 0.35);
  text-underline-offset: 4px;
}

.prose blockquote {
  border-left: 3px solid var(--c-gold);
  background: rgba(201, 162, 39, 0.06);
  padding: 0.8rem 1.25rem;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--c-muted);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--c-cyan);
  background: rgba(0, 229, 204, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 0.55rem 0.8rem;
  border-bottom: var(--border-soft);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.prose tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 数据与文献组件 ---------- */
.stat {
  display: grid;
  gap: 0.2rem;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-gold);
}

.stat__value--cyan {
  color: var(--c-cyan);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}

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

.note {
  background: rgba(28, 40, 56, 0.55);
  border-left: 3px solid var(--c-cyan);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--c-muted);
}

.term-list {
  display: grid;
  gap: 0.85rem;
}

.term-list__item {
  padding-left: 0.9rem;
  border-left: 2px solid rgba(201, 162, 39, 0.5);
}

.term-list__term {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--c-gold);
  margin-bottom: 0.1rem;
}

.term-list__def {
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.7;
}

.readmore {
  border-top: var(--border-soft);
  padding-top: 1rem;
}

.readmore__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(230, 233, 240, 0.1);
  font-size: 0.875rem;
  color: var(--c-text);
}

.readmore__link::after {
  content: "↗";
  color: var(--c-muted);
  font-family: var(--font-mono);
  transition: color 0.2s var(--ease);
}

.readmore__link:hover {
  color: var(--c-cyan);
}

.readmore__link:hover::after {
  color: var(--c-gold);
}

.collapse {
  border: var(--border-soft);
  border-radius: var(--radius-card);
  background: rgba(28, 40, 56, 0.4);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.collapse + .collapse {
  margin-top: 0.75rem;
}

.collapse[open] {
  border-color: rgba(201, 162, 39, 0.4);
  background: rgba(28, 40, 56, 0.7);
}

.collapse__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--c-text);
  list-style: none;
}

.collapse__summary::-webkit-details-marker {
  display: none;
}

.collapse__summary:hover {
  color: var(--c-gold);
}

.collapse__icon {
  font-family: var(--font-mono);
  color: var(--c-gold);
  line-height: 1;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.collapse[open] .collapse__icon {
  transform: rotate(45deg);
}

.collapse__body {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--c-muted);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(230, 233, 240, 0.15);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
}

.status-tag--danger {
  color: var(--c-danger);
  border-color: rgba(255, 77, 79, 0.45);
  background: rgba(255, 77, 79, 0.07);
}

.status-tag--gold {
  color: var(--c-gold);
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.07);
}

.status-tag--cyan {
  color: var(--c-cyan);
  border-color: rgba(0, 229, 204, 0.4);
  background: rgba(0, 229, 204, 0.06);
}

/* ============================================================
   头部：悬浮胶囊导航
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.92) 0%, rgba(10, 22, 40, 0.75) 45%, rgba(10, 22, 40, 0) 100%);
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.site-header__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  pointer-events: auto;
}

.site-header__capsule {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0.55rem 0.45rem 1.05rem;
  background: rgba(10, 22, 40, 0.78);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  pointer-events: auto;
}

/* 实时状态 */
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.22rem 0.8rem 0.22rem 0.65rem;
  border: var(--border-cyan);
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 204, 0.07);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.live-chip__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--c-cyan);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 229, 204, 0.45);
  }
  70% {
    opacity: 0.8;
    box-shadow: 0 0 0 6px rgba(0, 229, 204, 0);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 229, 204, 0);
  }
}

/* 快捷入口 */
.site-header__quick {
  display: inline-flex;
  gap: 0.15rem;
}

.quick-link {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.quick-link:hover {
  color: var(--c-gold);
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.07);
}

.quick-link[aria-current="page"] {
  color: var(--c-cyan);
}

.site-header__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  color: var(--c-muted);
}

.site-header__hint kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.2em;
  height: 1.2em;
  padding: 0 0.3em;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom-width: 2px;
  border-radius: 4px;
}

/* 品牌 */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: none;
  color: var(--c-text);
}

.site-brand:hover {
  color: var(--c-text);
}

.site-brand__logo {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-ink);
  background: linear-gradient(135deg, var(--c-gold-bright) 0%, var(--c-gold) 56%, #9b7d1e 100%);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.22), 0 4px 14px rgba(201, 162, 39, 0.35);
}

.site-brand__text {
  display: grid;
  gap: 0.1rem;
  line-height: 1.2;
}

.site-brand__name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.site-brand__tagline {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
}

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

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav__link {
  display: block;
  padding: 0.42rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--c-text);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-nav__link:hover {
  color: var(--c-cyan);
  background: rgba(0, 229, 204, 0.08);
  border-color: rgba(0, 229, 204, 0.25);
}

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

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover {
  color: var(--c-gold);
  border-color: rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.06);
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
}

.nav-toggle__bar {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

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

/* 跳过链接与滚动进度 */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--c-gold);
  color: var(--c-ink);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
  transform: translateY(calc(-100% - 1.5rem));
  transition: transform 0.25s var(--ease);
  pointer-events: auto;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-gold), var(--c-cyan));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  pointer-events: none;
}

/* ============================================================
   页脚：暗夜数据舱
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: auto;
  overflow: hidden;
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid rgba(201, 162, 39, 0.22);
  background-color: var(--c-night);
  background-image:
    linear-gradient(rgba(0, 229, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 204, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, var(--c-ink) 0%, var(--c-night) 120%);
  background-size: 44px 44px, 44px 44px, auto;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 162, 39, 0.8) 22%, rgba(0, 229, 204, 0.6) 55%, transparent 82%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 5%) 100%, 3% 100%);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: 0 clamp(2.5rem, 5vw, 4rem);
}

.site-footer__brand {
  display: grid;
  align-content: start;
}

.site-brand--footer {
  margin-bottom: 1rem;
}

.site-footer__trust {
  max-width: 44ch;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--c-muted);
}

.site-footer__col {
  display: grid;
  align-content: start;
  gap: 0.1rem;
}

.site-footer__heading {
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.site-footer__list {
  display: grid;
  gap: 0.1rem;
}

.site-footer__list a {
  display: inline-block;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: var(--c-muted);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.site-footer__list a:hover {
  color: var(--c-cyan);
  padding-left: 0.25rem;
}

.site-footer__contact {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--c-muted);
}

.site-footer__line {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
}

.site-footer__line::before {
  content: "›";
  flex: none;
  font-family: var(--font-mono);
  color: var(--c-gold);
}

.site-footer__note {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: rgba(136, 153, 170, 0.85);
}

.site-footer__bottom {
  border-top: 1px solid rgba(230, 233, 240, 0.08);
  background: rgba(10, 22, 40, 0.55);
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.4rem;
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--c-muted);
}

.site-footer__bottom-inner a {
  color: var(--c-muted);
}

.site-footer__bottom-inner a:hover {
  color: var(--c-cyan);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 980px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

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

@media (max-width: 880px) {
  .site-header {
    padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
  }

  .site-header__inner {
    gap: 0.4rem;
  }

  .site-header__meta {
    justify-content: center;
  }

  .site-header__quick {
    display: none;
  }

  .site-header__hint {
    display: none;
  }

  .site-brand__tagline {
    display: none;
  }

  .site-header__capsule {
    justify-content: space-between;
    padding-left: 0.8rem;
  }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    z-index: 90;
    margin-inline-start: 0;
    padding: 0.6rem;
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: var(--radius-soft);
    background: rgba(13, 24, 42, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-float);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
    pointer-events: none;
  }

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

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

  .site-nav__link {
    padding: 0.72rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(201, 162, 39, 0.92);
    color: var(--c-ink);
  }
}

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

@media (max-width: 600px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
  }
}

/* 触摸设备：图片说明默认显示 */
@media (hover: none) {
  .media::after {
    opacity: 1;
  }
}

/* 动画减弱 */
@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;
    transition-delay: 0s !important;
  }

  .live-chip__dot {
    animation: none;
  }
}
