/* ============================================================
   ORBITAL SWEEPER — 界面样式
   深空蓝黑 + 青色/琥珀科技感；纯本地、无外部字体资源。
   ============================================================ */

:root {
  --bg: #03060c;
  --panel: rgba(7, 17, 28, 0.82);
  --panel-deep: rgba(4, 11, 20, 0.92);
  --panel-soft: rgba(12, 30, 47, 0.72);
  --cyan: #6ce8ff;
  --cyan-soft: rgba(108, 232, 255, 0.55);
  --cyan-dim: rgba(108, 232, 255, 0.18);
  --amber: #ffb454;
  --amber-soft: rgba(255, 180, 84, 0.6);
  --green: #63ffb0;
  --green-soft: rgba(99, 255, 176, 0.6);
  --red: #ff5f6d;
  --red-soft: rgba(255, 95, 109, 0.6);
  --text: #dfeaff;
  --muted: #8498ad;
  --line: rgba(108, 232, 255, 0.22);
  --line-strong: rgba(108, 232, 255, 0.45);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Menlo", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  cursor: grab;
}
#scene-canvas:active { cursor: grabbing; }

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

/* ============================================================
   加载屏
   ============================================================ */
#loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 60% at 50% 42%, rgba(10, 30, 48, 0.85), rgba(3, 6, 12, 1) 70%),
    #03060c;
  transition: opacity 0.65s ease;
}
#loading.done { opacity: 0; pointer-events: none; }
#loading.error { background: #0a0608; }

.loading-inner { text-align: center; width: min(520px, 82vw); }
.loading-logo {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  text-shadow: 0 0 26px rgba(108, 232, 255, 0.55);
}
.loading-logo span { color: var(--cyan); font-size: 26px; vertical-align: top; margin-left: 4px; }
.loading-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.5em;
  margin: 10px 0 4px;
  color: #e9f6ff;
}
.loading-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.62em;
  color: var(--cyan-soft);
  margin-bottom: 44px;
}
.loading-bar {
  width: 100%;
  height: 2px;
  background: rgba(108, 232, 255, 0.14);
  overflow: hidden;
}
.loading-bar-fill {
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), #fff);
  animation: loading-slide 1.3s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
.loading-status {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-soft);
  min-height: 18px;
}
.loading-hint {
  margin-top: 44px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(132, 152, 173, 0.65);
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #03060c;
  color: var(--red);
  font-family: var(--font-mono);
  z-index: 300;
}

/* ============================================================
   HUD 通用
   ============================================================ */
#hud-root { position: absolute; inset: 0; pointer-events: none; z-index: 10; }

.hud {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.hud.visible { opacity: 1; }
.hud.hidden { opacity: 0; }

.hud-panel {
  position: relative;
  background: linear-gradient(160deg, rgba(9, 22, 36, 0.86), rgba(4, 10, 18, 0.78));
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(108, 232, 255, 0.035);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 13px 15px 14px;
}
.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--cyan-soft);
  border-style: solid;
  pointer-events: none;
}
.hud-panel::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.hud-panel::after { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; }

.hud-top-left { position: absolute; top: 18px; left: 18px; width: 306px; }
.hud-top-right {
  position: absolute; top: 18px; right: 18px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.hud-bottom-left { position: absolute; bottom: 18px; left: 18px; width: 306px; }
.hud-bottom-right { position: absolute; bottom: 18px; right: 18px; }

/* 任务面板 */
.mission-eyebrow {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--cyan); text-transform: uppercase;
  border-bottom: 1px solid rgba(108, 232, 255, 0.14);
  padding-bottom: 7px; margin-bottom: 9px;
}
.mission-eyebrow span { white-space: nowrap; }
.mission-eyebrow .dim { color: rgba(132, 152, 173, 0.8); letter-spacing: 0.08em; }
.mission-title {
  font-size: 19px; font-weight: 650; letter-spacing: 0.06em; color: #eef8ff;
  margin-bottom: 9px;
}
.mission-objective {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; color: #bcd2e6; margin-bottom: 8px;
}
.mission-objective .label,
.mission-sat .label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}
.mission-progress { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.mission-progress .bar { flex: 1; }
.mission-progress .mono { font-size: 11px; color: var(--cyan); }
.mission-sat {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: #bcd2e6; margin-bottom: 4px;
}
.mission-sat .mono { color: var(--green); }
.timer-block { margin-top: 11px; border-top: 1px solid rgba(108, 232, 255, 0.14); padding-top: 9px; }
.timer {
  font-size: 30px; font-weight: 600; letter-spacing: 0.08em; color: #eaf8ff;
  line-height: 1; text-shadow: 0 0 18px rgba(108, 232, 255, 0.25);
}
.timer.danger { color: var(--red); text-shadow: 0 0 20px rgba(255, 95, 109, 0.55); animation: timer-pulse 1s infinite; }
@keyframes timer-pulse { 50% { opacity: 0.55; } }
.timer-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--muted); margin-top: 4px; text-transform: uppercase;
}

