/* Orbitwatch: dark mission-control look, built for reading at a glance.
   Palette borrowed from Project Skywave. */
:root {
  --bg: #05070e;
  --surface: rgba(12, 18, 34, 0.86);
  --surface-solid: #0c1222;
  --surface2: #151f33;
  --text: #e9f2ff;
  --muted: #8b9cb8;
  --border: rgba(255, 255, 255, 0.11);
  --ion: #5dffcf;
  --violet: #c77dff;
  --ember: #ffb86c;
  --good: #5ef5c4;
  --warn: #ffc14a;
  --bad: #ff6b8b;
  /* quake depth */
  --d-shallow: #ff5d5d;
  --d-mid: #ff9f43;
  --d-inter: #ffe066;
  --d-deep: #b388ff;
  /* volcano alert */
  --a-advisory: #ffd84d;
  --a-watch: #ff8c1a;
  --a-warning: #ff3b3b;
  --font-display: "Oxanium", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --topbar-h: 56px;
  --rail-w: 250px;
  --panel-w: 360px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font-body);
  overflow: hidden;
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ map */
#map { position: fixed; inset: var(--topbar-h) 0 0 0; background: radial-gradient(circle at 50% 45%, #0b1430 0%, var(--bg) 60%); }
.maplibregl-ctrl-attrib { background: rgba(5, 7, 14, 0.7) !important; color: var(--muted); font-size: 11px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-group { background: var(--surface) !important; border: 1px solid var(--border); }
.maplibregl-ctrl-group button + button { border-top-color: var(--border) !important; }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.97), rgba(8, 12, 24, 0.92));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.brand { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.22em; font-size: 17px; display: flex; align-items: center; gap: 10px; color: var(--ion); white-space: nowrap; }
.brand-mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ion); box-shadow: 0 0 12px rgb(93 255 207 / 0.6), inset 0 0 6px rgb(93 255 207 / 0.5); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: -6px 4px; border: 1.5px solid var(--violet); border-radius: 50%; transform: rotate(60deg); opacity: 0.8; }
.clocks { display: flex; gap: 14px; }
.clock { display: flex; flex-direction: column; line-height: 1.1; }
.clock-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.clock .mono { font-size: 16px; }
.space-badges { display: flex; gap: 6px; margin-left: auto; cursor: pointer; }
.badge { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); }
.badge-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.badge-val { font-size: 16px; font-weight: 600; }
.badge.lvl-0 .badge-val { color: var(--good); }
.badge.lvl-1 .badge-val { color: var(--warn); }
.badge.lvl-2 .badge-val { color: var(--ember); }
.badge.lvl-3 .badge-val { color: var(--bad); }
.health { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); white-space: nowrap; }
.health:hover, .proj-toggle:hover { border-color: rgb(93 255 207 / 0.5); }
.health-dots { display: flex; gap: 3px; }
.hdot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.hdot.fresh { background: var(--good); box-shadow: 0 0 6px rgb(94 245 196 / 0.7); }
.hdot.stale { background: var(--warn); }
.hdot.error { background: var(--bad); }
.health-text { font-size: 13px; }
.layers-btn { display: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); font-size: 13px; }
.proj-toggle { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); font-size: 13px; white-space: nowrap; }

.health-drawer {
  position: fixed; top: calc(var(--topbar-h) + 8px); right: 16px; z-index: 30; width: min(560px, calc(100vw - 32px));
  max-height: 70vh; overflow: auto; padding: 14px 16px; border-radius: 14px;
  background: var(--surface-solid); border: 1px solid var(--border); box-shadow: 0 18px 60px rgb(0 0 0 / 0.6);
}
.drawer-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.drawer-head .muted { font-size: 13px; }
.drawer-wrap { overflow-x: auto; }
#health-table { border-collapse: collapse; width: 100%; font-size: 13px; }
#health-table th, #health-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
#health-table th { color: var(--muted); font-weight: 600; }
#health-table .grp td { color: var(--ion); font-family: var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; padding-top: 10px; }
.st-fresh { color: var(--good); } .st-stale { color: var(--warn); } .st-error, .st-waiting { color: var(--bad); }

