/* ══════════════════════════════════════════════════════════════════════
   VOXEL SPACE STATION — HUD · 深空任务控制台风格
   单文件 CSS（无预处理 / 无外部资源）
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. 设计令牌 ──────────────────────────────────────────────────────── */
:root {
  --bg-0: #04070d; --bg-1: #070d16; --bg-2: #0a1220;
  --ink-hi: #dceaf5; --ink: #a9bccb; --ink-lo: #6d8296;
  --cyan: #59d7ff; --cyan-soft: #8fe7ff; --cyan-dim: rgba(89, 215, 255, 0.16);
  --amber: #ffb454; --green: #5ef2a4; --red: #ff6b7a;
  --panel-bg: linear-gradient(160deg, rgba(13, 26, 40, 0.72), rgba(6, 12, 20, 0.66));
  --panel-border: rgba(89, 215, 255, 0.16);
  --glass-blur: blur(14px) saturate(140%);
  --panel-w-left: 260px; --panel-w-right: 300px; --gutter: 22px;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(0.22, 0.61, 0.24, 1);
}

/* ── 2. 基础重置 / 全局禁滚动 ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; background: var(--bg-0); }
body {
  font-family: var(--sans); color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }

/* ── 3. 应用外壳 / 舞台画布 ───────────────────────────────────────────── */
#app { position: relative; width: 100vw; height: 100vh; overflow: hidden; background: var(--bg-0); }
#stage {
  position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%;
  /* 关键：交给 pointer 事件处理，禁用浏览器默认的触摸滚动/缩放手势 */
  touch-action: none; cursor: grab; outline: none;
}
#stage:active { cursor: grabbing; }

/* ── 4. 启动层（boot） ───────────────────────────────────────────────── */
.boot {
  position: absolute; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(1200px 640px at 50% 28%, rgba(89, 215, 255, 0.10), transparent 62%),
    linear-gradient(rgba(89, 215, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 215, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 70%, #020409);
  background-size: auto, 44px 44px, 44px 44px, auto;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s var(--ease-out);
}
.boot--done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__frame {
  position: relative; width: min(440px, 88vw); padding: 34px;
  border: 1px solid rgba(89, 215, 255, 0.22);
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.72), rgba(4, 8, 14, 0.72));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(89, 215, 255, 0.045);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.boot__brand { display: flex; align-items: center; gap: 14px; }
.boot__glyph {
  position: relative; width: 34px; height: 34px; flex: none;
  border: 1px solid rgba(89, 215, 255, 0.6); transform: rotate(45deg);
  box-shadow: 0 0 16px rgba(89, 215, 255, 0.35), inset 0 0 10px rgba(89, 215, 255, 0.18);
}
.boot__glyph::after { content: ""; position: absolute; inset: 9px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.boot__title {
  font-family: var(--mono); font-size: 20px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-hi);
  text-shadow: 0 0 14px rgba(89, 215, 255, 0.5);
}
.boot__sub { margin: 14px 0 22px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-lo); }
.boot__track {
  position: relative; height: 6px; overflow: hidden;
  border: 1px solid rgba(89, 215, 255, 0.22); background: rgba(89, 215, 255, 0.07);
}
.boot__bar {
  position: relative; height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(89, 215, 255, 0.45), var(--cyan));
  box-shadow: 0 0 14px rgba(89, 215, 255, 0.6); transition: width 0.2s ease;
}
.boot__bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: shimmer 1.6s linear infinite;
}
.boot__meta { display: flex; justify-content: space-between; margin: 10px 2px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-lo); }
#boot-pct { color: var(--cyan); text-shadow: 0 0 8px rgba(89, 215, 255, 0.6); }
.boot__log {
  list-style: none; margin: 0; padding: 10px 12px; max-height: 124px; overflow-y: auto;
  border: 1px solid rgba(89, 215, 255, 0.12); background: rgba(0, 0, 0, 0.34);
  font-family: var(--mono); font-size: 10px; line-height: 1.85; color: var(--ink-lo);
}
.boot__log li::before { content: "▸ "; color: rgba(89, 215, 255, 0.5); }
.boot__log li.ok { color: var(--green); }
.boot__log li.ok::before { content: "✔ "; color: var(--green); }
.boot__log li.warn { color: var(--amber); }
.boot__log li.warn::before { content: "▲ "; color: var(--amber); }

