[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --bg: #101821;
  --panel: #1a2734;
  --line: #2e4153;
  --text: #ecf1f7;
  --muted: #a7b8ca;
  --warn: #ffc878;
  --err: #ffb0b0;
  --ok: #a4efc8;
  --u7: #009bd5;
  --u9: #f3791d;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0 auto; padding: 16px; max-width: 1200px; line-height: 1.4; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 6px; }
h3 { font-size: 1rem; margin: 14px 0 4px; }
a { color: #9ad8ff; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sub, .hint { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }
.pill { font-size: .7rem; padding: 3px 8px; border-radius: 6px; background: var(--line); vertical-align: middle; }
button {
  font: inherit; color: #fff; background: #2a475c; border: 1px solid #50748c;
  padding: 10px 14px; border-radius: 9px; cursor: pointer; min-height: 44px;
}
button.primary { background: #2f5d78; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, select:focus-visible { outline: 3px solid #9cdeff; outline-offset: 2px; }
select { font: inherit; color: var(--text); background: #12202c; border: 1px solid #50748c; border-radius: 8px; padding: 8px; min-height: 44px; width: 100%; margin-top: 4px; }
.global-status { margin: 12px 0; padding: 10px 12px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.panel, .station { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px; }
.param-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.param-grid label { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.hint-list { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: .9rem; }
.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.stations .station { margin-top: 14px; }
.st-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.st-status { margin: 8px 0; font-size: .9rem; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.err { color: var(--err); }
.muted { color: var(--muted); }
dl.meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; margin: 8px 0; font-size: .82rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; overflow-wrap: anywhere; }
.na { color: var(--muted); font-style: italic; }
.box { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; margin: 8px 0; font-size: .85rem; }
.box.diff { border-color: #6a5a2a; }
.box ul { margin: 4px 0 0; padding-left: 18px; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; font-weight: 700; }
.badge { display: inline-block; min-width: 38px; text-align: center; padding: 2px 7px; border-radius: 5px; font-weight: 800; color: #fff; background: #555; }
.badge.U7 { background: var(--u7); }
.badge.U9 { background: var(--u9); }
.dep { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border-top: 1px solid var(--line); padding: 8px 0; }
.dep.cancelled .dest { text-decoration: line-through; }
.dest { font-weight: 600; overflow-wrap: anywhere; }
.detail { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.cd { font-weight: 800; font-size: 1.1rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.more { font-size: .8rem; color: var(--muted); padding-top: 4px; }
.foot { margin: 20px 0; font-size: .8rem; color: var(--muted); }
@media (max-width: 420px) {
  body { padding: 10px; }
  .stations { grid-template-columns: 1fr; }
  dl.meta { grid-template-columns: 1fr; }
  dl.meta dt { margin-top: 4px; }
}

/* ---- 0.3 ---- */
.warnings { margin: 8px 0; }
.warning-box { border: 2px solid #c98a1e; background: #3a2a0c; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.warning-title { font-weight: 800; color: #ffd27a; }
.warning-text { margin-top: 4px; font-size: .9rem; overflow-wrap: anywhere; }
.warning-meta { margin-top: 6px; font-size: .78rem; color: #e6c98f; }
.meta-wrap > summary, details.box > summary { cursor: pointer; color: var(--muted); font-size: .85rem; padding: 4px 0; }
.rt { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; vertical-align: 2px; }
.rt.rt-live { background: #1f6b46; color: #d8ffe9; }
.rt.rt-plan { background: #3a4654; color: #c9d4e0; }
.rt.rt-prognose { background: #7a5a12; color: #ffe6a6; }
.rt.rt-cancelled { background: #7a1f1f; color: #ffd6d6; }
.dep.rt-plan .cd { color: var(--muted); font-style: italic; }
.dep.rt-cancelled .dest { text-decoration: line-through; }
.plat { font-size: .78rem; font-weight: 400; color: var(--muted); margin-left: auto; }
.detail.trip { color: #9ad8ff; }