/* ------------------------------------------------------------ left rail */
.rail, .panel {
  position: fixed; top: calc(var(--topbar-h) + 12px); bottom: 12px; z-index: 10;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  backdrop-filter: blur(10px); box-shadow: 0 12px 40px rgb(0 0 0 / 0.45);
}
.rail { left: 12px; width: var(--rail-w); padding: 14px; overflow-y: auto; }
.rail-title, .feed-head h2 { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.layer { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.layer:hover { background: rgb(255 255 255 / 0.04); }
.layer input { accent-color: var(--ion); width: 16px; height: 16px; margin: 0; }
.count { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.sw-quake { background: var(--d-shallow); box-shadow: 0 0 0 3px rgb(255 93 93 / 0.25); }
.sw-quake-big { background: transparent; border: 2px solid var(--d-mid); }
.sw-volc, .sw-volc-dim { width: 0; height: 0; border-radius: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 13px solid var(--a-watch); }
.sw-volc-dim { border-bottom-color: #6c7891; }
.sw-event { background: var(--ember); border-radius: 4px; }
.sw-aurora { background: linear-gradient(135deg, #3dffa0, #5dffcf 50%, #c77dff); }
.sw-night { background: linear-gradient(90deg, #0b1020 50%, #4a6aa8 50%); border: 1px solid var(--border); }
.rail-filter { margin: 12px 4px 4px; font-size: 14px; }
.rail-filter input { width: 100%; accent-color: var(--ion); }
.legend { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; }
.legend h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 8px 0 6px; font-weight: 600; }
.legend-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.legend .dot { width: 11px; height: 11px; border-radius: 50%; }
.legend .tri { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--c); }

/* ------------------------------------------------------------ right panel */
.panel { right: 12px; width: var(--panel-w); display: flex; flex-direction: column; overflow: hidden; }
.feed-head { padding: 14px 14px 8px; border-bottom: 1px solid var(--border); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; font-size: 13px; color: var(--muted); }
.chip.active { color: var(--bg); background: var(--ion); border-color: var(--ion); font-weight: 600; }
.ovchip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; font-size: 13px; color: var(--muted); cursor: pointer; }
.ovchip.active { color: var(--bg); background: var(--ion); border-color: var(--ion); font-weight: 600; }
.over-chips { margin: 6px 0 8px; }
.spot-more { margin: 6px 0 0; width: 100%; }
#over-minel { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font: 14px var(--font-body); }
.feed { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1; }
.feed li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 14px; border-bottom: 1px solid rgb(255 255 255 / 0.05); cursor: pointer; }
.feed li:hover, .feed li:focus { background: rgb(93 255 207 / 0.06); outline: none; }
.feed li.empty { display: block; color: var(--muted); cursor: default; }
.feed .tag { font-family: var(--font-mono); font-weight: 600; font-size: 15px; text-align: center; border-radius: 8px; padding: 6px 0; align-self: start; }
.feed .title { font-weight: 500; line-height: 1.3; }
.feed .meta { font-size: 13px; color: var(--muted); }
.feed .new { color: var(--ion); font-weight: 600; }

.detail { margin: 12px; padding: 14px; border-radius: 12px; background: var(--surface2); border: 1px solid rgb(93 255 207 / 0.25); position: relative; }
.detail h3 { margin: 0 32px 4px 0; font-size: 17px; line-height: 1.3; }
.detail .big { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 6px; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.detail a { color: var(--ion); }
.detail .close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: transparent; font-size: 16px; line-height: 1; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 1100px) {
  :root { --rail-w: 220px; --panel-w: 320px; }
  .clocks .clock:nth-child(2) { display: none; }
}
@media (max-width: 820px) {
  :root { --topbar-h: 52px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand { font-size: 14px; letter-spacing: 0.14em; }
  .clocks, .space-badges .scale, .health-text { display: none; }
  .layers-btn { display: block; }
  .brand-mark { display: none; }
  .rail { top: auto; bottom: 46vh; left: 12px; right: 12px; width: auto; max-height: 30vh; display: none; }
  .rail.open { display: block; }
  .panel { top: auto; left: 12px; right: 12px; width: auto; height: 42vh; bottom: 12px; }
}
@media (max-width: 480px) {
  .topbar { gap: 6px; padding: 0 10px; }
  .brand { font-size: 12px; letter-spacing: 0.1em; }
  .health { padding: 6px 8px; }
  .hdot { width: 7px; height: 7px; }
  .badge { padding: 4px 7px; }
  .layers-btn, .proj-toggle { padding: 6px 8px; font-size: 12px; }
}

/* ------------------------------------------------------------ panel tabs */
.tabs { display: flex; gap: 4px; padding: 10px 10px 0; border-bottom: 1px solid var(--border); }
.tab { flex: 1; padding: 8px 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.tab.active { color: var(--ion); border-bottom-color: var(--ion); }
.tab-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tab-body.scroll { overflow-y: auto; padding: 12px; gap: 14px; }
.section-title { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 4px 0 6px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.section-title .age { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-weight: 400; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.15; }
.tile .v small { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.tile .note { font-size: 12.5px; color: var(--muted); }
.tile .note b { color: var(--text); font-weight: 600; }
.st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.lv0 { background: var(--good); } .lv1 { background: var(--warn); } .lv2 { background: var(--ember); } .lv3 { background: var(--bad); }

/* charts */
.chart { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px 4px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { fill: var(--muted); font: 10.5px var(--font-mono); }
.chart .grid { stroke: rgb(255 255 255 / 0.07); stroke-width: 1; }
.chart .zero { stroke: rgb(255 255 255 / 0.28); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .line { fill: none; stroke: var(--ion); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgb(93 255 207 / 0.08); }
.chart .cross { stroke: rgb(255 255 255 / 0.4); stroke-width: 1; }
.chart .dot { fill: var(--ion); stroke: var(--surface-solid); stroke-width: 2; }
.chart .bar { rx: 2; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; padding: 6px 9px; border-radius: 8px; background: #0a1020; border: 1px solid rgb(93 255 207 / 0.35); font-size: 12.5px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.5); white-space: nowrap; }
.chart-tip b { font-family: var(--font-mono); }
.chart-cap { font-size: 12px; color: var(--muted); margin: 2px 0 4px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; }
.list li { padding: 8px 12px; border-bottom: 1px solid rgb(255 255 255 / 0.05); font-size: 13.5px; display: flex; gap: 10px; align-items: baseline; }
.list li:last-child { border-bottom: 0; }
.list .cls { font-family: var(--font-mono); font-weight: 600; min-width: 46px; }
.list .when { color: var(--muted); margin-left: auto; white-space: nowrap; font-size: 12.5px; }
.list.empty-note li { color: var(--muted); }
details.box { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; }
details.box summary { cursor: pointer; font-weight: 500; }
details.box pre { white-space: pre-wrap; font: 12px/1.45 var(--font-mono); color: #cfe3ff; margin: 8px 0 2px; max-height: 340px; overflow: auto; }
.alert-item + .alert-item { margin-top: 6px; }
.fclass-X { color: var(--bad); } .fclass-M { color: var(--ember); } .fclass-C { color: var(--warn); } .fclass-B, .fclass-A { color: var(--muted); }

/* sun gallery */
.sun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sun-card { background: #000; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: zoom-in; padding: 0; text-align: left; }
.sun-card.wide { grid-column: span 2; }
.sun-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.sun-card .cap { padding: 7px 9px 8px; background: var(--surface2); }
.sun-card .cap strong { display: block; font-size: 13.5px; }
.sun-card .cap span { font-size: 12px; color: var(--muted); }
.sun-missing { aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgb(2 4 10 / 0.92); display: grid; place-items: center; padding: 24px; }
.lightbox figure { margin: 0; max-width: min(92vw, 92vh); }
.lightbox img { width: 100%; border-radius: 12px; }
.lightbox figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; text-align: center; }
.lightbox .close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); font-size: 18px; }

/* ------------------------------------------------------------ timeline */
.timeline {
  position: fixed; z-index: 15; bottom: 14px; left: calc(var(--rail-w) + 28px); right: calc(var(--panel-w) + 28px);
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
}
.tl-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid rgb(93 255 207 / 0.5); background: rgb(93 255 207 / 0.1); color: var(--ion); font-size: 15px; }
.tl-btn:hover { background: rgb(93 255 207 / 0.2); }
.tl-speed { flex: none; min-width: 72px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 12px; white-space: nowrap; }
.tl-speed:hover { border-color: rgb(93 255 207 / 0.5); color: var(--ion); }
.tl-track { flex: 1; min-width: 120px; position: relative; padding-bottom: 14px; }
.tl-track input { width: 100%; accent-color: var(--ion); margin: 0; }
.tl-marks { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.tl-marks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-marks .now { color: var(--ion); }
.tl-marks .zone { position: absolute; top: -17px; height: 4px; border-radius: 2px; }
.tl-marks .zone.rec { background: rgb(93 255 207 / 0.55); }
.tl-marks .zone.proj { background: repeating-linear-gradient(90deg, rgb(199 125 255 / 0.7) 0 5px, transparent 5px 8px); }
.tl-info { flex: none; width: 230px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-time { font-size: 14px; }
.tl-src { font-size: 12px; color: var(--muted); }
.tl-src .proj { color: var(--violet); font-weight: 600; }
.tl-src .rec { color: var(--ion); font-weight: 600; }
.tl-live { flex: none; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); font-size: 13px; font-weight: 600; letter-spacing: 0.05em; }
.tl-live.active { color: var(--bg); background: var(--ion); border-color: var(--ion); }
@media (max-width: 1100px) { .tl-info { width: 170px; } }
@media (max-width: 820px) {
  .timeline { left: 12px; right: 12px; bottom: calc(42vh + 22px); padding: 8px 10px; gap: 8px; }
  .tl-info { width: 120px; }
  .tl-src { display: none; }
  .tl-speed { min-width: 0; padding: 6px; font-size: 11px; }
  .tl-info { width: auto; max-width: 112px; }
  .tl-time { font-size: 11.5px; white-space: normal; line-height: 1.25; }
}

/* ------------------------------------------------------------ satellites */
.rail-sub { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.rail-sub .small { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-weight: 400; }
.sw-sat { background: #a9dcff; width: 10px; height: 10px; margin: 2px; box-shadow: 0 0 6px rgb(169 220 255 / 0.8); }
.sw-station { background: transparent; width: 12px; height: 12px; border: 2px solid #ffffff; border-radius: 2px; transform: rotate(45deg); margin: 1px; }
.sat-search { position: relative; margin: 6px 4px 2px; }
.sat-search input { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font: 14px var(--font-body); }
.sat-search input:focus { outline: 2px solid rgb(93 255 207 / 0.5); outline-offset: 1px; }
.sat-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; list-style: none; margin: 0; padding: 4px 0; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 10px; max-height: 260px; overflow-y: auto; box-shadow: 0 12px 30px rgb(0 0 0 / 0.5); }
.sat-results li { padding: 6px 10px; cursor: pointer; font-size: 13.5px; display: flex; justify-content: space-between; gap: 8px; }
.sat-results li:hover, .sat-results li.sel { background: rgb(93 255 207 / 0.1); }
.sat-results li span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.live-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sw-label { width: auto; height: auto; border-radius: 4px; font: 700 10px var(--font-display); color: var(--ion); border: 1px solid rgb(93 255 207 / 0.5); padding: 0 3px; }
.sw-status { background: conic-gradient(#5ef5c4 0 25%, #ffc14a 0 50%, #ff3d5e 0 75%, #8b9cb8 0); }
.sw-ham { background: #c4ff7a; width: 10px; height: 10px; margin: 2px; box-shadow: 0 0 6px rgb(196 255 122 / 0.7); }
.sw-starlink { background: #b9a8ff; width: 8px; height: 8px; margin: 3px; }
.status-legend { margin: 4px 6px 6px; padding-top: 4px; }
.legend .dot.ring { background: transparent; border: 2px solid #8b9cb8; width: 11px; height: 11px; }
/* sats status tab */
.stack { display: flex; height: 12px; border-radius: 4px; overflow: hidden; gap: 2px; background: transparent; margin: 4px 0 2px; }
.stack i { display: block; height: 100%; }
.stack i:first-child { border-radius: 4px 0 0 4px; } .stack i:last-child { border-radius: 0 4px 4px 0; }
.grp-row { padding: 9px 12px; border-bottom: 1px solid rgb(255 255 255 / 0.05); }
.grp-row:last-child { border-bottom: 0; }
.grp-row .top { display: flex; justify-content: space-between; font-size: 13.5px; }
.grp-row .nums { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.grp-row .nums b { color: var(--text); font-weight: 600; font-family: var(--font-mono); }
.pill.st-op { color: #5ef5c4; border: 1px solid #5ef5c4; }
.pill.st-part { color: #ffc14a; border: 1px solid #ffc14a; }
.pill.st-off { color: #ff3d5e; border: 1px solid #ff3d5e; }
.pill.st-unk { color: #8b9cb8; border: 1px solid #8b9cb8; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: rgb(93 255 207 / 0.06); }
/* NOAA scales */
.scales { display: flex; flex-direction: column; gap: 8px; }
.scale-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.scale-head { display: flex; align-items: center; gap: 12px; }
.scale-head strong { font-size: 14px; }
.scale-head .note { font-size: 12.5px; color: var(--muted); }
.scale-big { font-family: var(--font-display); font-weight: 700; font-size: 28px; min-width: 52px; }
.lv-text-0 { color: var(--good); } .lv-text-1 { color: var(--warn); } .lv-text-2 { color: var(--ember); } .lv-text-3 { color: var(--bad); } .lv-text-x { color: var(--muted); }
.scale-card > .note { font-size: 12px; color: var(--muted); margin: 4px 0 6px; }
.scale-days { display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; }
.scale-days .fc { font-size: 11.5px; color: var(--muted); flex-basis: 100%; }
.sd { flex: 1; min-width: 62px; background: rgb(255 255 255 / 0.04); border-radius: 8px; padding: 4px 8px; display: flex; flex-direction: column; }
.sd span { font-size: 11.5px; color: var(--muted); }
.sd b { font-family: var(--font-mono); font-size: 14px; }
.sd b small { font-size: 11px; color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------ resizable panel */
.panel { overflow: visible; }
.panel > .tabs, .panel > .tab-body { overflow: hidden; }
.panel > .tab-body.scroll { overflow-y: auto; }
.panel-resizer { position: absolute; left: -7px; top: 14px; bottom: 14px; width: 12px; cursor: ew-resize; z-index: 3; border-radius: 6px; }
.panel-resizer::after { content: ""; position: absolute; left: 4px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 2px; background: rgb(255 255 255 / 0.18); transition: background 0.15s; }
.panel-resizer:hover::after, .panel-resizer:focus::after, .panel.resizing .panel-resizer::after { background: var(--ion); }
.panel-resizer:focus { outline: none; }
.panel.resizing, .panel.resizing * { user-select: none; }
.panel-size { flex: none; width: 38px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; letter-spacing: -0.1em; }
.panel-size:hover { color: var(--ion); }
.panel.wide { font-size: 16px; }
.panel.wide .feed .title { font-size: 16px; }
.panel.wide .feed .meta, .panel.wide .list li, .panel.wide .note, .panel.wide .chart-cap { font-size: 14px; }
.panel.wide .tile .v { font-size: 32px; }
.panel.wide .tiles { grid-template-columns: repeat(4, 1fr); }
.panel.wide .sun-grid { grid-template-columns: repeat(3, 1fr); }
.panel.wide .sun-card.wide { grid-column: span 3; }
.panel.wide .chart .axis { font-size: 9.5px; }
.panel.wide .detail h3 { font-size: 19px; }
.panel.wide .detail dl { font-size: 15.5px; }
@media (max-width: 820px) { .panel-resizer, .panel-size { display: none; } }
/* NASA tab */
.apod { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.apod-img { display: block; width: 100%; max-height: 420px; object-fit: cover; background: #000; }
.apod-video { display: block; padding: 28px 14px; text-align: center; color: var(--ion); background: #000; }
.apod-body { padding: 10px 12px; }
.apod-body details { margin-top: 6px; font-size: 13.5px; }
.apod-body summary { cursor: pointer; color: var(--ion); }
.apod-text { margin: 6px 0 0; line-height: 1.55; color: #d6e2f5; }
.apod-strip { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.apod-strip img { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.panel.wide .apod-strip img { width: 96px; height: 96px; }
.list a, .apod-body a, .empty-note a { color: var(--ion); }
.section-title { align-items: baseline; }
.section-title .age { white-space: nowrap; }

/* ------------------------------------------------------------ my spot */
.spot-form { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.spot-row { display: flex; gap: 6px; }
.spot-row input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font: 14px var(--font-body); }
.spot-row input:focus { outline: 2px solid rgb(93 255 207 / 0.5); outline-offset: 1px; }
.spot-row button { flex: none; padding: 7px 12px; border-radius: 8px; border: 1px solid rgb(93 255 207 / 0.45); background: rgb(93 255 207 / 0.1); color: var(--ion); font: 600 13px var(--font-body); cursor: pointer; }
.spot-row button:hover { background: rgb(93 255 207 / 0.2); }
.spot-row button[type="button"] { flex: 1; }
.spot-row button.on { background: var(--ion); color: var(--bg); }
.spot-saved { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-chip { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface2); overflow: hidden; }
.spot-chip button { border: 0; background: transparent; color: var(--text); font: 13px var(--font-body); padding: 4px 4px 4px 11px; cursor: pointer; }
.spot-chip button.x { color: var(--muted); padding: 4px 9px 4px 5px; font-size: 15px; line-height: 1; }
.spot-chip button.x:hover { color: #ff3d5e; }
.spot-chip.active { border-color: var(--ion); }
.spot-chip.active button:first-child { color: var(--ion); font-weight: 600; }
.spot-msg { margin: 0; min-height: 1em; }
.spot-msg.warn { color: var(--warn); }
.spot-body { display: flex; flex-direction: column; gap: 14px; }
.spot-now.over { color: #5ef5c4; }
.spot-now.horizon { color: #ffc14a; }
.spot-now { font-size: 20px !important; }
.spot-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.spot-legend span { display: inline-flex; align-items: center; gap: 5px; }
.spot-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.spot-legend i.day { border: 1.5px dashed rgb(139 156 184 / 0.7); }
.age .proj { color: var(--violet); font-weight: 600; }
.panel.wide .spot-body .tiles { grid-template-columns: repeat(4, 1fr); }

/* satellite card: radio + spot look */
.detail .radio { margin-top: 10px; }
.detail .radio .list li.tx { display: block; padding: 7px 0; }
.detail .radio .tx > div { margin: 2px 0; overflow-wrap: anywhere; }
.detail .dop { color: var(--ion); font-weight: 600; }
.detail .spot-look { margin-top: 8px; }
.detail .back-spot { margin: 0 0 8px; font-size: 13px; }
.detail details summary { cursor: pointer; padding: 4px 0; }