/* ── 5. 不支持提示（fatal） ──────────────────────────────────────────── */
.fatal {
  position: absolute; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(900px 500px at 50% 40%, rgba(255, 180, 84, 0.08), transparent 60%), linear-gradient(180deg, var(--bg-1), var(--bg-0));
}
.fatal__box {
  width: min(480px, 90vw); padding: 30px; text-align: center;
  border: 1px solid rgba(255, 180, 84, 0.4); background: rgba(12, 20, 30, 0.72);
  box-shadow: 0 0 44px rgba(255, 180, 84, 0.14), inset 0 0 30px rgba(255, 180, 84, 0.05);
}
.fatal__box h2 {
  margin: 0 0 12px; font-family: var(--mono); font-size: 16px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--amber); text-shadow: 0 0 12px rgba(255, 180, 84, 0.5);
}
.fatal__box p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink); }

/* ── 6. HUD 框架 / 隐藏淡出 ──────────────────────────────────────────── */
.hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; opacity: 1; transition: opacity 0.35s ease; }
.hud--hidden { opacity: 0; }

/* ── 7. 顶部条 / 品牌 / 遥测 ─────────────────────────────────────────── */
.hud__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  position: relative; width: 30px; height: 30px; flex: none;
  border: 1px solid rgba(89, 215, 255, 0.55); transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(89, 215, 255, 0.3), inset 0 0 8px rgba(89, 215, 255, 0.16);
}
.brand__mark::after { content: ""; position: absolute; inset: 8px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong {
  font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-hi); text-shadow: 0 0 12px rgba(89, 215, 255, 0.45);
}
.brand__text em { font-style: normal; font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-lo); }
.telemetry {
  display: flex; gap: 16px; padding: 8px 14px;
  border: 1px solid var(--cyan-dim);
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.6), rgba(6, 11, 19, 0.6));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(89, 215, 255, 0.04);
  backdrop-filter: blur(8px) saturate(130%); -webkit-backdrop-filter: blur(8px) saturate(130%);
}
.telemetry__item { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 46px; }
.telemetry__item .k { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-lo); }
.telemetry__item .v {
  position: relative; padding-bottom: 5px; font-family: var(--mono); font-size: 14px;
  color: var(--cyan); text-shadow: 0 0 10px rgba(89, 215, 255, 0.6);
}
/* 遥测数值下方 1px 渐变分隔线 */
.telemetry__item .v::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent); opacity: 0.5;
}

