/* 共时·凌空 v6 — 整体扁平视觉体系
   气质参考精致的深色信息层级与细分割、干净留白，不是 iOS 仿制品。
   三套轨道任务的重量级差异用字号、字距、色温和圆角区分，不用加厚边框。 */

:root {
  --hud: #f5f7fa;
  --hud-dim: rgba(245, 247, 250, 0.62);
  --hud-faint: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.12);
  --hair: rgba(255, 255, 255, 0.12);
  --hair-strong: rgba(255, 255, 255, 0.20);
  --bg: #050506;
  --bar: rgba(8, 10, 13, 0.86);
  --panel: rgba(10, 12, 16, 0.64);
  --brand: #32d7cf;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --blue: #0a84ff;
  --cyan: #64d2ff;
  --yellow: #ffd60a;
  --purple: #bf5af2;
  --on: #f5f7fa;
  --off: #2a2e33;
  --throttled: #b8c0c8;
  --danger: #ff453a;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC",
    "Segoe UI", system-ui, sans-serif;
  --bottom-h: clamp(104px, 12.5vh, 142px);
  --ctrl-h: 40px;
  --radius: 8px;
  --radius-sm: 6px;
}

html, body, #app {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1, "kern" 1;
}

/* ——— 取消旧顶栏占位：模块入口已到扁平底栏 ——— */
#moduleBar { display: none !important; }
body.module-orbit #app,
body:not(.module-twin) #app,
body.module-twin #app {
  position: absolute;
  inset: 0;
  top: 0;
}
body.module-twin #app {
  visibility: hidden;
  pointer-events: none;
}
body.module-twin #hudControls,
body.module-twin #hudHotzone {
  visibility: visible;
  pointer-events: auto;
}
#moduleTwin {
  top: 0;
  bottom: var(--ctrl-h);
}

/* ======================== 扁平底栏 / 码头 ======================== */
#hudControls,
.hud-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: var(--ctrl-h);
  min-height: var(--ctrl-h);
  max-height: var(--ctrl-h);
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--bar);
  border-top: 1px solid var(--hair);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--hud);
  pointer-events: auto;
}
#hudControls::-webkit-scrollbar { height: 0; }
.hud-dock {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  height: 100%;
  width: max-content;
  padding: 0 10px;
  transform-origin: left center;
  box-sizing: border-box;
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px 0 0;
  background: none;
  border: 0;
  flex: 0 0 auto;
}
.brand-mini img { width: 16px; height: 16px; border-radius: 3px; }
.brand-mini span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--hud);
  white-space: nowrap;
}

.dock-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.dock-lab {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: var(--hud-dim);
  padding: 0 6px 0 4px;
  white-space: nowrap;
}
.dock-rule {
  width: 1px;
  height: 16px;
  background: var(--hair-strong);
  flex: 0 0 auto;
  margin: 0 4px;
  display: inline-block;
}

.btn,
.seg button,
.dock-group button {
  appearance: none;
  height: 26px;
  padding: 0 10px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hud);
  font: 600 11.5px/1 var(--font);
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, filter 0.15s ease;
}
.btn:hover,
.seg button:hover,
.dock-group button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  filter: brightness(1.06);
}
.btn.on,
.seg button.on,
.dock-group button.on,
.dock-group button.active,
#btnModuleOrbit.on {
  background: #fff;
  color: #111;
  border: 0;
  box-shadow: none;
}
.btn.primary {
  background: var(--blue);
  color: #fff;
  border: 0;
}
#btnMute.on {
  background: var(--red);
  color: #fff;
  border: 0;
}
#btnClass,
#btnHangar,
#btnBoard { background: rgba(10, 132, 255, 0.18); color: var(--cyan); }
#btnClass.on,
#btnHangar.on,
#btnBoard.on { background: var(--blue); color: #fff; }
#speedSeg button.on { background: var(--yellow); color: #111; }
#camSeg button.on { background: var(--cyan); color: #111; }
#btnReset { background: rgba(255, 255, 255, 0.10); }
#btnSkipWait:not([hidden]) {
  color: #e8c37a;
  border: 0;
  background: rgba(232, 195, 122, 0.12);
}
/* class/hangar/board on-state set above */

