:root {
  /* 扶摇改版草图 token（P0），旧名作别名以免散落样式断裂 */
  --bg: #060d18;
  --bg2: #0a1626;
  --ink: #060d18;
  --panel: rgba(12, 30, 52, 0.82);
  --panel-2: rgba(12, 30, 52, 0.72);
  --panel-strong: #0c1e34;
  --panel-solid: #0c1e34;
  --fs-big-number: 48px;
  --fs-sub-number: 32px;
  --fs-verdict: 20px;
  --fs-card-title: 18px;
  --fs-body: 16px;
  --fs-min: 14px;
  --card-col-w-min: 320px;
  --chrome-blur: blur(10px) saturate(1.1);
  --chrome-top: 52px;
  --chrome-left: 290px;
  --chrome-right: 290px;
  --chrome-bottom: 72px;
  --line: #1c3a5c;
  --line2: #28507a;
  --line-soft: rgba(40, 80, 122, 0.45);
  --paper: #dce8f4;
  --text: #dce8f4;
  --fg: #dce8f4;
  --muted: #8aa2bc;
  --dim: #5b7390;
  --accent: #3cc8ea;
  --accent2: #9fe6f7;
  --amber: #f2c94c;
  --warn: #f2c94c;
  --appr: #f2994a;
  --ion: var(--accent);
  --ion-soft: var(--accent2);
  --risk: #ef5b5b;
  --bad: #ef5b5b;
  --ok: #2fd3a0;
  --orange: #f2994a;
  --blue: #0d5cad;
  --e1: #0d5cad;
  --e2: #1ad0f0;
  --e3: #f2c94c;
  --e4: #ef5b5b;
  --bldg: #46566b;
  --scroll-thumb: #28507a;
  --scroll-thumb-hover: #3cc8ea;
  --scroll-thumb-active: var(--accent);
  --chrome: rgba(8, 22, 40, 0.92);
  --hud: rgba(12, 30, 52, 0.88);
  --map-corner: 40px;
  --map-tool-right: 10px;
  --iono-card-w: 276px;
  --f-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --font: var(--f-ui);
  color-scheme: dark;
}

body.theme-day {
  --bg: #d7e3ee;
  --bg2: #e8f0f6;
  --ink: #14202c;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.82);
  --panel-strong: #f4f8fc;
  --panel-solid: #f4f8fc;
  --line: rgba(20, 42, 64, 0.18);
  --line2: rgba(20, 42, 64, 0.28);
  --line-soft: rgba(20, 42, 64, 0.1);
  --paper: #142433;
  --text: #142433;
  --fg: #142433;
  --muted: #3d5266;
  --dim: #5a6e80;
  --accent: #0a7ea8;
  --accent2: #066888;
  --ion: var(--accent);
  --ion-soft: var(--accent2);
  --amber: #8d6200;
  --warn: #8d6200;
  --appr: #c45c20;
  --risk: #c43b42;
  --bad: #c43b42;
  --ok: #1a8a5c;
  --orange: #c45c20;
  --blue: #0d5cad;
  --e1: #0d5cad;
  --e2: #0690b0;
  --e3: #8d6200;
  --e4: #c43b42;
  --scroll-thumb: #8aa0b4;
  --scroll-thumb-hover: #6a8498;
  --chrome: rgba(255, 255, 255, 0.72);
  --hud: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-thumb-active);
  background-clip: padding-box;
}
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.map-back {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(110, 155, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 155, 200, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
  z-index: 1;
}
body.theme-day .scan { opacity: 0.07; }

.top, footer, main { position: relative; z-index: 2; }

.top {
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 22, 40, 0.98), rgba(8, 22, 40, 0.88));
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  overflow: visible;
}

.top:has(#searchHome[hidden]),
body.globe-on .top,
body.china-on .top {
  /* 保留选择器供测试；flex 布局不再依赖列模板 */
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.top .sp { flex: 1; min-width: 8px; }

.iono-screen { display: none; }
body.seat-iono header.top { position: relative; z-index: 40; }
body.seat-iono #ionoScreen {
  display: block;
  position: fixed;
  z-index: 30;
  top: var(--chrome-top);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100vh - var(--chrome-top));
  border: 0;
  background: #060d18;
}

.nav1-home {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav1-home .tabs {
  display: flex;
  gap: 4px;
  margin: 0;
  grid-template-columns: none;
}

.nav1-home .tab {
  font-weight: 500;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.nav1-home .tab.on {
  color: #051221;
  background: var(--accent);
  box-shadow: none;
  border-color: transparent;
}

.preset {
  display: flex;
  border: 1px solid var(--line2);
  border-radius: 4px;
  overflow: hidden;
}
.preset[hidden] { display: none !important; }
.preset button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  padding: 4px 10px;
}
.preset button.on {
  background: rgba(60, 200, 234, 0.18);
  color: var(--accent2);
}

.chipbtn {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 4px 10px;
  background: transparent;
  white-space: nowrap;
}

.chipbtn.on,
.chipbtn[aria-expanded="true"] {
  color: var(--accent2);
  border-color: var(--accent);
  background: rgba(60, 200, 234, 0.14);
}

.layer-pop {
  position: relative;
}

.layer-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(320px, 78vw);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  backdrop-filter: blur(3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layer-panel[hidden] { display: none !important; }

/* 图层弹层 / 抽屉：多选与 chipbtn 一致（描边芯片，无原生勾选方块）。 */
.layer-panel .layer-toggles,
#drawerLayers .layer-toggles {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0;
  width: 100%;
  color: var(--muted);
  font-size: var(--fs-min);
}
.layer-panel .layer-group,
.layer-panel > .layer-group,
#drawerLayers .layer-group,
#drawerLayers > .layer-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  width: 100%;
}
.layer-panel .layer-group > span,
#drawerLayers .layer-group > span {
  flex: 1 0 100%;
  margin: 0 0 2px;
  color: var(--accent2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.layer-panel label,
#drawerLayers label,
.layer-toggles label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.layer-panel label:has(input:checked),
#drawerLayers label:has(input:checked),
.layer-toggles label:has(input:checked) {
  color: var(--accent2);
  border-color: var(--accent);
  background: rgba(60, 200, 234, 0.14);
}
.layer-panel label:has(input:disabled),
#drawerLayers label:has(input:disabled),
.layer-toggles label:has(input:disabled) {
  opacity: 0.42;
  cursor: not-allowed;
  color: var(--dim);
  border-color: var(--line);
  background: transparent;
}
.layer-panel label input,
#drawerLayers label input,
.layer-toggles label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.layer-panel .chips,
#drawerLayers .chips {
  flex: 1 0 100%;
  margin-top: 2px;
}

.alert-badge {
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  background: var(--bad);
  border: 0;
  border-radius: 999px;
  padding: 3px 9px;
  font-family: var(--f-num);
  min-width: 1.5em;
  text-align: center;
  cursor: pointer;
}

.alert-badge:empty,
.alert-badge[hidden] { display: none !important; }

body.tool-measure #map,
body.tool-measure .leaflet-container {
  cursor: crosshair;
}

.measure-tip {
  background: var(--panel-solid);
  color: var(--accent2);
  border: 1px solid var(--line);
  font-family: var(--f-num);
  font-size: 14px;
  padding: 2px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 5px 10px 5px 8px;
  background: rgba(236, 244, 252, 0.26);
  border: 1px solid rgba(150, 185, 220, 0.28);
}

.brand-logo img {
  display: block;
  height: 28px;
  width: auto;
}

body.theme-day .brand-logo {
  background: rgba(255, 255, 255, 0.86);
}

.brand-copy { min-width: 0; }

.eyebrow {
  margin: 0;
  color: var(--ion);
  letter-spacing: 0.8px;
  font-size: 12px;
  white-space: nowrap;
}

h1 {
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: 0.06em;
  font-weight: 700;
  white-space: nowrap;
}

.brand-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.clock {
  font-size: 15px;
  letter-spacing: 1px;
  font-weight: 500;
  color: var(--text);
  text-align: right;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(97, 228, 175, 0.28);
  background: rgba(97, 228, 175, 0.08);
  color: var(--ok);
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
  animation: pill-pulse 2.4s ease-in-out infinite;
}

@keyframes pill-pulse {
  50% { box-shadow: 0 0 4px var(--ok); opacity: 0.55; }
}

.token {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}

.token select {
  min-width: 148px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 6px 8px;
  font: inherit;
  cursor: pointer;
}

.token select option {
  background: var(--bg);
  color: var(--paper);
}

.head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-home {
  min-width: 0;
  justify-self: stretch;
}

.search-box {
  position: relative;
  z-index: 5;
  min-width: 0;
  justify-self: stretch;
}
.search-field { position: relative; }
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
}
.search-box.is-loading input { padding-right: 32px; }
.search-box input::placeholder { color: var(--dim); }
.search-spin {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid var(--line);
  border-top-color: var(--ion);
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
  pointer-events: none;
}
.search-spin[hidden] { display: none; }
@keyframes search-spin {
  to { transform: rotate(360deg); }
}
.search-hits {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--hud);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
}
.search-hits li { margin: 0; padding: 0; }
.search-hits button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 12px;
  padding: 8px;
  cursor: pointer;
}
.search-hits button:hover,
.search-hits button.active {
  color: var(--ion-soft);
  background: rgba(84, 215, 255, 0.1);
}
.search-hits .hit-name { display: block; }
.search-hits .hit-meta { display: block; margin-top: 3px; color: var(--dim); font-size: 11px; }
.search-hits .empty { padding: 8px; color: var(--dim); font-size: 12px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chips button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.chips button.on {
  color: var(--ion-soft);
  border-color: var(--ion);
  background: rgba(84, 215, 255, 0.1);
}

.bldg-popup .leaflet-popup-content-wrapper,
.bldg-popup .leaflet-popup-tip {
  background: var(--hud);
  color: var(--paper);
  border: 1px solid var(--line);
  box-shadow: none;
}
.bldg-popup .leaflet-popup-content { margin: 12px 14px; }
.bldg-popup a.leaflet-popup-close-button { color: var(--dim); }
.bldg-pop h4 {
  margin: 0 0 8px;
  font-size: 13px;
}
.bldg-pop dl { margin: 0; display: grid; gap: 6px; }
.bldg-pop dl div { display: grid; grid-template-columns: 56px 1fr; gap: 8px; font-size: 12px; }
.bldg-pop dt { color: var(--dim); }
.bldg-pop dd { margin: 0; }

main {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 268px;
  pointer-events: none;
}

.seat-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(4, 7, 14, 0.72);
  color: var(--paper);
  pointer-events: none;
}
body.theme-day .seat-loading { background: rgba(215, 227, 238, 0.72); color: var(--ink); }
.seat-loading p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 1px;
}

.rail, .detail {
  pointer-events: auto;
  background: var(--panel);
  border-right: 1px solid var(--line-soft);
  padding: 16px 14px;
  min-height: 0;
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
}

.rail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail {
  border-right: 0;
  border-left: 1px solid var(--line);
  overflow-x: hidden;
  overflow-y: auto;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.tab, button {
  font: inherit;
  cursor: pointer;
}

.tab {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 8px 4px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
}

.tab.on {
  color: var(--ion-soft);
  background: rgba(84, 215, 255, 0.1);
  border-color: rgba(84, 215, 255, 0.45);
  box-shadow: 0 0 16px rgba(84, 215, 255, 0.08);
}

/* 外壳与 tabs 同宽；列表探进右缝滚动，卡片用 cqw 锁成与 tabs 左右对齐 */
.list-scroll {
  --list-rail-pad: 14px;
  container-type: inline-size;
  container-name: product-list;
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: calc(-1 * var(--list-rail-pad));
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.list > li {
  width: 100cqw;
  max-width: 100cqw;
  box-sizing: border-box;
}
.list:hover,
.list:focus-within {
  scrollbar-color: var(--scroll-thumb) transparent;
}
.list::-webkit-scrollbar {
  width: 6px;
}
.list::-webkit-scrollbar-thumb {
  background: transparent;
  background-clip: padding-box;
  border: 1px solid transparent;
  border-radius: 999px;
}
.list:hover::-webkit-scrollbar-thumb,
.list:focus-within::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  background-clip: padding-box;
}
.list:hover::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: padding-box;
}

.list-pager {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--dim);
}
.list-pager[hidden] { display: none; }
.list-pager .pager-meta {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}
.list-pager button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  padding: 4px 8px;
  min-width: 52px;
}
.list-pager button:disabled {
  opacity: 0.35;
  cursor: default;
}
.list-pager button:not(:disabled):hover {
  color: var(--ion-soft);
  border-color: rgba(84, 215, 255, 0.45);
}

.list li {
  position: relative;
  border: 1px solid var(--line);
  padding: 8px 10px 8px 12px;
  cursor: pointer;
  background: var(--panel-2);
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.list li.tone-now::before,
.list li.on::before { background: var(--ion); }
.list li.tone-fcst::before { background: var(--amber); }
.list li.tone-obs::before { background: var(--blue); }
.list li.on { border-color: rgba(84, 215, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(84, 215, 255, 0.12); }
.list li.empty { cursor: default; color: var(--dim); }
.list li.empty::before { display: none; }
.list li.iono-card { cursor: default; display: grid; gap: 8px; padding: 12px 14px; border-radius: 6px; }
.list li.iono-card::before { display: none; }
.list li.iono-card h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.04em;
}
.list li.iono-card h4 em {
  font-style: normal;
  font-size: 11px;
  color: var(--dim);
  font-weight: 400;
}
.list li.iono-card .big {
  font-family: var(--f-num);
  font-size: 34px;
  line-height: 1.05;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.list li.iono-card .big small {
  display: inline;
  margin: 0 0 0 4px;
  font-size: 14px;
  color: var(--muted);
}
.list li.iono-card .sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.iono-spark {
  width: 100%;
  height: 70px;
  display: block;
}
.iono-skel {
  width: 100%;
  height: 70px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(60, 200, 234, 0.06) 0%, rgba(60, 200, 234, 0.16) 45%, rgba(60, 200, 234, 0.06) 90%);
  background-size: 220% 100%;
  animation: ionoSkel 1.2s ease-in-out infinite;
}
@keyframes ionoSkel {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .iono-skel { animation: none; }
}
.iono-spark-fill {
  fill: rgba(60, 200, 234, 0.22);
}
.list li.duty-acked { border-color: rgba(255, 207, 90, 0.4); }
.list li.duty-acked::before { background: var(--amber); }
.list li.duty-dispatched { border-color: rgba(97, 228, 175, 0.4); }
.list li.duty-dispatched::before { background: var(--ok); }

.list .prod-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.list .prod-mark { color: var(--ion-soft); }
.list .prod-title {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  word-break: keep-all;
}
.route-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: 0;
}
.list small {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  color: var(--dim);
  margin-top: 4px;
  font-size: 11px;
}
.list .prod-stamp {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.list .prod-phase { white-space: nowrap; }

.duty-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

[hidden] { display: none !important; }

#btnAck, #btnDispatch, .ghost {
  border: 0;
  padding: 8px 10px;
}

