/* 《千里漕韵》十雅高对比美学皮肤 × 四隅分舱 Web3D HUD 样式 (v6.0 Ten-Theme Ultra-Clear Edition) */

/* =========================================================
   基础通用尺寸与字体 + 默认皮肤 ① 紫禁靛蓝（青金石鎏金）
   ========================================================= */
:root,
body.theme-imperial {
  --bg-canvas: #091324;
  --hud-bg: linear-gradient(166deg, rgba(11, 22, 42, 0.84) 0%, rgba(8, 16, 32, 0.90) 100%);
  --hud-bg-solid: rgba(10, 20, 38, 0.95);
  --hud-surface: rgba(255, 255, 255, 0.075);
  --hud-surface-hover: rgba(242, 200, 120, 0.18);
  --hud-inset: rgba(5, 11, 24, 0.56);
  --hud-border: rgba(240, 200, 122, 0.32);
  --hud-border-strong: rgba(248, 214, 142, 0.72);
  --hud-border-soft: rgba(210, 230, 255, 0.13);
  --rim-highlight: inset 0 1px 0 rgba(255, 248, 232, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.38);
  --top-beam: linear-gradient(90deg, transparent, rgba(245, 204, 124, 0.82) 34%, rgba(96, 216, 242, 0.72) 68%, transparent);
  --text-main: #ffffff;
  --text-sub: #d6e4f2;
  --text-muted: #9eb7cf;
  --accent-jade: #38c4dc;
  --accent-jade-bright: #64e0f5;
  --accent-jade-deep: #156280;
  --accent-gold: #f5cd7e;
  --accent-gold-soft: rgba(245, 205, 126, 0.16);
  --accent-cinnabar: #ff6b57;
  --accent-warn: #ffb347;
  --accent-ok: #52ebb2;
  --shadow-float: 0 22px 54px rgba(2, 6, 18, 0.52), 0 4px 14px rgba(2, 6, 18, 0.28);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --range-track-bg: rgba(214, 232, 255, 0.22);
  --vignette: radial-gradient(circle at 50% 48%, transparent 60%, rgba(3, 8, 18, 0.36) 100%);
  --ic-well-bg: rgba(255, 248, 234, 0.11);
  --ic-well-border: rgba(255, 245, 224, 0.18);
  --ic-well-color: #f5cd7e;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia, serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

/* ② 千里青绿（宋画翡翠 × 暖金） */
body.theme-emerald {
  --bg-canvas: #071d20;
  --hud-bg: linear-gradient(166deg, rgba(10, 34, 38, 0.94) 0%, rgba(6, 22, 26, 0.96) 100%);
  --hud-bg-solid: rgba(8, 28, 32, 0.97);
  --hud-surface: rgba(255, 255, 255, 0.085);
  --hud-surface-hover: rgba(242, 200, 120, 0.18);
  --hud-inset: rgba(3, 14, 16, 0.62);
  --hud-border: rgba(82, 224, 206, 0.40);
  --hud-border-strong: rgba(242, 204, 126, 0.78);
  --hud-border-soft: rgba(196, 245, 238, 0.16);
  --top-beam: linear-gradient(90deg, transparent, rgba(72, 226, 206, 0.90) 34%, rgba(242, 204, 126, 0.85) 68%, transparent);
  --text-main: #ffffff;
  --text-sub: #d2ece8;
  --text-muted: #98c2bc;
  --accent-jade: #30d4bf;
  --accent-jade-bright: #5eeddb;
  --accent-jade-deep: #126b62;
  --accent-gold: #f2c874;
  --accent-gold-soft: rgba(242, 200, 116, 0.18);
  --accent-cinnabar: #ff6c58;
  --accent-ok: #50eca8;
  --ic-well-color: #f2c874;
}

/* ③ 玄墨鎏金（黑曜石 × 香槟金工业高定） */
body.theme-obsidian {
  --bg-canvas: #111318;
  --hud-bg: linear-gradient(166deg, rgba(22, 25, 32, 0.94) 0%, rgba(14, 16, 21, 0.96) 100%);
  --hud-bg-solid: rgba(18, 20, 26, 0.97);
  --hud-surface: rgba(255, 255, 255, 0.08);
  --hud-surface-hover: rgba(235, 194, 134, 0.18);
  --hud-inset: rgba(6, 7, 10, 0.62);
  --hud-border: rgba(232, 192, 134, 0.38);
  --hud-border-strong: rgba(246, 212, 162, 0.78);
  --hud-border-soft: rgba(255, 255, 255, 0.15);
  --top-beam: linear-gradient(90deg, transparent, rgba(240, 202, 146, 0.90) 35%, rgba(120, 186, 245, 0.75) 70%, transparent);
  --text-main: #ffffff;
  --text-sub: #dce2ec;
  --text-muted: #a2adbe;
  --accent-jade: #4eaef0;
  --accent-jade-bright: #7cc8fa;
  --accent-jade-deep: #1e5c8e;
  --accent-gold: #f0c688;
  --accent-gold-soft: rgba(240, 198, 136, 0.18);
  --accent-cinnabar: #ff6859;
  --accent-ok: #4ce8a6;
  --ic-well-color: #f0c688;
}

/* ④ 朱墙宫阙（故宫绛红暗漆 × 玉金） */
body.theme-cinnabar {
  --bg-canvas: #210d10;
  --hud-bg: linear-gradient(166deg, rgba(44, 17, 22, 0.94) 0%, rgba(28, 10, 14, 0.96) 100%);
  --hud-bg-solid: rgba(36, 13, 18, 0.97);
  --hud-surface: rgba(255, 242, 234, 0.09);
  --hud-surface-hover: rgba(248, 202, 126, 0.20);
  --hud-inset: rgba(18, 5, 8, 0.62);
  --hud-border: rgba(245, 196, 118, 0.44);
  --hud-border-strong: rgba(255, 216, 146, 0.80);
  --hud-border-soft: rgba(255, 224, 210, 0.17);
  --top-beam: linear-gradient(90deg, transparent, rgba(248, 202, 122, 0.92) 35%, rgba(240, 110, 90, 0.82) 70%, transparent);
  --text-main: #fffaf5;
  --text-sub: #f2d8ce;
  --text-muted: #cca69a;
  --accent-jade: #e8624d;
  --accent-jade-bright: #ff826e;
  --accent-jade-deep: #9e2a1b;
  --accent-gold: #f8cc7c;
  --accent-gold-soft: rgba(248, 204, 124, 0.20);
  --accent-cinnabar: #ff7866;
  --accent-ok: #5ce8b0;
  --ic-well-color: #f8cc7c;
}

/* ⑤ 暮云紫霄（星河靛紫 × 琥珀金） */
body.theme-violet {
  --bg-canvas: #150f29;
  --hud-bg: linear-gradient(166deg, rgba(28, 21, 56, 0.94) 0%, rgba(18, 13, 38, 0.96) 100%);
  --hud-bg-solid: rgba(23, 17, 48, 0.97);
  --hud-surface: rgba(240, 235, 255, 0.09);
  --hud-surface-hover: rgba(168, 152, 255, 0.22);
  --hud-inset: rgba(10, 7, 24, 0.62);
  --hud-border: rgba(176, 160, 255, 0.42);
  --hud-border-strong: rgba(246, 208, 132, 0.80);
  --hud-border-soft: rgba(226, 218, 255, 0.17);
  --top-beam: linear-gradient(90deg, transparent, rgba(168, 150, 255, 0.92) 34%, rgba(246, 208, 132, 0.86) 68%, transparent);
  --text-main: #ffffff;
  --text-sub: #ded8f8;
  --text-muted: #b0a6d8;
  --accent-jade: #8c7eff;
  --accent-jade-bright: #aba0ff;
  --accent-jade-deep: #4c3fb0;
  --accent-gold: #f6cd7e;
  --accent-gold-soft: rgba(246, 205, 126, 0.19);
  --accent-cinnabar: #ff6e6e;
  --accent-ok: #54ebb4;
  --ic-well-color: #f6cd7e;
}

/* ⑥ 落日漕灯（运河暖暮 × 琥珀灯火） */
body.theme-amber {
  --bg-canvas: #20150d;
  --hud-bg: linear-gradient(166deg, rgba(42, 28, 18, 0.94) 0%, rgba(27, 17, 10, 0.96) 100%);
  --hud-bg-solid: rgba(34, 22, 14, 0.97);
  --hud-surface: rgba(255, 244, 228, 0.09);
  --hud-surface-hover: rgba(248, 186, 100, 0.21);
  --hud-inset: rgba(16, 9, 4, 0.62);
  --hud-border: rgba(246, 186, 102, 0.44);
  --hud-border-strong: rgba(255, 212, 138, 0.80);
  --hud-border-soft: rgba(255, 232, 200, 0.17);
  --top-beam: linear-gradient(90deg, transparent, rgba(248, 184, 96, 0.92) 34%, rgba(76, 214, 198, 0.78) 70%, transparent);
  --text-main: #fffbf4;
  --text-sub: #f0dec8;
  --text-muted: #c9ae90;
  --accent-jade: #e08d34;
  --accent-jade-bright: #f5ad56;
  --accent-jade-deep: #8f4e12;
  --accent-gold: #ffd082;
  --accent-gold-soft: rgba(255, 208, 130, 0.20);
  --accent-cinnabar: #ff6d54;
  --accent-ok: #54e6ac;
  --ic-well-color: #ffd082;
}

/* =========================================================
   浅色皮肤共用底座（强制 95% 实润瓷面 + 浓墨 AAA 级清晰文字）
   ========================================================= */
body.is-light-theme {
  --rim-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -1px 0 rgba(16, 36, 40, 0.08);
  --shadow-float: 0 16px 40px rgba(15, 36, 44, 0.14), 0 3px 10px rgba(15, 36, 44, 0.08);
  --btn-shadow: 0 1px 3px rgba(15, 36, 44, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --vignette: radial-gradient(circle at 50% 48%, transparent 66%, rgba(120, 138, 146, 0.16) 100%);
}

/* ⑦ 宋瓷月白（白瓷浓墨 × 石青） */
body.theme-ivory {
  --bg-canvas: #e6eff0;
  --hud-bg: linear-gradient(168deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 250, 250, 0.97) 100%);
  --hud-bg-solid: rgba(255, 255, 255, 0.98);
  --hud-surface: #ffffff;
  --hud-surface-hover: #f0f8f7;
  --hud-inset: #edf4f4;
  --hud-border: rgba(17, 105, 98, 0.30);
  --hud-border-strong: rgba(158, 105, 29, 0.65);
  --hud-border-soft: rgba(17, 68, 72, 0.16);
  --top-beam: linear-gradient(90deg, transparent, rgba(17, 118, 110, 0.78) 34%, rgba(176, 120, 36, 0.75) 68%, transparent);
  --text-main: #0c1f24;
  --text-sub: #2d484f;
  --text-muted: #506b72;
  --accent-jade: #116e66;
  --accent-jade-bright: #198c82;
  --accent-jade-deep: #0a4c46;
  --accent-gold: #9a6416;
  --accent-gold-soft: rgba(154, 100, 22, 0.13);
  --accent-cinnabar: #b83324;
  --accent-warn: #b8680e;
  --accent-ok: #0d7550;
  --range-track-bg: rgba(17, 68, 72, 0.22);
  --ic-well-bg: rgba(17, 110, 102, 0.11);
  --ic-well-border: rgba(17, 110, 102, 0.22);
  --ic-well-color: #0e5e57;
}

/* ⑧ 古籍宣纸（明丽熟宣 × 浓松烟墨 × 朱砂） */
body.theme-parchment {
  --bg-canvas: #f0e4ce;
  --hud-bg: linear-gradient(168deg, rgba(255, 252, 245, 0.95) 0%, rgba(248, 241, 226, 0.97) 100%);
  --hud-bg-solid: rgba(255, 251, 243, 0.98);
  --hud-surface: #fffdf8;
  --hud-surface-hover: #fbf3e2;
  --hud-inset: #f2e8d4;
  --hud-border: rgba(152, 100, 28, 0.34);
  --hud-border-strong: rgba(178, 52, 38, 0.62);
  --hud-border-soft: rgba(88, 60, 22, 0.18);
  --top-beam: linear-gradient(90deg, transparent, rgba(168, 112, 32, 0.80) 35%, rgba(178, 52, 38, 0.65) 70%, transparent);
  --text-main: #18120c;
  --text-sub: #423526;
  --text-muted: #695946;
  --accent-jade: #15665f;
  --accent-jade-bright: #1e8279;
  --accent-jade-deep: #0d4742;
  --accent-gold: #945d12;
  --accent-gold-soft: rgba(148, 93, 18, 0.13);
  --accent-cinnabar: #b23222;
  --accent-warn: #b8660c;
  --accent-ok: #0f724e;
  --range-track-bg: rgba(88, 60, 22, 0.22);
  --ic-well-bg: rgba(148, 93, 18, 0.11);
  --ic-well-border: rgba(148, 93, 18, 0.24);
  --ic-well-color: #8c560e;
}

/* ⑨ 晴岚青瓷（江南晴空湖蓝 × 浓靛宝蓝） */
body.theme-mistblue {
  --bg-canvas: #dbeaf6;
  --hud-bg: linear-gradient(168deg, rgba(254, 255, 255, 0.95) 0%, rgba(240, 248, 255, 0.97) 100%);
  --hud-bg-solid: rgba(252, 254, 255, 0.98);
  --hud-surface: #ffffff;
  --hud-surface-hover: #ebf5fe;
  --hud-inset: #e6f0fa;
  --hud-border: rgba(24, 95, 166, 0.30);
  --hud-border-strong: rgba(154, 107, 34, 0.62);
  --hud-border-soft: rgba(20, 62, 108, 0.16);
  --top-beam: linear-gradient(90deg, transparent, rgba(28, 110, 190, 0.80) 34%, rgba(168, 118, 38, 0.72) 68%, transparent);
  --text-main: #0c1d30;
  --text-sub: #2d4763;
  --text-muted: #506b87;
  --accent-jade: #1862ab;
  --accent-jade-bright: #247cd1;
  --accent-jade-deep: #104378;
  --accent-gold: #946218;
  --accent-gold-soft: rgba(148, 98, 24, 0.12);
  --accent-cinnabar: #bd3528;
  --accent-warn: #ba690e;
  --accent-ok: #0e7654;
  --range-track-bg: rgba(20, 62, 108, 0.20);
  --ic-well-bg: rgba(24, 98, 171, 0.11);
  --ic-well-border: rgba(24, 98, 171, 0.22);
  --ic-well-color: #145394;
}

/* ⑩ 荷风玉露（清雅藕荷晨露 × 浓黛绛梅） */
body.theme-lotus {
  --bg-canvas: #efe7ec;
  --hud-bg: linear-gradient(168deg, rgba(255, 253, 254, 0.95) 0%, rgba(249, 242, 246, 0.97) 100%);
  --hud-bg-solid: rgba(255, 252, 254, 0.98);
  --hud-surface: #ffffff;
  --hud-surface-hover: #fcf0f5;
  --hud-inset: #f4eaf0;
  --hud-border: rgba(166, 58, 92, 0.30);
  --hud-border-strong: rgba(23, 105, 98, 0.58);
  --hud-border-soft: rgba(74, 38, 56, 0.16);
  --top-beam: linear-gradient(90deg, transparent, rgba(176, 62, 98, 0.78) 34%, rgba(24, 114, 106, 0.72) 68%, transparent);
  --text-main: #1d121c;
  --text-sub: #4a3446;
  --text-muted: #70586b;
  --accent-jade: #a4385a;
  --accent-jade-bright: #c44a70;
  --accent-jade-deep: #75223d;
  --accent-gold: #156b64;
  --accent-gold-soft: rgba(21, 107, 100, 0.12);
  --accent-cinnabar: #bd3428;
  --accent-warn: #ba690e;
  --accent-ok: #0e7654;
  --range-track-bg: rgba(74, 38, 56, 0.20);
  --ic-well-bg: rgba(164, 56, 90, 0.11);
  --ic-well-border: rgba(164, 56, 90, 0.22);
  --ic-well-color: #8f2d4c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
button:focus-visible { outline: 1.5px solid var(--accent-gold); outline-offset: 2px; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  transition: background 0.35s ease, color 0.25s ease;
}

.ui-ic {
  width: 14.5px;
  height: 14.5px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.ui-ic.xs { width: 13px; height: 13px; }

#webgl-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  cursor: grab;
}
#webgl-stage:active { cursor: grabbing; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--vignette);
}
body.state-danger::after {
  background: radial-gradient(circle at 50% 48%, transparent 46%, rgba(185, 36, 24, 0.50) 100%);
  animation: dangerPulse 1.2s ease-in-out infinite;
}
@keyframes dangerPulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1.0; }
}

