/* ============================================================================
   main.css — 布局与组件（页面壳）
   ----------------------------------------------------------------------------
   DOM 顺序 = 移动端阅读顺序；桌面用 grid-template-areas 把侧栏提到右列。
   所以移动端天然是「舞台 → 城市条 → 正文」，桌面是「左正文 / 右城市列表」，
   两个断点之间不重排 DOM，键盘顺序与读屏顺序也一致。

   视觉论点（本页只赌一个）：**夜航图上的精密仪表**。
   深空底 + 5/8/12% 白的描边分层 + 一个琥珀强调色 + tabular 数字；
   不用渐变文字、不用发光、不用玻璃拟态当装饰，光只留给「太阳与晨昏线」。
   ========================================================================== */

/* ============================== 卡片 / 按钮 ============================== */

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-10);
  box-shadow: var(--panel-shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding-inline: var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-6);
  font-size: var(--fs-15);
  font-weight: var(--fw-strong);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--tx-color);
}

/* 主按钮：全页唯一（P02 / G03）。强调色只在这里大面积出现。 */
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn--primary:hover { background: #ffd29a; border-color: #ffd29a; }

.btn--primary:active { background: #f0b166; }

/* 次按钮：描边而不是填充（20-踩坑 · 8：其余动作必须降级） */
.btn--ghost {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================== 页头 ============================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(4, 7, 14, 0.86);
  border-bottom: 1px solid var(--border-faint);
  /* 功能性模糊：内容从下面滚过时标题仍可读。不是装饰（craft floor 允许解释层级的 blur）。 */
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  backdrop-filter: saturate(120%) blur(10px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-15);
  font-weight: var(--fw-strong);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  font-size: var(--fs-14);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: var(--sp-1);
  transition: var(--tx-color);
}

.nav a:hover { color: var(--text); }

/* 当前页高亮（N02）：首页只有自己在导航里，用 aria-current 的样式兜住 */
.nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 640px) {
  .header__inner { height: 56px; }
  .nav { gap: var(--sp-4); font-size: var(--fs-13); }
  .nav a[data-nav="how"] { display: none; } /* 移动端只留两个入口，免得 4 项挤成两行 */
}

/* ============================== 首屏 ============================== */

.hero {
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-6);
}

.hero h1 {
  max-width: 24ch;
  font-size: var(--fs-42);
}

.hero__sub {
  margin-top: var(--sp-4);
  max-width: 62ch;
  color: var(--muted);
  font-size: var(--fs-17);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

@media (max-width: 860px) {
  .hero { padding-top: var(--sp-6); padding-bottom: var(--sp-3); }

  /* H10 裁决：移动端 H1 降到 22px（否则首屏被文字挤掉，看不到城市时间） */
  .hero h1 { font-size: 1.375rem; line-height: 1.2; max-width: none; }
  .hero__sub {
    font-size: var(--fs-15);
    margin-top: var(--sp-2);
    /* 副标题 2 行截止，第三句「No signup...」由 FAQ 接住（H10 的代价写明） */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero__actions { margin-top: var(--sp-3); gap: var(--sp-2); }
  /* 移动端只留一个主 CTA（P02/G03：一个页面一个主要动作），次按钮在 FAQ 里有同样的入口 */
  .hero__actions .btn--ghost { display: none; }
  .btn { height: 36px; padding-inline: var(--sp-3); font-size: var(--fs-14); }
}

/* ============================== 主栅格 ============================== */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  grid-template-areas:
    "stage   side"
    "content side";
  column-gap: var(--sp-12);
  row-gap: var(--sp-8);
  align-items: start;
  padding-bottom: var(--sp-16);
}

.stage { grid-area: stage; }
.sidebar { grid-area: side; }
.content { grid-area: content; }

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "stage"
      "side"
      "content";
    row-gap: var(--sp-6);
  }

  /* 1024–1080 之间侧栏不再 sticky：单列下 sticky 会压在内容上 */
  .sidebar { position: static; }
}

/* ============================== 3D 舞台 ============================== */

.stage__head {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.stage__h {
  font-size: var(--fs-20);
  line-height: var(--lh-snug);
}

.stage__meta {
  flex: none;
  color: var(--label);
  font-size: var(--fs-13);
  font-variant-numeric: tabular-nums;
}

/* canvas 容器：aspect-ratio 先占位，WebGL 初始化时不会把页面顶下去（H4 裁决） */
.stage__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--r-10);
  background: #000;
  overflow: hidden;
  /* 画布内只允许 canvas 自己接手势，页面滚动不受影响（11 §5 P6） */
  touch-action: pan-y;
}