#btnAck {
  background: rgba(255, 207, 90, 0.16);
  color: var(--amber);
  border: 1px solid rgba(255, 207, 90, 0.35);
}

#btnDispatch {
  background: rgba(84, 215, 255, 0.14);
  color: var(--ion-soft);
  border: 1px solid rgba(84, 215, 255, 0.4);
}

.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}

.hint, #mapMeta, #frameLabel, .story {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.55;
}

.story {
  color: var(--paper);
  margin: 0 0 14px;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: 8px 12px 6px;
  min-width: 0;
  min-height: 0;
}
.stage-head {
  pointer-events: auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  background: var(--chrome);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
}
.stage-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.flight-sky .title-row { align-items: flex-start; }
body.flight-sky .stage-tools { flex-shrink: 0; }
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.title-row > div:first-child {
  min-width: 0;
  flex: 1;
}
.stage-tools { display: grid; justify-items: end; gap: 6px; }
#mapMeta {
  margin: 4px 0 0;
  max-width: none;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.horizons { display: flex; gap: 6px; }
.view-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.view-row .horizons { margin-top: 0; }
.field-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.field-ramp {
  width: 140px;
  height: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--ion), var(--amber), var(--orange), var(--risk));
}
.field-ramp.invert {
  background: linear-gradient(90deg, var(--risk), var(--orange), var(--amber), var(--ion));
}
.field-ramp.iono-tec {
  /* TEC 定稿 D：与 IONO_TEC_RAMP 停点一致（雷达式彩虹） */
  background: linear-gradient(
    90deg,
    #0b2a60 0%,
    #0070ff 10%,
    #00c8ff 20%,
    #00dc50 32%,
    #28c800 42%,
    #ffff00 52%,
    #ffa000 62%,
    #ff2800 72%,
    #c80028 84%,
    #b400b4 92%,
    #ff00ff 100%
  );
}
.field-ramp.iono-tec.invert {
  background: linear-gradient(
    90deg,
    #ff00ff 0%,
    #b400b4 8%,
    #c80028 16%,
    #ff2800 28%,
    #ffa000 38%,
    #ffff00 48%,
    #28c800 58%,
    #00dc50 68%,
    #00c8ff 80%,
    #0070ff 90%,
    #0b2a60 100%
  );
}
.horizons button {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 5px 9px;
  font-size: 11px;
  white-space: nowrap;
}
.horizons button.on {
  color: var(--ion-soft);
  background: rgba(84, 215, 255, 0.12);
  border-color: rgba(84, 215, 255, 0.45);
}

.map-frame {
  position: relative;
  min-height: 0;
  margin-top: 12px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(150, 185, 220, 0.12);
}

.map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 72px rgba(4, 7, 14, 0.28);
}
body.theme-day .map-frame::after {
  box-shadow: inset 0 0 56px rgba(215, 227, 238, 0.18);
}

.grid-hotspots {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 8;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(560px, calc(100% - 24px));
  pointer-events: auto;
}
body.seat-grid .grid-hotspots {
  display: flex;
}
.grid-hotspots[hidden] {
  display: none !important;
}
.grid-hotspots button {
  background: rgba(12, 30, 52, 0.78);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 9px;
  font-size: 11px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
.grid-hotspots button.on {
  color: var(--ion-soft);
  background: rgba(84, 215, 255, 0.16);
  border-color: rgba(84, 215, 255, 0.45);
}
.map-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 7;
  pointer-events: auto;
}
body.world-on .map-hud,
body.flight-sky .map-hud {
  display: none;
}
.flight-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(4, 7, 14, 0.42);
  color: var(--paper);
  pointer-events: none;
}
.flight-loading[hidden] { display: none; }
body.grid-busy .flight-loading {
  z-index: 12;
  pointer-events: auto;
}
body.grid-busy .rail,
body.grid-busy .detail,
body.grid-busy #clockRail,
body.grid-busy #gridHotspotBar,
body.grid-busy #gridHotspots,
body.grid-busy #layerPop,
body.grid-busy #bldgSearchBox,
body.grid-busy #gridWorld,
body.grid-busy #map {
  pointer-events: none;
}
.flight-loading-mark {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(231, 240, 248, 0.28);
  border-top-color: var(--ion);
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
}
.flight-loading p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 1px;
}

.map-back:fullscreen .map-hud,
.map-back:-webkit-full-screen .map-hud {
  left: 16px;
  right: 16px;
  bottom: 16px;
}

#map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

#flightWorld,
#gridWorld,
#netWorld {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
}
body.seat-grid #map {
  visibility: hidden;
}
body.seat-grid #gridWorld {
  background: radial-gradient(ellipse at 50% 40%, #0d2340 0%, #071222 62%, #050c17 100%);
}
body.seat-net #map {
  visibility: hidden;
  pointer-events: none;
}
body.seat-net #netWorld {
  background: radial-gradient(ellipse at 50% 40%, #0d2340 0%, #071222 62%, #050c17 100%);
}
body.seat-net .scan { opacity: 0; }
body.seat-net #btnCompare { display: none !important; }
#disturbWorld {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  pointer-events: auto;
}
body:not(.seat-disturb) #disturbWorld,
body:not(.seat-disturb) .disturb-pad-labels {
  display: none !important;
}
body.seat-disturb #map {
  visibility: hidden;
  pointer-events: none;
}
body.seat-disturb #disturbWorld {
  display: block;
  background: radial-gradient(ellipse at 50% 40%, #0d2340 0%, #071222 62%, #050c17 100%);
}
body.seat-disturb .scan { opacity: 0; }
.disturb-pad-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.disturb-pad-label {
  position: absolute;
  transform: translate(8px, -50%);
  color: var(--paper);
  font-size: 12px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.disturb-pad-label i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
}
.disturb-pad-label i[data-st="warn"] { background: var(--warn); }
.disturb-pad-label i[data-st="bad"] { background: var(--bad); }
.disturb-verdict b { color: var(--warn); font-weight: 500; }
.disturb-head-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}
.disturb-head-tools[hidden] { display: none !important; }
.disturb-head-tools button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.disturb-head-tools button.on,
.disturb-head-tools button[aria-pressed="true"] {
  color: var(--ion-soft);
  border-color: rgba(84, 215, 255, 0.45);
  background: rgba(84, 215, 255, 0.12);
}
#disturbSpeed.clock-speed { flex-direction: row; gap: 2px; }
#disturbSpeed button { min-width: 32px; padding: 2px 4px; font-size: 12px; }
body:not(.seat-disturb) .disturb-flight-tip {
  display: none !important;
}
.disturb-flight-tip {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(8, 18, 32, 0.88);
  border: 1px solid rgba(125, 160, 196, 0.35);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  transform: translate(0, -100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.net-pad-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.net-pad-labels span {
  position: absolute;
  transform: translate(10px, -50%);
  font-size: 13px;
  line-height: 1.2;
  color: var(--fg);
  padding: 1px 7px 2px;
  border-radius: 3px;
  background: rgba(7, 18, 34, 0.58);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.net-pad-labels span.on {
  color: var(--accent2);
  font-weight: 500;
}
body.seat-grid .scan { opacity: 0; }
body.seat-grid #listLabel,
body.seat-grid .drawer-products .list-scroll,
body.seat-grid .drawer-products #listPager { display: none; }
body.seat-grid #viewPreset,
body.seat-grid #btnCompare { display: none !important; }
body.seat-grid #navControls,
body.seat-grid .map-corner-tools { display: none !important; }
body.seat-grid #tokenHome,
body.seat-grid #drawerToken,
body.seat-grid #statusPill,
body.seat-grid .map-full,
body.seat-grid .map-reset,
body.seat-grid .map-global,
body.seat-grid .map-measure,
body.seat-grid .map-shot { display: none !important; }
body.seat-grid #gridCtrlCard { display: grid; }
body.seat-grid #gridCtrlCard[hidden],
body:not(.seat-grid) #gridCtrlCard { display: none !important; }
body.seat-net #listLabel,
body.seat-net .drawer-products .list-scroll,
body.seat-net .drawer-products #listPager { display: none; }
body.seat-net #viewPreset { display: none !important; }
body.seat-net #navControls,
body.seat-net .map-corner-tools { display: none !important; }
body.seat-net #tokenHome,
body.seat-net #drawerToken,
body.seat-net #statusPill,
body.seat-net .map-full,
body.seat-net .map-reset,
body.seat-net .map-global,
body.seat-net .map-measure,
body.seat-net .map-shot { display: none !important; }
body.seat-net #searchHome,
body.seat-net #btnOpenSearch,
body.seat-net #bldgSearchBox,
body.seat-net #drawerSearch { display: none !important; }
body:not(.seat-net) #netCountCard,
body:not(.seat-net) #netTrunkCard,
body:not(.seat-net) #netZoneCard { display: none !important; }
body.seat-ops #listLabel,
body.seat-ops .drawer-products .list-scroll,
body.seat-ops .drawer-products #listPager { display: none; }
body.seat-ops #navControls,
body.seat-ops .map-corner-tools { display: none !important; }
body.seat-ops #tokenHome,
body.seat-ops #drawerToken,
body.seat-ops #statusPill,
body.seat-ops .map-full,
body.seat-ops .map-reset,
body.seat-ops .map-global,
body.seat-ops .map-measure,
body.seat-ops .map-shot,
body.seat-ops #btnGridDrill { display: none !important; }
body.seat-ops #searchHome,
body.seat-ops #btnOpenSearch,
body.seat-ops #bldgSearchBox,
body.seat-ops #drawerSearch { display: none !important; }
body:not(.seat-ops) #opsCountCard,
body:not(.seat-ops) #opsGradeCard,
body:not(.seat-ops) #opsFlowCard,
body:not(.seat-ops) #opsAdviceCard { display: none !important; }
body.seat-ops #kpiCard,
body.seat-ops #verdictCard { display: none !important; }
body.seat-cmd #navControls { display: none !important; }
body.seat-nav #viewPreset,
body.seat-nav #btnGlobalView,
body.seat-nav #btnResetView,
body.seat-nav #searchHome,
body.seat-nav #btnOpenSearch,
body.seat-nav #bldgSearchBox,
body.seat-nav #tokenHome,
body.seat-nav #drawerToken,
body.seat-nav #statusPill,
body.seat-nav .map-full,
body.seat-nav .map-reset,
body.seat-nav .map-global,
body.seat-nav .map-measure,
body.seat-nav .map-shot { display: none !important; }
body.seat-iono #viewPreset,
body.seat-iono #searchHome,
body.seat-iono #btnOpenSearch,
body.seat-iono #btnGlobalView,
body.seat-iono #bldgSearchBox,
body.seat-iono #ionoView,
body.seat-iono #ionoField,
body.seat-iono #tokenHome,
body.seat-iono #drawerToken,
body.seat-iono #statusPill,
body.seat-iono .map-reset,
body.seat-iono .map-global,
body.seat-iono .map-measure,
body.seat-iono .map-shot { display: none !important; }
/* 电离层席保留全屏；色条在按钮下方（#ionoHud top 已让出 map-corner）。 */
body.seat-grid #gridCtrlCard h4,
body.seat-grid #gridCtrlCard h4 em,
body.seat-grid #gridCountCard h4,
body.seat-grid #gridCountCard h4 em,
body.seat-grid .detail .card h4,
body.seat-grid #kpiCard h4,
body.seat-grid #kpiCard .sub,
body.seat-grid #statsCard h4 {
  font-size: 14px;
}
body.seat-grid header.top {
  container-type: inline-size;
  row-gap: 6px;
}
@container (max-width: 1280px) {
  body.seat-grid #clockRail { margin-top: 4px; }
}

.flight-layers {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 2px;
  color: var(--paper);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: auto;
}
.flight-layers[hidden] { display: none; }
.flight-layers label {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

#globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
  background: transparent;
  z-index: 1;
  touch-action: none;
  cursor: grab;
}
#globe:active { cursor: grabbing; }
body.globe-on #globe {
  display: block;
}

body.globe-on #map,
body.flight-sky #map {
  visibility: hidden;
  pointer-events: none;
}

body.globe-on .scan,
body.china-on .scan,
body.flight-sky .scan {
  opacity: 0.06;
}

body.globe-on .layer-toggles,
body.globe-on .search-home,
body.china-on .search-home {
  display: none;
}

.globe-tip {
  position: fixed;
  z-index: 8;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  background: rgba(8, 14, 24, 0.88);
  border: 1px solid rgba(150, 185, 220, 0.28);
  pointer-events: none;
  white-space: nowrap;
}

.map-back:fullscreen,
.map-back:-webkit-full-screen {
  width: 100%;
  height: 100%;
}

.iono-hud.no-tecu .iono-tecu { display: none; }
.iono-hud {
  position: absolute;
  top: calc(10px + var(--map-corner) + 6px);
  right: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: var(--map-corner);
  pointer-events: none;
}

.map-back:fullscreen .iono-hud,
.map-back:-webkit-full-screen .iono-hud {
  top: calc(10px + var(--map-corner) + 6px);
  right: 10px;
}