.corner-orn {
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 4;
  opacity: 0.72;
}
.corner-orn.tl { top: 6px; left: 6px; border-top: 1.5px solid var(--accent-gold); border-left: 1.5px solid var(--accent-gold); border-top-left-radius: 4px; }
.corner-orn.tr { top: 6px; right: 6px; border-top: 1.5px solid var(--accent-gold); border-right: 1.5px solid var(--accent-gold); border-top-right-radius: 4px; }
.corner-orn.bl { bottom: 6px; left: 6px; border-bottom: 1.5px solid var(--accent-gold); border-left: 1.5px solid var(--accent-gold); border-bottom-left-radius: 4px; }
.corner-orn.br { bottom: 6px; right: 6px; border-bottom: 1.5px solid var(--accent-gold); border-right: 1.5px solid var(--accent-gold); border-bottom-right-radius: 4px; }

/* 博物馆级极细画框与边隅微刻装饰（填充空白留白感，零遮挡、零干扰） */
.viewport-frame {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.vf-rail {
  position: absolute;
  top: 230px;
  bottom: 245px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--hud-border) 28%, var(--hud-border) 72%, transparent);
  opacity: 0.42;
}
.vf-rail.left { left: 10px; }
.vf-rail.right { right: 10px; }
.vf-mark {
  position: absolute;
  top: 50%;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 3.5px;
  color: var(--text-muted);
  opacity: 0.46;
  transform: translateY(-50%);
}
.vf-mark.left { left: 16px; }
.vf-mark.right { right: 16px; }