.seg {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 1px;
  border: 0;
}
.seg button {
  border: 0 !important;
  border-radius: 5px;
  height: 24px;
  padding: 0 7px;
  margin: 0;
}
.seg button:last-child { border-right-width: 0; }
.seg.wrap {
  flex-wrap: nowrap;
  background: transparent;
  padding: 0;
  gap: 1px;
}
.seg.wrap button { margin: 0; }

/* 发射按钮：仍然单独成形，但去掉立体光晕与超大圆形 */
.btn-launch,
#btnLaunch.btn-launch {
  appearance: none;
  width: auto;
  min-width: 56px;
  height: 26px;
  margin: 0 2px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #ff9f0a;
  color: #1a1004;
  font: 700 12px/1 var(--font);
  letter-spacing: 0.10em;
  box-shadow: none;
  text-shadow: none;
  flex: 0 0 auto;
}
.btn-launch:hover { filter: brightness(1.08); }
.btn-launch.is-armed {
  animation: launchpulse 1.8s ease-in-out infinite;
  background: #ff9f0a;
  color: #1a1004;
}
.btn-launch.is-flight,
.btn-launch.is-count {
  background: var(--red);
  color: #fff;
  box-shadow: none;
  font-size: 11px;
}
.btn-launch.is-done,
.btn-launch:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hud-dim);
  box-shadow: none;
  animation: none;
}
@keyframes launchpulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

body.module-twin .dock-orbit { display: none !important; }
body.module-twin .brand-mini span { opacity: 0.7; }

body.hud-autohide #hudControls {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
body.hud-autohide.hud-peek #hudControls,
body.hud-autohide #hudControls.show {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
body.module-twin.hud-autohide #hudControls {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
#hudHotzone {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 12px;
  z-index: 39;
}

/* ======================== 底栏仪表 / 时间轴 ======================== */
.hud-bottom {
  height: var(--bottom-h);
  bottom: var(--ctrl-h);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(5, 6, 8, 0.55) 36%, rgba(5, 6, 8, 0.88) 100%);
  padding: 0 16px 4px;
  border: 0;
  box-shadow: none;
}
.eng-bezel,
.att-bezel,
.earth-bezel {
  border: 1px solid var(--hair);
  box-shadow: none;
  background: rgba(8, 10, 14, 0.55);
}
.eng-bezel { width: 108px; height: 108px; }
.eng-bezel.s2,
.att-bezel,
.earth-bezel { width: 108px; height: 108px; }
.eng-dot {
  /* Unlit: cold metal. Do not use the global --on (near-white) for ignition. */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}
.eng-dot.on {
  background: #ff4a1a;
  box-shadow:
    0 0 6px 1px rgba(255, 90, 20, 0.95),
    0 0 12px rgba(255, 60, 0, 0.75),
    inset 0 0 3px rgba(255, 220, 120, 0.9);
}
.eng-dot.throttled {
  background: #c43a14;
  box-shadow:
    0 0 5px 1px rgba(220, 70, 16, 0.75),
    0 0 8px rgba(180, 50, 0, 0.5),
    inset 0 0 2px rgba(255, 180, 80, 0.55);
}