.elev-hud {
  position: absolute;
  left: calc(var(--chrome-left) + 16px);
  bottom: calc(var(--chrome-bottom) + 72px);
  z-index: 8;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--hud);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.04em;
  backdrop-filter: var(--chrome-blur);
  pointer-events: none;
}

.map-back:fullscreen .elev-hud,
.map-back:-webkit-full-screen .elev-hud {
  left: 16px;
  bottom: 18px;
}

.terrain-shade {
  mix-blend-mode: multiply;
}

.risk-field {
  mix-blend-mode: screen;
}
.risk-field.nav-heat,
body.theme-day .risk-field.nav-heat,
.risk-field.nav-cells {
  mix-blend-mode: normal;
}
body.china-on .risk-field,
body.seat-iono .risk-field {
  mix-blend-mode: normal;
}
body.theme-day .risk-field {
  mix-blend-mode: multiply;
}
body.theme-day.china-on .risk-field {
  mix-blend-mode: normal;
}
.iono-tecu {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-height: 168px;
  padding: 6px 2px;
  border: 1px solid var(--line);
  background: var(--hud);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  color: var(--paper);
  font-size: 10px;
}
.iono-tecu-unit {
  color: var(--dim);
  letter-spacing: 0;
  font-size: 9px;
}
.iono-tecu-ramp {
  width: 10px;
  min-height: 110px;
  border: 1px solid var(--line);
  /* TEC 定稿 D：上高下低，镜像 IONO_TEC_RAMP */
  background: linear-gradient(
    180deg,
    #ff00ff 0%,
    #b400b4 8%,
    #c80028 16%,
    #ff2800 28%,
    #ffa000 38%,
    #ffff00 48%,
    #28c800 58%,
    #00dc50 68%,
    #00c8ff 80%,
    #0070ff 90%,
    #0b2a60 100%
  );
}

.map-full,
.map-reset,
.map-global,
.map-measure,
.map-shot {
  position: absolute;
  top: 10px;
  right: var(--map-tool-right);
  z-index: 8;
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: var(--map-corner);
  height: var(--map-corner);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--paper);
}

.map-reset {
  right: calc(var(--map-tool-right) + var(--map-corner) + 8px);
}

.map-measure {
  right: calc(var(--map-tool-right) + 2 * (var(--map-corner) + 8px));
}

.map-shot {
  right: calc(var(--map-tool-right) + 3 * (var(--map-corner) + 8px));
}

.map-global {
  right: calc(var(--map-tool-right) + 4 * (var(--map-corner) + 8px));
}

.map-measure.on {
  border-color: var(--accent);
  color: var(--accent2);
}

.map-full[hidden],
.map-reset[hidden],
.map-global[hidden],
.map-measure[hidden],
.map-shot[hidden] {
  display: none !important;
}

.map-full svg,
.map-reset svg,
.map-global svg,
.map-measure svg,
.map-shot svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.map-full .icon-collapse,
.map-full .icon-close { display: none; }
.map-full.on .icon-expand { display: none; }
.map-full.on .icon-collapse { display: block; }

.map-back > .map-full,
.map-back > .map-reset,
.map-back > .map-global,
.map-back > .map-measure,
.map-back > .map-shot,
.map-back:fullscreen .map-full,
.map-back:fullscreen .map-reset,
.map-back:fullscreen .map-global,
.map-back:fullscreen .map-measure,
.map-back:fullscreen .map-shot,
.map-back:-webkit-full-screen .map-full,
.map-back:-webkit-full-screen .map-reset,
.map-back:-webkit-full-screen .map-global,
.map-back:-webkit-full-screen .map-measure,
.map-back:-webkit-full-screen .map-shot {
  top: 10px;
  z-index: 1100;
}
.map-back > .map-full,
.map-back:fullscreen .map-full,
.map-back:-webkit-full-screen .map-full {
  right: var(--map-tool-right);
}
.map-back > .map-reset,
.map-back:fullscreen .map-reset,
.map-back:-webkit-full-screen .map-reset {
  right: calc(var(--map-tool-right) + var(--map-corner) + 8px);
}
.map-back > .map-measure,
.map-back:fullscreen .map-measure,
.map-back:-webkit-full-screen .map-measure {
  right: calc(var(--map-tool-right) + 2 * (var(--map-corner) + 8px));
}
.map-back > .map-shot,
.map-back:fullscreen .map-shot,
.map-back:-webkit-full-screen .map-shot {
  right: calc(var(--map-tool-right) + 3 * (var(--map-corner) + 8px));
}
.map-back > .map-global,
.map-back:fullscreen .map-global,
.map-back:-webkit-full-screen .map-global {
  right: calc(var(--map-tool-right) + 4 * (var(--map-corner) + 8px));
}

body.globe-on .map-back,
body.china-on .map-back,
body.flight-sky .map-back,
.map-back:fullscreen,
.map-back:-webkit-full-screen {
  background:
    radial-gradient(ellipse 72% 58% at 50% 42%, rgba(62, 118, 188, 0.32), transparent 58%),
    radial-gradient(ellipse 100% 80% at 50% 108%, rgba(10, 36, 68, 0.96), #07111d 70%),
    #07111d;
}

body.china-on .leaflet-container {
  background: transparent;
}

body.china-on .leaflet-tile-pane {
  display: none;
}

body.globe-on .map-back::before,
body.china-on .map-back::before,
body.flight-sky .map-back::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/console/data/globe/stars.png") center / cover;
  opacity: 0.62;
}

/* 航路网跟电离层深圳一样：陆地用 sz/hk 底图浮在星空上。 */

.leaflet-container {
  background: var(--bg);
  font-family: var(--font);
}

.leaflet-container :focus,
.leaflet-interactive:focus,
.leaflet-image-layer:focus,
.leaflet-zoom-animated:focus {
  outline: none;
}

.china-plate {
  pointer-events: none;
}

.leaflet-tile-pane {
  filter: none;
}
body.theme-night .leaflet-tile-pane {
  filter: saturate(1.14) contrast(1.06);
}

.leaflet-control-zoom,
.leaflet-top.leaflet-left {
  display: none !important;
}

.city-dot {
  background: var(--amber);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.city-name {
  position: absolute;
  left: 10px;
  top: -8px;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-shadow: 0 0 4px var(--ink), 0 1px 2px var(--ink);
  white-space: nowrap;
}
body.theme-day .city-name {
  text-shadow: 0 0 4px #fff, 0 1px 2px #fff;
}

.legend-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 10px;
  pointer-events: auto;
  border: 1px solid var(--line);
  background: var(--hud);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
}
.layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
  color: var(--dim);
  font-size: 11px;
}
.layer-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.layer-group > span {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.legend-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  text-align: left;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
}

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 1px solid transparent;
  vertical-align: -2px;
}
.swatch.empty { background: transparent !important; }
.swatch.hatch.high {
  background: repeating-linear-gradient(-32deg, var(--orange) 0 2px, rgba(255, 134, 75, 0.2) 2px 6px) !important;
}
.swatch.hatch.very_high {
  background: repeating-linear-gradient(-32deg, var(--risk) 0 2px, rgba(255, 91, 99, 0.2) 2px 5px) !important;
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--ion);
  font-size: 9px;
  letter-spacing: 2px;
}

.detail h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text);
}

dl { margin: 0 0 16px; }
dt { color: var(--dim); font-size: 11px; }
dd { margin: 0 0 8px; }

#stats {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 6px;
  align-items: start;
  margin: 0 0 16px;
}
#stats dt {
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
}
#stats dd.route-pick {
  cursor: pointer;
}
#stats dd.route-pick.on {
  color: var(--ion-soft);
}
#stats dd.route-more {
  cursor: pointer;
  color: var(--mute, rgba(220, 230, 240, 0.72));
  text-decoration: underline;
  text-underline-offset: 2px;
}
#stats dd.conflict-pick {
  color: rgba(255, 168, 140, 0.95);
}
#stats dd {
  margin: 0;
  color: var(--paper);
  font-size: 12px;
  line-height: 1.4;
  min-width: 0;
}

#alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
#alerts li {
  margin: 0;
  padding: 7px 9px;
  border: 1px solid rgba(255, 207, 90, 0.22);
  background: rgba(255, 207, 90, 0.06);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.45;
}
#alerts button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ion-soft);
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.list li.conflict-board .prod-mark {
  color: rgba(255, 168, 140, 0.95);
}

.hint { margin: 14px 0 0; }

.mission-rail {
  grid-template-columns: minmax(0, 1fr);
}
.mission-span {
  position: absolute;
  top: 16px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 207, 90, 0.32);
  pointer-events: none;
  z-index: 1;
}
.mission-ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 36px;
}
.mission-ticks li {
  position: absolute;
  top: 15px;
  transform: translateX(-50%);
  z-index: 1;
}
.mission-ticks li:first-child {
  transform: none;
}
.mission-ticks li:last-child {
  transform: translateX(-100%);
}
.mission-ticks li:first-child button {
  justify-items: start;
}
.mission-ticks li:last-child button {
  justify-items: end;
}
.mission-ticks li:has(button.on) {
  z-index: 3;
}
.mission-forecasts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.mission-forecasts button {
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
}
.mission-forecasts button.on {
  color: var(--paper);
  border-color: rgba(255, 207, 90, 0.55);
  background: rgba(255, 207, 90, 0.12);
}
.mission-forecasts button.off {
  opacity: 0.4;
  cursor: default;
}
.mission-ticks button {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.mission-ticks button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--bg);
}
.mission-ticks button.start::before { background: var(--ion); }
.mission-ticks button.release::before { background: var(--amber); }
.mission-ticks button.on {
  color: var(--paper);
}
.mission-ticks button.on::before {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--amber);
}
.mission-ticks button.off {
  opacity: 0.35;
  cursor: default;
}
.mission-ticks .mission-clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.clock-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(40px, auto);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  margin-top: 2px;
  padding: 4px 8px;
  min-width: 0;
  pointer-events: auto;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
}

#clockRail {
  --rail-inset-l: 14px;
  --rail-inset-r: 36px;
  overflow: hidden;
}

.clock-rail-main {
  display: contents;
}

.clock-rail-labels {
  grid-column: 2;
  grid-row: 1;
}

.clock-play {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

.clock-rail-track {
  grid-column: 2;
  grid-row: 2;
}

.clock-speed {
  grid-column: 3;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: center;
}

.clock-speed button {
  min-width: 40px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--f-num);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.clock-speed button.on {
  color: var(--accent2);
  border-color: var(--accent);
  background: rgba(60, 200, 234, 0.12);
}

.clock-rail.mission-rail {
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
  overflow: hidden;
}

.clock-rail.mission-rail .clock-rail-labels,
.clock-rail.mission-rail .clock-rail-track,
.clock-rail.mission-rail .mission-forecasts {
  grid-column: 1;
}

.clock-rail.mission-rail .mission-labels {
  display: block;
  position: relative;
  height: 16px;
  margin: 0 28px;
  letter-spacing: 0;
}

.clock-rail.mission-rail .mission-labels span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  letter-spacing: 0.04em;
}

.clock-rail.mission-rail .mission-labels span:first-child {
  transform: translateX(0);
  text-align: left;
}

.clock-rail.mission-rail .mission-labels span:last-child {
  transform: translateX(-100%);
  text-align: right;
}

.clock-rail.mission-rail .mission-labels span[hidden] {
  display: none;
}

.clock-rail.mission-rail .clock-rail-track {
  grid-row: 2;
  width: auto;
  max-width: 100%;
  margin: 0 28px;
}

.clock-rail.mission-rail .mission-forecasts {
  grid-row: 3;
  min-width: 0;
  max-width: 100%;
}

.clock-rail.mission-rail .mission-ticks {
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.clock-play {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--paper);
}

.clock-play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.clock-play .icon-pause { display: none; }
.clock-play.on {
  background: rgba(84, 215, 255, 0.16);
  border-color: rgba(84, 215, 255, 0.55);
  color: var(--ion-soft);
}
.clock-play.on .icon-play { display: none; }
.clock-play.on .icon-pause { display: block; }

.flight-dock {
  position: relative;
  z-index: 4;
  left: auto;
  top: auto;
  width: auto;
  min-width: 0;
  transform: none;
  margin-top: 8px;
  background: rgba(8, 14, 26, 0.92);
  border-color: rgba(240, 180, 41, 0.7);
}
body.theme-day .flight-dock { background: rgba(248, 252, 255, 0.96); }
.flight-dock[hidden] { display: none !important; }
.flight-dock .clock-rail-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.flight-hud {
  position: absolute;
  z-index: 6;
  left: 24px;
  top: 24px;
  /* 固定跟机卡片尺寸，避免近楼名/相位切换时整卡伸缩跳动。 */
  box-sizing: border-box;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(240, 180, 41, 0.55);
  background: rgba(8, 14, 26, 0.88);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  color: var(--paper);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
body.theme-day .flight-hud {
  background: rgba(248, 252, 255, 0.94);
  border-color: rgba(180, 120, 20, 0.45);
}
.flight-hud[hidden] { display: none !important; }
.flight-hud-title {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--amber);
}
.flight-hud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin: 0;
}
.flight-hud-grid div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 6px;
  align-items: baseline;
  min-width: 0;
}
.flight-hud-grid dt {
  margin: 0;
  color: var(--dim);
  font-size: 10px;
}
.flight-hud-grid dd {
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flight-hud-grid .flight-hud-wide {
  grid-column: 1 / -1;
}
.flight-hud-grid .flight-hud-bldg {
  align-items: start;
}
.flight-hud-grid .flight-hud-bldg dd {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  /* 始终占满两行，有无近楼名时卡片高度不变。 */
  height: calc(1.35em * 2);
  min-height: calc(1.35em * 2);
  text-align: right;
}
.flight-hud-phase {
  margin: 8px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--ion-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.45;
  /* 高度含 padding，避免「巡航」被 height+overflow 裁掉一半。 */
  box-sizing: border-box;
  height: calc(6px + 1.45em);
  min-height: calc(6px + 1.45em);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .flight-hud {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    padding: 8px 10px 6px;
    transform: translate(-50%, calc(-100% - 10px));
  }
  .flight-hud-grid dd { font-size: 11px; }
  /* 窄屏合图：HUD 改底栏摘要，不跟机体。 */
  .flight-hud.phone-dock {
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(var(--chrome-bottom, 96px) + 8px);
    width: min(360px, calc(100vw - 24px));
    max-width: none;
    min-width: 0;
    transform: translate(-50%, 0) !important;
    padding: 8px 12px 6px;
  }
  .phone-tools .map-reset,
  .phone-tools .map-global {
    width: 44px;
    height: 44px;
  }
}
.flight-rates { flex: none; }
.flight-rates button {
  min-width: 32px;
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.flight-scrub {
  display: block;
  flex: 1;
  width: auto;
  min-width: 0;
  height: 28px;
  margin: 0;
  accent-color: #f0b429;
}
.craft-icon { background: none; border: 0; }
.craft-rig {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}
.craft-tag {
  margin-bottom: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.82);
  color: #f0b429;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.craft-body {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 16px solid #f0b429;
  filter: drop-shadow(0 0 6px rgba(240, 180, 41, 0.85));
}
.craft-stem {
  width: 1px;
  background: rgba(240, 180, 41, 0.75);
}

.clock-rail-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 0;
  font-size: 10px;
  white-space: nowrap;
  min-width: 0;
}

