*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-deep: #050708;
  --steel-dark: #111519;
  --steel-mid: #1c2228;
  --steel-light: #2b343e;
  --steel-edge: #465260;
  --text-main: #e4ece8;
  --text-muted: #93a19b;
  --ink-paper: #231d16;
  --ink-paper-muted: #584c3c;
  --safe: #4ee08a;
  --warn: #f0b13b;
  --danger: #e84840;
  --thermal: #59bfff;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 28%, rgba(44, 72, 60, 0.24) 0%, transparent 65%),
    radial-gradient(circle at 20% 80%, rgba(160, 96, 28, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(40, 88, 120, 0.1) 0%, transparent 45%),
    linear-gradient(180deg, #090c0f 0%, #040507 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.35;
  user-select: none;
  -webkit-user-select: none;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.hidden {
  display: none !important;
}

/* 桌面地下机房立体舞台 */
.cabinet-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 主工业监控台机壳：手机竖屏全贴合，桌面端立体机柜居中 */
.console-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 860px;
  background:
    linear-gradient(180deg, rgba(16, 20, 24, 0.72) 0%, rgba(10, 13, 16, 0.84) 100%),
    url('./assets/ui/ui_console_plate.png?v=3') center / cover no-repeat;
  border: 1px solid #353f4b;
  overflow: hidden;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* =========================================================
   A. 主菜单视图
========================================================= */
.menu-screen {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.menu-screen.active {
  display: flex;
}

.menu-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #070a0c;
}

.menu-bg-poster,
.menu-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) contrast(1.08) saturate(0.88);
}

.menu-bg-video {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.menu-bg-video.ready {
  opacity: 1;
}

.menu-bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(8, 13, 12, 0.18) 0%, rgba(5, 8, 10, 0.82) 78%, rgba(3, 5, 7, 0.96) 100%),
    linear-gradient(180deg, rgba(6, 9, 11, 0.55) 0%, rgba(6, 9, 11, 0.25) 40%, rgba(6, 9, 11, 0.92) 100%);
}

.menu-content {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(22px, env(safe-area-inset-top, 16px)) 16px max(16px, env(safe-area-inset-bottom, 12px));
  gap: 14px;
}

.menu-header-plate {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(28, 34, 40, 0.92) 0%, rgba(16, 20, 25, 0.94) 100%);
  border: 1px solid #43505e;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 6px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.plate-rivet {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #667380 0%, #232a32 70%, #0e1216 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.8);
}
.plate-rivet.tl { top: 8px; left: 8px; }
.plate-rivet.tr { top: 8px; right: 8px; }
.plate-rivet.bl { bottom: 8px; left: 8px; }
.plate-rivet.br { bottom: 8px; right: 8px; }

.menu-facility-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #82dfa6;
  text-shadow: 0 0 8px rgba(78, 224, 138, 0.35);
  margin-bottom: 6px;
}

.menu-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f0f6f2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.menu-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #aebcb5;
  letter-spacing: 0.04em;
}

.menu-console-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(11, 14, 18, 0.86);
  border: 1px solid #303944;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 12px 30px rgba(0, 0, 0, 0.65);
}

/* 工业实体菜单按钮 */
.hw-menu-btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 6px;
  background: linear-gradient(180deg, #2a323b 0%, #1d232a 55%, #161b21 100%);
  border: 1px solid #485463;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45),
    0 3px 0 #090c0f,
    0 6px 12px rgba(0, 0, 0, 0.55);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s;
}

.hw-menu-btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.7),
    0 1px 0 #090c0f;
}