.hb-left, .hb-right { align-items: center; }
.hb-left .eng-bezel,
.hb-left .att-bezel { width: 108px; height: 108px; }
.att-bezel .n-mark { display: none; }
.eng-cluster { position: relative; }
#engS1Wrap .eng-cap {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 2px;
}
.dock-model {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px;
  gap: 0;
}
.dock-model .dock-lab {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.dock-model button {
  background: transparent;
  border-radius: 999px;
}
.hb-right { align-items: center; }
.hb-right .eng-bezel.s2,
.hb-right .earth-bezel { width: 108px; height: 108px; }
#engS2Wrap .eng-cap { display: none; }
.eng-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
}
.eng-cap {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--hud-dim, rgba(238,241,244,0.72));
  text-shadow: 0 1px 6px #000;
  white-space: nowrap;
  line-height: 1.2;
}
.eng-bezel.heavy {
  width: 128px;
  height: 128px;
}
.eng-bezel.heavy .eng-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.eng-bezel.heavy .eng-dot.on {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #ff4a1a;
  box-shadow:
    0 0 7px 2px rgba(255, 90, 20, 1),
    0 0 14px rgba(255, 50, 0, 0.85),
    inset 0 0 2px rgba(255, 230, 140, 0.95);
}
.eng-bezel.heavy .eng-dot.throttled {
  width: 6.5px;
  height: 6.5px;
  margin: -3.25px 0 0 -3.25px;
  background: #c43a14;
  box-shadow:
    0 0 5px 1px rgba(220, 70, 16, 0.85),
    0 0 10px rgba(180, 50, 0, 0.55),
    inset 0 0 2px rgba(255, 180, 80, 0.6);
}
.eng-bezel.mid {
  width: 96px;
  height: 96px;
}
.eng-bezel.mid .eng-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
}
.eng-bezel.s2.quiet,
.eng-bezel.s2.heavy-s2 {
  width: 72px;
  height: 72px;
  opacity: 0.92;
}
.eng-bezel.s2.quiet .eng-dot,
.eng-bezel.s2.heavy-s2 .eng-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  opacity: 0.7;
}
.eng-bezel.s2.quiet .eng-dot.on,
.eng-bezel.s2.heavy-s2 .eng-dot.on {
  opacity: 1;
  background: #ff4a1a;
  box-shadow:
    0 0 6px 1px rgba(255, 90, 20, 0.95),
    0 0 10px rgba(255, 60, 0, 0.7),
    inset 0 0 2px rgba(255, 220, 120, 0.85);
}
.eng-bezel.s2.quiet .eng-dot.throttled,
.eng-bezel.s2.heavy-s2 .eng-dot.throttled {
  opacity: 1;
  background: #c43a14;
}
.hud-bottom.has-heavy {
  /* 远征一级 33 台表盘比默认 80px 大，底栏要让得下 */
  min-height: 148px;
}
body.eng-heavy {
  --bottom-h: clamp(148px, 16vh, 186px);
}

.eng-map {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 8px 4px 14px;
}
.eng-map-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.eng-map-cluster.s2 { opacity: 0.92; }
.eng-map-cap {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--hud-dim, rgba(238,241,244,0.8));
}
.eng-map-bezel.eng-bezel.heavy {
  width: 168px;
  height: 168px;
}
.eng-map-bezel.eng-bezel.heavy .eng-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
}
.eng-map-bezel.eng-bezel.heavy .eng-dot.on {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: #ff4a1a;
  box-shadow:
    0 0 8px 2px rgba(255, 90, 20, 1),
    0 0 14px rgba(255, 50, 0, 0.85),
    inset 0 0 2px rgba(255, 230, 140, 0.95);
}
.eng-map-bezel.eng-bezel.heavy .eng-dot.throttled {
  width: 7.5px;
  height: 7.5px;
  margin: -3.75px 0 0 -3.75px;
  background: #c43a14;
}
.eng-map-bezel.eng-bezel.s2 {
  width: 96px;
  height: 96px;
}
.eng-map-bezel.eng-bezel.s2 .eng-dot {
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
}