#clockRail .clock-rail-labels {
  padding: 0 var(--rail-inset-r) 0 var(--rail-inset-l);
}

#clockRail .clock-rail-labels span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.clock-rail-labels span:first-child { color: var(--ion); }
.clock-rail-labels span:nth-child(2) {
  color: var(--amber);
  text-align: center;
  letter-spacing: 2px;
}
#flightReadout { letter-spacing: 0; }
.clock-rail-labels span:last-child { color: var(--paper); text-align: right; }

.clock-rail-track {
  --dot: 8px;
  --axis-y: 16px;
  position: relative;
  min-width: 0;
  min-height: 40px;
}

.clock-rail-axis {
  position: absolute;
  left: 1.6%;
  right: 1.6%;
  top: calc(var(--axis-y) - 1px);
  height: 2px;
  background: linear-gradient(90deg, var(--ion), var(--amber) 50%, var(--orange));
  opacity: 0.45;
}

.clock-rail.obs-only .clock-rail-axis {
  background: var(--ion);
}

.clock-rail.obs-only .clock-rail-labels span:nth-child(2) {
  color: var(--ion);
}

.clock-rail.obs-only .clock-rail-head {
  background: var(--ion);
  box-shadow: 0 0 0 3px rgba(84, 215, 255, 0.22);
}

.clock-rail-ticks button .clock-when {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}

.clock-rail-ticks button .clock-d,
.clock-rail-ticks button .clock-t {
  color: inherit;
}

.clock-rail-ticks button .clock-d {
  font-size: 9px;
  letter-spacing: 0;
}

.clock-rail-head {
  position: absolute;
  top: calc(var(--axis-y) - 5px);
  left: 2.94%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.22);
  pointer-events: none;
  z-index: 2;
  transition: left 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.clock-rail-head.jump { transition: none; }

.clock-rail-ticks {
  display: grid;
  grid-template-columns: repeat(49, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
}

.clock-rail-ticks li { display: flex; justify-content: center; align-items: flex-start; }

#clockRail .clock-rail-axis {
  left: var(--rail-inset-l);
  right: var(--rail-inset-r);
}

.clock-rail-ticks.timed {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
}

.clock-rail-ticks.timed li {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  margin: 0;
  transform: translateX(-50%);
}

.clock-rail-ticks.timed li:first-child,
.clock-rail-ticks.timed li:last-child {
  width: max-content;
  min-width: 36px;
}

.clock-rail-ticks.timed li:first-child {
  transform: none;
}

.clock-rail-ticks.timed li:last-child {
  transform: translateX(-100%);
}

.clock-rail-ticks.timed li:first-child button {
  justify-items: start;
}

.clock-rail-ticks.timed li:last-child button {
  justify-items: end;
}

.clock-rail-ticks.timed li:last-child button .clock-when {
  justify-content: flex-end;
}

.clock-rail-ticks button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
  padding: calc(var(--axis-y) + 6px) 0 4px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  transition: color 0.35s ease;
}
.clock-rail-ticks button.bare {
  color: transparent;
}
.clock-rail-ticks button.bare::before {
  width: 5px;
  height: 5px;
  top: calc(var(--axis-y) - 2.5px);
}

.clock-rail-ticks button::before {
  content: "";
  position: absolute;
  top: calc(var(--axis-y) - var(--dot) / 2);
  left: 50%;
  width: var(--dot);
  height: var(--dot);
  transform: translateX(-50%);
  border-radius: 50%;
  background: #243246;
  box-shadow: 0 0 0 2px var(--bg);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.clock-rail-ticks button.past::before { background: var(--ion); }
.clock-rail-ticks button.now::before {
  width: 10px;
  height: 10px;
  top: calc(var(--axis-y) - 5px);
  background: var(--amber);
}
.clock-rail-ticks button.future::before { background: var(--orange); }

.clock-rail-ticks button.off {
  opacity: 0.35;
  cursor: default;
}

.clock-rail-ticks button.now {
  color: var(--amber);
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 22px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  background: var(--chrome);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
}
footer span { white-space: nowrap; }

.boot {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 14, 0.72);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  transition: opacity 0.28s ease;
}
.boot.off { opacity: 0; pointer-events: none; }
body.theme-day .boot { background: rgba(215, 227, 238, 0.78); }
.boot-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 260px;
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
  background: var(--hud);
}
.boot-card img {
  height: 40px;
  width: auto;
  padding: 6px 12px;
  background: rgba(236, 244, 252, 0.26);
}
.boot-step {
  margin: 0;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 1px;
}
.boot-track {
  width: 220px;
  height: 4px;
  background: var(--line-soft);
  overflow: hidden;
}
.boot-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ion);
  transition: width 0.16s linear;
}
.boot-pct {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 1px;
}

.phone-tools,
.phone-tabs,
.chrome-mask,
.map-exit,
.drawer-toolbar,
.drawer-label { display: none; }

.drawer-scroll,
.drawer-block,
.drawer-slot { display: contents; }

@media (max-width: 900px) {
  :root {
    --phone-dock: env(safe-area-inset-bottom, 0px);
    --phone-clock: 96px;
    --phone-head-btn: 40px;
    --chrome-top: 56px;
    --chrome-left: 16px;
    --chrome-right: 16px;
    --chrome-bottom: 96px;
  }

  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    padding:
      env(safe-area-inset-top, 0px)
      env(safe-area-inset-right, 0px)
      0
      env(safe-area-inset-left, 0px);
  }

  input, select, textarea { font-size: 16px; }
  button, .tab, a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  main { z-index: auto; }

  .top {
    z-index: 7;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px 10px;
  }

  .eyebrow,
  .brand-sub,
  .brand-copy,
  .status-pill,
  .search-home,
  #tokenHome { display: none; }

  .head-meta {
    display: flex;
    justify-content: center;
    justify-self: stretch;
    min-width: 0;
  }
  .clock {
    font-size: 14px;
    letter-spacing: 0.4px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand { gap: 6px; align-items: center; }
  .brand-logo {
    height: var(--phone-head-btn);
    padding: 4px 7px 4px 5px;
  }
  .brand-logo img { height: 100%; }
  h1 { display: none; }

  .head-tools { gap: 6px; }

  .phone-tools {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .phone-tools #btnOpenDetail { display: none; }
  .phone-tools #btnOpenSearch[hidden] { display: none !important; }
  .phone-tools .map-full,
  .phone-tools .map-reset,
  .phone-tools .map-global,
  .phone-tools #btnOpenRail,
  .phone-tools #btnOpenSearch {
    position: static;
    top: auto;
    right: auto;
    display: grid;
    place-items: center;
    width: var(--phone-head-btn);
    height: var(--phone-head-btn);
    min-height: 0;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--paper);
  }
  .phone-tools .map-reset[hidden],
  .phone-tools .map-global[hidden] {
    display: none !important;
  }
  .phone-tools .map-full svg,
  .phone-tools .map-reset svg,
  .phone-tools .map-global svg,
  .phone-tools #btnOpenRail svg,
  .phone-tools #btnOpenSearch svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }
  body.rail-open #btnOpenRail {
    color: var(--ion-soft);
    border-color: rgba(84, 215, 255, 0.45);
    background: rgba(84, 215, 255, 0.1);
  }

  .chrome-mask {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    padding: 0;
    background: rgba(4, 7, 14, 0.45);
  }
  .chrome-mask[hidden] { display: none !important; }

  main {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: var(--phone-dock);
  }

  .drawer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--line-soft);
  }
  .drawer-kicker {
    margin: 0;
    color: var(--ion);
    font-size: 12px;
    letter-spacing: 0.14em;
  }
  .drawer-title {
    margin: 4px 0 0;
    font-size: 18px;
    letter-spacing: 1px;
  }
  .drawer-toolbar button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--paper);
    font-size: 14px;
  }
  .drawer-scroll {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 14px 16px 32px;
  }
  .drawer-block,
  .drawer-slot { display: block; }
  .drawer-block { margin: 0 0 20px; }
  .drawer-label {
    display: block;
    margin: 0 0 10px;
    color: var(--dim);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
  }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: var(--phone-dock);
    z-index: 21;
    display: flex;
    flex-direction: column;
    width: min(88vw, 380px);
    max-width: 100%;
    padding: env(safe-area-inset-top, 0px) 0 0;
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--hud);
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
  }
  body.rail-open .rail { transform: none; }

  .rail .tabs {
    display: grid;
    margin-bottom: 14px;
  }
  .rail .tabs .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }
  .rail .list-scroll {
    flex: none;
    overflow: visible;
    position: static;
    width: auto;
  }
  .rail .list {
    position: static;
    right: auto;
    overflow: visible;
    justify-items: stretch;
  }
  .rail .list > li {
    width: auto;
    max-width: none;
  }
  .list-pager {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 12px;
  }
  .list-pager button {
    min-height: 36px;
    min-width: 64px;
    font-size: 12px;
  }
  .rail .list li { padding: 12px 12px 12px 14px; }
  .rail .list .prod-top { font-size: 12px; }
  .rail .list .prod-title { font-size: 15px; }
  .rail .list small { font-size: 13px; }
  .rail .token {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 12px;
    white-space: normal;
  }
  .rail .token select {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 16px;
  }
  .rail .search-box { display: block; }
  .rail .search-box input {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 16px;
  }
  .rail .view-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
  .rail .horizons { flex-wrap: wrap; gap: 6px; }
  .rail .horizons button,
  .rail .chips button {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
  }
  .rail .legend-title { display: none; }
  .rail .search-hits button {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .rail #stats,
  .rail #stats dd { font-size: 14px; }
  .rail #alerts li {
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 12px;
  }
  .rail .legend,
  .rail .layer-toggles {
    display: flex;
    margin-left: 0;
    width: 100%;
    font-size: 12px;
  }
  .rail .legend { flex-wrap: wrap; gap: 6px 10px; }
  .rail .layer-toggles {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .rail .layer-group { gap: 6px; }
  .rail .layer-group > span { font-size: 11px; }
  .rail .layer-toggles label {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
  }
  .rail .detail {
    position: static;
    inset: auto;
    transform: none;
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .rail .detail h3 {
    margin: 18px 0 8px;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--dim);
  }
  .rail .detail h3:first-child { margin-top: 0; }
  .rail .story { font-size: 15px; line-height: 1.55; }
  .rail #btnAck,
  .rail #btnDispatch {
    min-height: 44px;
    font-size: 14px;
  }

  .phone-tabs { display: none !important; }

  .stage {
    display: block;
    position: relative;
    height: 100%;
    padding: 0;
    min-height: 0;
  }
  .map-frame {
    position: absolute;
    inset: 0;
    margin: 0;
  }
  .stage-head,
  .map-hud { display: none; }
  body.flight-sky .stage-head {
    display: block;
    position: absolute;
    z-index: 8;
    top: 8px;
    right: 8px;
    left: auto;
    width: auto;
    max-width: calc(100% - 16px);
    padding: 6px 8px;
    pointer-events: none;
  }
  body.flight-sky .stage-head .title-row > div:first-child,
  body.flight-sky .stage-head #ionoControls,
  body.flight-sky .stage-head #navControls { display: none !important; }
  body.flight-sky .flight-layers { pointer-events: auto; }
  .map-frame::after { display: none; }

  .iono-hud {
    top: auto;
    bottom: calc(var(--phone-dock) + var(--phone-clock) + 8px);
    right: 8px;
    left: auto;
    width: var(--map-corner);
    max-width: none;
  }
  .iono-tecu {
    min-height: 80px;
    padding: 4px 5px;
    gap: 2px;
  }
  .elev-hud {
    left: 8px;
    bottom: calc(var(--phone-dock) + var(--phone-clock) + 8px);
  }
  #flightDock {
    bottom: calc(var(--phone-dock) + var(--phone-clock) + 8px);
    z-index: 6;
  }
  body.map-full-on .iono-hud,
  body.map-full-on .elev-hud {
    bottom: calc(var(--phone-dock) + 16px);
  }
  body.map-full-on .top,
  body.map-full-on .clock-rail,
  body.map-full-on .rail,
  body.map-full-on .chrome-mask {
    visibility: hidden;
    pointer-events: none;
  }
  body.map-full-on .map-back { z-index: 40; }
  .map-exit {
    display: none;
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 10000;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--hud);
    color: var(--paper);
    place-items: center;
  }
  .map-exit svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }
  body.map-full-on .map-exit { display: grid; }
  .bldg-pop h4 { font-size: 15px; }
  .bldg-pop dl div {
    grid-template-columns: 52px 1fr;
    font-size: 13px;
  }
  .leaflet-popup { max-width: min(86vw, 280px); }
  .leaflet-popup-content { min-width: 0; }

  .globe-tip {
    max-width: min(78vw, 260px);
    white-space: normal;
    word-break: break-word;
  }

  .clock-rail,
  .clock-rail.mission-rail {
    position: fixed;
    left: max(6px, env(safe-area-inset-left, 0px));
    right: max(6px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--phone-dock) + 6px);
    z-index: 5;
    margin: 0;
    gap: 4px;
    padding: 4px 6px 3px;
    grid-template-rows: auto minmax(48px, auto);
    background: rgba(8, 14, 26, 0.55);
  }
  #clockRail {
    --rail-inset-l: 10px;
    --rail-inset-r: 28px;
  }
  body.rail-open .clock-rail { visibility: hidden; pointer-events: none; }
  .clock-rail.mission-rail .clock-rail-track { margin: 0 12px; }
  .clock-rail.mission-rail .mission-labels {
    display: block;
    margin: 0 12px;
    height: 14px;
  }
  .clock-rail-labels {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0;
  }
  .clock-rail-labels span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .clock-play {
    width: 44px;
    height: 44px;
  }
  .clock-speed {
    flex-direction: row;
    gap: 3px;
  }
  .clock-speed button {
    min-width: 34px;
    padding: 4px 5px;
    font-size: 12px;
  }
  .clock-rail-ticks {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    grid-template-columns: none;
    padding-bottom: 2px;
  }
  .clock-rail-ticks::-webkit-scrollbar { display: none; }
  .clock-rail-ticks.dense {
    display: grid;
    overflow-x: hidden;
  }
  .clock-rail-ticks.timed {
    display: block;
    overflow: visible;
  }
  .clock-rail-ticks li { flex: 0 0 36px; }
  .clock-rail-ticks.dense li { flex: none; }
  .clock-rail-ticks.timed li { flex: none; }
  .clock-rail-ticks button { min-height: 40px; font-size: 12px; }
  .clock-rail-ticks.dense button { min-height: 28px; font-size: 9px; }
  .clock-rail-ticks button .clock-when {
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.15;
  }
  .clock-rail-ticks button .clock-t { font-size: 11px; }
  .clock-rail-ticks.timed li:first-child button .clock-when {
    align-items: flex-start;
  }
  .clock-rail-ticks.timed li:last-child button .clock-when {
    justify-content: flex-start;
    align-items: flex-end;
  }
  .clock-rail-track { min-height: 48px; }

  footer { display: none; }

  .boot-card { min-width: 0; width: min(88vw, 320px); }

  body.theme-day .clock-rail,
  body.theme-day .clock-rail.mission-rail {
    background: rgba(248, 252, 255, 0.72);
  }
}