/* =========================================================
   顶部极简摄影机 HUD 栏（右置紧凑工具胶囊）
   ========================================================= */
.hud-topbar {
  position: fixed;
  top: 14px;
  left: 20px;
  right: 18px;
  z-index: 26;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.brand-seal {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #cf4836 0%, #8f2115 100%);
  color: #fdf6e8;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 228, 184, 0.60);
  box-shadow: inset 0 0 0 2px rgba(120, 22, 14, 0.38), 0 4px 12px rgba(178, 58, 42, 0.32);
  position: relative;
  flex-shrink: 0;
}
.brand-seal::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(255, 238, 210, 0.40); border-radius: 6px; pointer-events: none; }
.brand-seal.sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 11.5px;
}
.brand-seal.sm::after { inset: 2.5px; border-radius: 5.5px; }
.brand-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.34));
  transition: transform 0.22s ease;
}
.brand-logo-img:hover { transform: scale(1.06); }

.top-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: 999px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-float), var(--rim-highlight);
}
.top-sep { width: 1px; height: 16px; background: var(--hud-border); margin: 0 3px; opacity: 0.75; }

/* =========================================================
   十雅皮肤画廊弹出面板（2 列 × 5 行可视化色卡）
   ========================================================= */
.theme-popover {
  position: absolute;
  top: 48px;
  right: 0;
  width: 348px;
  padding: 12px;
  border-radius: 16px;
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-border-strong);
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow-float), var(--rim-highlight);
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 40;
}
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.theme-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7.5px 9px;
  border-radius: 11px;
  border: 1px solid var(--hud-border-soft);
  background: var(--hud-surface);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.theme-card:hover {
  border-color: var(--accent-gold);
  background: var(--hud-surface-hover);
  transform: translateY(-1px);
}
.theme-card.active {
  border-color: var(--accent-jade);
  background: var(--accent-gold-soft);
  box-shadow: 0 0 0 1.5px var(--accent-jade);
}
.theme-dots {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.theme-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  margin-left: -4px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
.theme-dots i:first-child { margin-left: 0; }
.theme-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.theme-meta strong {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}
.theme-meta span {
  font-size: 10px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-mode-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 5px;
  border-radius: 5px;
  flex-shrink: 0;
}
.theme-mode-tag.dark { background: rgba(16, 28, 48, 0.85); color: #f5cd7e; border: 1px solid rgba(245, 205, 126, 0.4); }
.theme-mode-tag.light { background: #fff9ec; color: #8c560e; border: 1px solid rgba(148, 93, 18, 0.35); }

/* =========================================================
   高定通用按钮体系（清晰锐利文字 + 精微高光）
   ========================================================= */
.hud-btn {
  appearance: none;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hud-border-soft);
  background: var(--hud-surface);
  color: var(--text-main);
  padding: 6.5px 12.5px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5.5px;
  white-space: nowrap;
  box-shadow: var(--btn-shadow);
}
.hud-btn:hover {
  border-color: var(--hud-border-strong);
  background: var(--hud-surface-hover);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.hud-btn:active { transform: translateY(1px) scale(0.985); }
.hud-btn.lg { padding: 11px 24px; font-size: 14px; font-weight: 700; gap: 8px; }
.hud-btn.full-w { width: 100%; border-radius: 10px; padding: 8.5px 12px; }

.hud-btn.primary {
  background: linear-gradient(140deg, var(--accent-jade-bright) 0%, var(--accent-jade) 55%, var(--accent-jade-deep) 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.30);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.hud-btn.primary:hover { filter: brightness(1.07); border-color: var(--accent-gold); }
.hud-btn.danger {
  background: linear-gradient(140deg, #e04f3d 0%, #a52418 100%);
  color: #ffffff;
  border-color: rgba(255, 210, 198, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  box-shadow: 0 6px 16px rgba(165, 36, 24, 0.40);
  animation: pulseWarn 1.5s infinite;
}
.hud-btn.active {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, var(--accent-jade-bright) 0%, var(--accent-jade) 56%, var(--accent-jade-deep) 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 2px var(--accent-gold-soft), 0 6px 16px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.hud-btn.active:hover {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, var(--accent-jade-bright) 0%, var(--accent-jade) 56%, var(--accent-jade-deep) 100%);
  filter: brightness(1.06);
}
.hud-btn.danger:hover {
  background: linear-gradient(140deg, #e04f3d 0%, #a52418 100%);
  border-color: rgba(255, 224, 210, 0.8);
  filter: brightness(1.06);
}
.hud-btn.active .ui-ic,
.hud-btn.danger .ui-ic,
.hud-btn.primary .ui-ic {
  color: #ffffff;
}
@keyframes pulseWarn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 79, 61, 0.50); }
  50% { box-shadow: 0 0 0 9px rgba(224, 79, 61, 0); }
}

.top-actions .hud-btn:not(.primary):not(.active) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.top-actions .hud-btn:not(.primary):not(.active):hover {
  background: var(--hud-surface-hover);
  border-color: var(--hud-border);
}

/* =========================================================
   非方形灵动器物轮廓 × 极简瘦身三浮舱（彻底告别笨重直角大方盒）
   ========================================================= */
.stage-dashboard,
.stage-controls-panel,
.inquiry-dock,
.mini-atlas-card,
.hud-drawer {
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-float), var(--rim-highlight);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
}
.stage-dashboard::before,
.stage-controls-panel::before,
.inquiry-dock::before,
.mini-atlas-card::before,
.hud-drawer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 1.5px;
  background: var(--top-beam);
  pointer-events: none;
  z-index: 5;
}

/* 1. 左上角：品牌印章 × 实时读数一体式玉珪浮囊（博物馆级极简瘦身，释放更大 3D 视野） */
.stage-dashboard {
  position: fixed;
  top: 14px;
  left: 18px;
  z-index: 26;
  width: 256px;
  border-radius: 18px 26px 24px 24px;
  transition: max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.24s ease, border-radius 0.24s ease;
}
.stage-dashboard.collapsed { max-height: 50px; width: 256px; border-radius: 999px; }
.stage-dashboard.collapsed .dash-body { display: none; }
.stage-dashboard.collapsed .dash-header { border-bottom-color: transparent; }
.stage-dashboard.collapsed .collapse-ic { transform: rotate(180deg); }

.dash-brand-block {
  display: flex;
  align-items: center;
  gap: 8.5px;
  min-width: 0;
  flex: 1;
}
.dash-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1.5px;
}
.dash-brand-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dash-brand-h1 {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.4px;
  line-height: 1.15;
  color: var(--text-main);
  white-space: nowrap;
}
.dash-brand-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6.5px;
  border-radius: 999px;
  background: var(--accent-gold-soft);
  border: 1px solid var(--hud-border);
  color: var(--accent-gold);
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-stage-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

/* 2. 左下角：流线云托胶囊操控岛（瘦身 256px，纯圆角触感胶囊） */
.stage-controls-panel {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 21;
  width: 256px;
  max-height: calc(100vh - 220px);
  border-radius: 24px 24px 24px 12px;
  transition: max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.24s ease;
}
.stage-controls-panel.collapsed { max-height: 38px; width: 172px; border-radius: 999px; }
.stage-controls-panel.collapsed .ctrl-panel-body { display: none; }
.stage-controls-panel.collapsed .collapse-ic { transform: rotate(180deg); }

.ctrl-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px 6px 13px;
  border-bottom: 1px solid var(--hud-border-soft);
  background: linear-gradient(180deg, var(--accent-gold-soft) 0%, transparent 100%);
  flex-shrink: 0;
}
.ctrl-panel-title { font-family: var(--font-serif); font-size: 12.5px; font-weight: 700; letter-spacing: 0.4px; color: var(--text-main); }
.ctrl-panel-body { padding: 8px 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ctrl-stage-view { display: flex; flex-direction: column; gap: 6.5px; }
.ctrl-mini-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sub);
}
.ctrl-mini-meta strong { color: var(--accent-gold); font-variant-numeric: tabular-nums; }