.gauge { width: 108px; height: 108px; aspect-ratio: 1 / 1; position: relative; }
.gauge .gauge-arc { width: 100%; height: 100%; display: block; }
.gauge .dial-face { fill: rgba(0, 0, 0, 0.45); stroke: rgba(255,255,255,0.16); stroke-width: 1; }
.gauge .arc-bg { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 7; stroke-linecap: round; }
.gauge .arc-fg { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; }
#gaugeSpeed .arc-fg { stroke: var(--cyan); }
#gaugeAlt .arc-fg { stroke: var(--blue); }
.gauge-read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 6px; }
.gauge-lab {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--hud-dim);
}
.gauge-num {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.gauge-unit {
  font-size: 8px;
  letter-spacing: 0.10em;
  font-weight: 500;
  color: var(--hud-dim);
}
.arc-fg { stroke-width: 2.2; }
#timeline .arc { stroke: var(--hair-strong); stroke-width: 1.1; }
#timeline .arc-now { stroke: #fff; stroke-width: 1.4; }
#timeline .lab {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  fill: var(--hud-dim);
}
.clock-center .t-digits {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.clock-center .t-sign {
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.mission-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--hud-dim);
}

/* ======================== 顶栏：时钟、加注、任务名 ======================== */
.hud-tl { top: 12px; left: 16px; }
.clock-chip {
  clip-path: none;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 5px 12px 4px;
  gap: 8px;
  box-shadow: none;
}
.t-sign { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; }
.t-digits {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.mission-name {
  margin-top: 6px;
  padding-left: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--hud-dim);
}
.mission-en {
  padding-left: 2px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: rgba(243, 245, 247, 0.40);
}
.fuel-strip {
  margin-top: 12px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 0;
  border-radius: var(--radius);
  padding: 8px 10px;
  width: 188px;
  box-shadow: none;
}
.fuel-hd {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.fuel-kv strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#dataTicker {
  height: 20px;
  line-height: 20px;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
  background: linear-gradient(90deg, transparent, rgba(8, 10, 14, 0.55), transparent);
}

/* ======================== 顶部半透明飞行 HUD ======================== */
#flightHud {
  top: 8px;
  left: 200px;
  right: 140px;
  gap: 8px;
}
.fh-chip,
.fh-tools {
  background: rgba(8, 10, 14, 0.52);
  border: 0;
  box-shadow: none;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(14px);
}
.fh-chip { padding: 4px 9px 3px; min-width: 72px; }
.fh-chip span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--hud-dim);
}
.fh-chip strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.fh-tools { padding: 3px 8px; font-size: 10px; }
.fh-tools input { accent-color: var(--brand); }