@media (max-width: 900px) and (max-height: 500px) {
  :root {
    --chrome-top: 44px;
    --phone-clock: 72px;
    --chrome-bottom: 72px;
  }
  .top { padding: 4px 8px; }
  .clock-rail-labels {
    height: 0;
    overflow: hidden;
    margin: 0;
    font-size: 0;
  }
  .clock-rail,
  .clock-rail.mission-rail {
    grid-template-rows: 0 minmax(44px, auto);
    padding: 2px 6px;
    gap: 0;
  }
  .clock-play {
    width: 36px;
    height: 36px;
  }
  .clock-rail-track { min-height: 40px; }
  .iono-hud,
  .elev-hud {
    bottom: calc(var(--phone-dock) + var(--phone-clock) + 4px);
  }
}

/* ===== 扶摇改版 P2：空域栅格计数 / 缩略 ===== */
.grid-mini {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.grid-mini svg {
  display: block;
  width: 100%;
  height: auto;
}
.grid-mini-cap {
  padding: 4px 8px 6px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
#gridCountCard .kpi-grid {
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
body.seat-grid #kpiCard .kpi-grid .t {
  white-space: nowrap;
  line-height: 1.3;
}
#gridControls {
  display: grid;
  gap: 8px;
}
#gridControls .horizons {
  flex-wrap: wrap;
  max-width: none;
}
#gridScale {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
#gridScale button {
  min-width: 0;
  text-align: center;
}
#gridHotspotBlock {
  display: grid;
  gap: 8px;
}
#gridLayer {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
#gridLayer button {
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}
#gridHotspots button {
  padding: 5px 8px;
}
#gridFitHint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
#gridFitHint[hidden] {
  display: none !important;
}
#gridLevel[data-locked="1"] button.on {
  box-shadow: inset 0 0 0 1px rgba(242, 201, 76, 0.55);
}
#gridLevel button[data-fit="0"],
#gridLevel button:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ===== 扶摇改版 P0/P1：浮卡、结论、告警队列、地图角控件 ===== */
.brief-card,
.detail .card,
#statsCard,
#gridCtrlCard,
#gridCountCard,
#kpiCard,
#netCountCard,
#netTrunkCard,
#netZoneCard,
#opsCountCard,
#opsGradeCard,
#opsFlowCard,
#opsAdviceCard,
#disturbViewCard,
#disturbPadCard,
#disturbAirspaceCard,
#disturbFlowCard,
#disturbEhCard,
.float-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  backdrop-filter: blur(3px);
}

.detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border-left: 0;
  padding: 12px 12px 12px 0;
  overflow: auto;
}

.detail > h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  letter-spacing: 0.04em;
}

.detail .story {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
}

.detail .story b,
.verdict b {
  color: var(--warn);
  font-weight: 500;
}

.detail .sub,
#kpiCard .sub,
#opsFlowCard .sub,
#opsAdviceCard .sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.detail .card h4,
#statsCard h4,
#gridCtrlCard h4,
#gridCountCard h4,
#kpiCard h4,
#netCountCard h4,
#netTrunkCard h4,
#netZoneCard h4,
#opsCountCard h4,
#opsGradeCard h4,
#opsFlowCard h4,
#opsAdviceCard h4,
#disturbViewCard h4,
#disturbPadCard h4,
#disturbAirspaceCard h4,
#disturbFlowCard h4,
#disturbEhCard h4,
.brief-card h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail .card h4 em,
#gridCtrlCard h4 em,
#gridCountCard h4 em,
#kpiCard h4 em,
#netCountCard h4 em,
#opsFlowCard h4 em,
#opsAdviceCard h4 em,
.brief-card h4 em {
  font-style: normal;
  font-size: 11px;
  color: var(--dim);
  font-weight: 400;
}

.big-num {
  font-family: var(--f-num);
  font-size: 34px;
  line-height: 1.05;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.big-num small {
  font-size: 14px;
  color: var(--muted);
  margin-left: 4px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kpi-grid.iono-kpi {
  grid-template-columns: 1fr 1fr;
}

.kpi-grid.iono-kpi > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-grid.iono-kpi .v {
  font-size: 22px;
  line-height: 1.1;
}
.kpi-grid.iono-kpi .v.pair {
  font-size: 16px;
  white-space: pre;
  line-height: 1.25;
}
.kpi-grid.iono-kpi .v.dim {
  font-size: 16px;
  color: var(--muted);
}

.drawer-products > #statsCard {
  margin-top: 10px;
}

/* 浮卡席：截图/测距/全屏挪到右卡左侧，避免被结论挡住 */
@media (min-width: 901px) {
  body.seat-iono {
    --map-tool-right: calc(14px + var(--iono-card-w) + 8px);
  }
  body.seat-nav {
    --map-tool-right: calc(14px + var(--iono-card-w) + 8px);
  }
  body.seat-grid {
    --map-tool-right: calc(14px + 276px + 8px);
  }
  body.seat-net,
  body.seat-ops {
    --map-tool-right: calc(14px + var(--card-col-w-min) + 8px);
  }
}

/* 草图 P1：地图铺满，左右两列浮在地球上 */
@media (min-width: 901px) {
  body.seat-iono footer { display: none; }
  body.seat-iono main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }
  body.seat-iono .stage {
    height: 100%;
    padding: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  body.seat-iono .stage-head { display: none; }
  body.seat-iono .map-frame {
    margin-top: 0;
    box-shadow: none;
  }
  body.seat-iono .map-frame::after { display: none; }
  body.seat-iono #clockRail {
    margin: 8px 14px 12px;
    border-width: 1px;
    border-radius: 6px;
  }
  body.seat-iono .rail,
  body.seat-iono .detail {
    position: absolute;
    top: 14px;
    width: var(--iono-card-w);
    z-index: 6;
    height: auto;
    max-height: calc(100% - 96px);
    background: transparent;
    border: 0;
    padding: 0;
    overflow: auto;
    pointer-events: auto;
  }
  body.seat-iono .rail { left: 14px; }
  body.seat-iono .detail { right: 14px; left: auto; gap: 12px; }
  body.seat-iono .rail .list-scroll {
    flex: none;
    min-height: auto;
    overflow: visible;
    height: auto;
  }
  body.seat-iono .rail .list {
    position: static;
    right: auto;
    width: auto;
    gap: 12px;
    overflow: visible;
    justify-items: stretch;
  }
  body.seat-iono .rail .list > li { width: 100%; max-width: none; }
  body.seat-iono .rail .iono-card,
  body.seat-iono .detail .card { pointer-events: auto; }
  body.seat-iono #drawerView,
  body.seat-iono #drawerSearch,
  body.seat-iono #drawerLayers,
  body.seat-iono #drawerLegend,
  body.seat-iono #drawerBrief,
  body.seat-iono #drawerToken,
  body.seat-iono #statsCard,
  body.seat-iono #gridCountCard,
  body.seat-iono #dutyBar,
  body.seat-iono #kpiCardTitle,
  body.seat-iono #detailHome > article:has(#alerts),
  body.seat-iono #hint { display: none !important; }
  /* 全屏钮与色条同列：顶边 14px 对齐浮卡，钮下 8px 接色条，right 同 --map-tool-right */
  body.seat-iono .map-full {
    top: 14px;
    right: var(--map-tool-right);
  }
  body.seat-iono #ionoHud {
    top: calc(14px + var(--map-corner) + 8px);
    right: var(--map-tool-right);
  }
  body.seat-iono .map-corner-tools {
    left: calc(14px + var(--iono-card-w) + 14px);
    top: 14px;
  }
}

@media (min-width: 1366px) {
  body.seat-iono,
  body.seat-nav { --iono-card-w: 320px; }
}

@media (min-width: 1800px) {
  body.seat-iono,
  body.seat-nav { --iono-card-w: 380px; }
}

/* 草图 P2：导航风险同样铺满，左右浮卡 */
@media (min-width: 901px) {
  body.seat-nav footer { display: none; }
  body.seat-nav main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }
  body.seat-nav .stage {
    height: 100%;
    padding: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  body.seat-nav .stage-head { display: none; }
  body.seat-nav .map-frame {
    margin-top: 0;
    box-shadow: none;
  }
  body.seat-nav .map-frame::after { display: none; }
  body.seat-nav #clockRail {
    margin: 8px 14px 12px;
    border-width: 1px;
    border-radius: 6px;
  }
  body.seat-nav .rail,
  body.seat-nav .detail {
    position: absolute;
    top: 14px;
    width: var(--iono-card-w);
    z-index: 6;
    height: auto;
    max-height: calc(100% - 96px);
    background: transparent;
    border: 0;
    padding: 0;
    overflow: auto;
    pointer-events: auto;
  }
  body.seat-nav .rail { left: 14px; }
  body.seat-nav .detail { right: 14px; left: auto; gap: 12px; }
  body.seat-nav .rail .list-scroll {
    flex: none;
    min-height: auto;
    overflow: visible;
    height: auto;
  }
  body.seat-nav .rail .list {
    position: static;
    right: auto;
    width: auto;
    gap: 12px;
    overflow: visible;
    justify-items: stretch;
  }
  body.seat-nav .rail .list > li { width: 100%; max-width: none; }
  body.seat-nav .rail .iono-card,
  body.seat-nav .detail .card { pointer-events: auto; }
  body.seat-nav #drawerView,
  body.seat-nav #drawerSearch,
  body.seat-nav #drawerLayers,
  body.seat-nav #drawerLegend,
  body.seat-nav #drawerBrief,
  body.seat-nav #drawerToken,
  body.seat-nav #statsCard,
  body.seat-nav #gridCountCard,
  body.seat-nav #dutyBar,
  body.seat-nav #detailHome > article:has(#alerts),
  body.seat-nav #hint,
  body.seat-nav #mapHud,
  body.seat-nav #listPager { display: none !important; }
  body.seat-nav .map-corner-tools {
    left: calc(14px + var(--iono-card-w) + 14px);
    top: 14px;
    width: max-content;
    max-width: calc(100% - 2 * var(--iono-card-w) - 56px);
  }
  /* 模式/轴向一行，城市跟空域栅格一样放第二行。 */
  body.seat-nav #navControls {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: start;
    align-items: center;
    gap: 8px 14px;
    width: max-content;
  }
  body.seat-nav #navMode { grid-column: 1; grid-row: 1; }
  body.seat-nav #navField { grid-column: 2; grid-row: 1; }
  body.seat-nav #navScale { grid-column: 1; grid-row: 2; }
  body.seat-nav #navView { display: none !important; }
  body.seat-nav #navControls .horizons { flex-wrap: nowrap; }
}