.hw-menu-btn.primary {
  background: linear-gradient(180deg, #28533b 0%, #1c3c2a 55%, #142c1f 100%);
  border-color: #4ea876;
}

.hw-menu-btn.compact {
  padding: 10px 14px;
}

.hw-led {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #36404a;
  border: 1px solid #596775;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.65);
}
.hw-led.green {
  background: #5cf09a;
  border-color: #b7ffd3;
  box-shadow: 0 0 10px rgba(78, 224, 138, 0.85), inset 0 1px 1px #fff;
}
.hw-led.amber {
  background: #f5b942;
  border-color: #ffe29e;
  box-shadow: 0 0 9px rgba(240, 177, 59, 0.75);
}
.hw-led.blue {
  background: #62c4ff;
  border-color: #bce4ff;
  box-shadow: 0 0 9px rgba(89, 191, 255, 0.75);
}
.hw-led.off {
  background: #30373f;
  border-color: #4c5662;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.hw-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hw-btn-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #f1f7f3;
}

.hw-btn-text small {
  font-size: 12px;
  color: #a9b8b0;
}

.menu-footer-note {
  text-align: center;
  font-size: 12px;
  color: #8f9e96;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* =========================================================
   B. 值夜监控台主界面
========================================================= */
.watch-screen {
  position: relative;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: max(6px, env(safe-area-inset-top, 4px)) 10px max(8px, env(safe-area-inset-bottom, 6px));
  gap: clamp(5px, 0.9vh, 8px);
}

.watch-screen.active {
  display: flex;
}

/* 1. 顶部工业仪表盘 */
.status-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #161b20 0%, #0d1014 100%);
  border: 1px solid #353f4b;
  border-radius: 5px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.06);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 7px rgba(78, 224, 138, 0.85);
  flex: 0 0 auto;
}
.site-dot.sleep {
  background: #4b8f6e;
  box-shadow: 0 0 5px rgba(75, 143, 110, 0.6);
}
.site-dot.alert {
  background: var(--danger);
  box-shadow: 0 0 9px rgba(232, 72, 64, 0.95);
  animation: blink-fast 0.55s infinite;
}

.night-badge {
  font-size: 11px;
  font-weight: 700;
  color: #c7d4cd;
  background: #1f272f;
  border: 1px solid #3e4a57;
  border-radius: 3px;
  padding: 2px 5px;
  white-space: nowrap;
}

.status-clock {
  font-size: 15px;
  font-weight: 700;
  color: #7df2aa;
  text-shadow: 0 0 8px rgba(78, 224, 138, 0.4);
  background: #060908;
  padding: 2px 7px;
  border: 1px solid #24382d;
  border-radius: 3px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9);
}

.status-clock.urgent {
  color: #ff6e66;
  border-color: #5c2525;
  text-shadow: 0 0 8px rgba(232, 72, 64, 0.55);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

/* 模拟光柱/分段刻度电表 */
.power-gauge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  background: #080b0e;
  border: 1px solid #2f3843;
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.85);
}

.power-gauge.low { border-color: #6b4e1c; }
.power-gauge.crit { border-color: #7d2520; background: #190b0b; }

.power-pct {
  font-size: 13px;
  font-weight: 700;
  color: #7df2aa;
  min-width: 35px;
  text-align: right;
}
.power-gauge.low .power-pct { color: #f6c257; }
.power-gauge.crit .power-pct { color: #ff6c64; animation: blink-fast 0.6s infinite; }

.power-segments {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: #040608;
  border: 1px solid #222a33;
  border-radius: 2px;
}

.power-segments .seg {
  width: 4px;
  height: 11px;
  border-radius: 1px;
  background: #1b2229;
  transition: background 0.15s, box-shadow 0.15s;
}

.power-segments .seg.on {
  background: #55e28f;
  box-shadow: 0 0 4px rgba(85, 226, 143, 0.7);
}
.power-gauge.low .power-segments .seg.on {
  background: #f2b740;
  box-shadow: 0 0 4px rgba(242, 183, 64, 0.7);
}
.power-gauge.crit .power-segments .seg.on {
  background: #f05149;
  box-shadow: 0 0 5px rgba(240, 81, 73, 0.85);
}

.power-load {
  font-size: 11px;
  font-weight: 700;
  color: #9ba8a2;
  padding: 1px 4px;
  border-radius: 2px;
  background: #151b21;
  white-space: nowrap;
}
.power-load.sleep { color: #7df2aa; background: #10281b; }
.power-load.heavy { color: #74c9ff; background: #0f253b; }

.hw-mini-btn {
  appearance: none;
  background: linear-gradient(180deg, #272f38 0%, #181e24 100%);
  color: #cbd7d1;
  border: 1px solid #414c59;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 0 #090c0f;
}
.hw-mini-btn:active { transform: translateY(1px); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7); }
.hw-mini-btn.muted { color: #6e7880; text-decoration: line-through; }

/* 2. 重型 CRT 闭路监视器 */
.monitor-bay {
  flex: 0 0 auto;
  width: 100%;
}

.monitor-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 820;
  background: #050708;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.85),
    0 0 0 1px #2f3842;
}

/* 实际 CRT 玻璃屏幕对齐金属外框内窗 */
.monitor-screen {
  position: absolute;
  inset: 10.5% 8.8% 10.5% 8.8%;
  background: #040607;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.92);
}

.crt-bezel-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 12;
  pointer-events: none;
}

.feed-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s linear;
}
.feed-layer.active {
  opacity: 1;
}

.feed-fallback,
.feed-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feed-video { opacity: 0; transition: opacity 0.18s ease; }
.feed-video.ready { opacity: 1; }

.monitor-screen[data-thermal="on"] .feed-layer {
  filter: url(#thermal-filter) contrast(1.18) brightness(1.06);
}

/* CRT 扫描线 + 玻璃微弧反光 */
.crt-scanlines {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.22) 0px,
      rgba(0, 0, 0, 0.22) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.58) 100%);
}

/* 效果层 */
.fx-light-boost {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(220, 255, 238, 0.72) 0%, rgba(160, 230, 200, 0.16) 70%, transparent 100%);
  transition: opacity 0.18s ease;
}
.fx-light-boost.active { opacity: 1; }

.fx-fog-plume {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(0deg, rgba(165, 232, 205, 0.55) 0%, rgba(110, 185, 162, 0.22) 55%, transparent 100%);
  transition: opacity 0.35s ease;
}
.fx-fog-plume.active { opacity: 1; }

/* 2号 0.8s 光学惊觉缓冲红框 */
.fx-optical-danger {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 58, 48, 0.95);
  box-shadow: inset 0 0 36px rgba(255, 42, 34, 0.72);
  background: rgba(145, 12, 12, 0.24);
}
.fx-optical-danger.active {
  opacity: 1;
  animation: blink-fast 0.28s infinite;
}
.fx-optical-danger.burning {
  background: rgba(190, 12, 12, 0.45);
  border-width: 6px;
}
.optical-warn-banner {
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(168, 22, 18, 0.94);
  border: 1px solid #ff9a94;
  color: #fff5f4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
}