/* ======================== 快捷切箭 ======================== */
#fleetBar {
  top: 78px;
  left: 16px;
  gap: 6px;
}
.fleet-pills { gap: 6px; }
.fleet-pill {
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 0;
  background: rgba(8, 10, 14, 0.52);
  backdrop-filter: blur(14px);
  font: 500 12px/1 var(--font);
  letter-spacing: 0.03em;
  box-shadow: none;
  gap: 7px;
}
.fleet-pill i { width: 7px; height: 7px; }
.fleet-pill.lk2 i { background: #6fe0d4; }
.fleet-pill.moon i { background: #d4c4ff; }
.fleet-pill.mars i { background: #ff8a4a; }
.fleet-pill.on {
  box-shadow: none;
  filter: none;
  background: rgba(255, 255, 255, 0.94);
  color: #111;
}
.fleet-pill.lk2.on i { background: #128f84; }
.fleet-pill.moon.on i { background: #6b56b3; }
.fleet-pill.mars.on i { background: #c4561c; }
.sound-mode { font-size: 10px; font-weight: 500; gap: 6px; }
.sound-mode select {
  background: transparent;
  color: var(--hud);
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  padding: 2px 2px;
  font: 500 11px var(--font);
  border-radius: 0;
}

/* ======================== 分屏框 ======================== */
.split-lane { border-left: 1px solid var(--hair); }
.split-lane.on {
  outline: 1px solid var(--brand);
  outline-offset: -1px;
}
.lane-hud {
  background: rgba(8, 10, 14, 0.50);
  backdrop-filter: blur(12px);
  border: 0;
  border-left: 2px solid var(--lane, var(--brand));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
}
.lane-hud strong { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
#cutToast, #switchToast {
  background: rgba(8, 12, 16, 0.78);
  backdrop-filter: blur(14px);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  box-shadow: none;
}

/* ======================== 字幕 ======================== */
#subs {
  bottom: calc(var(--bottom-h) + var(--ctrl-h) + 10px);
}
.sub-zh {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
.sub-en {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: rgba(243, 245, 247, 0.62);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
.lesson-line {
  bottom: calc(var(--bottom-h) + var(--ctrl-h) + 86px);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ======================== 右侧飞行看板 + 指针仪表 ======================== */
.dash,
#dash.dash {
  top: 8px;
  right: 8px;
  bottom: calc(var(--bottom-h) + var(--ctrl-h) + 8px);
  width: min(332px, 30vw);
  background: rgba(9, 11, 15, 0.62);
  backdrop-filter: blur(18px) saturate(1.05);
  border: 0;
  box-shadow: none;
  border-radius: var(--radius);
  color: var(--hud);
}
.dash-hd {
  height: 34px;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid var(--hair);
  background: none;
}
.dash-hd h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  flex: 1;
}
.dash-live {
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.14em;
  background: #5ee29a;
  color: #062014;
  padding: 1px 5px;
  border-radius: 3px;
  animation: livePulse 1.6s ease-in-out infinite;
}
.dash-scroll { padding: 4px 8px 10px; }
.icon-x {
  appearance: none;
  width: 22px; height: 22px;
  border: 0;
  background: transparent;
  color: var(--hud-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.icon-x:hover { color: var(--hud); background: rgba(255,255,255,0.06); }

.prime-reads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 12px;
  margin: 0 0 6px;
  padding: 6px 2px 8px;
  border-bottom: 1px solid var(--hair);
}
.prime-reads .read {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
  min-height: 22px;
}
.prime-reads .read span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--hud-dim);
}
.prime-reads .read strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--hud);
}
.prime-reads .read em {
  font-style: normal;
  font-size: 9px;
  font-weight: 500;
  color: var(--hud-dim);
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.gauges-grid {
  gap: 2px;
  margin: 0 0 6px;
  background: none;
  border: 0;
}
.gauges-prime { margin-bottom: 4px; }
.gauges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  align-items: center;
  justify-items: center;
}
.gauge-dial {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 148px;
  margin: 0 auto;
  position: relative;
}
.gauges-prime .gauge-dial,
.gauges-more .gauge-dial,
.gauge-dial canvas,
.gauges-prime canvas,
.gauges-more canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: 1 / 1;
  display: block;
}

.layer-card,
.orbit-block,
.mission-board,
.transfer-board,
.station-board {
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
  margin: 0 0 2px;
  padding: 8px 2px 6px;
  border-top: 1px solid var(--hair) !important;
  border-radius: 0;
}
.layer-kicker {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--hud-dim);
  margin-bottom: 2px;
}
.layer-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.layer-en {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 1px 0 4px;
}
.layer-hint {
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(243, 245, 247, 0.78);
  margin-bottom: 6px;
}
.layer-stack {
  height: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
  border-radius: 2px;
  overflow: hidden;
}
.atm-grid { gap: 4px 10px; }
.atm-cell {
  background: none;
  border: 0;
  padding: 2px 0;
}
.atm-cell span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--hud-dim);
}
.atm-cell strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.orbit-grid,
.science-row {
  gap: 4px 10px;
  font-size: 12px;
}
.chart-toggle {
  border: 0;
  border-top: 1px solid var(--hair);
  background: none;
  padding: 7px 2px;
  letter-spacing: 0.08em;
  font-weight: 500;
  font-size: 11px;
  color: var(--hud-dim);
  margin: 0;
  border-radius: 0;
}
.chart-toggle.on { color: var(--hud); }