.stage__canvas {
  position: absolute;
  inset: 0;
}

.stage__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* 拖拽只在画布内接管（A01） */
  touch-action: none;
  cursor: grab;
}

.stage__canvas canvas:active { cursor: grabbing; }

/* 无 WebGL / 无 JS 的静态降级：与 canvas 同一块区域，不改变页面高度（CLS 0） */
.stage__fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  background: #000;
}

/* 图吃满剩余高度，说明文字固定在最底下 —— 两者永不重叠 */
.stage__fallback img {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.stage__fallback p {
  padding: var(--sp-3) var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-13);
  line-height: 1.45;
  background: #000;
  border-top: 1px solid var(--border-faint);
}

html[data-webgl="no"] .stage__fallback { display: flex; }
html[data-webgl="no"] .stage__canvas { display: none; }
html[data-webgl="no"] .stage__hint { display: none; }
/* 降级时 HUD 与状态行都在重复图里那句话，收起来（时间看下面城市列表） */
html[data-webgl="no"] .stage__hud { display: none; }
html[data-webgl="no"] .stage__status { display: none; }

/* HUD：LIVE 芯片 + UTC 读数。DOM 文字放在 3D 之上是刻意的 —— 3D 里画字会糊（11 §5.2） */
.stage__hud {
  position: absolute;
  left: var(--sp-3);
  bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding-inline: var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  background: rgba(4, 7, 14, 0.72);
  color: var(--text);
  font-size: 11px;
  font-weight: var(--fw-strong);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}

.chip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
}

.stage__utc {
  font-size: var(--fs-12);
  color: var(--muted);
  background: rgba(4, 7, 14, 0.72);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-4);
  padding: 3px var(--sp-2);
  font-variant-numeric: tabular-nums;
}

.stage__utc time { color: var(--text); }

/* 首访提示：只出现一次，2.4 s 内退干净（11 §0.1「成功」场景的口径） */
.stage__hint {
  position: absolute;
  left: 50%;
  bottom: var(--sp-12);
  transform: translateX(-50%);
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-6);
  background: rgba(4, 7, 14, 0.78);
  border: 1px solid var(--border-faint);
  color: var(--muted);
  font-size: var(--fs-13);
  white-space: nowrap;
  pointer-events: none;
  animation: hint-out var(--dur-5) var(--ease) 2.2s forwards;
}

@keyframes hint-out {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* 不做「循环/位移动画」，但也别把提示永久钉在画布上 */
  .stage__hint { display: none; }
}

.stage__status {
  margin-top: var(--sp-2);
  min-height: 1.4em; /* 状态文字变化不引起位移（G01 加载态） */
  color: var(--label);
  font-size: var(--fs-13);
}

.stage__status[data-state="error"] { color: var(--neg); }

.stage__lede {
  margin-top: var(--sp-3);
  max-width: var(--prose);
  color: var(--muted);
  font-size: var(--fs-16);
}

@media (max-width: 860px) {
  /* H10 裁决：移动端画布 52vh，正好把城市条留在首屏 */
  .stage__frame {
    aspect-ratio: auto;
    /* H10 的 52vh 是按 640 px 视口算的；在 844 px 视口上 52vh 会把城市条挤出首屏。
       clamp 让矮屏保持 52vh，高屏封顶 380 px —— 两种视口首屏都能看到城市时间。 */
    height: clamp(240px, 46vh, 380px);
    min-height: 240px;
    border-radius: var(--r-8);
  }
  .stage__head { display: none; }
  .stage__hint { bottom: var(--sp-8); font-size: var(--fs-12); }
  .stage__lede { font-size: var(--fs-15); }
}

/* 舞台在移动端把标题放到画布之后：DOM 顺序仍 H2 → canvas → 状态 → 说明，
   视觉顺序改成 canvas → 状态 → 标题 → 说明，让首屏第一眼就是地球（H10 的 52vh 预算）。 */
@media (max-width: 860px) {
  .stage { display: flex; flex-direction: column; }
  .stage__frame { order: 1; }
  .stage__status { order: 2; margin-top: var(--sp-2); }
}

/* ============================== 侧栏：城市 12 城 ============================== */

.sidebar {
  position: sticky;
  top: calc(64px + var(--sp-4));
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.cities {
  padding: var(--sp-4);
  background: var(--panel-bg);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-10);
  box-shadow: var(--panel-shadow);
}

