:root {
  --paper: #f7f9fb;
  --paper-strong: #ffffff;
  --ink: #111820;
  --ink-soft: #35424f;
  --muted: #73808d;
  --faint: #9ca6af;
  --line: rgba(17, 24, 32, 0.1);
  --line-strong: rgba(17, 24, 32, 0.16);
  --glass: rgba(255, 255, 255, 0.78);
  --cjh: #007f73;
  --cjh-rgb: 0, 127, 115;
  --yrcc: #d08b15;
  --yrcc-rgb: 208, 139, 21;
  --mwr: #1769aa;
  --mwr-rgb: 23, 105, 170;
  --danger: #c73b38;
  --ok: #168060;
  --warning: #bd7614;
  --shadow: 0 22px 64px rgba(25, 45, 62, 0.12);
  --shadow-soft: 0 12px 34px rgba(25, 45, 62, 0.08);
  --sans: "Avenir Next", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Cascadia Mono", monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  margin: 0;
}

html {
  height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(var(--mwr-rgb), 0.42);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 25px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.brand-mark i {
  position: absolute;
  left: 2px;
  width: 21px;
  height: 4px;
  border: 1.5px solid var(--mwr);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  transform: rotate(-7deg);
}

.brand-mark i:nth-child(1) { top: 3px; opacity: 0.38; }
.brand-mark i:nth-child(2) { top: 8px; opacity: 0.68; }
.brand-mark i:nth-child(3) { top: 13px; }

.app-body {
  height: 100%;
  min-height: 620px;
  overflow: hidden;
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  height: 64px;
  grid-template-columns: 310px minmax(380px, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
}

.topbar > .brand {
  padding: 0 22px;
}

.view-nav {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: stretch;
  justify-content: center;
  scrollbar-width: none;
}

.view-nav::-webkit-scrollbar { display: none; }

.view-nav a {
  position: relative;
  display: grid;
  min-width: 80px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease;
}

.view-nav a::after {
  position: absolute;
  right: 20px;
  bottom: -1px;
  left: 20px;
  height: 2px;
  background: var(--ink);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.view-nav a:hover,
.view-nav a.on {
  color: var(--ink);
}

.view-nav a.on::after {
  opacity: 1;
  transform: scaleX(1);
}

.topbar-meta {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
  gap: 15px;
  padding: 0 22px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.system-state i,
.status-dot,
.crawl-banner i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 4px rgba(115, 128, 141, 0.1);
}

.system-state i.ok,
.status-dot.ok,
.crawl-banner.ok i {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(22, 128, 96, 0.11);
}

.system-state i.running,
.status-dot.running,
.crawl-banner.running i {
  background: var(--mwr);
  box-shadow: 0 0 0 4px rgba(var(--mwr-rgb), 0.12);
  animation: status-pulse 1.6s ease-in-out infinite;
}

.system-state i.error,
.status-dot.error,
.crawl-banner.error i {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(199, 59, 56, 0.1);
}

@keyframes status-pulse {
  50% { opacity: 0.5; transform: scale(1.25); }
}

.clock {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.user-name {
  max-width: 92px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
}

.logout-form { margin: 0; }

.logout-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 5px 0;
}

.logout-button:hover { color: var(--ink); }

.mobile-status-button { display: none !important; }

.workspace {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 310px minmax(460px, 1fr) 284px;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.explorer,
.telemetry {
  position: relative;
  z-index: 6;
  min-height: 0;
  min-width: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.explorer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  padding: 28px 20px 0;
}

.explorer-heading {
  padding: 0 4px;
}

.explorer-heading h1 {
  margin: 7px 0 7px;
  font-size: 28px;
  font-weight: 580;
  line-height: 1.15;
}

.update-line {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.source-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 17px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(17, 24, 32, 0.025);
}

.source-filters:empty { display: none; }

.source-filters button {
  min-width: 0;
  min-height: 31px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-filters button.on {
  background: #fff;
  box-shadow: 0 1px 6px rgba(25, 45, 62, 0.08);
  color: var(--ink);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-grid div {
  min-width: 0;
  padding: 14px 8px 13px 4px;
}

.summary-grid div + div {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.summary-grid strong {
  display: block;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.summary-grid span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.station-tools {
  padding: 0 4px 18px;
}

.search-field {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
}

.search-field > span {
  font-size: 20px;
  line-height: 1;
  transform: rotate(-15deg);
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder { color: var(--faint); }

.search-field button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 32, 0.05);
  color: var(--muted);
  cursor: pointer;
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}

.segmented {
  display: inline-flex;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(17, 24, 32, 0.025);
}

.segmented button {
  min-width: 58px;
  min-height: 29px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.segmented button.on {
  background: #fff;
  box-shadow: 0 1px 6px rgba(25, 45, 62, 0.08);
  color: var(--ink);
}

.segmented.compact button {
  min-width: 54px;
  min-height: 25px;
}

.select-wrap select {
  max-width: 92px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.station-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.station-list {
  min-height: 0;
  flex: 1;
  margin: 0 -20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 24px;
  scrollbar-color: rgba(17, 24, 32, 0.15) transparent;
  scrollbar-width: thin;
}

.station-row {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 8px 4px;
  text-align: left;
}

.station-row:last-child { border-bottom: 1px solid var(--line); }

.station-row:hover,
.station-row.on {
  background: linear-gradient(90deg, rgba(var(--mwr-rgb), 0.05), transparent 88%);
}

.station-row > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mwr);
  box-shadow: 0 0 0 4px rgba(var(--mwr-rgb), 0.1);
}

.station-row.cjh > i { background: var(--cjh); box-shadow: 0 0 0 4px rgba(var(--cjh-rgb), 0.1); }
.station-row.yrcc > i { background: var(--yrcc); box-shadow: 0 0 0 4px rgba(var(--yrcc-rgb), 0.1); }

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

.station-copy strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 580;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-copy span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-value {
  max-width: 94px;
  text-align: right;
}

.station-value strong {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.station-value span {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
}

.list-loading,
.list-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.list-loading i {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-top-color: var(--mwr);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.list-loading span { margin-top: -60px; }

@keyframes spin { to { transform: rotate(360deg); } }

.globe-stage {
  position: relative;
  min-height: 320px;
  min-width: 0;
  overflow: hidden;
  background: #f0f4f7;
}

#globe,
#login-globe {
  display: block;
  width: 100%;
  height: 100%;
}

#globe {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: none;
}

#globe:active { cursor: grabbing; }

.globe-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(46, 80, 108, 0.06);
}

.globe-wash::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(23, 105, 170, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 105, 170, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.globe-fallback {
  position: absolute;
  top: 26px;
  left: 50%;
  width: min(420px, calc(100% - 40px));
  border: 1px solid rgba(199, 59, 56, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--danger);
  font-size: 11px;
  padding: 10px 14px;
  text-align: center;
  transform: translateX(-50%);
}

.map-toolbar {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1;
}

.icon-button:hover { background: #fff; color: var(--ink); }

.map-toolbar .icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.map-toolbar .icon-button + .icon-button { border-top: 1px solid var(--line); }
.map-toolbar .focus-button { font-size: 16px; }

.map-label {
  position: absolute;
  z-index: 5;
  display: grid;
  min-width: 130px;
  grid-template-columns: 8px 1fr;
  column-gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  padding: 9px 11px;
  pointer-events: none;
}

.map-label i {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--mwr);
}

.map-label strong {
  font-size: 12px;
  font-weight: 600;
}

.map-label span {
  grid-column: 2;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.scene-footer {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
}

.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 6px; height: 6px; border-radius: 50%; }

.scene-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
}

.telemetry {
  border-left: 1px solid var(--line);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 27px 19px 22px;
  overscroll-behavior: contain;
}

.telemetry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 3px 20px;
}

.telemetry-head h2 {
  margin: 5px 0 0;
  font-size: 21px;
  font-weight: 580;
}

.telemetry-close { display: none; }

.health-diagnostic {
  padding: 0 3px 18px;
  border-bottom: 1px solid var(--line);
}

.diagnostic-run {
  display: grid;
  width: 100%;
  min-height: 43px;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.diagnostic-run:hover {
  border-color: #273846;
  background: #273846;
}

.diagnostic-run:active { transform: translateY(1px); }

.diagnostic-run:disabled {
  cursor: wait;
  opacity: 0.84;
  transform: none;
}

.diagnostic-run > span:nth-child(2) {
  font-size: 12px;
  font-weight: 650;
}

.diagnostic-run small {
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.diagnostic-run-mark {
  position: relative;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
}

.diagnostic-run-mark::before,
.diagnostic-run-mark::after,
.diagnostic-run-mark i {
  position: absolute;
  background: #fff;
  content: "";
}

.diagnostic-run-mark::before { width: 7px; height: 1px; }
.diagnostic-run-mark::after { width: 1px; height: 7px; }
.diagnostic-run-mark i { width: 3px; height: 3px; border-radius: 50%; }

.diagnostic-run.running .diagnostic-run-mark {
  animation: diagnostic-scan 1.2s linear infinite;
}

@keyframes diagnostic-scan { to { transform: rotate(360deg); } }

.diagnostic-progress {
  --diagnostic-progress: 0%;
  position: relative;
  height: 56px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: #09131d;
  isolation: isolate;
}

.diagnostic-progress::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--diagnostic-progress);
  background: #087d82;
  content: "";
  transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms ease;
}

.diagnostic-progress[data-tone="success"]::before { background: var(--ok); }
.diagnostic-progress[data-tone="error"]::before { background: var(--danger); }

.diagnostic-progress canvas {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.diagnostic-progress.webgpu-ready canvas { display: block; }

.diagnostic-progress-copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  color: #fff;
  pointer-events: none;
}

.diagnostic-progress-copy span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-progress-copy strong {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.diagnostic-steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.diagnostic-steps li {
  display: grid;
  min-height: 54px;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
}

.diagnostic-step-index {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.diagnostic-steps li > div { min-width: 0; }

.diagnostic-steps strong {
  display: block;
  font-size: 10px;
  font-weight: 650;
}

.diagnostic-steps p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.diagnostic-step-state {
  display: inline-flex;
  min-width: 34px;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.diagnostic-step-state::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
  content: "";
}

.diagnostic-steps li.running .diagnostic-step-state { color: var(--mwr); }
.diagnostic-steps li.running .diagnostic-step-state::before {
  background: var(--mwr);
  animation: status-pulse 1.2s ease-in-out infinite;
}
.diagnostic-steps li.pass .diagnostic-step-state { color: var(--ok); }
.diagnostic-steps li.pass .diagnostic-step-state::before { background: var(--ok); }
.diagnostic-steps li.fail .diagnostic-step-state { color: var(--danger); }
.diagnostic-steps li.fail .diagnostic-step-state::before { background: var(--danger); }

.diagnostic-result {
  min-height: 27px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.diagnostic-result.pass { color: var(--ok); }
.diagnostic-result.fail { color: var(--danger); }

.source-status {
  border-top: 0;
}

.status-source {
  padding: 15px 3px 16px;
  border-bottom: 1px solid var(--line);
}

.status-source-head {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.status-source-head strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-source-head span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.status-source > p {
  min-height: 30px;
  margin: 8px 0 0 17px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.status-stats {
  display: flex;
  gap: 14px;
  margin: 8px 0 0 17px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.status-stats b { color: var(--ink-soft); font-weight: 560; }

.status-skeleton {
  height: 86px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, transparent 20%, rgba(23, 105, 170, 0.05) 45%, transparent 70%);
  background-size: 260% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { to { background-position: -180% 0; } }

.archive-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 3px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.archive-line strong {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-align: right;
}

.telemetry-foot {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.heartbeat-pulse {
  width: 24px;
  height: 8px;
  background: linear-gradient(90deg, transparent 0 14%, var(--mwr) 15% 18%, transparent 19% 31%, var(--mwr) 32% 35%, transparent 36% 49%, var(--mwr) 50% 54%, transparent 55%);
  opacity: 0.55;
  animation: heartbeat 1.8s linear infinite;
}

@keyframes heartbeat { 50% { opacity: 1; } }

.station-drawer {
  position: fixed;
  z-index: 70;
  top: 64px;
  right: 284px;
  bottom: 0;
  display: flex;
  width: min(660px, calc(100vw - 594px));
  min-width: 540px;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -24px 0 70px rgba(28, 52, 72, 0.13);
  padding: 28px 30px 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.8,.2,1);
}

.station-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.drawer-head h2 {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 580;
  line-height: 1.12;
}

.station-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

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

.current-readings {
  display: grid;
  grid-template-columns: 1fr 1fr 1.12fr;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.current-readings > div {
  min-width: 0;
  padding: 17px 15px 15px 0;
}

.current-readings > div + div {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.current-readings > div > span {
  color: var(--muted);
  font-size: 10px;
}

.current-readings p {
  min-height: 31px;
  margin: 5px 0 0;
}

.current-readings strong {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 540;
  font-variant-numeric: tabular-nums;
}

.current-readings small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
}

.current-readings em {
  display: block;
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-readings .reading-time {
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.crawl-banner {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  margin: 16px 0 20px;
  border-left: 2px solid var(--mwr);
  background: rgba(var(--mwr-rgb), 0.04);
  color: var(--ink-soft);
  font-size: 10px;
  padding: 8px 12px;
}

.crawl-banner.error { border-left-color: var(--danger); background: rgba(199, 59, 56, 0.04); }

.chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.range-control { overflow-x: auto; }
.range-control button { min-width: 62px; }

.chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
  margin: 16px 0 5px;
  color: var(--muted);
  font-size: 9px;
}

.chart-summary strong {
  margin-left: 3px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-weight: 540;
}

.chart-wrap {
  position: relative;
  min-height: 260px;
  flex: 1;
  margin-top: 4px;
}

#history-chart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  touch-action: none;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 138px;
  border: 1px solid rgba(17, 24, 32, 0.8);
  border-radius: 4px;
  background: rgba(17, 24, 32, 0.94);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.55;
  padding: 7px 9px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  white-space: nowrap;
}

.chart-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.chart-caption span:last-child { display: flex; align-items: center; gap: 6px; }
.chart-caption i { width: 14px; border-top: 1px dashed var(--faint); }

.station-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.station-facts div {
  min-width: 0;
  padding: 13px 12px 13px 0;
}

.station-facts div + div { border-left: 1px solid var(--line); padding-left: 13px; }

.station-facts span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.station-facts strong,
.station-facts a {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 520;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-facts a:hover { color: var(--mwr); }

.scrim {
  position: fixed;
  z-index: 59;
  inset: 64px 0 0;
  background: rgba(31, 50, 66, 0.16);
  backdrop-filter: blur(1px);
}

.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(17, 24, 32, 0.94);
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 11px;
  padding: 10px 14px;
  transform: translateX(-50%);
}

/* Login */
.login-body {
  position: relative;
  height: 100%;
  min-height: 620px;
  overflow: hidden;
  background: #f3f6f8;
}

#login-globe {
  position: absolute;
  inset: 0;
}

.login-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 249, 251, 0.96) 0%, rgba(247, 249, 251, 0.58) 44%, rgba(247, 249, 251, 0.18) 74%, rgba(247, 249, 251, 0.55) 100%);
  pointer-events: none;
}

.login-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
}

.login-topbar > span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.login-layout {
  position: relative;
  z-index: 4;
  display: grid;
  width: min(1180px, calc(100% - 80px));
  height: calc(100% - 72px);
  grid-template-columns: 1fr 390px;
  align-items: center;
  gap: 70px;
  margin: 0 auto;
  padding-bottom: 3vh;
}

.login-intro h1 {
  margin: 12px 0 24px;
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 520;
  line-height: 1.07;
}

.login-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 21px;
  color: var(--ink-soft);
  font-size: 11px;
}

.login-sources span { display: inline-flex; align-items: center; gap: 7px; }
.login-sources i { width: 18px; height: 2px; background: var(--mwr); }
.login-sources i.cjh { background: var(--cjh); }
.login-sources i.yrcc { background: var(--yrcc); }

.login-panel {
  border-top: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 35px 36px 27px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login-panel h2 {
  margin: 8px 0 5px;
  font-size: 27px;
  font-weight: 580;
}

.login-subtitle {
  margin: 0 0 27px;
  color: var(--muted);
  font-size: 11px;
}

.login-panel label {
  display: block;
  margin-top: 17px;
}

.login-panel label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.login-panel input:not([type="hidden"]) {
  display: block;
  width: 100%;
  height: 43px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 14px;
}

.login-panel input:focus { border-bottom-color: var(--ink); }

.login-panel form > button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin-top: 27px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  padding: 0 16px;
}

.login-panel form > button:hover { background: #26313b; }
.login-panel form > button span { font-size: 18px; }

.login-error {
  border-left: 2px solid var(--danger);
  background: rgba(199, 59, 56, 0.05);
  color: var(--danger);
  font-size: 11px;
  padding: 9px 11px;
}

.login-security {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 23px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.login-security i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 3px;
  border: 1px solid var(--ok);
  border-radius: 50%;
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 250px minmax(350px, 1fr) auto; }
  .workspace { grid-template-columns: 270px minmax(420px, 1fr) 250px; }
  .station-drawer { right: 250px; width: min(620px, calc(100vw - 520px)); min-width: 500px; }
  .topbar-meta { gap: 10px; padding: 0 16px; }
  .user-name { display: none; }
  .login-layout { width: min(1000px, calc(100% - 60px)); grid-template-columns: 1fr 360px; }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 210px 1fr auto; }
  .topbar > .brand { padding: 0 14px; }
  .brand { font-size: 12px; }
  .view-nav a { min-width: 62px; }
  .clock, .system-state span, .logout-button { display: none; }
  .workspace { grid-template-columns: 270px minmax(0, 1fr); }
  .telemetry {
    position: fixed;
    z-index: 80;
    top: 64px;
    right: 0;
    bottom: 0;
    width: 284px;
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(28, 52, 72, 0.13);
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: opacity 180ms ease, transform 220ms ease;
  }
  .telemetry.open { opacity: 1; pointer-events: auto; transform: none; }
  .scrim { right: 284px; }
  .telemetry-close { display: inline-grid; }
  .mobile-status-button { display: inline-grid !important; width: 31px; height: 31px; color: var(--ok); font-size: 10px; }
  .station-drawer { right: 0; width: min(650px, calc(100vw - 270px)); min-width: 0; }
  .login-layout { grid-template-columns: minmax(0, 1fr) 350px; gap: 35px; }
}

@media (max-width: 740px) {
  .app-body { min-height: 0; }
  .topbar {
    height: 58px;
    grid-template-columns: auto 1fr auto;
  }
  .topbar > .brand { padding: 0 12px; }
  .topbar .brand > span:last-child { display: none; }
  .view-nav { overflow-x: auto; justify-content: flex-start; }
  .view-nav a { min-width: 55px; font-size: 11px; }
  .view-nav a::after { right: 13px; left: 13px; }
  .topbar-meta { padding: 0 10px 0 4px; }
  .topbar-meta .system-state { display: none; }
  .workspace { top: 58px; display: block; }
  .explorer {
    position: fixed;
    z-index: 12;
    right: 0;
    bottom: 0;
    left: 0;
    height: 43vh;
    min-height: 268px;
    border-top: 1px solid var(--line);
    border-right: 0;
    padding: 14px 14px 0;
    box-shadow: 0 -18px 48px rgba(25, 45, 62, 0.08);
  }
  .explorer-heading { display: flex; align-items: baseline; gap: 10px; padding: 0; }
  .explorer-heading .eyebrow { display: none; }
  .explorer-heading h1 { margin: 0; font-size: 18px; }
  .update-line { min-width: 0; min-height: 0; flex: 1; overflow: hidden; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
  .source-filters { margin-top: 10px; }
  .summary-grid { display: none; }
  .station-tools { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; padding: 9px 0 10px; }
  .search-field { min-width: 0; }
  .tool-row { margin: 0; }
  .select-wrap { display: none; }
  .station-list-head { padding: 0 0 7px; }
  .station-list { margin: 0 -14px; padding: 0 14px 12px; }
  .station-row { min-height: 52px; padding: 5px 2px; }
  .station-copy strong { font-size: 12px; }
  .globe-stage { position: absolute; inset: 0 0 43vh; }
  .map-toolbar { top: 14px; left: 14px; }
  .scene-footer { right: 12px; bottom: 10px; left: 12px; }
  .scene-footer p { display: none; }
  .telemetry { top: 58px; width: min(320px, 88vw); }
  .station-drawer {
    z-index: 90;
    top: 58px;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    min-width: 0;
    padding: 20px 16px 18px;
    transform: translateY(30px);
  }
  .station-drawer.open { transform: translateY(0); }
  .drawer-head h2 { font-size: 25px; }
  .current-readings { grid-template-columns: 1fr 1fr; }
  .current-readings > div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; padding-left: 0; }
  .chart-controls { align-items: flex-start; flex-direction: column; gap: 10px; }
  .range-control { width: 100%; }
  .range-control button { min-width: 74px; flex: 1; }
  .chart-wrap { min-height: 235px; }
  #history-chart { min-height: 235px; }
  .station-facts { grid-template-columns: 1fr 1fr; }
  .station-facts div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; padding-left: 0; }
  .station-facts div:nth-child(4) { border-top: 1px solid var(--line); }
  .scrim { inset: 58px min(320px, 88vw) 0 0; }
  .login-body { min-height: 560px; overflow-y: auto; }
  .login-topbar { height: 62px; padding: 0 18px; }
  .login-topbar > span:last-child { display: none; }
  .login-layout {
    width: calc(100% - 32px);
    height: auto;
    min-height: calc(100% - 62px);
    grid-template-columns: 1fr;
    gap: 26px;
    align-content: center;
    padding: 34px 0;
  }
  .login-intro h1 { margin: 8px 0 16px; font-size: 38px; }
  .login-sources { gap: 13px; font-size: 9px; }
  .login-panel { padding: 29px 24px 23px; }
  .login-wash { background: rgba(247, 249, 251, 0.74); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