/* ======================== 仓库 / 设计抽屉 ======================== */
.drawer,
.drawer-left,
#hangar {
  background: rgba(9, 11, 15, 0.82);
  backdrop-filter: blur(20px) saturate(1.05);
  border: 0;
  box-shadow: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.drawer {
  bottom: calc(var(--bottom-h) + var(--ctrl-h) + 10px);
}
.drawer-hd {
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--hair);
  background: none;
  display: flex;
  align-items: center;
}
.drawer-hd h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.drawer-note, .hint-line {
  font-size: 12px;
  line-height: 1.5;
  color: var(--hud-dim);
}
.hangar-tabs {
  border-bottom: 1px solid var(--hair);
  gap: 0;
  background: none;
}
.hangar-tabs button {
  appearance: none;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hud-dim);
  font: 500 12px/1 var(--font);
  letter-spacing: 0.03em;
}
.hangar-tabs button.on {
  background: transparent;
  color: var(--hud);
  box-shadow: inset 0 -1px 0 #fff;
}
.hangar-pane { padding: 10px 14px 16px; }
.series-card,
.sat-card,
.part-card {
  border: 0 !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: var(--radius-sm) !important;
}
.series-card .weight-tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.field > span {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.field strong { font-weight: 600; }
.totals strong { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }

/* ======================== 课堂讲解 ======================== */
#classPanel {
  background: rgba(9, 11, 15, 0.78);
  backdrop-filter: blur(18px);
  border: 0;
  box-shadow: none;
  border-radius: var(--radius);
  padding: 12px 14px 14px;
}
.class-hd {
  letter-spacing: 0.10em;
  font-size: 10px;
  font-weight: 500;
  color: var(--hud-dim);
}
.class-hd em { color: #e8c37a; }
#classTitle {
  margin: 8px 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.class-zh { font-size: 13px; line-height: 1.55; }
.class-en { font-size: 11px; line-height: 1.45; color: var(--hud-dim); }
.class-formula {
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  border-radius: var(--radius-sm);
}
.class-still {
  border: 0;
  border-radius: var(--radius-sm);
  height: 100px;
}
.class-mini {
  background: rgba(9, 11, 15, 0.62);
  border: 0;
  border-radius: var(--radius-sm);
}

/* ======================== 回顾面板 ======================== */
#recapMask { background: rgba(0, 0, 0, 0.42); }
#recapCard {
  background: rgba(12, 14, 18, 0.88);
  backdrop-filter: blur(22px);
  border: 0;
  box-shadow: none;
  border-radius: 12px;
  padding: 22px 24px 18px;
  width: min(680px, 90vw);
}
#recapCard .end-kicker,
.recap-kicker, #recapCard .end-kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--hud-dim);
}
#recapTitle {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 6px 0 10px;
}
.recap-grid { gap: 6px 20px; margin: 10px 0; font-size: 13px; }
.recap-grid div span {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--hud-dim);
}
.recap-grid div strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.end-quote { font-size: 14px; line-height: 1.55; font-weight: 500; }
.end-en { font-size: 11.5px; color: var(--hud-dim); }
.recap-actions { gap: 8px; margin-top: 14px; }
.recap-actions .btn {
  height: 28px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hud);
}
.recap-actions .btn.primary,
.recap-actions .btn-primary {
  background: #fff;
  color: #111;
}