.cities__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: var(--sp-2);
}

.cities__title {
  font-size: var(--fs-15);
  font-weight: var(--fw-strong);
  letter-spacing: -0.01em;
}

.cities__note {
  color: var(--label);
  font-size: var(--fs-12);
}

.cities__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cities__list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 34px;
  padding: 3px var(--sp-2) 3px 6px;
  margin-inline: calc(var(--sp-2) * -1);
  border-radius: var(--r-6);
  border-left: 1px solid transparent;
  transition: var(--tx-color);
}

.cities__list > li:hover { background: rgba(255, 255, 255, 0.025); }

/* 用户的本地时区：一条 1px 的琥珀线 + 极淡底（不做 2px 彩条，那是卡片的廉价做法） */
.cities__list > li[data-home="true"] {
  border-left-color: var(--accent);
  background: var(--accent-tint);
}

.city__link {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  line-height: 1.2;
}

/* src/main.js 重渲染时用的类名（.cities__name / .cities__meta），
   样式必须与静态 HTML 的 .city__name / .city__zone 对齐，否则刷新一瞬会跳。 */
.cities__name,
.city__name {
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 站内城市页链接：默认不画下划线，hover/focus 才给（避免 12 行同时带下划线的"模板感"）。
   原选择器被一行注释切断，导致 `.city__name` 永久带下划线 —— n14 整合时修正。 */
.city__link:hover .city__name,
.city__link:focus-visible .city__name { text-decoration: underline; }

.cities__meta,
.city__zone {
  color: var(--label);
  font-size: 11px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.city__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.city__icon {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--day);
}

.city__icon[data-phase="night"] { color: var(--night); }

.city__time {
  font-size: var(--fs-15);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  min-width: 4.2ch; /* --:-- 宽度预留，JS 填入时不推动布局（H4） */
  text-align: right;
}

.city__delta {
  min-width: 2ch;
  color: var(--label);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.city__delta[data-sign="+"] { color: var(--pos); }
.city__delta[data-sign="-"] { color: var(--neg); }

.cities__foot {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border-faint);
  color: var(--label);
  font-size: var(--fs-12);
}

/* 时间轴控件区（C 块渲染）。骨架期给一块 48px 高的占位，避免拿到控件后跳动。 */
.timeline-slot {
  min-height: 48px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px dashed var(--border-faint);
  border-radius: var(--r-8);
  color: var(--label);
  font-size: var(--fs-12);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

@media (max-width: 1080px) {
  .sidebar { gap: var(--sp-3); }
  /* 移动端：城市条横滑，一行城市不占两屏高（H7：首屏至少看见一个城市时间） */
  .cities { padding: var(--sp-3); }
  .cities__list {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: var(--sp-1);
    scrollbar-width: thin;
  }
  .cities__list > li {
    flex: 0 0 auto;
    scroll-snap-align: start;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2px;
    min-height: 58px;
    min-width: 108px;
    margin-inline: 0;
    padding: var(--sp-2);
    border-left: 0;
    border-top: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
  }
  .cities__list > li[data-home="true"] {
    border-top-color: var(--accent);
    background: var(--accent-tint);
  }
  .city__right { gap: 4px; }
  .city__delta { display: none; }
  .timeline-slot { display: none; }
}

/* ==========================================================================
   A8 返工（2026-11）：375×667 首屏必须看见城市时间（需求 H7）
   --------------------------------------------------------------------------
   实测（CDP，真 375×667 / dpr2 / 触摸模拟）：改前 `#cities` 块 top=618.2，
   `#city-list > li[0]` top=680.2、card 高 87.3 —— 视口 667，差 13.2 px，可见 0/12 城。
   13 px 不是"差一点"，因为城市条是横滑卡片，光露出 13 px 等于什么都没看见。
   所以预算不是补 13 px，而是让**第一张卡（87.3 px）整张进首屏**：需要让 top ≤ 580。
   逐项省（全部只作用于 ≤860，桌面 1440×900 走不到这里）：
     hero 上下 padding 24/12 → 16/8            −12
     h1 line-height 1.2 → 1.15（两行）         −2.2
     副标题 margin-top 8 → 6                   −2
     按钮组 margin-top 12 → 8                  −4
     canvas 46vh → 36vh（306.8 → 240.1）       −66.7
     状态行 margin-top 8 → 6                   −2
     栅格 row-gap 24 → 12                      −12
     城市卡 padding 12 → 10 / 头部 margin 8 → 6 −6
                                         合计 ≈ −107 → 首行 top ≈ 573，整卡 ≈ 660（<667）
   canvas 仍占 240 px（36vh）> 34vh 的下限，地球仍是首屏第一眼；H10 的"地球优先"不变。
   ========================================================================== */
@media (max-width: 860px) {
  .hero { padding-top: var(--sp-4); padding-bottom: var(--sp-2); }
  .hero h1 { line-height: 1.15; }
  .hero__sub { margin-top: 6px; }
  .hero__actions { margin-top: var(--sp-2); }

  .stage__frame {
    /* A8：52vh（H10）→ 46vh（n14）→ 36vh。屏幕只有 667 px 时，城市活数据比多出来的
       66 px 球面更有价值；宽屏/高屏仍由 clamp 的上限 380 px 兜住。 */
    height: clamp(200px, 36vh, 380px);
    min-height: 200px;
  }
  .stage__status { margin-top: 6px; }

  .layout { row-gap: var(--sp-3); }

  .cities { padding: 10px; }
  .cities__head { margin-bottom: 6px; }
}

/* ============================== 本地时间 ============================== */

.local-clock {
  display: inline-block;
  margin-right: var(--sp-2);
  color: var(--text);
  font-size: var(--fs-28);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-tight);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.local-clock time { min-width: 4.5ch; display: inline-block; }

.local-zone {
  color: var(--label);
  font-size: var(--fs-13);
  letter-spacing: 0.01em;
}

@media (max-width: 640px) {
  .local-clock { font-size: var(--fs-24); }
}

/* ============================== 正文 ============================== */

.content > section + section,
.content > section + aside,
.content > aside + section {
  margin-top: var(--sp-12);
}

@media (max-width: 860px) {
  .content > section + section,
  .content > section + aside,
  .content > aside + section { margin-top: var(--sp-8); }
}

.section__h {
  font-size: var(--fs-24);
  margin-bottom: var(--sp-3);
}

.section__lede {
  max-width: var(--prose);
  color: var(--muted);
  font-size: var(--fs-17);
}

.section__h + .section__lede { margin-top: 0; }

.prose {
  max-width: var(--prose);
  color: var(--muted);
  font-size: var(--fs-16);
}

.prose p + p { margin-top: var(--sp-3); }

.prose strong,
.prose b {
  color: var(--text);
  font-weight: var(--fw-strong);
}

/* 三步「怎么用」：有序列表 + 悬挂数字，不用卡片格子（craft floor：卡片当结构是懒容器） */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--prose);
}