/* ── 8. 面板玻璃拟态（含四角 L 形装饰角标） ──────────────────────────── */
.panel {
  position: absolute; z-index: 30;
  background:
    repeating-linear-gradient(0deg, rgba(120, 210, 255, 0.022) 0px, rgba(120, 210, 255, 0.022) 1px, transparent 1px, transparent 4px),
    var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 18px 48px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(89, 215, 255, 0.04);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  pointer-events: auto; user-select: none;
}
.panel > * { position: relative; z-index: 2; }
/* 四角角标：::before 上两角、::after 下两角 */
.panel::before, .panel::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-repeat: no-repeat; opacity: 0.75;
}
.panel::before {
  background-image:
    linear-gradient(var(--cyan), var(--cyan)), linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)), linear-gradient(var(--cyan), var(--cyan));
  background-position: top left, top left, top right, top right;
  background-size: 16px 1px, 1px 16px, 16px 1px, 1px 16px;
}
.panel::after {
  background-image:
    linear-gradient(var(--cyan), var(--cyan)), linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)), linear-gradient(var(--cyan), var(--cyan));
  background-position: bottom left, bottom left, bottom right, bottom right;
  background-size: 16px 1px, 1px 16px, 16px 1px, 1px 16px;
}
.panel--left { top: 88px; left: var(--gutter); width: var(--panel-w-left); animation: panel-in-left 0.5s var(--ease-out) both; }
.panel--right { top: 88px; right: var(--gutter); width: var(--panel-w-right); animation: panel-in-right 0.5s var(--ease-out) both; }
.panel__title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--cyan-dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-hi);
}
.panel__title span { color: var(--cyan); text-shadow: 0 0 10px rgba(89, 215, 255, 0.5); }
.panel__title em { font-style: normal; font-size: 9px; letter-spacing: 0.22em; color: var(--ink-lo); }
.panel__close {
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  font-family: var(--mono); font-size: 14px; line-height: 1; color: var(--ink-lo);
  background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.panel__close:hover { color: var(--cyan); border-color: rgba(89, 215, 255, 0.4); box-shadow: 0 0 10px rgba(89, 215, 255, 0.3); }

/* ── 9. 舱段列表（modlist） ──────────────────────────────────────────── */
.modlist { list-style: none; margin: 0; padding: 4px 0; max-height: 46vh; overflow-y: auto; }
.modlist__item {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 16px;
  cursor: pointer; border-left: 3px solid transparent;
  transition: background-color 0.18s, border-color 0.18s, opacity 0.18s;
}
.modlist__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px rgba(89, 215, 255, 0.8); transition: background-color 0.18s, box-shadow 0.18s; }
.modlist__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-hi); }
.modlist__code { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-lo); }
/* 选中项：左侧发光竖条 */
.modlist__item.is-active { background: rgba(89, 215, 255, 0.08); border-left-color: var(--cyan); box-shadow: inset 0 0 18px rgba(89, 215, 255, 0.05); }
.modlist__item.is-active .modlist__name { color: var(--cyan-soft); text-shadow: 0 0 10px rgba(89, 215, 255, 0.4); }
/* 三维悬停高亮 */
.modlist__item.is-hover { background: rgba(255, 180, 84, 0.07); border-left-color: var(--amber); }
.modlist__item.is-hover .modlist__name { color: var(--amber); }
/* 隐藏舱段：半透明 + 删除线 */
.modlist__item.is-off { opacity: 0.45; }
.modlist__item.is-off .modlist__name { text-decoration: line-through; }
.modlist__item.is-off .modlist__dot { background: #3a4a5a; box-shadow: none; }
.panel__foot { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--cyan-dim); }

/* ── 10. 检查器（inspector / 右侧面板） ──────────────────────────────── */
.panel--right[data-state="filled"] { border-color: rgba(94, 242, 164, 0.28); }
.inspector { max-height: min(58vh, 520px); overflow-y: auto; padding: 14px; }
.inspector__hint { padding: 34px 12px; text-align: center; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-lo); }
.inspector__body { display: flex; flex-direction: column; gap: 13px; }
#ins-name { margin: 0; font-family: var(--mono); font-size: 18px; font-weight: 600; letter-spacing: 0.12em; color: var(--ink-hi); text-shadow: 0 0 12px rgba(89, 215, 255, 0.4); }
.inspector__en { margin: -6px 0 0; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-lo); }
.inspector__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--cyan); background: rgba(89, 215, 255, 0.07); border: 1px solid rgba(89, 215, 255, 0.4); }
.tag--ghost { color: var(--ink-lo); background: transparent; border: 1px dashed rgba(109, 130, 150, 0.45); }
.inspector__desc { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ink); }
/* 规格表：两列 grid，dd 等宽高亮，每行下方 1px 虚线 */
.specs { display: grid; grid-template-columns: minmax(0, 96px) 1fr; gap: 6px 12px; margin: 2px 0 0; }
.specs dt, .specs dd { margin: 0; padding-bottom: 6px; border-bottom: 1px dashed rgba(89, 215, 255, 0.14); }
.specs dt { font-size: 11px; letter-spacing: 0.08em; color: var(--ink-lo); }
.specs dd { font-family: var(--mono); font-size: 12px; color: var(--cyan); text-align: right; text-shadow: 0 0 8px rgba(89, 215, 255, 0.35); word-break: break-all; }
.inspector__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }

/* ── 11. 文本按钮（描边扩散 hover） ──────────────────────────────────── */
.linkbtn {
  position: relative; padding: 7px 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
  background: transparent; border: 1px solid rgba(89, 215, 255, 0.35); cursor: pointer;
  box-shadow: 0 0 0 0 rgba(89, 215, 255, 0.35);
  transition: color 0.18s, border-color 0.18s, box-shadow 0.28s var(--ease-out), text-shadow 0.18s, background-color 0.18s;
}
.linkbtn:hover {
  color: var(--cyan-soft); border-color: var(--cyan); background: rgba(89, 215, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(89, 215, 255, 0.12), 0 0 0 1px rgba(89, 215, 255, 0.5), 0 0 18px rgba(89, 215, 255, 0.25);
  text-shadow: 0 0 9px rgba(89, 215, 255, 0.8);
}
.linkbtn:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; }

/* ── 12. 底部工具坞（dock / 开关） ───────────────────────────────────── */
.dock {
  position: absolute; left: 50%; bottom: 18px; z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translateX(-50%); animation: dock-in 0.5s var(--ease-out) both;
}
.dock__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: auto; }
/* 工具条分组竖线 */
.dock__sep {
  width: 1px; align-self: stretch; margin: 2px 4px;
  background: linear-gradient(180deg, transparent, rgba(89, 215, 255, 0.32), transparent);
}
.toggle {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-lo);
  background: linear-gradient(180deg, rgba(13, 26, 40, 0.82), rgba(6, 12, 20, 0.82));
  border: 1px solid rgba(89, 215, 255, 0.18); cursor: pointer;
  transition: color 0.18s, border-color 0.18s, box-shadow 0.22s;
}
.toggle__led { width: 8px; height: 8px; border-radius: 50%; background: #2a3d52; box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8); transition: background-color 0.18s, box-shadow 0.22s; }
.toggle.is-on { color: var(--cyan); border-color: rgba(89, 215, 255, 0.55); box-shadow: 0 0 14px rgba(89, 215, 255, 0.22), inset 0 0 10px rgba(89, 215, 255, 0.08); }
.toggle.is-on .toggle__led { background: var(--green); box-shadow: 0 0 9px var(--green), 0 0 2px var(--green); }

/* ── 13. 滑块（自定义 range：webkit + moz 双写） ─────────────────────── */
.dock__row--sliders { padding: 2px 4px; }
.slider {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  background: linear-gradient(180deg, rgba(13, 26, 40, 0.82), rgba(6, 12, 20, 0.82));
  border: 1px solid rgba(89, 215, 255, 0.16);
}
.slider__k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-lo); white-space: nowrap; }
.slider__v { min-width: 40px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--cyan); text-shadow: 0 0 8px rgba(89, 215, 255, 0.5); }
.slider input[type="range"] { -webkit-appearance: none; appearance: none; width: 120px; height: 20px; margin: 0; background: transparent; cursor: pointer; }
/* WebKit */
.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(89, 215, 255, 0.15), rgba(89, 215, 255, 0.42));
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%;
  border: 1px solid rgba(220, 250, 255, 0.7);
  background: radial-gradient(circle at 35% 35%, #eaf9ff, var(--cyan) 60%, #1f7ea3);
  box-shadow: 0 0 10px rgba(89, 215, 255, 0.9), 0 0 2px rgba(89, 215, 255, 0.9);
}
/* Firefox */
.slider input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, rgba(89, 215, 255, 0.15), rgba(89, 215, 255, 0.42)); }
.slider input[type="range"]::-moz-range-progress { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--cyan-soft)); }
.slider input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(220, 250, 255, 0.7);
  background: radial-gradient(circle at 35% 35%, #eaf9ff, var(--cyan) 60%, #1f7ea3);
  box-shadow: 0 0 10px rgba(89, 215, 255, 0.9);
}
.slider input[type="range"]:focus-visible { outline: 1px solid rgba(89, 215, 255, 0.6); outline-offset: 3px; }