/* ======================== 警告红灯 / 紧急 / 失败卡 ======================== */
#emergencyMask .em-pulse,
.em-pulse {
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(226, 75, 75, 0.35);
  animation: emflash 0.8s ease-in-out infinite;
}
@keyframes emflash {
  0%, 100% { background: rgba(180, 16, 16, 0.05); box-shadow: inset 0 0 0 1px rgba(226, 75, 75, 0.28); }
  50% { background: rgba(180, 16, 16, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 110, 110, 0.7); }
}
#emergencyMask .em-card,
.em-card {
  background: rgba(18, 8, 8, 0.88);
  backdrop-filter: blur(18px);
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  padding: 18px 20px;
}
.em-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #ff8a8a;
}
.em-actions .btn {
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  color: #fff;
  padding: 0 12px;
  height: 28px;
}
.em-actions .btn.primary { background: #c42a2a; color: #fff; }
#failCard, #endCard {
  background: rgba(12, 14, 18, 0.88);
  backdrop-filter: blur(18px);
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

/* 发动机指示灯：扁平色点，故障时干净的红 */
.eng-dot.warn,
.eng-dot.fail,
.eng-dot.out,
.eng-dot.off.warn,
.eng-bezel.heavy .eng-dot.warn,
.eng-bezel.heavy .eng-dot.fail,
.eng-bezel.heavy .eng-dot.out,
.eng-map-bezel.eng-bezel.heavy .eng-dot.warn,
.eng-map-bezel.eng-bezel.heavy .eng-dot.fail {
  background: var(--danger);
  box-shadow: none;
}
body.emergency-on .dash,
body.emergency-on #subs,
body.emergency-on .clock-chip {
  /* keep readable; no thick red frames */
  box-shadow: none;
}

/* ======================== 三套轨道任务的重量级差异（仍扁平） ======================== */
body.theme-lk2 {
  --radius: 4px;
  --radius-sm: 3px;
}
body.theme-lk2 .dash { width: min(312px, 28vw); }
body.theme-lk2 .dash-hd h2,
body.theme-lk2 .mission-name { letter-spacing: 0.06em; }
body.theme-lk2 .fh-chip,
body.theme-lk2 .fleet-pill,
body.theme-lk2 .clock-chip { border-radius: 3px; }
body.theme-lk2 .prime-reads .read strong { font-size: 16px; }

body.theme-moon {
  --radius: 10px;
  --radius-sm: 8px;
  --hud-dim: rgba(236, 230, 214, 0.62);
}
body.theme-moon #dash { width: min(348px, 32vw); }
body.theme-moon .dash-hd h2 {
  letter-spacing: 0.12em;
  font-size: 12.5px;
  font-weight: 600;
}
body.theme-moon .layer-kicker,
body.theme-moon .mission-name { color: #e8d5a3; letter-spacing: 0.10em; }
body.theme-moon .fh-chip,
body.theme-moon .fleet-pill,
body.theme-moon .clock-chip { border-radius: 10px; }
body.theme-moon .prime-reads .read strong { font-size: 17px; }
body.theme-moon #fleetBar { top: 84px; }

body.theme-mars {
  --radius: 6px;
  --radius-sm: 5px;
}
body.theme-mars #dash { width: min(372px, 34vw); }
body.theme-mars .dash-hd h2 {
  letter-spacing: 0.10em;
  font-size: 13px;
  font-weight: 650;
}
body.theme-mars .layer-kicker { color: #ffb080; letter-spacing: 0.12em; }
body.theme-mars .prime-reads .read strong,
body.theme-mars .fh-chip strong,
body.theme-mars .t-digits {
  color: #ffd4b0;
  font-size: 19px;
  font-weight: 650;
}
body.theme-mars .t-digits { font-size: 26px; }
body.theme-mars .atm-cell strong { font-size: 17px; }
body.theme-mars .layer-name { font-size: 22px; }

/* 旧的厚面板描边一律收掉（主题里若还有加框） */
.dash, .drawer, .fuel-strip, .clock-chip {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-color: transparent;
}

/* ======================== 模型火箭模块：同一套扁平气质 ======================== */
#moduleTwin {
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: none;
  --panel: rgba(10, 16, 26, 0.62);
  --panel-solid: rgba(12, 18, 28, 0.88);
  font-family: var(--font);
}
#moduleTwin #mrApp {
  padding: 8px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  background:
    radial-gradient(1000px 500px at 70% 0%, rgba(9, 39, 101, 0.35), transparent 60%),
    var(--ink, #070b14);
}
#moduleTwin .topbar {
  min-height: 36px;
  gap: 8px;
  padding: 0 4px;
}
#moduleTwin .panel,
#moduleTwin .summary,
#moduleTwin aside.panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 0;
  box-shadow: none;
  border-radius: var(--radius);
}
#moduleTwin .panel-hd,
#moduleTwin .telem .mission-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: var(--muted, #8b9bb4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: none;
  padding: 8px 10px 6px;
}
#moduleTwin .kv .v,
#moduleTwin .mission-clock {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
#moduleTwin .btn,
#moduleTwin .chip,
#moduleTwin .modes button {
  border: 0;
  box-shadow: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