/* 3. 右上角：宋式云耳探究提问浮囊（宽 262px，非对称大圆弧，与右下纵剖图互不遮挡） */
.inquiry-dock {
  position: fixed;
  top: 66px;
  right: 18px;
  z-index: 20;
  width: 262px;
  max-height: calc(100vh - 236px);
  border-radius: 26px 12px 26px 26px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, max-height 0.28s ease, width 0.24s ease;
}
.inquiry-dock.collapsed { max-height: 44px; width: 214px; border-radius: 999px; }
.inquiry-dock.collapsed .inq-dock-body { display: none; }
.inquiry-dock.collapsed .collapse-ic { transform: rotate(180deg); }
body.drawer-open .inquiry-dock { transform: translateX(320px); opacity: 0; pointer-events: none; }

/* 4. 右下角：交互式水脉纵剖面 & 实时 3D 方位罗盘微仪（平衡四隅，点击城标直飞实境） */
.mini-atlas-card {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 20;
  width: 262px;
  border-radius: 26px 26px 12px 26px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, max-height 0.28s ease, width 0.24s ease;
}
.mini-atlas-card.collapsed { max-height: 44px; width: 208px; border-radius: 999px; }
.mini-atlas-card.collapsed .atlas-body { display: none; }
.mini-atlas-card.collapsed .atlas-head { border-bottom-color: transparent; }
.mini-atlas-card.collapsed .collapse-ic { transform: rotate(180deg); }
body.drawer-open .mini-atlas-card { transform: translateX(320px); opacity: 0; pointer-events: none; }