.fx-signal-static {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.28) 0px,
    rgba(0, 0, 0, 0.36) 2px,
    rgba(255, 255, 255, 0.14) 4px
  );
  transition: opacity 0.09s ease;
}
.fx-signal-static.flash { opacity: 0.78; }

/* 息屏盲听幕 */
.screen-sleep-curtain {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: radial-gradient(circle at center, #0c1210 0%, #030505 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.monitor-screen[data-screen="off"] .screen-sleep-curtain {
  opacity: 1;
}
.sleep-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5be095;
  box-shadow: 0 0 12px rgba(91, 224, 149, 0.85);
  animation: pulse-soft 1.8s infinite;
}
.sleep-title {
  font-size: 15px;
  font-weight: 700;
  color: #9ce8bd;
  letter-spacing: 0.06em;
}
.sleep-sub {
  font-size: 11px;
  color: #6a8a78;
}

/* 第3夜突发信号劫持覆盖层 */
.hijack-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(18, 6, 6, 0.42);
}
.hijack-overlay.active { display: flex; }

.hijack-tag {
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(178, 28, 22, 0.92);
  border: 1px solid #ff9d96;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  animation: blink-fast 0.55s infinite;
}

.hijack-reboot-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, #d9821e 0%, #a85b0e 100%);
  border: 2px solid #ffd27d;
  color: #fff9eb;
  cursor: pointer;
  box-shadow: 0 4px 0 #4d2604, 0 8px 20px rgba(0, 0, 0, 0.85);
}
.hijack-reboot-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #4d2604; }
.hijack-reboot-btn:disabled { opacity: 0.72; cursor: default; }
.hijack-btn-title { font-size: 15px; font-weight: 800; letter-spacing: 0.05em; }
.hijack-btn-cost { font-size: 11px; color: #ffebc2; }

.hijack-progress-wrap {
  width: 68%;
  height: 7px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid #d49642;
  border-radius: 3px;
  overflow: hidden;
  opacity: 0;
}
.hijack-progress-wrap.active { opacity: 1; }
.hijack-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #f2b740 0%, #69f0a2 100%);
}

/* 06:00 黎明交班演出层 */
.dawn-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  gap: 8px;
  background: linear-gradient(180deg, transparent 45%, rgba(16, 14, 10, 0.82) 100%);
}
.dawn-overlay.active { display: flex; }