.steps li {
  position: relative;
  padding-left: var(--sp-8);
  color: var(--muted);
  font-size: var(--fs-16);
}

.steps li + li { margin-top: var(--sp-4); }

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  color: var(--label);
  font-size: var(--fs-13);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.steps b { color: var(--text); font-weight: var(--fw-strong); }

/* 数据表：宽表格自己横滚，不许把整页撑破（L10 / 20-踩坑 · 5） */
.table-wrap {
  overflow-x: auto;
  margin-top: var(--sp-4);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-8);
  background: rgba(255, 255, 255, 0.012);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-15);
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: top;
  padding: var(--sp-3) var(--sp-4);
  color: var(--label);
  font-size: var(--fs-13);
  text-align: left;
}

th,
td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--border-faint);
  white-space: nowrap;
}

thead th {
  color: var(--label);
  font-size: var(--fs-12);
  font-weight: var(--fw-strong);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}

tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

tbody th { font-weight: var(--fw-medium); color: var(--text); }

tbody td { color: var(--muted); }

tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* FAQ：12 条 details —— 语义化折叠，内容始终在 DOM 里（允许爬虫与 JSON-LD 对齐） */
.faq { margin-top: var(--sp-12); }

.faq__list {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border-faint);
}

.faq__item {
  border-bottom: 1px solid var(--border-faint);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  font-size: var(--fs-17);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  transition: var(--tx-color);
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary:hover { color: var(--accent); }

.faq__chev {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--label);
  transition: transform var(--dur-3) var(--ease), color var(--dur-2) var(--ease);
}

.faq__item[open] .faq__chev { transform: rotate(180deg); color: var(--accent); }

.faq__a {
  padding-bottom: var(--sp-6);
  max-width: var(--prose);
  color: var(--muted);
  font-size: var(--fs-16);
}

