:root {
  --bg: rgba(18, 22, 30, 0.88);
  --fg: #e8ebf0;
  --muted: #9aa3b2;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #ff8a1f;
  --btn: rgba(255, 255, 255, 0.08);
  --btn-h: rgba(255, 255, 255, 0.16);
}
html, body { margin: 0; height: 100%; background: #0d1117; color: var(--fg);
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
#cesium { position: absolute; inset: 0; }
.cesium-viewer-bottom { display: none; }

.card { position: absolute; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; backdrop-filter: blur(6px); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.hidden { display: none !important; }
#panel { top: 12px; left: 12px; width: 270px; max-height: calc(100% - 48px); overflow: auto; }
#stationPanel { top: 12px; left: 12px; width: 300px; max-height: calc(100% - 48px); overflow: auto; }
#info { top: 12px; right: 12px; width: 280px; }
.title { font-size: 16px; font-weight: 650; }
.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.muted { color: var(--muted); }
.sect { margin: 12px 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
label { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; }
.clock { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
#simtime, .simtime { font: 600 22px/1 ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.speeds, .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.speeds button, .seg button { background: transparent; color: var(--fg); border: 0; padding: 4px 7px; cursor: pointer;
  font: inherit; font-size: 12px; }
.speeds button + button, .seg button + button { border-left: 1px solid var(--line); }
.speeds button.on, .seg button.on { background: var(--accent); color: #111; font-weight: 600; }
.btn { background: var(--btn); color: var(--fg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px;
  cursor: pointer; font: inherit; }
.btn:hover { background: var(--btn-h); }
.btn.on { background: var(--accent); color: #111; border-color: transparent; font-weight: 600; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btnrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#backBtn { margin-bottom: 10px; }
.leg { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; flex: none; }
.st3d { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 7px;
  background: var(--btn); cursor: pointer; margin-bottom: 4px; }
.st3d:hover { background: var(--btn-h); }
.badge { background: var(--accent); color: #111; font-weight: 700; font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.arr { display: grid; grid-template-columns: 52px 1fr; gap: 2px 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.arr .t { font: 600 13px ui-monospace, Consolas, monospace; }
.arr .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arr .k { grid-column: 2; color: var(--muted); font-size: 12px; }
.note { color: var(--muted); font-size: 11px; margin-top: 10px; }
#info .close { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
#info table { width: 100%; border-collapse: collapse; margin-top: 8px; }
#info td { padding: 2px 0; vertical-align: top; }
#info td:first-child { color: var(--muted); width: 95px; }
#tip { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 8px; font-size: 12px; white-space: nowrap; transform: translate(12px, 12px); }
#loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; display: flex; gap: 10px; align-items: center; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  #panel, #stationPanel { width: calc(100% - 52px); max-height: 45%; }
  #info { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
}

#pano { right: 12px; bottom: 12px; width: min(46vw, 760px); height: min(56vh, 460px); padding: 8px;
  display: flex; flex-direction: column; gap: 6px; }
#pano .panohead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
#pano .close { position: static; }
#panoView { flex: 1; border-radius: 6px; overflow: hidden; background: #000; }
@media (max-width: 700px) { #pano { left: 12px; width: auto; height: 45vh; } }