/* 草图 P3：空域栅格铺满，左列级别/格数/缩略，右列一张属性卡 */
@media (min-width: 901px) {
  body.seat-grid footer { display: none; }
  body.seat-grid main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }
  body.seat-grid .stage {
    height: 100%;
    padding: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  body.seat-grid .stage-head { display: none; }
  body.seat-grid .map-frame {
    margin-top: 0;
    box-shadow: none;
  }
  body.seat-grid .map-frame::after { display: none; }
  body.seat-grid #clockRail {
    margin: 8px 14px 12px;
    border-width: 1px;
    border-radius: 6px;
  }
  body.seat-grid .rail,
  body.seat-grid .detail {
    position: absolute;
    top: 14px;
    width: 276px;
    z-index: 6;
    height: auto;
    max-height: calc(100% - 112px);
    background: transparent;
    border: 0;
    padding: 0;
    overflow: auto;
    pointer-events: auto;
  }
  body.seat-grid .rail { left: 14px; }
  body.seat-grid .detail { right: 14px; left: auto; gap: 12px; }
  body.seat-grid header.top { flex-wrap: nowrap; }
  body.seat-grid .head-meta { display: none; }
  body.seat-grid #gridHotspotBlock { display: none; }
  body.seat-grid #gridHotspotBar {
    left: 302px;
    right: 302px;
    top: 10px;
    max-width: none;
  }
  body.seat-grid .rail .list-scroll {
    flex: none;
    min-height: auto;
    overflow: visible;
    height: auto;
  }
  body.seat-grid .rail .list {
    position: static;
    right: auto;
    width: auto;
    gap: 12px;
    overflow: visible;
    justify-items: stretch;
  }
  body.seat-grid .rail .list > li { width: 100%; max-width: none; }
  body.seat-grid .detail .card,
  body.seat-grid #gridCtrlCard,
  body.seat-grid #gridControls,
  body.seat-grid #gridCountCard { pointer-events: auto; }
  body.seat-grid #dutyBar,
  body.seat-grid #detailHome > article:has(#alerts),
  body.seat-grid #hint,
  body.seat-grid #mapHud,
  body.seat-grid #btnGlobalView,
  body.seat-grid #btnResetView,
  body.seat-grid .drawer-toolbar { display: none !important; }
  body.seat-grid .map-corner-tools,
  body.seat-grid #navControls { display: none !important; }
  body.seat-grid #gridCtrlCard {
    margin-bottom: 12px;
  }
  body.seat-grid #gridFitHint {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
  }
  body.seat-grid #gridControls .horizons {
    flex-wrap: wrap;
    max-width: none;
  }
  body.seat-grid #gridCountCard { margin-bottom: 0; }
  body.seat-grid .grid-mini svg { max-height: 80px; }
  body.seat-grid #statsCard { border-color: var(--accent); }
}

/* 草图 P4：航路网铺满，左列 2×2 / 起降场，右列主干表 / 空域 / 抽屉 */
@media (min-width: 901px) {
  body.seat-net footer { display: none; }
  body.seat-net main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }
  body.seat-net .stage {
    height: 100%;
    padding: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  body.seat-net .stage-head { display: none; }
  body.seat-net .map-frame {
    margin-top: 0;
    box-shadow: none;
  }
  body.seat-net .map-frame::after { display: none; }
  body.seat-net #clockRail {
    margin: 8px 14px 12px;
    border-width: 1px;
    border-radius: 6px;
  }
  body.seat-net .rail,
  body.seat-net .detail {
    position: absolute;
    top: 14px;
    width: var(--card-col-w-min);
    z-index: 6;
    height: auto;
    max-height: calc(100% - 48px);
    background: transparent;
    border: 0;
    padding: 0;
    overflow: auto;
    pointer-events: auto;
  }
  body.seat-net .rail { left: 14px; gap: 12px; }
  body.seat-net .detail {
    right: 14px;
    left: auto;
    gap: 10px;
    overflow: hidden;
  }
  body.seat-net #verdictCard { flex: 0 0 auto; order: 1; }
  body.seat-net #netTrunkCard,
  body.seat-net #statsCard {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    order: 2;
  }
  body.seat-net #netZoneCard { flex: 0 0 auto; order: 9; }
  body.seat-net .rail .list-scroll {
    flex: none;
    min-height: auto;
    overflow: visible;
    height: auto;
  }
  body.seat-net .detail .card,
  body.seat-net #netCountCard,
  body.seat-net #kpiCard,
  body.seat-net #netTrunkCard,
  body.seat-net #netZoneCard { pointer-events: auto; }
  body.seat-net #dutyBar,
  body.seat-net #detailHome > article:has(#alerts),
  body.seat-net #hint,
  body.seat-net #mapHud,
  body.seat-net #btnGlobalView,
  body.seat-net #btnResetView,
  body.seat-net .drawer-toolbar { display: none !important; }
  body.seat-net .map-corner-tools,
  body.seat-net #navControls { display: none !important; }
  body.seat-net #statsCard { border-color: var(--accent); }
}

/* 草图 P5：运行态势铺满，保留高德；左列 2×2 / 冲突等级 / 容流比，右列告警 */
@media (min-width: 901px) and (max-width: 1279px) {
  body.seat-ops { --card-col-w-min: 288px; }
}

@media (min-width: 901px) {
  body.seat-ops footer { display: none; }
  body.seat-ops main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }
  body.seat-ops .stage {
    height: 100%;
    padding: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  body.seat-ops .stage-head { display: none; }
  body.seat-ops .map-frame {
    margin-top: 0;
    box-shadow: none;
  }
  body.seat-ops .map-frame::after { display: none; }
  body.seat-ops .rail,
  body.seat-ops .detail {
    position: absolute;
    top: 14px;
    width: var(--card-col-w-min);
    z-index: 500;
    height: auto;
    max-height: calc(100% - 28px);
    background: transparent;
    border: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: auto;
  }
  body.seat-ops .rail { left: 14px; gap: 12px; }
  body.seat-ops .detail { right: 14px; left: auto; gap: 12px; }
  body.seat-ops .rail .list-scroll {
    flex: none;
    min-height: auto;
    overflow: visible;
    height: auto;
  }
  body.seat-ops .rail .card,
  body.seat-ops .detail .card,
  body.seat-ops #opsCountCard,
  body.seat-ops #opsGradeCard,
  body.seat-ops #opsFlowCard,
  body.seat-ops #opsAdviceCard,
  body.seat-ops #alertCard { pointer-events: auto; }
  body.seat-ops #dutyBar,
  body.seat-ops #verdictCard,
  body.seat-ops #hint,
  body.seat-ops #mapHud,
  body.seat-ops #btnGlobalView,
  body.seat-ops .drawer-toolbar { display: none !important; }
  body.seat-ops .map-corner-tools,
  body.seat-ops #navControls { display: none !important; }
  body.seat-ops #statsCard { border-color: var(--accent); }
  /* 查看全部 / 单机抽屉：卡身封顶，列表内滚，底部「收起」不跟着被卷走 */
  body.seat-ops .detail {
    height: calc(100% - 28px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  body.seat-ops #alertCard,
  body.seat-ops #statsCard {
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  body.seat-ops #alerts,
  body.seat-ops #stats {
    min-height: 0;
    overflow: auto;
  }
  /* 时钟在 main 里，与左右浮卡同一条顶边；窄缝里换行，不钻顶栏、不压 2×2。 */
  body.seat-ops .ops-clock {
    top: 14px;
    left: 50%;
    right: auto;
    width: max-content;
    max-width: calc(100% - 2 * (14px + var(--card-col-w-min) + 12px));
    transform: translateX(-50%);
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 4px 10px;
    overflow: hidden;
    z-index: 510;
  }
  body.seat-ops .ops-clock strong {
    font-size: clamp(22px, 2.8vw, 40px);
  }
}

/* 运行指令铺满，左右浮卡；保留高德 + 三维；左列指令列表，右列结论 / 字段 / 签收 */
@media (min-width: 901px) {
  body.seat-cmd footer { display: none; }
  body.seat-cmd main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }
  body.seat-cmd .stage {
    height: 100%;
    padding: 0;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }
  body.seat-cmd .stage-head { display: none; }
  body.seat-cmd .map-frame {
    margin-top: 0;
    box-shadow: none;
  }
  body.seat-cmd .map-frame::after { display: none; }
  body.seat-cmd #missionRail,
  body.seat-cmd #flightDock {
    margin: 8px 14px 12px;
    border-width: 1px;
    border-radius: 6px;
  }
  body.seat-cmd #flightDock { margin-bottom: 0; }
  body.seat-cmd .rail,
  body.seat-cmd .detail {
    position: absolute;
    top: 14px;
    width: var(--card-col-w-min);
    z-index: 6;
    height: auto;
    max-height: calc(100% - 128px);
    background: transparent;
    border: 0;
    padding: 0;
    overflow: auto;
    pointer-events: auto;
  }
  body.seat-cmd .rail {
    left: 14px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.seat-cmd .detail {
    right: 14px;
    left: auto;
    gap: 12px;
    height: calc(100% - 128px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  body.seat-cmd #verdictCard,
  body.seat-cmd #dutyBar { flex-shrink: 0; }
  body.seat-cmd #statsCard {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }
  body.seat-cmd #stats {
    min-height: 0;
    overflow: auto;
  }
  body.seat-cmd #alertCard {
    flex: 0 1 auto;
    max-height: 28%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }
  body.seat-cmd #alerts {
    min-height: 0;
    overflow: auto;
  }
  body.seat-cmd .rail .list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    height: auto;
  }
  body.seat-cmd .rail .list {
    position: static;
    right: auto;
    width: auto;
    gap: 8px;
    overflow: visible;
    justify-items: stretch;
  }
  body.seat-cmd .rail .list > li {
    width: 100%;
    max-width: none;
    background: var(--panel);
    border-radius: 6px;
    padding: 12px 14px 12px 16px;
    backdrop-filter: blur(3px);
  }
  body.seat-cmd .rail .list > li,
  body.seat-cmd .detail .card,
  body.seat-cmd #dutyBar { pointer-events: auto; }
  body.seat-cmd #listPager {
    flex-shrink: 0;
    margin-top: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    backdrop-filter: blur(3px);
  }
  body.seat-cmd #dutyBar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    margin: 0;
    backdrop-filter: blur(3px);
  }
  body.seat-cmd #drawerView,
  body.seat-cmd #drawerSearch,
  body.seat-cmd #drawerLayers,
  body.seat-cmd #drawerLegend,
  body.seat-cmd #drawerBrief,
  body.seat-cmd #drawerToken,
  body.seat-cmd #hint,
  body.seat-cmd #mapHud,
  body.seat-cmd .drawer-toolbar { display: none !important; }
  body.seat-cmd .map-corner-tools {
    left: calc(14px + var(--card-col-w-min) + 14px);
    top: 14px;
    width: max-content;
    max-width: calc(100% - 2 * var(--card-col-w-min) - 56px);
    flex-direction: column;
    align-items: flex-start;
  }
  body.seat-cmd #cmdControls {
    display: flex;
    width: max-content;
  }
  body.seat-cmd .flight-layers {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(8, 22, 40, 0.82);
    font-size: 11px;
    gap: 10px;
    white-space: normal;
  }
  /* 顶栏与其他席对齐：建筑搜索不占导航行。手机抽屉仍可搜。 */
  body.seat-cmd #searchHome,
  body.seat-cmd #btnOpenSearch { display: none !important; }
  /* 截图 / 测距 / 复位 / 全局 / 全屏：竖排贴在右卡左侧，避免压进结论卡 */
  body.seat-cmd .map-full,
  body.seat-cmd .map-reset,
  body.seat-cmd .map-global,
  body.seat-cmd .map-measure,
  body.seat-cmd .map-shot {
    right: calc(14px + var(--card-col-w-min) + 8px);
    z-index: 7;
  }
  body.seat-cmd .map-global { top: 14px; }
  body.seat-cmd .map-reset { top: calc(14px + var(--map-corner) + 8px); }
  body.seat-cmd .map-measure { top: calc(14px + 2 * (var(--map-corner) + 8px)); }
  body.seat-cmd .map-shot { top: calc(14px + 3 * (var(--map-corner) + 8px)); }
  body.seat-cmd .map-full { top: calc(14px + 4 * (var(--map-corner) + 8px)); }
  body.seat-cmd #dutyBar { grid-template-columns: 1fr; }
  body.seat-cmd #dutyBar:has(#btnAck:not([hidden])):has(#btnDispatch:not([hidden])) {
    grid-template-columns: 1fr 1fr;
  }
}

/* 进入全屏后工具回到地图右上角，不再给右卡留空 */
.map-back:fullscreen,
.map-back:-webkit-full-screen,
body.map-full-on {
  --map-tool-right: 10px;
}
.map-back:fullscreen .map-full,
.map-back:fullscreen .map-reset,
.map-back:fullscreen .map-global,
.map-back:fullscreen .map-measure,
.map-back:fullscreen .map-shot,
.map-back:-webkit-full-screen .map-full,
.map-back:-webkit-full-screen .map-reset,
.map-back:-webkit-full-screen .map-global,
.map-back:-webkit-full-screen .map-measure,
.map-back:-webkit-full-screen .map-shot,
body.map-full-on .map-full,
body.map-full-on .map-reset,
body.map-full-on .map-global,
body.map-full-on .map-measure,
body.map-full-on .map-shot {
  top: 10px;
}
.map-back:fullscreen .map-full,
.map-back:-webkit-full-screen .map-full,
body.map-full-on .map-full {
  right: 10px;
}
/* 桌面全屏：色条贴全屏钮正下方。窄屏色条仍在底部，勿设 top。 */
@media (min-width: 901px) {
  body.seat-iono .map-back:fullscreen #ionoHud,
  body.seat-iono .map-back:-webkit-full-screen #ionoHud,
  body.map-full-on.seat-iono #ionoHud {
    top: calc(10px + var(--map-corner) + 8px);
    right: 10px;
  }
}
.map-back:fullscreen .map-reset,
.map-back:-webkit-full-screen .map-reset,
body.map-full-on .map-reset {
  right: calc(10px + var(--map-corner) + 8px);
}
.map-back:fullscreen .map-measure,
.map-back:-webkit-full-screen .map-measure,
body.map-full-on .map-measure {
  right: calc(10px + 2 * (var(--map-corner) + 8px));
}
.map-back:fullscreen .map-shot,
.map-back:-webkit-full-screen .map-shot,
body.map-full-on .map-shot {
  right: calc(10px + 3 * (var(--map-corner) + 8px));
}
.map-back:fullscreen .map-global,
.map-back:-webkit-full-screen .map-global,
body.map-full-on .map-global {
  right: calc(10px + 4 * (var(--map-corner) + 8px));
}

body.seat-cmd .detail .story {
  font-size: var(--fs-verdict);
}
body.seat-cmd .detail .card h4,
body.seat-cmd #statsCard h4,
body.seat-cmd #alertCard h4 {
  font-size: var(--fs-card-title);
}
body.seat-cmd .detail .sub,
body.seat-cmd .kpi-grid .t,
body.seat-cmd #alertCard h4 em,
body.seat-cmd .detail .card h4 em {
  font-size: var(--fs-min);
}