.atlas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6.5px 9px 6px 11px;
  border-bottom: 1px solid var(--hud-border-soft);
  background: linear-gradient(180deg, var(--accent-gold-soft) 0%, transparent 100%);
}
.atlas-compass-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.atlas-compass-svg {
  width: 26px;
  height: 26px;
  color: var(--accent-gold);
  flex-shrink: 0;
}
.atlas-head-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.atlas-title {
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
}
.atlas-bearing {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.atlas-body {
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.atlas-elev-svg {
  width: 100%;
  height: 68px;
  display: block;
  overflow: visible;
}
.atlas-grid-line { stroke: var(--hud-border-soft); stroke-width: 0.9; }
.atlas-area { fill: url(#atlasFillGrad); }
.atlas-curve { fill: none; stroke: var(--accent-jade); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.atlas-peak-txt { font-size: 8.5px; font-weight: 700; fill: var(--accent-gold); font-family: var(--font-sans); }
.atlas-probe-line { stroke: var(--accent-gold); stroke-width: 1.2; stroke-dasharray: 2 2; opacity: 0.9; }
.atlas-probe-dot { fill: var(--accent-gold); stroke: var(--hud-bg-solid); stroke-width: 1.5; }
.atlas-city-node { cursor: pointer; }
.atlas-city-node .dot {
  fill: var(--hud-bg-solid);
  stroke: var(--accent-jade);
  stroke-width: 1.6;
  transition: transform 0.16s ease, fill 0.16s ease;
}
.atlas-city-node.peak .dot { stroke: var(--accent-gold); fill: var(--accent-gold); }
.atlas-city-node text {
  font-size: 9px;
  font-weight: 700;
  fill: var(--text-sub);
  font-family: var(--font-sans);
  pointer-events: none;
}
.atlas-city-node:hover .dot { fill: var(--accent-gold); stroke: var(--accent-gold); transform: scale(1.25); }
.atlas-city-node:hover text { fill: var(--accent-gold); }

.atlas-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px dashed var(--hud-border-soft);
  font-size: 10px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}
.atlas-foot strong { color: var(--text-main); font-weight: 700; }

.inq-dock-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px 7px 10px;
  border-bottom: 1px solid var(--hud-border-soft);
  background: linear-gradient(180deg, var(--accent-gold-soft) 0%, transparent 100%);
  flex-shrink: 0;
}
.inq-dock-top .inquiry-tabs { flex: 1; }
.inq-dock-body { padding: 8px 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }

/* 左上一体式品牌+读数标题眉 */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px 7.5px 10px;
  border-bottom: 1px solid var(--hud-border-soft);
  background: linear-gradient(180deg, var(--accent-gold-soft) 0%, transparent 100%);
  flex-shrink: 0;
}
.dash-title-wrap { display: flex; align-items: center; gap: 5px; min-width: 0; }
.dash-title-txt {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-dot { width: 6.5px; height: 6.5px; border-radius: 50%; background: var(--accent-jade); box-shadow: 0 0 7px var(--accent-jade); flex-shrink: 0; }
.dash-dot.gold { background: var(--accent-gold); box-shadow: 0 0 7px var(--accent-gold); }
.dash-tag {
  display: none;
}
.dash-head-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.dash-icon-btn {
  appearance: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid var(--hud-border-soft);
  background: var(--hud-surface);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.dash-icon-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); background: var(--hud-surface-hover); }
#btn-dash-reset-cam:hover { transform: rotate(-35deg); }
.dash-mini-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--hud-border-soft);
  background: var(--hud-surface);
  color: var(--text-main);
  border-radius: 999px;
  padding: 2.5px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.dash-mini-btn:hover { border-color: var(--accent-gold); background: var(--hud-surface-hover); }

.dash-body { padding: 8px 11px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.dash-body::-webkit-scrollbar,
.ctrl-panel-body::-webkit-scrollbar,
.inq-dock-body::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar { width: 3.5px; }
.dash-body::-webkit-scrollbar-thumb,
.ctrl-panel-body::-webkit-scrollbar-thumb,
.inq-dock-body::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb { background: var(--hud-border); border-radius: 99px; }

/* =========================================================
   一体式无框套框 KPI 读数条与纤细标尺
   ========================================================= */
.dash-meters { display: flex; flex-direction: column; gap: 6px; }
.meter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
}
.kpi-cell {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1px 8px 2px 2px;
  box-shadow: none;
}
.kpi-cell:last-child {
  padding: 1px 2px 2px 10px;
  border-left: 1px solid var(--hud-border-soft);
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1px; }
.kpi-cell .label { font-size: 10.5px; font-weight: 600; color: var(--text-sub); }
.kpi-pip { width: 5px; height: 5px; border-radius: 50%; }
.kpi-pip.jade { background: var(--accent-jade); box-shadow: 0 0 6px var(--accent-jade); }
.kpi-pip.gold { background: var(--accent-gold); box-shadow: 0 0 6px var(--accent-gold); }
.kpi-cell .val { font-family: var(--font-serif); font-size: 17.5px; font-weight: 700; line-height: 1.15; color: var(--text-main); font-variant-numeric: tabular-nums; }
.kpi-cell .val.ok { color: var(--accent-ok); }
.kpi-cell .val.warn { color: var(--accent-warn); }
.kpi-cell .val.danger { color: var(--accent-cinnabar); }

.mini-bar-wrap { background: transparent; border: none; border-radius: 0; padding: 2px 2px 1px; }
.mini-bar-meta { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; font-weight: 500; color: var(--text-sub); margin-bottom: 4.5px; gap: 6px; }
.mini-bar-meta strong { color: var(--text-main); font-weight: 700; }
.mini-bar-meta .meta-accent { color: var(--accent-gold); font-weight: 700; white-space: nowrap; }

.mini-bar-track { position: relative; width: 100%; height: 6px; border-radius: 999px; background: var(--range-track-bg); overflow: visible; }
.mini-bar-track.has-ticks::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(255, 255, 255, 0.28) calc(10% - 1px), rgba(255, 255, 255, 0.28) 10%);
  pointer-events: none;
}
.mini-bar-track.split-track { background: linear-gradient(90deg, rgba(212, 158, 66, 0.28), rgba(212, 158, 66, 0.50)); }
.mini-bar-fill { height: 100%; border-radius: 999px; transition: width 0.36s cubic-bezier(0.22, 1, 0.36, 1); }
.mini-bar-fill.jade { background: linear-gradient(90deg, var(--accent-jade-deep) 0%, var(--accent-jade) 60%, var(--accent-jade-bright) 100%); }
.mini-bar-fill.gold { background: linear-gradient(90deg, #a67223 0%, #e0a94d 68%, #fae0a0 100%); }
.mini-bar-pin { position: absolute; top: -3px; width: 3.5px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #fff6db, #e0a238); transform: translateX(-50%); box-shadow: 0 0 8px rgba(224, 162, 56, 0.85); z-index: 2; }

/* =========================================================
   左下角胶囊按钮簇（全圆角药丸键 + 无冗余外框滑块）
   ========================================================= */
.dash-section-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--accent-gold); }
.sec-title { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sec-diamond { display: inline-block; width: 5px; height: 5px; background: var(--accent-gold); transform: rotate(45deg); border-radius: 1px; flex-shrink: 0; }
.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--hud-border), transparent); }
.sec-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--hud-surface);
  border: 1px solid var(--hud-border-soft);
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sec-badge.clickable { cursor: pointer; transition: all 0.18s ease; }
.sec-badge.clickable:hover { border-color: var(--accent-gold); color: var(--accent-gold); background: var(--hud-surface-hover); }

.dash-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5.5px; }
.dash-btn-grid .act-tile {
  justify-content: center;
  padding: 5.5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  gap: 5px;
  min-height: 31px;
}
.dash-btn-grid .act-tile.span-2 { grid-column: 1 / -1; justify-content: center; }
.dash-btn-grid .act-tile .ui-ic { color: var(--accent-gold); }
.dash-btn-grid .act-tile.primary .ui-ic,
.dash-btn-grid .act-tile.active .ui-ic,
.dash-btn-grid .act-tile.danger .ui-ic { color: #ffffff; }
.dash-btn-grid .act-tile.btn-fired {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 3px var(--accent-gold-soft), 0 4px 14px rgba(0, 0, 0, 0.22) !important;
  transform: scale(0.97);
}

.dash-slider-row { display: flex; align-items: center; padding: 3px 4px 5px; background: transparent; border: none; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-jade) 0%, var(--accent-gold) var(--pct, 50%), var(--range-track-bg) var(--pct, 50%), var(--range-track-bg) 100%);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff9e8 0%, #e5b762 62%, #ab7420 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.34);
  cursor: grab;
  transition: transform 0.16s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.16); }

/* =========================================================
   右侧云耳气泡提问舱（非方形对话气泡 + 全圆角搜索胶囊）
   ========================================================= */
.dash-inquiry-box { display: flex; flex-direction: column; gap: 6.5px; }
.inquiry-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 2.5px; border-radius: 999px; background: var(--hud-inset); border: 1px solid var(--hud-border-soft); }
.inq-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-sub);
  border-radius: 999px;
  padding: 4.5px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.inq-tab:hover { color: var(--text-main); }
.inq-tab.active {
  background: linear-gradient(140deg, var(--accent-jade-bright), var(--accent-jade-deep));
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.inq-panel { display: flex; flex-direction: column; gap: 6px; }
.qa-chip-list { display: flex; flex-direction: column; gap: 5px; }
.qa-chip {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--hud-border-soft);
  background: var(--hud-surface);
  color: var(--text-main);
  border-radius: 16px 16px 4px 16px;
  padding: 6.5px 10px 6.5px 12px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  line-height: 1.38;
  box-shadow: var(--btn-shadow);
}
.qa-chip::before { display: none; }
.qa-chip::after { content: "›"; font-size: 14px; font-weight: 700; color: var(--accent-gold); flex-shrink: 0; }
.qa-chip:hover { border-color: var(--hud-border-strong); background: var(--hud-surface-hover); transform: translateX(-2px); }

.qa-form {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 3px 3px 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--hud-border);
  background: var(--hud-surface);
}
.qa-form:focus-within { border-color: var(--accent-jade); box-shadow: 0 0 0 2.5px rgba(56, 196, 220, 0.18); }
.qa-form input { flex: 1; min-width: 0; padding: 4.5px 2px; border: none; background: transparent; color: var(--text-main); font-size: 11.5px; font-weight: 500; outline: none; user-select: text; }
.qa-form input::placeholder { color: var(--text-muted); }
.qa-send-btn { width: 27px; height: 27px; padding: 0 !important; border-radius: 50% !important; flex-shrink: 0; }