.dawn-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255, 246, 224, 0.92);
  color: #2c2418;
  font-weight: 800;
  font-size: 13px;
}
.dawn-time {
  color: #216b41;
  font-size: 14px;
}
.dawn-skip-btn {
  align-self: flex-end;
  appearance: none;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(22, 30, 26, 0.9);
  border: 1px solid #79d8a0;
  color: #e2faec;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* 监视器四角 HUD */
.monitor-hud {
  position: absolute;
  inset: 8px 9px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.monitor-screen[data-screen="off"] .monitor-hud { opacity: 0; }

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.hud-row.bottom {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.hud-chip {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(7, 11, 14, 0.78);
  border: 1px solid rgba(155, 185, 175, 0.24);
  color: #dfece6;
  font-size: 11px;
  font-weight: 700;
}
.hud-chip.thermal {
  background: rgba(14, 54, 88, 0.86);
  border-color: rgba(102, 198, 255, 0.65);
  color: #a8dcff;
}
.hud-chip.muted {
  background: rgba(74, 54, 14, 0.86);
  border-color: rgba(242, 188, 72, 0.65);
  color: #ffe299;
}
.hud-chip.breathe {
  background: rgba(18, 68, 42, 0.86);
  border-color: rgba(88, 224, 145, 0.6);
  color: #a7f8c8;
}

/* 3. 紧凑双行状态与速记条 */
.telemetry-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.telemetry-strip {
  padding: 6px 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, #13181d 0%, #0b0e12 100%);
  border: 1px solid #303945;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.telemetry-strip.warn { border-color: #825e1e; background: linear-gradient(180deg, #21190c 0%, #141008 100%); }
.telemetry-strip.danger { border-color: #8a2c26; background: linear-gradient(180deg, #261212 0%, #170b0b 100%); }
.telemetry-strip.safe { border-color: #296b47; background: linear-gradient(180deg, #102419 0%, #0a1710 100%); }

.telemetry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.telemetry-label {
  font-size: 12px;
  font-weight: 700;
  color: #d6e2dc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skip-tut-btn {
  appearance: none;
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 3px;
  background: #232b34;
  border: 1px solid #4d5a69;
  color: #cfe0d8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.telemetry-bar-track {
  width: 100%;
  height: 5px;
  border-radius: 2px;
  background: #1a2128;
  overflow: hidden;
}
.telemetry-bar-fill {
  width: 0%;
  height: 100%;
  background: #4ee08a;
  transition: width 0.1s linear;
}
.telemetry-bar-fill.warn { background: #f2b740; }
.telemetry-bar-fill.danger { background: #f05149; }
.telemetry-bar-fill.thermal { background: #59bfff; }

.guide-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(14, 18, 22, 0.9);
  border: 1px solid #2d3640;
  cursor: pointer;
}
.guide-tag {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #90e2b1;
  padding: 1px 6px;
  border-radius: 3px;
  background: #12261c;
  border: 1px solid #285940;
}
.guide-text {
  flex: 1 1 auto;
  font-size: 12px;
  color: #b9c7c0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guide-more {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #8fa299;
  padding: 1px 5px;
  border: 1px solid #394450;
  border-radius: 3px;
}

/* 4. 下半区：重型物理控制台 */
.control-deck {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: clamp(8px, 1.3vh, 12px);
  padding: 14px 10px 10px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(16, 20, 24, 0.56) 0%, rgba(10, 13, 16, 0.76) 100%),
    url('./assets/ui/ui_console_plate.png?v=3') center / cover no-repeat;
  border: 1px solid #3f4b59;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.82), 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.control-deck::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(224, 164, 48, 0.55) 0 8px,
    rgba(16, 19, 23, 0.88) 8px 16px
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

.cam-row {
  flex: 0.85 1 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.38fr;
  gap: 7px;
}

/* 深凹金属卡槽镜头按钮 */
.hw-cam-btn {
  appearance: none;
  position: relative;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, #2d353f 0%, #1e242c 60%, #161b21 100%);
  border: 1px solid #495665;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -2px 3px rgba(0, 0, 0, 0.55),
    0 3px 0 #080b0e,
    0 5px 8px rgba(0, 0, 0, 0.55);
  color: #c7d4ce;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s;
}
.hw-cam-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.78), 0 1px 0 #080b0e;
}
.hw-cam-btn.active {
  background: linear-gradient(180deg, #244736 0%, #183225 65%, #11241b 100%);
  border-color: #5ce096;
  color: #eefcf4;
  box-shadow:
    inset 0 1px 0 rgba(168, 255, 206, 0.25),
    0 0 12px rgba(78, 224, 138, 0.28),
    0 3px 0 #081810;
}
.hw-cam-btn.dormant {
  opacity: 0.65;
}

.cam-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #36404a;
  border: 1px solid #556270;
}
.hw-cam-btn.active .cam-led {
  background: #67f5a3;
  border-color: #c8ffe0;
  box-shadow: 0 0 8px rgba(85, 240, 150, 0.95);
}
.cam-num { font-size: 13px; font-weight: 800; }
.cam-name { font-size: 11px; color: #a7b6ae; white-space: nowrap; }
.hw-cam-btn.active .cam-name { color: #d9f8e6; }

/* 大尺寸实体机械拨片开关「息屏省电」 */
.hw-sleep-switch {
  appearance: none;
  min-height: 56px;
  padding: 5px 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, #252d36 0%, #161b21 100%);
  border: 1px solid #4b5867;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.75),
    0 3px 0 #080b0e;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-align: left;
  color: #d6e4dc;
  transition: border-color 0.15s, background 0.15s;
}
.hw-sleep-switch.engaged {
  background: linear-gradient(180deg, #163626 0%, #0d2318 100%);
  border-color: #5be095;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(78, 224, 138, 0.35),
    0 2px 0 #07160e;
}

.switch-housing {
  width: 20px;
  height: 38px;
  border-radius: 4px;
  background: #080b0e;
  border: 1px solid #394450;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.95);
  padding: 2px;
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}
.switch-lever {
  width: 100%;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, #748394 0%, #46525f 55%, #2b333d 100%);
  border: 1px solid #9aa9b9;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.85);
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), background 0.14s;
}
.hw-sleep-switch.engaged .switch-lever {
  transform: translateY(15px);
  background: linear-gradient(180deg, #6bf0a4 0%, #38a868 60%, #217043 100%);
  border-color: #c2ffdc;
  box-shadow: 0 0 8px rgba(91, 224, 149, 0.85);
}

.switch-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.switch-label { font-size: 12px; font-weight: 800; color: #e9f5ee; white-space: nowrap; }
.switch-sub { font-size: 10px; color: #8fa49a; white-space: nowrap; }
.hw-sleep-switch.engaged .switch-sub { color: #8af0b6; }

/* 2x2 物理处置按键 */
.action-grid {
  flex: 2.15 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
}

.hw-act-btn {
  appearance: none;
  min-height: 58px;
  padding: 10px 11px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(48, 57, 68, 0.95) 0%, rgba(30, 36, 44, 0.96) 58%, rgba(20, 25, 31, 0.98) 100%);
  border: 1px solid #4f5d6d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.58),
    0 3px 0 #080b0e,
    0 6px 10px rgba(0, 0, 0, 0.55);
  color: #e4ede8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s;
}
.hw-act-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.82), 0 1px 0 #080b0e;
}

.hw-act-btn.engaged {
  background: linear-gradient(180deg, #1b4363 0%, #122d44 100%);
  border-color: #63c5ff;
  box-shadow: inset 0 1px 0 rgba(173, 226, 255, 0.28), 0 0 14px rgba(89, 191, 255, 0.32), 0 3px 0 #071420;
}
.hw-act-btn.engaged-warn {
  background: linear-gradient(180deg, #4f3b16 0%, #33250c 100%);
  border-color: #f4be4c;
  box-shadow: inset 0 1px 0 rgba(255, 232, 168, 0.25), 0 0 12px rgba(240, 177, 59, 0.28), 0 3px 0 #1c1305;
}
.hw-act-btn.engaged-safe {
  background: linear-gradient(180deg, #1e4b34 0%, #133323 100%);
  border-color: #5ee296;
  box-shadow: inset 0 1px 0 rgba(170, 255, 206, 0.25), 0 0 12px rgba(78, 224, 138, 0.3), 0 3px 0 #081a10;
}

.act-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}
.act-title { font-size: 14px; font-weight: 800; color: #f2f8f4; }
.act-sub { font-size: 11px; color: #9eb0a7; }

.act-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #36404a;
  border: 1px solid #556372;
}
.hw-act-btn.engaged .act-led {
  background: #73ccff;
  border-color: #c8ebff;
  box-shadow: 0 0 8px rgba(89, 191, 255, 0.95);
}
.hw-act-btn.engaged-warn .act-led {
  background: #f8c655;
  border-color: #ffeaad;
  box-shadow: 0 0 8px rgba(240, 177, 59, 0.95);
}
.hw-act-btn.engaged-safe .act-led {
  background: #67f5a3;
  border-color: #c8ffe0;
  box-shadow: 0 0 8px rgba(78, 224, 138, 0.95);
}

/* 开局带教呼吸金框 */
.tut-pulse {
  border-color: #ffd35c !important;
  box-shadow: 0 0 0 2px rgba(255, 211, 92, 0.55), 0 0 18px rgba(255, 211, 92, 0.65) !important;
  animation: tut-glow 0.85s ease-in-out infinite;
}

/* =========================================================
   C-G. 弹窗层（金属机密面板 & 泛黄做旧档案纸）
========================================================= */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(4, 7, 9, 0.84);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.metal-modal {
  width: 100%;
  max-width: 390px;
  max-height: 92%;
  overflow-y: auto;
  padding: 15px;
  border-radius: 8px;
  background: linear-gradient(180deg, #212830 0%, #14191f 100%);
  border: 1px solid #475565;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.metal-modal.danger {
  border-color: #8a332d;
  background: linear-gradient(180deg, #2a1616 0%, #160e0e 100%);
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.modal-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #82dfa6;
}
.modal-tag.danger { color: #ff948d; }
.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #f1f7f3;
}

/* 选择夜班卡片 */
.night-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.night-card {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #29313b 0%, #1a2027 100%);
  border: 1px solid #475464;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 0 #090c0f;
  color: #e4ede8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.night-card:active { transform: translateY(2px); }
.night-card.locked {
  opacity: 0.52;
  cursor: not-allowed;
  background: #14181d;
  border-color: #2e3640;
}
.night-card-info { display: flex; flex-direction: column; gap: 3px; }
.night-card-title { font-size: 14px; font-weight: 800; color: #f1f8f4; }
.night-card-sub { font-size: 12px; color: #9eb0a7; }
.night-card-record { font-size: 11px; color: #85dfa8; }

.grade-pill {
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  border: 2px solid #596775;
  color: #8a98a4;
  background: #101419;
}
.grade-pill.S { border-color: #f5c24c; color: #ffe08a; background: #2e220b; box-shadow: 0 0 10px rgba(245, 194, 76, 0.35); }
.grade-pill.A { border-color: #5ee296; color: #a7f8c8; background: #102a1c; }
.grade-pill.B { border-color: #63c5ff; color: #b5e2ff; background: #102333; }

/* 泛黄机密档案纸面板（真实使用 ui_dossier_paper.png） */
.paper-modal {
  position: relative;
  width: 100%;
  max-width: 394px;
  max-height: 92%;
  overflow-y: auto;
  padding: 15px 15px 15px 22px;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(235, 220, 186, 0.25) 0%, rgba(214, 194, 152, 0.22) 100%),
    url('./assets/ui/ui_dossier_paper.png?v=3') center / cover no-repeat;
  border: 1px solid #8a7757;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), inset 0 0 24px rgba(74, 52, 22, 0.28);
  color: var(--ink-paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paper-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 2px solid rgba(58, 42, 24, 0.35);
  padding-bottom: 8px;
}
.paper-stamp-top {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8f221d;
}
.paper-title {
  font-size: 20px;
  font-weight: 900;
  color: #1f1912;
  margin-top: 2px;
}
.paper-close-btn {
  appearance: none;
  padding: 5px 10px;
  border-radius: 4px;
  background: #2f261d;
  border: 1px solid #594a38;
  color: #f3ead8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dossier-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.dossier-tab {
  appearance: none;
  padding: 6px 4px;
  border-radius: 4px;
  background: rgba(66, 51, 34, 0.14);
  border: 1px solid rgba(72, 54, 34, 0.35);
  color: #3d3123;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.dossier-tab.active {
  background: #2b2219;
  border-color: #2b2219;
  color: #f7eedc;
}

.dossier-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.polaroid-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.polaroid-card {
  flex: 0 0 112px;
  background: #f5efe2;
  padding: 5px 5px 16px;
  border: 1px solid #b5a488;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
  transform: rotate(-1.5deg);
}
.polaroid-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: contrast(1.06) sepia(0.14);
}
.polaroid-caption {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #463a2c;
}
.dossier-meta {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #2c2319;
}
.dossier-meta b { color: #16110c; }

.dossier-section {
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 250, 238, 0.45);
  border: 1px solid rgba(84, 65, 42, 0.28);
  font-size: 12px;
  line-height: 1.5;
  color: #2a2218;
}

.redacted-box {
  padding: 20px 14px;
  border-radius: 4px;
  background: rgba(34, 28, 22, 0.12);
  border: 1px dashed rgba(82, 58, 34, 0.55);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.redacted-stamp {
  padding: 3px 10px;
  border: 2px solid #96221d;
  color: #96221d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: rotate(-4deg);
}
.redacted-hint {
  font-size: 12px;
  font-weight: 700;
  color: #453828;
}

/* 通关交班单 S/A/B 橡胶印章 */
.win-sheet { padding-top: 18px; }
.win-grade-stamp {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #a8221c;
  color: #a8221c;
  font-size: 30px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(12deg);
  box-shadow: inset 0 0 0 2px rgba(168, 34, 28, 0.25);
  background: rgba(168, 34, 28, 0.06);
}
.win-grade-stamp.S { border-color: #a66908; color: #a66908; background: rgba(166, 105, 8, 0.08); }
.win-grade-stamp.A { border-color: #1c6b3d; color: #1c6b3d; background: rgba(28, 107, 61, 0.08); }

.paper-summary {
  font-size: 13px;
  color: #34291d;
  line-height: 1.48;
  padding-right: 54px;
}

.paper-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  padding: 9px 10px;
  border-radius: 4px;
  background: rgba(255, 250, 238, 0.55);
  border: 1px solid rgba(78, 60, 38, 0.3);
  font-size: 12px;
  color: #463827;
}
.paper-metrics strong { color: #19130d; }

.unlock-banner {
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(24, 92, 54, 0.14);
  border: 1px solid rgba(24, 92, 54, 0.45);
  color: #164f2f;
  font-size: 12px;
  font-weight: 800;
}

/* 失败与速查细节 */
.fail-diagnosis {
  padding: 10px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 130, 120, 0.22);
  font-size: 13px;
  color: #f7e6e4;
  line-height: 1.5;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #b7c4be;
}
.report-grid .mono { color: #f0f8f4; font-weight: 700; }

.sheet-item {
  padding: 8px 10px;
  border-radius: 5px;
  background: #10151a;
  border: 1px solid #2e3742;
  font-size: 12px;
  color: #c4d1cb;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sheet-h { font-size: 13px; font-weight: 800; color: #f0f8f4; }

.overlay-actions {
  display: flex;
  gap: 8px;
}

.hw-action-primary {
  appearance: none;
  flex: 1 1 auto;
  padding: 11px 12px;
  border-radius: 5px;
  background: linear-gradient(180deg, #2d7d52 0%, #1e5c3b 100%);
  border: 1px solid #63d494;
  color: #f3fbf6;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 0 #0d2b1b;
}
.hw-action-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #0d2b1b; }
.hw-action-primary.danger {
  background: linear-gradient(180deg, #b03630 0%, #82221d 100%);
  border-color: #f0746d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 0 #3d0f0d;
}
.hw-action-primary.secondary {
  background: linear-gradient(180deg, #323b45 0%, #20272f 100%);
  border-color: #556373;
  color: #dbe5e0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 3px 0 #0c1014;
}

@keyframes blink-fast {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
@keyframes tut-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 211, 92, 0.38), 0 0 12px rgba(255, 211, 92, 0.38); }
  50% { box-shadow: 0 0 0 3px rgba(255, 211, 92, 0.85), 0 0 22px rgba(255, 211, 92, 0.78); }
}

/* 桌面端 1280x720 立体地下监控台机柜呈现 */
@media (min-width: 768px) {
  .console-shell {
    max-width: 460px;
    max-height: min(706px, calc(100dvh - 14px));
    border-radius: 12px;
    border: 2px solid #45515e;
    box-shadow:
      0 32px 96px rgba(0, 0, 0, 0.96),
      0 0 60px rgba(52, 98, 76, 0.18),
      0 0 0 6px #12161b,
      0 0 0 8px #29313a;
  }
  .watch-screen {
    gap: 6px;
    padding: 7px 11px 9px;
  }
  .hw-cam-btn,
  .hw-sleep-switch {
    min-height: 50px;
  }
  .hw-act-btn {
    min-height: 54px;
    padding: 7px 10px;
  }
}