.faq__a a { color: var(--text); }

/* ============================== 页脚 ============================== */

.site-footer {
  margin-top: var(--sp-16);
  padding-block: var(--sp-8) var(--sp-12);
  border-top: 1px solid var(--border-faint);
  color: var(--label);
  font-size: var(--fs-13);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-8);
}

.footer__note { max-width: 60ch; line-height: 1.6; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-13);
}

.footer__nav a {
  color: var(--muted);
  text-decoration: none;
  transition: var(--tx-color);
}

.footer__nav a:hover { color: var(--text); text-decoration: underline; }

.footer__legal {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-faint);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  justify-content: space-between;
  color: var(--label);
  font-size: var(--fs-12);
}

.footer__legal a { color: var(--label); }

/* ============================== 杂项 ============================== */

/* 行内代码：合规页会出现 Intl / IANA 这类标识符。
   用系统等宽栈（不下载字体），只为让它与正文区分，不做「技术感」装饰。 */
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: var(--r-4);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

/* 图片降级时的 alt 文本（无 WebGL 块的图加载失败也不塌） */
.stage__fallback img { background: #05080f; }

/* 打印：去掉装饰，保留时间与正文（工具站会被打印成会议参考） */
@media print {
  .site-header,
  .ad-slot,
  .stage__frame,
  .hero__actions,
  .footer__nav { display: none !important; }

  body { background: #fff; color: #000; }

  .content { max-width: none; }
}

/* ==========================================================================
   f2 修复层（性能/触控/无障碍实测后补的规则，全部有 f2/ux-probe 的数据来源）
   ========================================================================== */

/* 键盘等价入口：看不见但 Tab 到得了，聚焦时显形。
   为什么需要：3D 里点一下才知道几点，纯键盘用户没有等价的读时间入口（WCAG 2.1.1）。 */
.stage__a11y {
  position: absolute;
  left: var(--sp-2);
  top: var(--sp-2);
  z-index: 4;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.stage__a11y:focus-visible {
  width: auto;
  height: auto;
  padding: 10px 14px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: var(--r-8);
  background: rgba(4, 7, 14, 0.92);
  color: var(--text);
  font-size: var(--fs-13);
  cursor: pointer;
}

/* 触屏：① 竖滑必须能滚页面 ② 点击区 ≥44 px
   实测（f2/ux-probe，390×844 dpr3）：改动前 23/47 个可点元素 <44 px，
   最小的是页脚链接 21 px、城市行链接 30 px；canvas 的 touch-action 是 none，
   落在 52vh 地球上的竖滑完全滚不动页面。 */
@media (pointer: coarse) {
  /* 横滑转地球，竖滑滚页面：交给浏览器分配手势，pointercancel 会结束这次拖拽 */
  .stage__canvas,
  .stage__canvas canvas { touch-action: pan-y; }

  .city__link {
    min-height: 44px;
    justify-content: center;
    padding-block: 6px;
  }
  .btn { height: auto; min-height: 44px; }
  .site-header a,
  .footer__nav a,
  .footer__legal a,
  .skip-link { display: inline-flex; align-items: center; min-height: 44px; }

  /* 命中区补宽（n15）：只补高度的话，「FAQ」(25px) /「About」(36px) /「Terms」(37px)
     仍然是 25×44 这种窄条 —— 实测 scripts/a11y-check.mjs 判定为 <44px。
     文字链接本身宽度由字决定，用 min-width + 居中把命中区撑到 44×44。 */
  .site-header a,
  .footer__nav a,
  .footer__legal a { min-width: 44px; justify-content: center; }

  /* 字号地板（n15）：LIVE 芯片原来 11px，390px 宽屏上肉眼发虚；移动端抬到 12px。 */
  .chip { font-size: 12px; }
  /* 页脚整块链接密排时也保证每个命中区：多出来的高度靠 flex 居中吃掉 */
  .footer__nav,
  .footer__legal { row-gap: 0; }

  /* 触屏设备关掉毛玻璃：手机 GPU 弱，sticky header 的 backdrop-filter 每帧都要重模糊，
     软件渲染下实测一项就值 410 ms（f2：/tmp/wc3d-nofx 对照，FCP 2,508 → 2,096 ms）。
     用实色替回去，颜色值取自原 blurred 背景的等效叠加（视觉差 <5%）。 */
  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(4, 7, 14, 0.96);
  }
  .stage__poster__meter {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(4, 7, 14, 0.86);
  }
}