.qa-answer-box {
  background: var(--hud-surface);
  border: 1px solid var(--hud-border);
  border-radius: 16px 4px 16px 16px;
  padding: 9px 10.5px;
  font-size: 11.5px;
  line-height: 1.56;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}
.qa-answer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.qa-answer-head { font-family: var(--font-serif); font-weight: 700; color: var(--accent-gold); font-size: 12px; line-height: 1.38; flex: 1; }
.qa-loading { opacity: 0.88; }
.qa-source-badge {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 6.5px;
  border-radius: 999px;
  border: 1px solid var(--hud-border-soft);
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}
.qa-source-badge.llm {
  border-color: rgba(56, 196, 220, 0.45);
  color: var(--accent-jade);
  background: rgba(56, 196, 220, 0.12);
}
.qa-answer-body { font-size: 11.5px; line-height: 1.58; color: var(--text-main); }
.qa-metrics-row { display: flex; flex-wrap: wrap; gap: 5px; }
.qa-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hud-border-soft);
  font-size: 10px;
}
.qa-metric-chip em { font-style: normal; color: var(--text-sub); }
.qa-metric-chip b { color: var(--accent-gold); font-weight: 700; }
.qa-answer-ev { font-size: 10.5px; color: var(--text-sub); border-top: 1px dashed var(--hud-border-soft); padding-top: 4.5px; }
.qa-followups { display: flex; flex-wrap: wrap; gap: 4.5px; padding-top: 2px; }
.qa-followup-btn {
  appearance: none;
  border: 1px solid var(--hud-border-soft);
  background: rgba(56, 196, 220, 0.08);
  color: var(--text-main);
  font-size: 10.5px;
  line-height: 1.3;
  padding: 3.5px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}
.qa-followup-btn:hover { border-color: var(--accent-jade); background: rgba(56, 196, 220, 0.2); color: var(--accent-gold); }
.qa-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-gold-soft);
  border: 1px solid var(--hud-border-strong);
  color: var(--accent-gold);
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.qa-action-pill span:last-child { white-space: nowrap; flex-shrink: 0; padding: 1px 6px; border-radius: 999px; background: rgba(166, 114, 35, 0.22); }

.explore-card { background: transparent; border: none; border-radius: 0; padding: 2px; display: flex; flex-direction: column; gap: 6.5px; }
.explore-head { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: var(--accent-gold); font-weight: 700; }
.explore-q { font-size: 12px; font-weight: 700; line-height: 1.44; color: var(--text-main); }
.explore-opts { display: flex; flex-direction: column; gap: 5px; }
.explore-opt {
  appearance: none;
  text-align: left;
  padding: 6.5px 11px;
  border-radius: 999px;
  border: 1px solid var(--hud-border-soft);
  background: var(--hud-surface);
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.explore-opt:hover { border-color: var(--accent-gold); background: var(--hud-surface-hover); }
.explore-opt.selected { border-color: var(--accent-jade); background: var(--accent-gold-soft); font-weight: 700; }
.explore-reveal { font-size: 11px; line-height: 1.5; padding: 7.5px 10px; border-radius: 14px 4px 14px 14px; background: var(--hud-surface); border: 1px solid var(--hud-border); color: var(--text-main); }

/* =========================================================
   右侧参数典籍抽屉（同步流线瘦身）
   ========================================================= */
.hud-drawer {
  position: fixed;
  top: 68px;
  right: 18px;
  bottom: 80px;
  width: 298px;
  border-radius: 26px 10px 10px 26px;
  z-index: 22;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}
.hud-drawer.collapsed { transform: translateX(332px); opacity: 0; pointer-events: none; }

.drawer-head {
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--hud-border-soft);
  background: linear-gradient(180deg, var(--accent-gold-soft) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.drawer-head-left { display: flex; align-items: center; gap: 7px; min-width: 0; }
.drawer-head-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.drawer-head h2 { font-family: var(--font-serif); font-size: 14.5px; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-head .tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-gold-soft); color: var(--accent-gold); border: 1px solid var(--hud-border); white-space: nowrap; }
.icon-close-btn { appearance: none; width: 25px; height: 25px; border-radius: 999px; border: 1px solid var(--hud-border-soft); background: var(--hud-surface); color: var(--text-main); display: grid; place-items: center; cursor: pointer; }
.icon-close-btn:hover { border-color: var(--accent-gold); background: var(--hud-surface-hover); }

.drawer-body { flex: 1; overflow-y: auto; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.stage-panel { display: flex; flex-direction: column; gap: 10px; }

.panel-section { background: var(--hud-surface); border: 1px solid var(--hud-border-soft); border-radius: var(--radius-md); padding: 11px 12px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--btn-shadow); }
.panel-section.result-nested { background: var(--hud-inset); padding: 10px 11px; gap: 7px; box-shadow: none; }
.crisis-res-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; font-weight: 700; }
.crisis-res-head.ok { color: var(--accent-ok); }
.crisis-res-head.danger { color: var(--accent-cinnabar); }
.crisis-score-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--hud-surface); border: 1px solid currentColor; white-space: nowrap; }
.crisis-res-advice { font-size: 11.5px; line-height: 1.54; color: var(--text-main); }
.crisis-m-list { display: flex; flex-direction: column; gap: 4.5px; border-top: 1px dashed var(--hud-border-soft); padding-top: 6px; }
.crisis-m-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-sub); padding: 3.5px 7px; border-radius: 6px; background: var(--hud-surface); }
.crisis-m-row strong { color: var(--text-main); font-weight: 700; font-variant-numeric: tabular-nums; }

.section-label { font-size: 11.5px; font-weight: 700; color: var(--accent-gold); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-pill { font-size: 10px; font-weight: 700; padding: 1.5px 7.5px; border-radius: 999px; background: var(--accent-gold-soft); border: 1px solid var(--hud-border); color: var(--accent-gold); white-space: nowrap; flex-shrink: 0; }
.ctrl-row { display: flex; flex-direction: column; gap: 6px; }
.ctrl-row .ctrl-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--text-sub); }
.ctrl-row .ctrl-meta strong { color: var(--text-main); font-variant-numeric: tabular-nums; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--hud-surface); border: 1px solid var(--hud-border-soft); }

.seg-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.seg-group.cols-3 { grid-template-columns: repeat(3, 1fr); }
.seg-group.cols-2 { grid-template-columns: repeat(2, 1fr); }
.seg-group.action-pair .hud-btn { border-radius: 10px; padding: 7.5px 8px; font-size: 12px; }
.seg-tray { padding: 3.5px; border-radius: 10px; background: var(--hud-inset); border: 1px solid var(--hud-border-soft); gap: 3px; }
.seg-tray .seg-btn { border-color: transparent; padding: 6.5px 3px; border-radius: 7.5px; white-space: nowrap; font-size: 11px; }
.seg-btn { padding: 6.5px 4px; border-radius: 8px; border: 1px solid var(--hud-border-soft); background: transparent; color: var(--text-sub); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all 0.18s ease; text-align: center; white-space: nowrap; }
.seg-btn:hover { border-color: var(--accent-gold); color: var(--text-main); background: var(--hud-surface-hover); }
.seg-btn.active { background: linear-gradient(135deg, var(--accent-jade-bright), var(--accent-jade-deep)); color: #ffffff; border-color: transparent; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22); }
.mini-play-btn { padding: 2.5px 10px; font-size: 10.5px; border-radius: 999px; }
.bom-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
.bom-grid .seg-btn { text-align: left; padding: 6px 8px; font-size: 11px; background: var(--hud-surface); color: var(--text-main); }

select.hud-select { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--hud-border); background: var(--hud-bg-solid); color: var(--text-main); font-size: 12px; font-weight: 600; outline: none; cursor: pointer; }