/* ── 14. 性能监控（stats） ───────────────────────────────────────────── */
.stats {
  position: absolute; right: var(--gutter); bottom: var(--gutter); z-index: 30; width: 190px; padding: 12px;
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.6), rgba(6, 11, 19, 0.6));
  border: 1px solid var(--cyan-dim);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(89, 215, 255, 0.04);
  backdrop-filter: blur(8px) saturate(130%); -webkit-backdrop-filter: blur(8px) saturate(130%);
  animation: rise-in 0.5s var(--ease-out) both;
}
#perf { display: block; width: 100%; height: 42px; margin-bottom: 8px; }
.stats__grid { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.stats__grid .k { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.stats__grid .v { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--cyan); text-shadow: 0 0 8px rgba(89, 215, 255, 0.45); }

/* ── 15. 底部提示条 / 键位（kbd） ────────────────────────────────────── */
.hint {
  position: absolute; left: var(--gutter); bottom: var(--gutter); z-index: 30; padding: 7px 11px;
  font-size: 11px; letter-spacing: 0.06em; color: var(--ink-lo);
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.55), rgba(6, 11, 19, 0.55));
  border: 1px solid rgba(89, 215, 255, 0.12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
kbd {
  display: inline-block; margin: 0 2px; padding: 2px 7px;
  font-family: var(--mono); font-size: 10px; line-height: 1.4; color: var(--ink-hi);
  background: linear-gradient(180deg, rgba(30, 48, 66, 0.92), rgba(12, 22, 34, 0.92));
  border: 1px solid rgba(89, 215, 255, 0.4); border-bottom-width: 2px; border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 0 8px rgba(89, 215, 255, 0.15);
}

/* ── 16. 浮动标签（hoverlabel） ──────────────────────────────────────── */
.hoverlabel {
  position: fixed; left: 0; top: 0; z-index: 60; transform: translate(-50%, calc(-100% - 10px));
  pointer-events: none; padding: 6px 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; white-space: nowrap; color: var(--ink-hi);
  background: linear-gradient(180deg, rgba(12, 22, 36, 0.92), rgba(5, 9, 16, 0.92));
  border: 1px solid rgba(89, 215, 255, 0.5);
  box-shadow: 0 0 16px rgba(89, 215, 255, 0.28), inset 0 0 10px rgba(89, 215, 255, 0.06);
  text-shadow: 0 0 8px rgba(89, 215, 255, 0.35);
}
.hoverlabel::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: rgba(89, 215, 255, 0.5);
  filter: drop-shadow(0 1px 0 rgba(89, 215, 255, 0.4));
}