body.seat-net .kpi-grid .v,
body.seat-ops .kpi-grid .v {
  font-size: var(--fs-sub-number);
  font-weight: 500;
}
body.seat-net .big-num {
  font-size: var(--fs-big-number);
}
body.seat-net .detail .story {
  font-size: var(--fs-verdict);
}
body.seat-net .detail .card h4,
body.seat-net #netCountCard h4,
body.seat-net #kpiCard h4,
body.seat-net #netTrunkCard h4,
body.seat-net #netZoneCard h4,
body.seat-net #statsCard h4,
body.seat-ops .detail .card h4,
body.seat-ops #opsGradeCard h4,
body.seat-ops #opsFlowCard h4,
body.seat-ops #opsAdviceCard h4,
body.seat-ops #alertCard h4,
body.seat-ops #statsCard h4 {
  font-size: var(--fs-card-title);
}
body.seat-net .detail .sub,
body.seat-net #kpiCard .sub,
body.seat-net .kpi-grid .t,
body.seat-net .net-zone-legend > div,
body.seat-net .net-tbl,
body.seat-net .net-tbl th,
body.seat-net #netCountCard h4 em,
body.seat-net #kpiCard h4 em,
body.seat-net .detail .card h4 em,
body.seat-ops .detail .sub,
body.seat-ops #opsFlowCard .sub,
body.seat-ops .kpi-grid .t,
body.seat-ops .net-zone-legend > div,
body.seat-ops #opsFlowCard h4 em,
body.seat-ops #alertCard h4 em,
body.seat-ops .detail .card h4 em {
  font-size: var(--fs-min);
}

#netCountCard .kpi-grid,
#opsCountCard .kpi-grid {
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
#netCountCard .kpi-grid > div,
#opsCountCard .kpi-grid > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
#kpiBody {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.net-tbl {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: var(--fs-min);
}
.net-tbl th,
.net-tbl td {
  padding: 5px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.net-tbl th {
  color: var(--dim);
  font-weight: 400;
  font-size: var(--fs-min);
}
.net-tbl th:nth-child(1),
.net-tbl td:nth-child(1) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}
.net-tbl th:nth-child(2),
.net-tbl td:nth-child(2) {
  width: 6.2em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.net-tbl th:nth-child(3),
.net-tbl td:nth-child(3) {
  width: 64px;
}
.net-tbl th:nth-child(4),
.net-tbl td:nth-child(4) {
  width: 2.4em;
}
.net-tbl tr {
  cursor: pointer;
}
.net-tbl tr.on td {
  color: var(--accent2);
}
.net-tbl .n {
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
  text-align: right;
  width: 2.6em;
  white-space: nowrap;
}
.net-meter {
  width: 64px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.net-meter i {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.net-zone-legend {
  display: grid;
  gap: 6px;
}
.net-zone-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-min);
}
.net-zone-legend > div span {
  margin-left: auto;
  font-family: var(--f-num);
  font-variant-numeric: tabular-nums;
}
.net-zone-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: none;
}
.leaflet-div-icon.net-pad {
  background: transparent;
  border: none;
  overflow: visible;
}
.net-pad {
  position: relative;
  width: 18px;
  height: 40px;
  pointer-events: auto;
}
.net-pad-glow {
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 16px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
}
.net-pad-shaft {
  position: absolute;
  left: 7px;
  bottom: 4px;
  width: 4px;
  height: 28px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.8;
}
.net-pad-cap {
  position: absolute;
  left: 5px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.net-pad-name {
  position: absolute;
  left: 16px;
  top: 4px;
  white-space: nowrap;
  font-size: var(--fs-min);
  color: var(--fg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
.net-pad-noname .net-pad-name { display: none; }
.net-pad-ok { color: var(--ok); }
.net-pad-warn { color: var(--warn); }
.net-pad-appr { color: var(--appr); }
.net-pad-bad { color: var(--bad); }
.net-pad.on .net-pad-cap {
  box-shadow: 0 0 0 2px #fff;
}
@keyframes net-flow {
  to { stroke-dashoffset: -24; }
}
path.net-flow {
  animation: net-flow 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  path.net-flow { animation: none; }
}

.stats-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.stats-head h4 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
#btnStatsClose {
  flex: none;
  margin: 0;
  padding: 2px 0 2px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-min);
  cursor: pointer;
}
#btnStatsClose:hover {
  color: var(--fg);
}
#btnGridDrill {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(84, 215, 255, 0.45);
  background: rgba(84, 215, 255, 0.1);
  color: var(--ion-soft);
  font-size: 12px;
}
#btnGridDrill:disabled {
  opacity: 0.55;
  cursor: default;
}

.iono-sz-mark {
  display: none;
  position: absolute;
  z-index: 6;
  pointer-events: none;
}
body.seat-iono.globe-on .iono-sz-mark:not([hidden]) { display: block; }
.iono-sz-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
}
.iono-sz-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid #fff;
  border-radius: 50%;
  animation: ionoPulse 1.6s ease-out infinite;
}
@keyframes ionoPulse {
  from { opacity: 0.9; transform: scale(0.6); }
  to { opacity: 0; transform: scale(1.8); }
}
@media (prefers-reduced-motion: reduce) {
  .iono-sz-dot::after { animation: none; opacity: 0.45; }
  .flight-loading-mark { animation: none; }
}
.iono-sz-tag {
  position: absolute;
  left: 14px;
  top: 16px;
  font-size: 12px;
  color: var(--fg);
  background: rgba(6, 18, 34, 0.82);
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: pre;
  line-height: 1.45;
}
.iono-sz-mark.flip .iono-sz-tag {
  left: auto;
  right: 14px;
}
body.seat-iono #story { word-break: keep-all; }
body.seat-iono #story em {
  font-style: normal;
  color: var(--warn);
  font-family: var(--f-num);
}
body.seat-iono .list li.iono-card h4 {
  font-size: 14px;
}
body.seat-iono .list li.iono-card h4 em {
  font-size: 14px;
}
body.seat-iono .kpi-grid .t,
body.seat-nav .kpi-grid .t {
  font-size: 14px;
}
body.seat-nav .list li.iono-card h4,
body.seat-nav .list li.iono-card h4 em,
body.seat-nav .band-legend,
body.seat-nav .detail .card h4,
body.seat-nav #kpiCard h4,
body.seat-nav #kpiCard .sub {
  font-size: 14px;
}
body.seat-iono .kpi-grid.iono-kpi .v {
  font-size: 20px;
}
#ionoLayerFields,
#navLayerFields,
#gridLayerFields {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}
#ionoLayerFields[hidden],
#navLayerFields[hidden],
#gridLayerFields[hidden] { display: none !important; }
#ionoLayerFields label,
#navLayerFields label,
#gridLayerFields label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg);
  font-size: 13px;
}
#ionoLayerFields label:has(input:disabled) {
  opacity: 0.45;
}
.clock-storms {
  position: absolute;
  left: var(--rail-inset-l, 14px);
  right: var(--rail-inset-r, 36px);
  top: 0;
  bottom: 0;
  z-index: 4;
  pointer-events: none;
}
.clock-storms[hidden],
body:not(.seat-iono) #clockStorms { display: none !important; }
.clock-storm-bar {
  position: absolute;
  top: calc(var(--axis-y) - 5px);
  height: 10px;
  border-radius: 2px;
  background: rgba(239, 91, 91, 0.5);
  pointer-events: none;
}
.clock-storms button {
  position: absolute;
  top: calc(var(--axis-y) + 8px);
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bad);
  font-size: 10px;
  line-height: 1;
  font-family: var(--f-num);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  z-index: 4;
}
@media (prefers-reduced-motion: reduce) {
  .clock-storms button { opacity: 0.85; }
}

.kpi-grid .v {
  font-family: var(--f-num);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.kpi-grid .t {
  font-size: 12px;
  color: var(--muted);
}

.band-legend {
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.band-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.band-legend i {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.band-legend span {
  margin-left: auto;
  font-family: var(--f-num);
  color: var(--muted);
}

.stack-bar {
  display: flex;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
}

.stack-bar i { display: block; height: 100%; }

.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  padding: 12px;
}

.list li {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}

.list li.alert-item::before {
  width: 4px;
  border-radius: 2px;
}

.list li.alert-sev-bad::before { background: var(--bad); }
.list li.alert-sev-warn::before { background: var(--warn); }
.list li.alert-sev-ok::before { background: var(--ok); }

.drawer-products .drawer-label[data-mode='alerts']::after {
  content: '（需处置优先）';
  color: var(--dim);
  font-weight: 400;
}

.map-corner-tools {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
  max-width: min(420px, 46vw);
}

.map-corner-tools .horizons,
.map-corner-tools .view-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.map-corner-tools .horizons button,
.map-corner-tools .seg b {
  font-weight: 400;
  font-size: 12px;
  padding: 3px 9px;
  border: 1px solid var(--line2);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(8, 22, 40, 0.82);
}

.map-corner-tools .horizons button.on {
  border-color: var(--accent);
  color: var(--accent2);
  background: rgba(60, 200, 234, 0.12);
}

/* 电离层：尺度留在地图角；出图/指标收进抽屉，桌面舞台不再堆按钮 */
@media (min-width: 901px) {
  .stage-tools #ionoView,
  .stage-tools #ionoField {
    display: none !important;
  }
  .stage-head {
    padding-top: 6px;
    min-height: 0;
  }
  .stage-head h2 {
    font-size: 15px;
    font-weight: 500;
  }
  .stage-head #mapMeta {
    font-size: 12px;
    color: var(--muted);
  }
  #tabsHome:empty { display: none; }
}

.clock {
  font-family: var(--f-num);
  font-size: 16px;
  letter-spacing: 0;
}

.clock-rail {
  border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(8, 22, 40, 0.98), rgba(8, 22, 40, 0.86));
}

.status-pill {
  border-radius: 999px;
  font-family: var(--f-num);
}

.eyebrow {
  color: var(--accent);
  font-family: var(--f-num);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

.detail dl {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
}

.detail dl div,
.detail dl {
  /* dt/dd pairs */
}

#stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 12.5px;
}

#stats dt { color: var(--muted); }
#stats dd { margin: 0; font-family: var(--f-num); }
#stats dd.ops-profile { grid-column: 1 / -1; font-family: var(--f-ui); }
.leaflet-tooltip.ops-envelope-tip {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #3cc8ea;
  font-family: var(--f-num);
  font-size: 12px;
}
.leaflet-tooltip.ops-envelope-tip::before { display: none; }

#alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

#alerts li {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 8px;
  align-items: start;
  font-size: var(--fs-min);
  background: rgba(255, 255, 255, 0.03);
  border: 0;
  border-radius: 3px;
  padding: 6px 8px 6px 0;
}

#alerts li[data-ops] { cursor: pointer; }

#cmpStage {
  position: absolute;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  --cmp-split: 50%;
}
#cmpStage[hidden] { display: none !important; }
#cmpStage .cmp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#cmpStage .cmp-left { clip-path: inset(0 calc(100% - var(--cmp-split)) 0 0); }
#cmpStage .cmp-right { clip-path: inset(0 0 0 var(--cmp-split)); }
#cmpStage .cmp-bar {
  pointer-events: none;
  position: absolute;
  left: calc(var(--chrome-left) + 12px);
  right: calc(var(--chrome-right) + 12px);
  top: calc(var(--chrome-top) + 10px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
#cmpStage .cmp-card {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: baseline;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  backdrop-filter: var(--chrome-blur);
}
#cmpStage .cmp-card span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}
#cmpStage .cmp-card b {
  font-family: var(--f-num);
  font-size: 20px;
  font-weight: 500;
  color: var(--ok);
}
#cmpStage .cmp-card b.ok { color: var(--ok); }
#cmpStage .cmp-card b.bad { color: var(--bad); }
#cmpStage .cmp-tag {
  position: absolute;
  top: calc(var(--chrome-top) + 78px);
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}
#cmpStage .cmp-tag-left { left: calc(var(--chrome-left) + 16px); color: var(--ok); }
#cmpStage .cmp-tag-right { left: calc(var(--cmp-split) + 16px); color: var(--warn); }
#cmpStage .cmp-split {
  pointer-events: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cmp-split);
  width: 28px;
  transform: translateX(-50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
}
#cmpStage .cmp-split i {
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.78);
}
#cmpStage .cmp-close {
  pointer-events: auto;
  position: absolute;
  right: calc(var(--chrome-right) + 12px);
  bottom: calc(var(--chrome-bottom) + 12px);
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 10px;
}
@media (max-width: 900px) {
  #cmpStage .cmp-bar { grid-template-columns: 1fr 1fr; }
  #cmpStage .cmp-card b { font-size: 16px; }
}

#alerts li::before {
  content: '';
  grid-column: 1;
  grid-row: 1 / -1;
  min-height: 28px;
  border-radius: 2px;
  background: var(--warn);
}
#alerts .ops-alert-text,
#alerts .ops-alert-act,
#alerts .ops-alert-state { grid-column: 2; }

#alerts li.sev-bad::before { background: var(--bad); }
#alerts li.sev-ok::before { background: var(--ok); }

.duty-bar button {
  border-radius: 4px;
  border: 1px solid var(--line2);
  background: rgba(60, 200, 234, 0.1);
  color: var(--accent2);
}

@media (max-width: 900px) {
  .nav1-home { display: none; }
  .layer-pop { display: none; }
}