/* 资金 */
.money-panel { min-width: 190px; text-align: right; }
.money-label {
  display: block; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.2em; color: var(--muted); margin-bottom: 3px;
}
.money-value { font-size: 23px; color: var(--amber); letter-spacing: 0.04em; text-shadow: 0 0 16px rgba(255, 180, 84, 0.25); }
.money-value small { font-size: 10px; color: rgba(255, 180, 84, 0.65); margin-left: 4px; letter-spacing: 0.1em; }
.mini-panel {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  color: var(--muted); padding: 6px 10px;
}

/* 仪表 */
.systems-panel { padding: 14px 15px; }
.gauge-row {
  display: grid; grid-template-columns: 66px 1fr 82px;
  align-items: center; gap: 9px; margin-bottom: 9px;
}
.gauge-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
}
.gauge-value { font-size: 10px; color: #dcecf9; text-align: right; white-space: nowrap; }
.bar {
  position: relative; height: 6px; background: rgba(108, 232, 255, 0.09);
  border: 1px solid rgba(108, 232, 255, 0.12); overflow: hidden;
}
.bar.slim { height: 4px; }
.bar-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, rgba(108, 232, 255, 0.5), var(--cyan));
  transition: width 0.25s linear, background 0.3s;
  box-shadow: 0 0 10px rgba(108, 232, 255, 0.45);
}
.bar-fill.cyan { background: linear-gradient(90deg, rgba(108, 232, 255, 0.45), var(--cyan)); }
.bar-fill.amber { background: linear-gradient(90deg, rgba(255, 180, 84, 0.45), var(--amber)); box-shadow: 0 0 10px rgba(255, 180, 84, 0.4); }
.bar-fill.green { background: linear-gradient(90deg, rgba(99, 255, 176, 0.4), var(--green)); box-shadow: 0 0 10px rgba(99, 255, 176, 0.4); }
.bar-fill.low { background: linear-gradient(90deg, rgba(255, 95, 109, 0.45), var(--red)); box-shadow: 0 0 10px rgba(255, 95, 109, 0.45); }

.cargo-row { display: flex; align-items: center; gap: 9px; margin: 2px 0 9px; }
.cargo-pips { display: flex; gap: 4px; flex: 1; }
.cargo-pips i {
  display: block; width: 16px; height: 9px;
  border: 1px solid rgba(108, 232, 255, 0.3);
  background: rgba(108, 232, 255, 0.06);
  transition: background 0.2s, box-shadow 0.2s;
}
.cargo-pips i.on { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px rgba(255, 180, 84, 0.55); }
.cargo-pips i.full { background: var(--red); border-color: var(--red); box-shadow: 0 0 9px rgba(255, 95, 109, 0.65); }
.speed-row {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(108, 232, 255, 0.12); padding-top: 9px;
  font-size: 11px; color: #cfe4f4;
}

/* 雷达 */
.radar-panel { position: relative; width: 200px; }
#radar {
  display: block; width: 200px; height: 200px;
  border-radius: 50%;
  filter: drop-shadow(0 0 22px rgba(24, 90, 130, 0.35));
}
.radar-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 7px; font-family: var(--font-mono); font-size: 8px;
  letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase;
  border-top: 1px solid rgba(108, 232, 255, 0.14); padding-top: 6px;
}
.radar-depot {
  display: flex; align-items: center; gap: 7px;
  margin-top: 5px; font-size: 9px; letter-spacing: 0.1em; color: rgba(190, 225, 205, 0.82);
}
.radar-depot i {
  width: 6px; height: 6px; background: transparent;
  border: 1px solid var(--green); transform: rotate(45deg);
}
.radar-depot[data-state="window"] { color: var(--amber); }
.radar-depot[data-state="window"] i { border-color: var(--amber); }
.radar-depot[data-state="ready"] { color: var(--green); }
.radar-depot[data-state="ready"] i { background: var(--green); box-shadow: 0 0 8px rgba(99, 255, 176, 0.7); }

/* 相机模式 / 姿态 */
.mode-panel {
  color: var(--cyan-soft);
  border-color: rgba(108, 232, 255, 0.3);
}
.attitude-row {
  display: grid; grid-template-columns: 66px 1fr auto;
  align-items: center; gap: 9px; margin: 2px 0 9px;
}
.attitude-horizon {
  position: relative; height: 16px;
  border: 1px solid rgba(108, 232, 255, 0.16);
  background:
    linear-gradient(90deg, transparent 49.4%, rgba(108, 232, 255, 0.18) 49.4%, rgba(108, 232, 255, 0.18) 50.6%, transparent 50.6%),
    rgba(6, 18, 28, 0.6);
  overflow: hidden;
}
.ah-line {
  position: absolute; left: -40%; right: -40%; top: 50%;
  height: 1px; transform-origin: center;
  background: linear-gradient(90deg, transparent, rgba(108, 232, 255, 0.85), transparent);
  transition: transform 0.08s linear;
}
.ah-dot {
  position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border: 1px solid var(--cyan); border-radius: 50%;
  background: rgba(108, 232, 255, 0.2);
}
.attitude-row .gauge-value { font-size: 9px; color: #bcd5e6; }

/* 自动规划提示条 */
.auto-hint {
  position: absolute; left: 50%; bottom: 66px;
  transform: translateX(-50%) translateY(5px);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--amber); opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  padding: 4px 12px;
  background: rgba(4, 13, 22, 0.72);
  border: 1px solid rgba(255, 180, 84, 0.22);
}
.auto-hint.visible { opacity: 0.9; transform: translateX(-50%) translateY(0); }