.quote-box { border-left: 3px solid var(--accent-cinnabar); padding: 8.5px 10px; background: var(--hud-inset); border-radius: 0 9px 9px 0; font-size: 12px; line-height: 1.56; color: var(--text-main); }
.quote-box .src { display: block; margin-top: 4px; font-size: 11px; color: var(--accent-gold); font-weight: 700; }

.myth-chip-list { display: flex; flex-direction: column; gap: 5.5px; }
.myth-chip { text-align: left; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--hud-border-soft); background: var(--hud-surface); color: var(--text-main); font-size: 11.5px; line-height: 1.46; cursor: pointer; }
.myth-chip:hover { border-color: var(--accent-cinnabar); background: var(--hud-surface-hover); }
.myth-chip.active { border-color: var(--accent-cinnabar); background: var(--accent-gold-soft); font-weight: 600; }

.cad-canvas-wrap { position: relative; width: 100%; background: #0a151c; border: 1px solid var(--hud-border); border-radius: 10px; padding: 22px 6px 6px; }
.cad-legend { position: absolute; top: 5px; left: 8px; right: 8px; display: flex; gap: 10px; font-size: 9.5px; font-weight: 600; color: #c8dce0; }
.cad-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cad-legend .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.cad-legend .dot.cut { background: #e85d4a; }
.cad-legend .dot.eng { background: #3bd1c2; }
.cad-legend .dot.dim { background: #cfa353; }
#cad-nesting-canvas { width: 100%; height: 122px; display: block; border-radius: 4px; }
.cad-meta-line { font-size: 11px; color: var(--text-sub); line-height: 1.44; }

.rubbing-preview { width: 100%; min-height: 132px; display: flex; align-items: center; justify-content: center; background: linear-gradient(155deg, #fbf6ea, #f1e7d2); border: 1px solid rgba(184, 134, 53, 0.50); border-radius: 10px; padding: 8px; }
.rubbing-preview svg { max-height: 156px; width: auto; }

details.adv-fold { border: 1px solid var(--hud-border-soft); border-radius: var(--radius-md); padding: 9.5px 11px; background: var(--hud-inset); }
details.adv-fold summary { font-size: 11.5px; color: var(--accent-gold); cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.adv-fold summary::-webkit-details-marker { display: none; }
details.adv-fold .fold-ic { transform: rotate(180deg); transition: transform 0.22s ease; }
details.adv-fold[open] .fold-ic { transform: rotate(0deg); }
details.adv-fold[open] summary { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--hud-border-soft); }
.adv-fold-body { display: flex; flex-direction: column; gap: 10px; }

/* =========================================================
   设置弹层、告警横幅、底部导航栈、气泡与弹窗
   ========================================================= */
.settings-popover {
  position: absolute;
  top: 48px;
  right: 0;
  width: 332px;
  max-height: calc(100vh - 84px);
  overflow-y: auto;
  padding: 12px;
  border-radius: 16px;
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-border-strong);
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow-float), var(--rim-highlight);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}
.settings-title { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--accent-gold); padding: 2px 4px 6px; border-bottom: 1px solid var(--hud-border-soft); }
.settings-ver { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--accent-gold-soft); border: 1px solid var(--hud-border); color: var(--accent-gold); }
.settings-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.settings-popover .hud-btn { width: 100%; justify-content: center; border-radius: 10px; padding: 6.5px 8px; font-size: 11.5px; }
.settings-subhead { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-sub); padding: 0 2px; }
.settings-subhead strong { color: var(--accent-gold); font-family: var(--font-serif); }
.settings-divider { height: 1px; background: var(--hud-border-soft); margin: 1px 0; }

.alert-banner {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(176, 34, 24, 0.96), rgba(124, 20, 14, 0.96));
  color: #ffffff;
  border: 1px solid rgba(255, 205, 190, 0.65);
  box-shadow: 0 14px 36px rgba(154, 30, 22, 0.50);
  font-size: 12.5px;
  font-weight: 700;
}
.alert-banner.visible { display: flex; }

.bottom-hud-stack {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  max-width: min(820px, calc(100vw - 574px));
  pointer-events: none;
}
.bottom-hud-stack > * { pointer-events: auto; }

.voice-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  padding: 0 3px;
  flex-shrink: 0;
}
.voice-wave i {
  display: block;
  width: 2.5px;
  height: 100%;
  border-radius: 99px;
  background: var(--accent-jade);
  animation: vWave 0.72s ease-in-out infinite;
}
.voice-wave i:nth-child(2) { animation-delay: 0.16s; background: var(--accent-gold); }
.voice-wave i:nth-child(3) { animation-delay: 0.32s; }
@keyframes vWave {
  0%, 100% { transform: scaleY(0.32); }
  50% { transform: scaleY(1.0); }
}

.story-guide-bar {
  max-width: 100%;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-border);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-float), var(--rim-highlight);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}