/* ===== 扶摇改版 P5：运行态势时钟 ===== */
.ops-clock {
  position: absolute;
  z-index: 480;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  pointer-events: auto;
}
.ops-clock[hidden] { display: none !important; }
.ops-clock #opsClockPhase {
  font-size: var(--fs-min);
  color: var(--muted);
  white-space: nowrap;
}
.ops-clock strong {
  font-family: var(--f-num);
  font-size: 40px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.ops-clock button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--f-num);
  font-size: var(--fs-min);
  cursor: pointer;
}
.ops-clock button.on { color: var(--warn); }
.ops-clock.storm {
  border-color: var(--warn);
}
.ops-clock.storm #opsClockPhase { color: var(--warn); }
.ops-grades {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.ops-grades b {
  font-family: var(--f-num);
  font-size: 18px;
  font-weight: 500;
}
.ops-grades b.high { color: var(--bad); }
.ops-grades b.mid { color: var(--warn); }
.ops-grades b.low { color: var(--e2); }
.ops-grades em { font-style: normal; font-size: 12px; color: var(--muted); }
#btnAlertMore {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--accent2);
  font-size: var(--fs-min);
  cursor: pointer;
  padding: 0;
}
#alerts li.acked,
#alerts li.ignored { opacity: 0.5; }
.ops-alert-act,
.ops-alert-state {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  font-size: var(--fs-min);
}
#alerts .ops-alert-act button {
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--accent2);
  border-radius: 3px;
  padding: 1px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ops-close {
  float: right;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
#stats dd.ops-related { grid-column: 1 / -1; font-family: var(--f-ui); }
#stats dd.ops-related ul {
  margin: 0;
  padding-left: 16px;
}
body.compare-on .rail,
body.compare-on .detail {
  visibility: hidden;
  pointer-events: none;
}
body.compare-on.seat-disturb #disturbLeft,
body.compare-on.seat-disturb #disturbClock,
body.compare-on.seat-disturb #disturbEhCard,
body.compare-on.seat-disturb #disturbAdviceCard {
  visibility: hidden;
  pointer-events: none;
}
#disturbCmpStage {
  position: absolute;
  inset: 0;
  z-index: 28;
  pointer-events: none;
  --cmp-split: 50%;
}
#disturbCmpStage:not([hidden]) {
  display: block;
}
#disturbCmpStage .cmp-bar,
#disturbCmpStage .cmp-tag,
#disturbCmpStage .cmp-split,
#disturbCmpStage .cmp-close {
  pointer-events: auto;
}
#disturbCmpStage .cmp-bar {
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  width: min(920px, calc(100% - 48px));
  z-index: 2;
}
#disturbCmpStage .cmp-card {
  background: rgba(8, 18, 32, 0.82);
  border: 1px solid rgba(125, 160, 196, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}
#disturbCmpStage .cmp-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
#disturbCmpStage .cmp-card b {
  display: inline-block;
  margin-top: 4px;
  margin-right: 6px;
  font-family: var(--f-num);
  font-size: 18px;
}
#disturbCmpStage .cmp-card b.ok { color: var(--ok); }
#disturbCmpStage .cmp-card b.bad { color: var(--bad); }
#disturbCmpStage .cmp-tag {
  position: absolute;
  top: 128px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  z-index: 2;
}
#disturbCmpStage .cmp-tag-left { left: calc(var(--chrome-left, 16px) + 16px); color: var(--ok); }
#disturbCmpStage .cmp-tag-right { left: calc(var(--cmp-split) + 16px); color: var(--warn); }
#disturbCmpStage .cmp-split {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cmp-split);
  width: 18px;
  margin-left: -9px;
  border: 0;
  background: transparent;
  cursor: ew-resize;
  z-index: 3;
}
#disturbCmpStage .cmp-split i {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.85);
}
#disturbCmpStage .cmp-close {
  position: absolute;
  right: 18px;
  top: 72px;
  z-index: 3;
  border: 1px solid rgba(125, 160, 196, 0.35);
  background: rgba(8, 18, 32, 0.88);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.leaflet-div-icon.ops-dot { background: transparent; border: 0; }
.ops-conflict {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 0;
  background: transparent;
}
.ops-conflict::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid #ef5b5b;
  border-radius: 50%;
  animation: opsPulse 1.6s ease-out infinite;
}
.ops-conflict::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ef5b5b;
}
@keyframes opsPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* 扰动推演 P8-0 */
.disturb-clock {
  position: absolute;
  z-index: 480;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  pointer-events: none;
}
.disturb-clock[hidden] { display: none !important; }
.disturb-clock strong {
  font-family: var(--f-num);
  font-size: 40px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.disturb-clock #disturbClockPhase {
  font-size: var(--fs-min);
  color: var(--muted);
}
.disturb-clock #disturbClockPhase[data-phase="storm"] { color: var(--warn); }
.disturb-clock #disturbClockPhase[data-phase="easing"] { color: var(--warn); }
.disturb-clock #disturbClockPhase[data-phase="recovered"] { color: var(--ok); }
.disturb-clock #disturbSceneTag {
  font-size: var(--fs-min);
  color: var(--muted);
  white-space: nowrap;
}
.disturb-left {
  position: absolute;
  z-index: 470;
  left: 14px;
  top: 14px;
  /* 与右侧 detail、运行态势浮卡同一套外沿：14 / 12 / 300 */
  width: min(300px, calc(50vw - 28px));
  max-height: calc(100% - 86px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.disturb-left[hidden] { display: none !important; }
.disturb-left .card {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
}
.disturb-left .card h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  letter-spacing: 0.04em;
}
.disturb-left .card h4 small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.disturb-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
  max-width: none;
  pointer-events: auto;
}
.disturb-controls h4,
.disturb-controls .disturb-layer-hint,
#disturbLayer,
#disturbPadList {
  grid-column: 1 / -1;
}
#disturbViewCard .disturb-controls h4:nth-of-type(2) { display: none; }
#disturbCamera { grid-column: 1; grid-row: 1; }
#disturbMode { grid-column: 2; grid-row: 1; }
.disturb-controls h4 {
  margin: 2px 0 0;
}
.disturb-controls h4:first-child {
  margin-top: 0;
}
.disturb-controls .horizons,
.disturb-pad-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.disturb-controls .horizons button {
  min-width: 0;
  flex: 1 1 auto;
}
.disturb-pad-list button {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  text-align: center;
  padding: 4px 0;
  font-size: 12px;
}
#disturbLeft > .card {
  padding: 6px 10px;
  gap: 4px;
}
#disturbAirspaceValue { font-size: 24px; }
#disturbKpiCard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px 6px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
#disturbKpiNote {
  white-space: normal;
}
body.seat-disturb .detail { gap: 8px; }
body.seat-disturb #disturbEhValue { font-size: 24px; }
.disturb-verdict {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--paper);
}
.disturb-fold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.disturb-fold small {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
#disturbFlowCard {
  position: relative;
  z-index: 2;
}
#disturbFlowList {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  max-height: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 3;
}
#disturbFlowList[hidden] { display: none !important; }
.disturb-event-tip {
  position: absolute;
  bottom: calc(100% + 28px);
  z-index: 5;
  max-width: 280px;
  transform: translateX(-50%);
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-strong);
  color: var(--paper);
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}
.disturb-event-tip[hidden] { display: none !important; }
body.seat-disturb #disturbAdviceCard { padding-bottom: 6px; }
body.seat-disturb #statsCard:not([hidden]) { order: -1; }
.disturb-layer-hint {
  margin: 0;
  font-size: var(--fs-min);
  color: var(--muted);
  font-family: var(--f-num);
}
.disturb-big {
  margin: 4px 0 0;
  font-family: var(--f-num);
  font-size: 36px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.disturb-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 6px;
}
.disturb-kpi-grid .v {
  display: block;
  font-family: var(--f-num);
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.disturb-kpi-grid .t {
  color: var(--muted);
  font-size: var(--fs-min);
}
.disturb-kpi-grid .v[data-tone="bad"] { color: var(--bad); }
.disturb-kpi-grid .v[data-tone="warn"] { color: var(--warn); }
.disturb-flow-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}
.disturb-flow-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--line2) 70%, transparent);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--paper);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}
.disturb-flow-list button.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.disturb-flow-list .flow-id {
  font-family: var(--f-num);
  font-weight: 500;
}
.disturb-flow-list .flow-st {
  font-size: 11px;
  color: var(--muted);
}
.disturb-flow-list button[data-st="warn"] .flow-st { color: var(--warn); }
.disturb-flow-list button[data-st="bad"] .flow-st { color: var(--bad); }
.disturb-flow-list button[data-st="ok"] .flow-st { color: var(--ok); }
.disturb-pad-list button[data-pad-st="warn"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.disturb-pad-list button[data-pad-st="bad"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.disturb-pad-list button[data-pad-st="ok"] { color: var(--ok); }
.disturb-events {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.disturb-events button {
  position: absolute;
  top: 0;
  width: 10px;
  height: 100%;
  transform: translateX(-50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.disturb-events button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--warn);
  opacity: 0.9;
}
.disturb-events button[data-cls="bad"]::before { background: var(--bad); }
.disturb-events button[data-cls="ok"]::before { background: var(--ok); }
.disturb-events button[data-cls="warn"]::before { background: var(--warn); }
.disturb-advice-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.disturb-advice-list button,
.disturb-advice-list .advice-row {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line2) 70%, transparent);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--paper);
  border-radius: 6px;
  padding: 4px 8px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.3;
}
.disturb-advice-list .advice-main {
  font-family: var(--f-num);
}
.disturb-advice-list .advice-sub {
  color: var(--muted);
  margin-top: 2px;
}
.disturb-advice-apply {
  margin-top: 4px;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--paper);
  border-radius: 6px;
  padding: 7px 8px;
  cursor: pointer;
}
#disturbEhValue[data-band="ok"] { color: var(--ok); }
#disturbEhValue[data-band="warn-lo"] { color: var(--e2, #7ec8a0); }
#disturbEhValue[data-band="warn"] { color: var(--warn); }
#disturbEhValue[data-band="bad"] { color: var(--bad); }
.disturb-rail .disturb-storm {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--warn) 22%, transparent);
  pointer-events: none;
}
.disturb-eh-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent2);
  pointer-events: none;
  overflow: visible;
}
.disturb-rail .clock-play {
  width: auto;
  min-width: 52px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.disturb-rail .clock-rail-axis {
  left: 0;
  right: 0;
}
.disturb-speed {
  grid-column: 3;
  grid-row: 1 / -1;
  align-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--f-num);
  font-size: var(--fs-min);
  cursor: pointer;
  min-width: 40px;
}
body.seat-disturb #listLabel,
body.seat-disturb .drawer-products .list-scroll,
body.seat-disturb .drawer-products #listPager { display: none; }
body.seat-disturb #viewPreset { display: none !important; }
body.seat-disturb #drawerLayers { display: none !important; }
body.seat-disturb #netWorld,
body.seat-disturb #gridWorld,
body.seat-disturb #flightWorld { display: none !important; }
body.seat-disturb #navControls,
body.seat-disturb .map-corner-tools { display: none !important; }
body.seat-disturb #tokenHome,
body.seat-disturb #drawerToken,
body.seat-disturb #statusPill,
body.seat-disturb .map-full,
body.seat-disturb .map-reset,
body.seat-disturb .map-global,
body.seat-disturb .map-measure,
body.seat-disturb .map-shot,
body.seat-disturb #btnGridDrill { display: none !important; }
body.seat-disturb #searchHome,
body.seat-disturb #btnOpenSearch,
body.seat-disturb #bldgSearchBox,
body.seat-disturb #drawerSearch { display: none !important; }
body.seat-disturb #kpiCard,
body.seat-disturb #verdictCard,
body.seat-disturb #dutyBar,
body.seat-disturb #alertCard { display: none !important; }
body.seat-disturb #statsCard[hidden] { display: none !important; }
body.seat-disturb #clockRail,
body.seat-disturb #missionRail { display: none !important; }
body:not(.seat-disturb) #disturbClock,
body:not(.seat-disturb) #disturbLeft,
body:not(.seat-disturb) #disturbRail,
body:not(.seat-disturb) #disturbEhCard,
body:not(.seat-disturb) #disturbViewCard,
body:not(.seat-disturb) #disturbPadCard,
body:not(.seat-disturb) #disturbKpiCard,
body:not(.seat-disturb) #disturbFlowCard,
body:not(.seat-disturb) #disturbAirspaceCard,
body:not(.seat-disturb) #disturbAdviceCard { display: none !important; }
.leaflet-tooltip.disturb-pad-tip {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--paper);
  font-size: 12px;
  padding: 0;
}
/* 右侧结论/误差/建筑字段卡：不依赖 ≥901px，避免窄窗时卡在收起的 phoneDrawer 里。 */
body.seat-disturb main {
  display: block;
  position: relative;
  height: 100%;
  min-height: 0;
}
body.seat-disturb .stage {
  height: 100%;
  padding: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}
body.seat-disturb .stage-head { display: none; }
body.seat-disturb .map-frame {
  margin-top: 0;
  box-shadow: none;
}
body.seat-disturb .map-frame::after { display: none; }
body.seat-disturb .rail { display: none !important; }
body.seat-disturb .detail {
  /* 与左侧、其它席浮卡对齐：主区内 absolute + 顶/右 14、宽 300、卡距 12 */
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  width: min(300px, calc(50vw - 28px));
  z-index: 500;
  height: auto;
  max-height: calc(100% - 86px);
  background: transparent;
  border: 0;
  padding: 0;
  overflow: auto;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: none !important;
}
body.seat-disturb .detail .card { pointer-events: auto; }
body.seat-disturb #mapHud,
body.seat-disturb .drawer-toolbar { display: none !important; }
@media (min-width: 901px) {
  body.seat-disturb footer { display: none; }
}
body.seat-disturb #disturbRail:not([hidden]) {
  display: grid;
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  padding: 2px 8px;
  row-gap: 0;
  z-index: 490;
  pointer-events: auto;
}
.disturb-rail .clock-rail-track {
  min-height: 30px;
}

/* 须写在席位媒体查询之后，才能盖过 body.seat-grid .rail { pointer-events: auto } */
body.grid-busy .rail,
body.grid-busy .detail,
body.grid-busy #clockRail,
body.grid-busy #gridHotspotBar,
body.grid-busy #gridHotspots,
body.grid-busy #layerPop,
body.grid-busy #bldgSearchBox,
body.grid-busy #btnOpenRail,
body.grid-busy #btnOpenDetail,
body.grid-busy #gridWorld,
body.grid-busy #map {
  pointer-events: none;
}
body.grid-busy.seat-grid .detail .card,
body.grid-busy.seat-grid #gridCtrlCard,
body.grid-busy.seat-grid #gridControls,
body.grid-busy.seat-grid #gridCountCard,
body.grid-busy.seat-grid #btnGridDrill {
  pointer-events: none;
}