/* 自动规划面板 */
.autopilot-panel {
  position: absolute; left: 18px; top: 286px;
  width: 306px;
  padding: 12px 14px 11px;
  background: linear-gradient(160deg, rgba(9, 26, 40, 0.9), rgba(4, 13, 22, 0.86));
  border: 1px solid rgba(255, 180, 84, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 0 26px rgba(255, 180, 84, 0.035);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 3;
}
.autopilot-panel.visible { opacity: 1; transform: translateY(0); }
.autopilot-panel::before {
  content: ""; position: absolute; left: -1px; top: -1px;
  width: 14px; height: 14px;
  border: 1.5px solid var(--amber-soft); border-width: 1.5px 0 0 1.5px;
}
.ap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ap-kicker {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--amber); white-space: nowrap;
}
.ap-target {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ap-phase-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: #ffe9c8; margin-bottom: 6px;
}
.ap-phase-row .mono { font-size: 10px; color: var(--amber); }
.ap-bar {
  height: 4px; background: rgba(255, 180, 84, 0.1);
  border: 1px solid rgba(255, 180, 84, 0.18); margin-bottom: 9px;
}
.ap-bar-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, rgba(255,180,84,.55), var(--amber));
  box-shadow: 0 0 8px rgba(255, 180, 84, 0.5);
  transition: width 0.15s linear;
}
.ap-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px;
  margin-bottom: 7px;
}
.ap-stats div { display: flex; justify-content: space-between; gap: 6px; font-size: 9px; color: var(--muted); }
.ap-stats strong { font-size: 10px; color: #e9f5ff; font-weight: 500; }
.ap-hint {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.1em;
  color: rgba(132, 152, 173, 0.75); border-top: 1px solid rgba(255, 180, 84, 0.12);
  padding-top: 7px;
}

/* 准星 */
.crosshair {
  position: absolute; left: 50%; top: 50%;
  width: 42px; height: 42px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.9;
  transition: filter 0.15s;
}
.crosshair-ring {
  position: absolute; inset: 8px;
  border: 1px solid rgba(220, 240, 255, 0.55);
  border-radius: 50%;
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: crosshair-spin 12s linear infinite;
}
@keyframes crosshair-spin { to { transform: rotate(360deg); } }
.crosshair-dot {
  position: absolute; left: 50%; top: 50%;
  width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px;
  background: rgba(220, 240, 255, 0.9);
  border-radius: 50%;
}
.crosshair[data-state="ready"] .crosshair-ring { border-color: var(--green); filter: drop-shadow(0 0 6px rgba(99, 255, 176, 0.8)); }
.crosshair[data-state="ready"] .crosshair-dot { background: var(--green); }
.crosshair[data-state="window"] .crosshair-ring { border-color: var(--amber); }
.crosshair[data-state="window"] .crosshair-dot { background: var(--amber); }
.crosshair[data-state="danger"] .crosshair-ring { border-color: var(--red); animation-duration: 4s; }
.crosshair[data-state="danger"] .crosshair-dot { background: var(--red); }

/* 目标标记 */
.target-marker {
  position: absolute; left: 0; top: 0;
  width: 128px; height: 128px;
  transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s;
  z-index: 4;
}
.target-marker.visible { opacity: 1; }
.tm-corners { position: absolute; inset: 0; }
.tm-corners i {
  position: absolute; width: 18px; height: 18px;
  border-color: rgba(220, 245, 255, 0.8); border-style: solid;
  filter: drop-shadow(0 0 4px rgba(108, 232, 255, 0.45));
}
.tm-corners i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.tm-corners i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.tm-corners i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.tm-corners i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
.tm-label {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  white-space: nowrap; text-align: center;
  padding-top: 6px;
}
.tm-label strong {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  color: #eef8ff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.tm-label .mono {
  display: block; font-size: 10px; color: rgba(200, 225, 245, 0.85); margin-top: 2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.tm-state {
  display: inline-block; margin-top: 5px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em;
  padding: 2px 7px; border: 1px solid rgba(108, 232, 255, 0.35);
  color: var(--cyan); background: rgba(5, 15, 24, 0.72);
}
.target-marker[data-state="far"] .tm-state { color: var(--muted); border-color: rgba(132, 152, 173, 0.35); }
.target-marker[data-state="window"] .tm-state { color: var(--cyan); border-color: rgba(108, 232, 255, 0.45); }
.target-marker[data-state="ready"] .tm-corners i { border-color: var(--green); filter: drop-shadow(0 0 6px rgba(99, 255, 176, 0.6)); }
.target-marker[data-state="ready"] .tm-state { color: #04150d; background: var(--green); border-color: var(--green); }
.target-marker[data-state="too-fast"] .tm-corners i,
.target-marker[data-state="cargo-full"] .tm-corners i,
.target-marker[data-state="low-battery"] .tm-corners i { border-color: var(--red); }
.target-marker[data-state="too-fast"] .tm-state,
.target-marker[data-state="cargo-full"] .tm-state,
.target-marker[data-state="low-battery"] .tm-state { color: var(--red); border-color: rgba(255, 95, 109, 0.55); }

/* 空间站标记 */
.station-marker {
  position: absolute; left: 0; top: 0;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.station-marker.visible { opacity: 1; }
.sm-icon {
  width: 15px; height: 15px; margin: 0 auto;
  border: 1.5px solid rgba(99, 255, 176, 0.85);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(99, 255, 176, 0.35);
  background: rgba(5, 20, 14, 0.5);
}
.sm-label { text-align: center; white-space: nowrap; padding-top: 7px; }
.sm-label strong {
  display: block; font-size: 11px; color: #dfffe9; letter-spacing: 0.06em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.sm-label .mono { display: block; font-size: 9px; color: rgba(190, 235, 210, 0.8); margin-top: 2px; }
.station-marker[data-state="window"] .sm-icon { border-color: var(--amber); }
.station-marker[data-state="ready"] .sm-icon {
  border-color: var(--green); background: var(--green);
  box-shadow: 0 0 18px rgba(99, 255, 176, 0.75);
  animation: dock-pulse 1.1s infinite;
}
@keyframes dock-pulse { 50% { box-shadow: 0 0 4px rgba(99, 255, 176, 0.4); } }

/* 屏幕外箭头 */
.edge-arrow {
  position: absolute; left: 0; top: 0;
  opacity: 0; transform: translate(-50%, -50%);
  z-index: 5; pointer-events: none;
  transition: opacity 0.2s;
}
.edge-arrow.visible { opacity: 0.95; }
.edge-arrow span {
  display: block;
  font-size: 20px; color: var(--amber);
  text-shadow: 0 0 12px rgba(255, 180, 84, 0.75);
}

/* 捕获进度 */
.capture-readout {
  position: absolute; left: 50%; bottom: 152px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0; transition: opacity 0.15s;
}
.capture-readout.active { opacity: 1; }
.capture-ring {
  width: 54px; height: 54px; border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--p, 0) * 1turn), rgba(108, 232, 255, 0.1) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  filter: drop-shadow(0 0 8px rgba(108, 232, 255, 0.5));
}
.capture-readout[data-tone="green"] .capture-ring {
  background: conic-gradient(var(--green) calc(var(--p, 0) * 1turn), rgba(99, 255, 176, 0.1) 0);
  filter: drop-shadow(0 0 8px rgba(99, 255, 176, 0.5));
}
.capture-label {
  font-size: 9px; letter-spacing: 0.22em; color: var(--cyan);
  text-shadow: 0 0 10px rgba(108, 232, 255, 0.5);
}
.capture-readout[data-tone="green"] .capture-label { color: var(--green); }

/* 提示条 */
.prompt {
  position: absolute; left: 50%; bottom: 96px;
  transform: translateX(-50%) translateY(8px);
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  background: linear-gradient(180deg, rgba(8, 22, 36, 0.9), rgba(4, 11, 20, 0.85));
  border: 1px solid var(--line);
  font-size: 13px; letter-spacing: 0.05em; color: #d8ecfa;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.prompt.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.prompt[data-tone="green"] { border-color: rgba(99, 255, 176, 0.4); color: #e2fff0; }
.prompt[data-tone="amber"] { border-color: rgba(255, 180, 84, 0.4); color: #ffe9c8; }
.prompt[data-tone="danger"] { border-color: rgba(255, 95, 109, 0.45); color: #ffe1e4; }
.prompt-key {
  display: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  padding: 3px 7px; border: 1px solid var(--cyan-soft); color: var(--cyan);
  background: rgba(108, 232, 255, 0.08);
}
.prompt.has-key .prompt-key { display: inline-block; }
.prompt[data-tone="green"] .prompt-key { color: var(--green); border-color: var(--green-soft); }
.prompt[data-tone="danger"] .prompt-key { color: var(--red); border-color: var(--red-soft); }

/* 警告 */
.warnings {
  position: absolute; left: 50%; top: 92px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.warning-chip {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--red); border: 1px solid rgba(255, 95, 109, 0.45);
  background: rgba(30, 7, 12, 0.72); padding: 4px 12px;
  animation: warning-blink 1.6s infinite;
}
@keyframes warning-blink { 50% { opacity: 0.55; } }

/* Toast */
.toasts {
  position: absolute; right: 20px; top: 196px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  width: min(330px, 34vw);
}
.toast {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(160deg, rgba(8, 24, 38, 0.94), rgba(4, 12, 20, 0.92));
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  font-size: 12px; line-height: 1.55; color: #dceeff;
  animation: toast-in 0.28s ease;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.toast.out { opacity: 0; transform: translateX(16px); }
.toast-success { border-left-color: var(--green); color: #e2fff0; }
.toast-danger { border-left-color: var(--red); color: #ffe2e5; }
.toast-amber { border-left-color: var(--amber); color: #fff0d8; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } }

/* 关卡开场 */
.wave-intro {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; text-align: center;
  background: radial-gradient(50% 42% at 50% 50%, rgba(3, 9, 16, 0.55), transparent 70%);
}
.wave-intro.active { animation: wave-intro 3.4s ease forwards; }
@keyframes wave-intro {
  0% { opacity: 0; }
  12% { opacity: 1; }
  76% { opacity: 1; }
  100% { opacity: 0; }
}
.wi-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.36em;
  color: var(--cyan-soft); margin-bottom: 16px;
}
.wi-title {
  font-size: clamp(38px, 5vw, 62px); font-weight: 700; letter-spacing: 0.1em;
  color: #f0faff; text-shadow: 0 0 40px rgba(108, 232, 255, 0.35);
}
.wi-sub {
  margin-top: 14px; font-size: 13px; letter-spacing: 0.16em; color: var(--amber);
}

/* 控制提示 */
.control-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 14px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: rgba(160, 184, 204, 0.82); white-space: nowrap;
  flex-wrap: wrap; justify-content: center;
  width: min(860px, 84vw);
  padding: 6px 16px;
  background: linear-gradient(180deg, rgba(3, 10, 18, 0.58), rgba(3, 8, 14, 0.32));
  border: 1px solid rgba(108, 232, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.control-hint b { color: rgba(200, 228, 245, 0.85); font-weight: 600; }

/* 屏幕效果 */
.vignette, .scanlines, .damage-vignette {
  position: absolute; inset: 0; pointer-events: none;
}
.vignette {
  background: radial-gradient(80% 80% at 50% 50%, transparent 55%, rgba(0, 2, 6, 0.55) 100%);
  z-index: 2;
}
.scanlines {
  z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
  opacity: 0.55;
}
.damage-vignette {
  z-index: 4;
  background: radial-gradient(75% 75% at 50% 50%, transparent 50%, rgba(255, 40, 60, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.1s linear;
}

/* ============================================================
   全屏界面
   ============================================================ */
#screens-root { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.screen-layer { position: absolute; inset: 0; }
.screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(2, 5, 10, 0.88) 0%, rgba(2, 5, 10, 0.48) 45%, rgba(2, 5, 10, 0.82) 100%),
    radial-gradient(60% 70% at 50% 50%, rgba(5, 16, 27, 0.55), rgba(2, 5, 10, 0.9));
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
  overflow: auto;
}
.screen.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* 标题屏透过更多 3D 背景，让地球弧线与碎片场可见 */
.screen[data-screen="title"] {
  background:
    linear-gradient(90deg, rgba(2, 5, 10, 0.93) 0%, rgba(2, 5, 10, 0.8) 30%, rgba(2, 5, 10, 0.16) 64%, rgba(2, 5, 10, 0.34) 100%),
    radial-gradient(90% 95% at 60% 60%, rgba(4, 13, 22, 0.12), rgba(2, 5, 10, 0.55));
}

.screen-inner { width: min(1120px, 94vw); margin: auto; }

.panel {
  position: relative;
  background: linear-gradient(165deg, rgba(8, 21, 34, 0.94), rgba(4, 11, 20, 0.92));
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), inset 0 0 60px rgba(108, 232, 255, 0.025);
  padding: clamp(24px, 3.4vw, 44px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 26px; height: 26px;
  border-color: var(--cyan-soft); border-style: solid; pointer-events: none;
}
.panel::before { left: -1px; top: -1px; border-width: 1.5px 0 0 1.5px; }
.panel::after { right: -1px; bottom: -1px; border-width: 0 1.5px 1.5px 0; }
.panel.wide { width: 100%; }

.kicker {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.28em;
  color: var(--cyan-soft); text-transform: uppercase; margin-bottom: 10px;
}
.kicker.danger { color: var(--red); }
.screen h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.7vw, 36px); font-weight: 650; letter-spacing: 0.04em;
  color: #f0f9ff;
}
.screen h3 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  color: var(--cyan-soft); text-transform: uppercase;
  margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(108, 232, 255, 0.14);
}
.screen-head { margin-bottom: 22px; }
.screen-head .subline {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 11px; letter-spacing: 0.06em; color: var(--muted);
}
.screen-head .story { margin: 10px 0 0; color: #b9d0e4; font-size: 13px; line-height: 1.7; max-width: 760px; }
.screen-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid rgba(108, 232, 255, 0.14);
}
.foot-hint { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

/* 按钮 */
.btn {
  appearance: none;
  position: relative;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  color: #cfe6f6;
  background: rgba(14, 36, 55, 0.55);
  border: 1px solid rgba(108, 232, 255, 0.28);
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn:hover {
  background: rgba(24, 58, 84, 0.75);
  border-color: var(--cyan-soft);
  color: #f2fcff;
  box-shadow: 0 0 22px rgba(108, 232, 255, 0.16);
}
.btn:active { transform: translateY(1px); }
.btn kbd {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em;
  color: var(--muted); border: 1px solid rgba(108, 232, 255, 0.25);
  padding: 2px 5px; margin-left: 10px; vertical-align: 1px;
}
.btn-primary {
  background: linear-gradient(120deg, rgba(28, 120, 156, 0.55), rgba(14, 54, 78, 0.75));
  border-color: var(--cyan-soft);
  color: #eafcff;
  box-shadow: 0 0 26px rgba(108, 232, 255, 0.14), inset 0 0 24px rgba(108, 232, 255, 0.08);
}
.btn-primary:hover {
  background: linear-gradient(120deg, rgba(42, 160, 200, 0.68), rgba(20, 76, 108, 0.85));
  box-shadow: 0 0 34px rgba(108, 232, 255, 0.26);
}
.btn-danger { border-color: rgba(255, 95, 109, 0.4); color: #ffc9cf; }
.btn-danger:hover { background: rgba(70, 18, 24, 0.6); border-color: var(--red); box-shadow: 0 0 22px rgba(255, 95, 109, 0.2); }
.btn-ghost { background: transparent; border-color: rgba(132, 152, 173, 0.28); color: var(--muted); }
.btn-ghost:hover { color: #dceeff; border-color: rgba(132, 152, 173, 0.55); background: rgba(20, 40, 56, 0.35); }
.btn:disabled {
  opacity: 0.38; cursor: not-allowed; box-shadow: none;
  background: rgba(14, 24, 34, 0.5); border-color: rgba(132, 152, 173, 0.2);
}

/* 标题屏 */
.title-screen {
  position: relative;
  width: min(1120px, 92vw);
  padding-left: clamp(0px, 3vw, 40px);
}
.title-kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3em;
  color: var(--cyan-soft); margin-bottom: 24px;
}
.title-kicker .dot {
  width: 6px; height: 6px; background: var(--green); border-radius: 50%;
  box-shadow: 0 0 12px var(--green); animation: dot-pulse 1.8s infinite;
}
@keyframes dot-pulse { 50% { opacity: 0.3; } }
.title-lockup { position: relative; }
.title-logo {
  font-family: var(--font-mono);
  font-size: clamp(88px, 13.5vw, 190px);
  font-weight: 700; line-height: 0.86; letter-spacing: -0.055em;
  background: linear-gradient(180deg, #f4fdff 8%, #93dff4 46%, #2d8ba8 92%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 44px rgba(80, 200, 240, 0.22));
}
.title-logo-sub {
  font-size: 0.18em; letter-spacing: 0.08em; color: var(--amber);
  -webkit-text-fill-color: var(--amber);
  margin-left: 0.3em; vertical-align: 0.9em;
}
.title-cn {
  margin: 14px 0 6px;
  font-size: clamp(30px, 4.2vw, 52px); font-weight: 650;
  letter-spacing: 0.34em; color: #eefaff;
  text-shadow: 0 0 40px rgba(108, 232, 255, 0.2);
}
.title-en {
  font-family: var(--font-mono); font-size: clamp(11px, 1.2vw, 14px);
  letter-spacing: 0.62em; color: var(--amber-soft); margin-bottom: 30px;
}
.title-tagline {
  max-width: 560px;
  font-size: 14px; line-height: 2; letter-spacing: 0.03em;
  color: #b9d1e4; margin: 0 0 34px;
}
.title-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 42px; }
.title-actions .btn-primary { padding: 14px 30px; font-size: 14px; letter-spacing: 0.12em; }
.title-meta {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  color: rgba(132, 152, 173, 0.65); margin-bottom: 16px;
}
.title-footer {
  display: flex; align-items: center; gap: 24px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  color: rgba(132, 152, 173, 0.5);
}
.title-footer .btn { padding: 5px 10px; font-size: 9px; }

/* 简报 */
.brief-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; }
.brief-col h3 { margin-top: 0; }
.brief-line {
  font-size: 13px; line-height: 1.9; color: #c6dcee; margin: 0 0 8px;
  padding-left: 14px; position: relative;
}
.brief-line::before { content: ""; position: absolute; left: 0; top: 11px; width: 5px; height: 5px; background: var(--cyan); }
.brief-note {
  display: flex; gap: 10px; margin-top: 20px; padding: 12px 14px;
  border: 1px solid rgba(255, 180, 84, 0.3);
  background: rgba(255, 180, 84, 0.05);
  font-size: 12px; line-height: 1.7; color: #ffe9c8;
}
.note-mark {
  flex: 0 0 18px; height: 18px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  color: #1c1206; background: var(--amber);
}
.control-table { display: flex; flex-direction: column; gap: 1px; }
.control-row {
  display: grid; grid-template-columns: 116px 1fr; align-items: center;
  gap: 12px; padding: 7px 0;
  border-bottom: 1px solid rgba(108, 232, 255, 0.08);
  font-size: 12px; color: #b9cfe2;
}
.control-row .key {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--cyan); border: 1px solid rgba(108, 232, 255, 0.25);
  padding: 3px 6px; text-align: center; white-space: nowrap;
}

/* 暂停 */
.pause-panel { width: min(480px, 100%); margin: 0 auto; }
.pause-panel h2 { font-size: 34px; letter-spacing: 0.2em; }
.pause-panel .muted { font-size: 12px; margin-bottom: 24px; }
.pause-actions { display: flex; flex-direction: column; gap: 10px; }
.pause-actions .btn { text-align: left; }

/* 对接报告 */
.dock-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 38px; }
.dock-objective {
  border-left: 1px solid rgba(108, 232, 255, 0.14);
  padding-left: 30px;
}
.dock-kicker { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; color: var(--muted); }
.dock-progress-big {
  font-family: var(--font-mono); font-size: 58px; color: var(--amber); line-height: 1.05;
  margin: 10px 0 2px; letter-spacing: -0.02em;
}
.dock-progress-big span { font-size: 22px; color: var(--muted); }
.dock-progress-label { font-size: 11px; color: var(--muted); letter-spacing: 0.12em; }
.dock-sat { margin-top: 12px; font-size: 12px; color: var(--green); }
.dock-status {
  margin-top: 22px; padding: 10px 14px; font-size: 12px; line-height: 1.6;
  border: 1px solid rgba(99, 255, 176, 0.3); color: #d6ffe9; background: rgba(99, 255, 176, 0.05);
}
.dock-status.pending { border-color: rgba(255, 180, 84, 0.35); color: #ffe9c8; background: rgba(255, 180, 84, 0.05); }

/* 账本 */
.ledger { margin-bottom: 6px; }
.ledger-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 7px 0; font-size: 12px; color: #b9cfe2;
  border-bottom: 1px solid rgba(108, 232, 255, 0.07);
}
.ledger-row .mono { color: #e6f5ff; }
.ledger-row.total {
  border-top: 1px solid rgba(108, 232, 255, 0.2); border-bottom: none;
  margin-top: 4px; padding-top: 11px; font-size: 13px; color: #eefaff;
}
.ledger-row.total .mono { color: var(--amber); }
.ledger-row.dim { color: var(--muted); }
.ledger-head {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 8px;
}

/* 商店 */
.shop-panel .screen-head { margin-bottom: 18px; }
.shop-ledger {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px;
  padding: 16px 18px; margin-bottom: 22px;
  border: 1px solid rgba(108, 232, 255, 0.12);
  background: rgba(3, 10, 18, 0.45);
}
.shop-ledger .ledger-head { grid-column: 1 / -1; }
.shop-ledger .ledger { grid-row: span 4; }
.shop-ledger .shop-money {
  align-self: center; font-family: var(--font-mono); font-size: 12px;
  color: var(--muted); display: flex; flex-direction: column; gap: 6px;
}
.shop-ledger .shop-money span { font-size: 26px; color: var(--amber); }
.shop-upgrades { margin-bottom: 6px; }
.upgrade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upgrade-card {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(108, 232, 255, 0.16);
  background: linear-gradient(150deg, rgba(11, 28, 44, 0.65), rgba(5, 13, 22, 0.6));
  transition: border-color 0.18s, background 0.18s;
}
.upgrade-card:hover { border-color: var(--cyan-soft); background: linear-gradient(150deg, rgba(15, 38, 58, 0.75), rgba(6, 16, 27, 0.7)); }
.upgrade-card.maxed { opacity: 0.72; }
.upgrade-icon {
  grid-row: span 2;
  width: 42px; height: 42px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 22px; color: var(--cyan);
  border: 1px solid rgba(108, 232, 255, 0.3);
  background: rgba(108, 232, 255, 0.06);
  text-shadow: 0 0 14px rgba(108, 232, 255, 0.5);
}
.upgrade-name {
  font-size: 14px; font-weight: 600; color: #eaf8ff;
  display: flex; align-items: center; gap: 10px;
}
.upgrade-short { font-size: 8px; letter-spacing: 0.18em; color: var(--muted); }
.upgrade-desc { font-size: 11px; line-height: 1.55; color: #93aabf; margin-top: 3px; }
.upgrade-effect { font-size: 11px; color: var(--cyan); margin-top: 5px; }
.upgrade-pips { display: flex; gap: 4px; margin-top: 6px; }
.upgrade-pips i { width: 14px; height: 3px; background: rgba(108, 232, 255, 0.16); }
.upgrade-pips i.on { background: var(--cyan); box-shadow: 0 0 8px rgba(108, 232, 255, 0.45); }
.upgrade-card .btn-buy {
  grid-column: 2; justify-self: start; margin-top: 8px;
  padding: 6px 12px; font-size: 10px; letter-spacing: 0.06em;
}
.shop-max {
  grid-column: 2; margin-top: 8px; font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.18em; color: var(--muted);
}
.repair-card .upgrade-icon { color: var(--amber); border-color: rgba(255, 180, 84, 0.35); background: rgba(255, 180, 84, 0.06); }
.repair-card .btn-buy { border-color: rgba(255, 180, 84, 0.35); color: #ffe9c8; }

/* 结局 */
.result-panel { display: grid; grid-template-columns: 260px 1fr; gap: 20px 40px; align-items: center; }
.result-grade-wrap {
  position: relative; grid-row: span 2;
  display: grid; place-items: center; min-height: 260px;
}
.result-grade {
  font-family: var(--font-mono); font-size: 170px; line-height: 1; font-weight: 700;
  color: var(--green); text-shadow: 0 0 60px rgba(99, 255, 176, 0.35);
}
.grade-S .result-grade { color: var(--green); }
.grade-A .result-grade { color: var(--cyan); text-shadow: 0 0 60px rgba(108, 232, 255, 0.35); }
.grade-B .result-grade { color: var(--amber); text-shadow: 0 0 60px rgba(255, 180, 84, 0.3); }
.grade-C .result-grade { color: var(--red); text-shadow: 0 0 60px rgba(255, 95, 109, 0.3); }
.result-grade-ring {
  position: absolute; width: 216px; height: 216px;
  border: 1px solid rgba(108, 232, 255, 0.2); border-radius: 50%;
  box-shadow: inset 0 0 40px rgba(108, 232, 255, 0.07);
}
.result-grade-ring::before {
  content: ""; position: absolute; inset: 18px;
  border: 1px dashed rgba(108, 232, 255, 0.22); border-radius: 50%;
  animation: crosshair-spin 40s linear infinite reverse;
}
.grade-S .result-grade-ring { border-color: rgba(99, 255, 176, 0.28); }
.grade-A .result-grade-ring { border-color: rgba(108, 232, 255, 0.3); }
.grade-B .result-grade-ring { border-color: rgba(255, 180, 84, 0.28); }
.grade-C .result-grade-ring { border-color: rgba(255, 95, 109, 0.28); }
.result-head .kicker { margin-bottom: 8px; }
.result-head h2 { font-size: clamp(26px, 3vw, 40px); }
.result-head .story { color: #c0d6e8; font-size: 13px; line-height: 1.8; margin: 10px 0 0; max-width: 620px; }
.result-stats {
  grid-column: 2; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.result-stat {
  padding: 12px 12px 10px;
  border: 1px solid rgba(108, 232, 255, 0.14);
  background: rgba(4, 13, 22, 0.5);
}
.result-stat span {
  display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.08em;
  margin-bottom: 6px; white-space: nowrap;
}
.result-stat strong { font-size: 17px; font-weight: 600; color: #eaf8ff; }
.result-timeline { grid-column: 1 / -1; margin-top: 8px; border-top: 1px solid rgba(108, 232, 255, 0.12); padding-top: 14px; }
.tl-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  padding: 6px 0; font-size: 12px; color: #a9c0d4;
}
.tl-row span:first-child { color: var(--cyan-soft); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; }
.result-panel .screen-foot { grid-column: 1 / -1; width: 100%; }

/* 失败 */
.fail-panel { width: min(560px, 100%); margin: 0 auto; border-color: rgba(255, 95, 109, 0.25); }
.fail-panel::before, .fail-panel::after { border-color: rgba(255, 95, 109, 0.5); }
.fail-panel h2 { color: #ffe7ea; letter-spacing: 0.12em; }
.fail-reason { font-size: 15px; color: #ffd4d8; line-height: 1.7; margin: 14px 0 6px; }
.fail-panel .muted { font-size: 12px; line-height: 1.7; }
.fail-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.fail-panel .screen-foot { justify-content: flex-end; border-color: rgba(255, 95, 109, 0.16); }

/* 研究档案 */
.archive-panel { max-height: 92vh; display: flex; flex-direction: column; }
.archive-scroll {
  overflow-y: auto; padding-right: 16px; max-height: 60vh; font-size: 12.5px;
  line-height: 1.85; color: #b7cee0; scrollbar-width: thin;
  scrollbar-color: rgba(108, 232, 255, 0.3) transparent;
}
.archive-scroll::-webkit-scrollbar { width: 6px; }
.archive-scroll::-webkit-scrollbar-thumb { background: rgba(108, 232, 255, 0.25); }
.archive-scroll h3 { margin-top: 22px; }
.archive-scroll ul { margin: 0 0 10px; padding: 0; list-style: none; }
.archive-scroll li { position: relative; padding-left: 16px; margin-bottom: 6px; }
.archive-scroll li::before { content: "›"; position: absolute; left: 0; color: var(--cyan); }
.archive-scroll code {
  font-family: var(--font-mono); font-size: 11px; color: var(--amber);
  background: rgba(255, 180, 84, 0.07); padding: 1px 5px; border: 1px solid rgba(255, 180, 84, 0.15);
}
.archive-warning {
  padding: 14px 16px; margin-bottom: 8px;
  border: 1px solid rgba(255, 95, 109, 0.32); background: rgba(255, 95, 109, 0.05);
  color: #ffd9dc; font-size: 12px; line-height: 1.7;
}
.archive-warning strong { color: var(--red); }
.archive-links li { margin-bottom: 7px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .hud-top-left, .hud-bottom-left { width: 268px; }
  .autopilot-panel { width: 268px; top: 278px; }
  .control-hint { gap: 10px; }
  .hud-bottom-right { transform: scale(0.9); transform-origin: bottom right; }
  .toasts { width: min(300px, 30vw); }
  .brief-grid, .dock-grid { grid-template-columns: 1fr; gap: 24px; }
  .dock-objective { border-left: none; padding-left: 0; border-top: 1px solid rgba(108, 232, 255, 0.14); padding-top: 20px; }
  .upgrade-grid { grid-template-columns: 1fr; }
  .shop-ledger { grid-template-columns: 1fr; }
  .result-panel { grid-template-columns: 180px 1fr; }
  .result-grade { font-size: 120px; }
  .result-grade-ring { width: 160px; height: 160px; }
  .result-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .hud-top-left, .hud-bottom-left { width: 220px; }
  .hud-panel { padding: 10px 12px; }
  .mission-title { font-size: 16px; }
  .timer { font-size: 24px; }
  .hud-bottom-right { display: none; }
  .control-hint { display: none; }
  .autopilot-panel { display: none; }
  .toasts { display: none; }
  .prompt { bottom: 20px; white-space: normal; width: 84vw; justify-content: center; text-align: center; }
  .title-cn { letter-spacing: 0.18em; }
  .title-actions { flex-direction: column; align-items: flex-start; }
  .result-panel { grid-template-columns: 1fr; }
  .result-grade-wrap { min-height: 150px; }
  .result-stats { grid-column: 1; grid-template-columns: repeat(2, 1fr); }
  .result-timeline { grid-column: 1; }
  .screen-foot { flex-wrap: wrap; justify-content: flex-end; }
}
