:root {
  --bg: #fbfaf7; --fg: #1d1d1b; --muted: #6a6a63; --card: #ffffff;
  --line: #dcd8cc; --accent: #b4491f; --accent-soft: #f3dccf;
  --sun: #d99a00; --moon: #6f7783;
  --mercury: #8a6f4d; --venus: #c27a00; --earth: #1f6fb5;
  --mars: #c0392b; --jupiter: #a1522f; --saturn: #7d6a1f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15161a; --fg: #ecebe6; --muted: #9a998f; --card: #1f2127;
    --line: #34363f; --accent: #f08a5d; --accent-soft: #4a2e22;
    --sun: #f2c14e; --moon: #b9c0cc;
    --mercury: #c9b08a; --venus: #f0b04a; --earth: #6cb4ee;
    --mars: #ee6f60; --jupiter: #d98a62; --saturn: #cdb85a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header, main, footer { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 1.5rem; margin: 20px 0 10px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
h3 { font-size: .95rem; margin: 0 0 6px; }
#controls { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: end; }
#controls label { display: flex; flex-direction: column; font-size: .75rem;
  color: var(--muted); gap: 2px; }
.sep { flex: 0 0 8px; }
input, select, button { font: inherit; padding: 6px 9px; color: var(--fg);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
#status { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
#status.error { color: var(--mars); }
main { display: grid; gap: 16px; grid-template-columns: 1fr; padding-bottom: 8px; }
@media (min-width: 900px) { main { grid-template-columns: 1fr 1fr; } .wide { grid-column: 1 / -1; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; min-width: 0; }
.note { color: var(--muted); font-size: .82rem; margin: 8px 0 0; }
.lc { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.lc .unit { text-align: center; min-width: 58px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 8px; }
.lc .num { display: block; font-size: 1.9rem; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.lc .lbl { font-size: .7rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
dt { color: var(--muted); font-size: .85rem; }
dd { margin: 0; font-weight: 500; }
svg { width: 100%; height: auto; display: block; }
.sky { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .sky { grid-template-columns: 1.1fr 1fr; } }
.cyc { margin-bottom: 11px; }
.cyc .row { display: flex; justify-content: space-between; gap: 8px;
  font-size: .9rem; }
.cyc .name { font-weight: 600; }
.cyc .name .dot { display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 6px; }
.cyc .nums { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cyc .track { height: 9px; background: var(--line); border-radius: 5px; margin: 4px 0 2px; overflow: hidden; }
.cyc .fill { height: 100%; border-radius: 5px; }
.cyc .state { font-size: .78rem; color: var(--muted); }
.badge { font: inherit; font-size: .66rem; border: 1px solid var(--line);
  border-radius: 8px; padding: 0 6px; margin-left: 6px; color: var(--muted);
  background: transparent; cursor: pointer; text-decoration: underline dotted; }
.badge.ok { text-decoration: none; }
.badge:hover, .badge:focus-visible { border-color: var(--accent); color: var(--accent); }
dialog { max-width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  overflow: auto; padding: 18px 20px; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dlg-head h2 { margin: 0 0 8px; font-size: 1.1rem; }
.dlg-head button { font-size: 1.3rem; line-height: 1; padding: 2px 9px; }
#notes-body .lead { margin: 0 0 8px; font-weight: 500; }
#notes-body ul { margin: 0 0 12px; padding-left: 20px; }
#notes-body li { margin-bottom: 6px; font-size: .92rem; }
#notes-body .sources li { font-size: .85rem; }
#notes-body .read { color: var(--muted); }
footer { color: var(--muted); font-size: .8rem; padding-bottom: 28px; }
a { color: var(--accent); }
svg text { fill: var(--fg); }
#orbits text { paint-order: stroke; stroke: var(--card); stroke-width: 3px; }