#moduleTwin .btn-primary,
#moduleTwin .btn.btn-primary {
  background: #ff7a2a;
  color: #fffaf4;
  box-shadow: none;
  border: 0;
  border-radius: 7px;
  height: 32px;
  letter-spacing: 0.08em;
  font-weight: 650;
}
#moduleTwin .pill {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
#moduleTwin .banner {
  background: rgba(8, 10, 14, 0.50);
  border: 0;
  border-radius: var(--radius-sm);
}
#moduleTwin .summary {
  border: 0;
  box-shadow: none;
}
#moduleTwin .overlay .count-num {
  font-weight: 600;
  letter-spacing: -0.04em;
}

#moduleTwin .design-sum {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--text, #e8eef8);
  padding: 8px 0 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
}
#moduleTwin .design-sum strong {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* 告警：用字色和轻底，不用厚红框描边字幕 */
body.emergency-on #subs,
body.emergency-on .dash,
body.emergency-on .clock-chip {
  outline: none;
  box-shadow: none;
}
body.emergency-on #subs .sub-zh { color: #ffd0d0; }
body.emergency-on #subs {
  background: rgba(80, 12, 12, 0.28);
  border-radius: 8px;
  padding: 6px 12px;
}

/* 设计模式腾出右侧空间，方案摘要始终可见 */
#moduleTwin.mode-design .side > .panel[aria-label="飞行记录"] { display: none; }
#moduleTwin.mode-design .panel.grow { display: flex; flex-direction: column; min-height: 0; }
#moduleTwin.mode-design .panel.grow .design-grid { flex: 1; min-height: 0; overflow: auto; }
#moduleTwin.mode-design #mr-designSum {
  position: sticky;
  bottom: 0;
  background: rgba(12, 18, 28, 0.94);
  padding: 8px 0 10px;
  z-index: 2;
}

/* 告警大字：更扁、字距收紧，不再铺满半个画面 */
.event-banner {
  top: 16%;
  font-size: clamp(16px, 2.1vw, 26px);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  max-width: min(780px, 70vw);
  line-height: 1.35;
}


.key-slow-flag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1a1400;
  font: 700 11px/1 var(--font);
  letter-spacing: 0.04em;
  flex: 0 0 auto;
  white-space: nowrap;
}
.key-slow-flag[hidden],
.key-slow-chip[hidden] { display: none !important; }
.fh-chip.key-slow-chip { background: rgba(255, 214, 10, 0.2); }
.fh-chip.key-slow-chip span { color: var(--yellow); }
.fh-chip.key-slow-chip strong { color: var(--yellow); }
body.key-slow #speedSeg button.on { outline: 2px solid var(--yellow); }

.layer-name { color: var(--cyan); }
.c-temp strong, #atmTemp { color: var(--orange); }
.c-pres strong, #atmPres { color: var(--blue); }
.c-rho strong { color: var(--purple); }
.c-cs strong { color: var(--yellow); }
#rClosed { font-weight: 700; }
.prime-reads .read strong { color: var(--hud); }
.prime-reads .read:nth-child(1) strong { color: var(--blue); }
.prime-reads .read:nth-child(2) strong { color: var(--cyan); }
.prime-reads .read:nth-child(3) strong { color: var(--orange); }
.prime-reads .read:nth-child(4) strong { color: var(--yellow); }
.payload-row[data-st="operating"] strong { color: var(--green); }
.payload-row[data-st="separated"] strong { color: var(--yellow); }
.payload-row[data-st="recovered"] strong { color: var(--green); }
.payload-row[data-st="reentry"] strong { color: var(--orange); }
body.theme-lk2 { --brand: #32d7cf; }
body.theme-moon { --brand: #e8d5a3; }
body.theme-mars { --brand: #ff9f0a; }