/* ── 17. 帮助遮罩（help） ────────────────────────────────────────────── */
.help {
  position: absolute; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(2, 4, 8, 0.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.help__box {
  width: min(560px, 92vw); max-height: 84vh; overflow-y: auto; padding: 26px;
  background: linear-gradient(180deg, rgba(13, 26, 40, 0.9), rgba(6, 12, 20, 0.9));
  border: 1px solid rgba(89, 215, 255, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(89, 215, 255, 0.04);
}
.help__box h3 {
  margin: 0; font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-hi); text-shadow: 0 0 12px rgba(89, 215, 255, 0.45);
}
.help__box table { width: 100%; border-collapse: collapse; margin: 16px 0 18px; }
.help__box th {
  padding: 9px 14px 9px 0; text-align: left; vertical-align: top;
  font-family: var(--mono); font-size: 11px; font-weight: normal; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-lo); white-space: nowrap;
}
.help__box td { padding: 9px 0; font-size: 12px; line-height: 1.6; color: var(--ink); border-bottom: 1px dashed rgba(89, 215, 255, 0.14); }

/* ── 18. 内部滚动条（细、冷色调） ────────────────────────────────────── */
.modlist, .boot__log, .inspector, .help__box, .dock__row--sliders { scrollbar-width: thin; scrollbar-color: rgba(89, 215, 255, 0.28) transparent; }
.modlist::-webkit-scrollbar, .boot__log::-webkit-scrollbar, .inspector::-webkit-scrollbar, .help__box::-webkit-scrollbar, .dock__row--sliders::-webkit-scrollbar { width: 6px; height: 6px; }
.modlist::-webkit-scrollbar-thumb, .boot__log::-webkit-scrollbar-thumb, .inspector::-webkit-scrollbar-thumb, .help__box::-webkit-scrollbar-thumb, .dock__row--sliders::-webkit-scrollbar-thumb { background: rgba(89, 215, 255, 0.25); border-radius: 3px; }
.modlist::-webkit-scrollbar-thumb:hover, .inspector::-webkit-scrollbar-thumb:hover { background: rgba(89, 215, 255, 0.45); }

/* ── 19. 动画（入场 / 流光） ─────────────────────────────────────────── */
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes panel-in-left { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes panel-in-right { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── 20. 响应式：窄屏（≤ 900px） ─────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gutter: 12px; }
  .hud__top { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .brand { align-self: flex-start; }
  .telemetry { justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; }
  .telemetry__item { align-items: flex-start; min-width: 0; }
  /* 左右面板改为半透明覆盖层 */
  .panel--left, .panel--right {
    top: 150px;
    background:
      repeating-linear-gradient(0deg, rgba(120, 210, 255, 0.02) 0px, rgba(120, 210, 255, 0.02) 1px, transparent 1px, transparent 4px),
      linear-gradient(160deg, rgba(13, 26, 40, 0.62), rgba(6, 12, 20, 0.54));
  }
  .panel--left { width: 240px; left: 12px; }
  .panel--right { width: 260px; right: 12px; }
  .modlist { max-height: 32vh; }
  .inspector { max-height: 40vh; }
  .dock { left: 12px; right: 12px; bottom: 12px; transform: none; animation-name: rise-in; }
  /* 底部工具条横向滚动 */
  .dock__row--sliders { max-width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .stats { right: 12px; bottom: 118px; width: 158px; }
  .hint { left: 12px; bottom: 118px; max-width: 44vw; }
}

/* ── 21. 响应式：超窄屏（≤ 620px） ───────────────────────────────────── */
@media (max-width: 620px) {
  .hud__top { padding: 10px; }
  .brand__text strong { font-size: 13px; }
  .telemetry { gap: 6px 12px; }
  .telemetry__item .v { font-size: 12px; }
  /* 面板收窄为几乎全宽的上浮覆盖层 */
  .panel--left, .panel--right { left: 8px; right: 8px; width: auto; }
  .panel--left { top: 168px; }
  .panel--right { top: auto; bottom: 148px; }
  .modlist { max-height: 26vh; }
  .inspector { max-height: 34vh; }
  .stats { bottom: 104px; width: 140px; padding: 10px; }
  .hint { display: none; }
  .toggle { padding: 7px 9px; font-size: 9px; }
  .slider { gap: 7px; padding: 6px 9px; }
  .slider input[type="range"] { width: 90px; }
  .hoverlabel { font-size: 11px; padding: 5px 9px; }
}

/* ── 22. 减少动态效果（可访问性降级） ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
  .boot__bar::after { display: none; }
}