.story-guide-bar .guide-tag {
  background: linear-gradient(135deg, #d14836, #942116);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2.5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
#story-guide-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hud-bottom-dock {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-border);
  border-radius: 999px;
  backdrop-filter: blur(26px);
  box-shadow: var(--shadow-float), var(--rim-highlight);
}
.hud-bottom-dock::before { content: ""; position: absolute; top: 0; left: 34px; right: 34px; height: 1px; background: var(--top-beam); }

.stage-pill {
  appearance: none;
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-sub);
  padding: 6.5px 11px 6.5px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  gap: 5.5px;
  white-space: nowrap;
}
.stage-pill .num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-weight: 700;
  background: var(--hud-surface);
  border: 1px solid var(--hud-border-soft);
  color: var(--accent-gold);
}
.stage-pill:hover { color: var(--text-main); background: var(--hud-surface-hover); }
.stage-pill.active {
  background: linear-gradient(135deg, var(--accent-jade-bright) 0%, var(--accent-jade) 60%, var(--accent-jade-deep) 100%);
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}
.stage-pill.active .num { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 240, 200, 0.60); color: #ffffff; }
.stage-pill.active::after { content: ""; position: absolute; bottom: 2px; left: 26%; right: 26%; height: 1.5px; border-radius: 99px; background: linear-gradient(90deg, transparent, #f8d88e, transparent); }

.tour-caption { max-width: 680px; padding: 9px 22px; border-radius: 999px; background: rgba(11, 20, 36, 0.94); color: #ffffff; border: 1px solid rgba(245, 205, 126, 0.60); font-family: var(--font-serif); font-size: 14.5px; letter-spacing: 0.7px; text-align: center; display: none; }
.tour-caption.visible { display: block; }

.pick-tooltip {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 19;
  max-width: 380px;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-border-strong);
  border-left: 3.5px solid var(--accent-gold);
  box-shadow: var(--shadow-float), var(--rim-highlight);
  font-size: 12px;
  line-height: 1.54;
  color: var(--text-main);
  display: none;
}
.pick-tooltip.visible { display: block; }
.pick-tooltip strong { display: block; font-family: var(--font-serif); color: var(--accent-gold); margin-bottom: 2px; font-size: 13px; }

.cursor-hint { position: fixed; z-index: 45; pointer-events: none; padding: 6px 13px; border-radius: 999px; background: rgba(10, 20, 36, 0.96); color: #fff2cc; border: 1px solid rgba(245, 205, 126, 0.78); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42); font-size: 12px; font-weight: 700; white-space: nowrap; display: none; }
.cursor-hint.visible { display: block; }

.dossier-modal { position: fixed; inset: 0; z-index: 42; background: rgba(8, 16, 28, 0.66); backdrop-filter: blur(12px); display: none; align-items: center; justify-content: center; padding: 20px; }
.dossier-modal.visible { display: flex; }
.dossier-card { width: min(700px, 94vw); max-height: 86vh; overflow-y: auto; background: linear-gradient(165deg, #fcf8ef, #f4ebda); color: #162429; border: 1.5px solid #b88635; border-radius: var(--radius-lg); padding: 26px 30px; box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44); position: relative; }
.dossier-card h3 { font-family: var(--font-serif); font-size: 20px; color: #124844; margin-bottom: 12px; border-bottom: 1px solid rgba(20, 77, 73, 0.24); padding-bottom: 10px; padding-right: 68px; }
.dossier-seal { position: absolute; top: 22px; right: 26px; width: 52px; height: 52px; border: 2px solid #b23a2a; border-radius: 7px; color: #b23a2a; font-family: var(--font-serif); font-weight: 700; font-size: 13px; display: grid; place-items: center; text-align: center; line-height: 1.15; transform: rotate(-7deg); }
.dossier-footer { margin-top: 16px; text-align: right; }
.dossier-close-btn { color: #162429 !important; background: rgba(20, 77, 73, 0.10) !important; border-color: rgba(20, 77, 73, 0.34) !important; }

/* 博物馆深度档案弹窗专用排版（统计卡片、数据表、公式卡、可点击名城飞镜标签） */
.dos-lead { font-size: 13px; color: #43575c; line-height: 1.62; margin-bottom: 12px; }
.dos-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.dos-stat { background: rgba(20, 77, 73, 0.07); border: 1px solid rgba(184, 134, 53, 0.32); border-radius: 10px; padding: 9px 10px; }
.dos-stat span { display: block; font-size: 10.5px; color: #54696e; margin-bottom: 2px; }
.dos-stat strong { font-family: var(--font-serif); font-size: 16px; color: #124844; }
.dos-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 12px; }
.dos-table th { text-align: left; padding: 7px 8px; background: rgba(20, 77, 73, 0.10); color: #124844; font-weight: 700; border-bottom: 1.5px solid rgba(20, 77, 73, 0.25); }
.dos-table td { padding: 7px 8px; border-bottom: 1px solid rgba(20, 77, 73, 0.12); color: #1d2e33; vertical-align: top; line-height: 1.48; }
.dos-table tr:hover td { background: rgba(184, 134, 53, 0.08); }
.dos-formula { background: rgba(20, 77, 73, 0.08); border-left: 3.5px solid #146a63; border-radius: 0 9px 9px 0; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.65; }
.dos-formula strong { color: #124844; display: block; margin-bottom: 2px; }
.dos-formula code { font-family: Consolas, monospace; background: rgba(255, 255, 255, 0.72); padding: 1px 6px; border-radius: 4px; color: #9c2b1e; font-weight: 700; }
.dos-city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.dos-city-card { background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(184, 134, 53, 0.34); border-radius: 10px; padding: 9px 11px; cursor: pointer; text-align: left; transition: all 0.18s ease; }
.dos-city-card:hover { background: #fffdf8; border-color: #146a63; transform: translateY(-1px); }
.dos-city-card h4 { font-family: var(--font-serif); font-size: 13.5px; color: #124844; margin-bottom: 3px; display: flex; justify-content: space-between; }
.dos-city-card h4 em { font-style: normal; font-size: 11px; color: #9c6216; }
.dos-city-card p { font-size: 11.5px; color: #3a4e53; line-height: 1.46; }
.dos-bar { height: 6px; border-radius: 99px; background: rgba(20, 77, 73, 0.14); overflow: hidden; margin-top: 3px; }
.dos-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #126962, #d49c3a); }

.hidden { display: none !important; }

/* 首屏典雅宋韵开场幕布（轻盈通透、极简留白、器物感鎏金双框） */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 50% 44%, rgba(6, 18, 34, 0.42) 0%, rgba(4, 10, 22, 0.78) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.42s ease;
}
.intro-overlay.fade-out { opacity: 0; pointer-events: none; }
.intro-card {
  position: relative;
  width: min(540px, 92vw);
  background: var(--hud-bg);
  border: 1px solid var(--hud-border-strong);
  border-radius: 32px 16px 32px 16px;
  padding: 40px 42px 36px;
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.50), var(--rim-highlight);
  text-align: center;
  color: var(--text-main);
  overflow: hidden;
  backdrop-filter: blur(26px);
}
.intro-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 56px;
  right: 56px;
  height: 2px;
  background: var(--top-beam);
}
.intro-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px 10px 24px 10px;
  border: 1px solid var(--hud-border-soft);
  pointer-events: none;
}
.intro-halo {
  position: absolute;
  top: -70px;
  left: 50%;
  width: 320px;
  height: 190px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--accent-gold-soft) 0%, transparent 72%);
  pointer-events: none;
}
.intro-emblem {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}
.emblem-line {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.72;
}
.intro-logo-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(74, 216, 202, 0.26));
}
.intro-card h2 {
  position: relative;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 10px;
  padding-left: 10px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-main);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.intro-sub {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 2.2px;
  color: var(--text-sub);
  margin-bottom: 16px;
}
.intro-wave {
  width: min(280px, 78%);
  height: 18px;
  display: block;
  margin: 0 auto 20px;
  color: var(--accent-gold);
}
.intro-pillars {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.intro-pillar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5.5px 12px;
  border-radius: 999px;
  background: var(--hud-surface);
  border: 1px solid var(--hud-border-soft);
  color: var(--text-sub);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
}
.intro-pillar .ui-ic { color: var(--accent-gold); }
.intro-actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.intro-ghost-btn {
  background: var(--hud-surface);
  border-color: var(--hud-border);
}

@media (max-width: 1280px) {
  .stage-dashboard, .stage-controls-panel { width: 258px; left: 12px; }
  .inquiry-dock, .mini-atlas-card, .hud-drawer { width: 254px; right: 12px; }
  .bottom-hud-stack { max-width: calc(100vw - 552px); }
  .viewport-frame { display: none; }
}
@media (max-width: 960px) {
  .stage-dashboard { width: 254px; top: 10px; left: 10px; }
  .stage-controls-panel { width: 254px; bottom: 82px; left: 10px; max-height: 38vh; }
  .inquiry-dock { width: 254px; top: 60px; right: 10px; max-height: 44vh; }
  .mini-atlas-card { display: none; }
  .hud-drawer { width: calc(100vw - 20px); right: 10px; top: auto; bottom: 78px; max-height: 46vh; }
  .bottom-hud-stack { max-width: calc(100vw - 20px); }
  .intro-steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hud-topbar { top: 6px; left: 8px; right: 8px; gap: 4px; }
  .brand-seal.sm { width: 24px; height: 24px; font-size: 10px; border-radius: 6px; }
  .top-actions { gap: 2px; padding: 2px 4px; }
  .top-actions .hud-btn { padding: 4px 7px; font-size: 10px; }
  .top-sep { display: none; }
  .inquiry-dock, .mini-atlas-card { display: none; }
  .stage-controls-panel { bottom: 68px; width: calc(100vw - 16px); left: 8px; }
  .bottom-hud-stack { bottom: 6px; max-width: calc(100vw - 12px); gap: 4px; }
  .hud-bottom-dock { width: 100%; padding: 3px 4px; gap: 2px; justify-content: space-around; }
  .stage-pill { padding: 4px 6px; font-size: 10px; gap: 4px; flex: 1; justify-content: center; }
  .stage-pill .num { width: 16px; height: 16px; font-size: 9px; }
  .story-guide-bar { display: none; }
}
