:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --card: #ffffff;
  --ink: #0f1b2b;
  --ink-2: #33445a;
  --muted: #6b7a8e;
  --line: #dfe5ec;
  --line-2: #eef1f5;
  --field: #f6f8fb;
  --primary: #0b6bcb;
  --primary-ink: #ffffff;
  --primary-soft: #e3f0fc;
  --accent: #f26b1d;
  --good: #0f8a5f;
  --good-soft: #e3f5ee;
  --bad: #c62f3a;
  --bad-soft: #fdeaec;
  --warn: #b26a00;
  --warn-soft: #fff4e0;
  --shadow: 0 1px 2px rgba(15, 27, 43, .06), 0 4px 14px rgba(15, 27, 43, .07);
  --shadow-lg: 0 10px 40px rgba(15, 27, 43, .22);
  --radius: 12px;
  --panel-w: 410px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c131c;
    --panel: #111a25;
    --card: #162130;
    --ink: #e8eef5;
    --ink-2: #c3cfdc;
    --muted: #8697aa;
    --line: #243244;
    --line-2: #1c2838;
    --field: #0f1824;
    --primary: #3b9af0;
    --primary-ink: #04121f;
    --primary-soft: #11304d;
    --accent: #ff8a3d;
    --good: #3fcf97;
    --good-soft: #10342a;
    --bad: #ff6b76;
    --bad-soft: #3a1820;
    --warn: #f3b44b;
    --warn-soft: #3a2b10;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Верхня панель ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.brand > div { min-width: 0; }
.brand-logo { width: 30px; height: 30px; stroke: none; }
.brand-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11.5px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: none; }
.mode-badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn);
}

/* ---------- Розкладка ---------- */
.app { display: grid; grid-template-columns: var(--panel-w) 1fr; height: calc(100% - 56px); }
.panel {
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 12px 12px 0;
  scrollbar-width: thin;
  position: relative;
  z-index: 10;
}
.map-wrap { position: relative; overflow: hidden; background: #cfd8e3; container-type: inline-size; container-name: map; }
#map { position: absolute; inset: 0; }

/* ---------- Картки ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.card-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; font-size: 13.5px; font-weight: 700; letter-spacing: .01em; text-transform: none;
}
.num {
  width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: var(--primary-soft); color: var(--primary);
}
details.card > summary { cursor: pointer; list-style: none; margin: 0; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
details.card[open] > summary { margin-bottom: 10px; }
details.card:not([open]) > summary::after { transform: rotate(-90deg); }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
input[type=number], input[type=text], input[type=password], input[type=datetime-local], input:not([type]), select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  min-width: 0;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.input-unit { position: relative; display: flex; align-items: center; }
.input-unit input { padding-right: 38px; font-variant-numeric: tabular-nums; }
.input-unit > span { position: absolute; right: 10px; font-size: 12px; color: var(--muted); pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); margin: 2px 0 8px; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--primary); }
.check.small { margin: 0; white-space: nowrap; align-items: center; }
.check.small input { margin-top: 0; }
.check.inline { display: inline-flex; margin: 0; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.hint.tight { margin: -4px 0 8px; }
.muted { color: var(--muted); font-weight: 500; }
.subhead { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 10px 0 6px; }
.subhead .muted { font-weight: 500; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--field); border-radius: 999px; padding: 3px 10px;
  font-size: 12px; cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.time-info { font-size: 12px; color: var(--muted); margin-top: 6px; }
.time-info b { color: var(--ink-2); font-weight: 600; }
.time-info .tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 600; margin-right: 6px; }
.tag.past { background: var(--warn-soft); color: var(--warn); }
.tag.future { background: var(--primary-soft); color: var(--primary); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 600; font-size: 13px; text-decoration: none; color: var(--ink);
  transition: background .12s, border-color .12s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.tiny { height: 28px; padding: 0 8px; font-size: 12px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--line-2); }
.only-mobile { display: none; }

/* ---------- Розрахунок ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat {
  border: 1px solid var(--line-2); background: var(--field); border-radius: 10px; padding: 8px 10px; min-width: 0;
}
.stat .k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 18px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .v small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat .s { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stat.wide { grid-column: span 2; }
.stat.good { background: var(--good-soft); border-color: transparent; }
.stat.good .v { color: var(--good); }
.stat.bad { background: var(--bad-soft); border-color: transparent; }
.stat.bad .v { color: var(--bad); }
.stat.hl { background: var(--primary-soft); border-color: transparent; }
.stat.hl .v { color: var(--primary); }
.calc-warn { grid-column: span 2; font-size: 12px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }

/* ---------- Баласт ---------- */
.drop-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.drop-row { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 8px; align-items: end; }
.drop-row .field { margin: 0; }
.drop-row .icon-btn { width: 30px; height: 36px; color: var(--muted); }
.auto-box { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.auto-box > summary { list-style: none; cursor: pointer; }
.auto-box > summary::-webkit-details-marker { display: none; }
.auto-box[open] > summary { margin-bottom: 8px; }

/* ---------- Джерела ---------- */
.sources { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.src {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--field); cursor: pointer; font-size: 13px;
}
.src input { accent-color: var(--primary); }
.src .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.src .meta { margin-left: auto; font-size: 11.5px; color: var(--muted); text-align: right; }
.src.disabled { opacity: .5; cursor: not-allowed; }
.src-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 2px; }

/* ---------- Запуск ---------- */
.run-bar {
  position: sticky; bottom: 0; padding: 10px 0 12px; background: linear-gradient(to bottom, transparent, var(--bg) 28%);
  z-index: 3;
}
.run-bar .btn.primary { height: 44px; font-size: 14.5px; box-shadow: 0 6px 18px rgba(11, 107, 203, .28); }
.progress { position: relative; height: 26px; margin-top: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--primary-soft); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 26px; font-size: 12px; font-weight: 600; color: var(--ink-2); }

/* ---------- Результати ---------- */
.results { margin-top: 2px; }
.res {
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden;
}
.res-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--field); border-bottom: 1px solid var(--line-2); }
.res-head .sw { width: 14px; height: 4px; border-radius: 2px; }
.res-head b { font-size: 13px; }
.res-head .st { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.st.ok { background: var(--good-soft); color: var(--good); }
.st.warn { background: var(--warn-soft); color: var(--warn); }
.st.err { background: var(--bad-soft); color: var(--bad); }
.res-body { padding: 8px 10px 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv dd.coord { font-family: var(--mono); font-size: 12px; cursor: pointer; }
.kv dd.coord:hover { color: var(--primary); }
.events { margin: 8px 0 0; padding: 0; list-style: none; border-top: 1px dashed var(--line); padding-top: 6px; max-height: 190px; overflow: auto; }
.events li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; font-size: 12px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.events li:hover { background: var(--line-2); }
.events .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.events .z { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.res-err { padding: 10px; font-size: 12.5px; color: var(--bad); }
.export-row { display: flex; gap: 6px; flex-wrap: wrap; }
.panel-foot { font-size: 11px; color: var(--muted); padding: 4px 4px 16px; }

/* ---------- Шари на мапі ---------- */
.wind-canvas, .windy-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border: 0; }
.windy-layer { z-index: 2; opacity: .65; }
.wind-canvas { z-index: 3; }
#windy { background: transparent !important; }
#windy.no-base .leaflet-tile-pane .leaflet-layer:first-child,
#windy.no-base img.leaflet-tile[src*="tiles.windy.com"] { opacity: 0 !important; }

.layer-bar {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px; z-index: 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  max-width: calc(100% - 20px); flex-wrap: wrap; justify-content: center;
}
.layer-bar select { height: 30px; width: auto; font-size: 12.5px; padding: 0 8px; }
.seg { display: flex; gap: 4px; }
.toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field); cursor: pointer; font-weight: 600; font-size: 12.5px;
}
.toggle svg { width: 16px; height: 16px; }
.toggle[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.toggle.windy[aria-pressed="true"] { background: #9d2d6a; border-color: #9d2d6a; color: #fff; }
.wind-legend {
  position: absolute; left: 10px; top: 60px; z-index: 5; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 8px; font-size: 11px; box-shadow: var(--shadow); line-height: 1.5; pointer-events: none;
}
@container map (max-width: 780px) {
  .layer-bar { top: 58px; }
  .wind-legend { top: auto; bottom: 80px; }
  .map-wrap.has-chart .wind-legend { bottom: 270px; }
  .map-banner { top: auto; bottom: 70px; }
  .map-wrap.has-chart .map-banner { bottom: 262px; }
}
.opacity { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.opacity input { width: 80px; accent-color: #9d2d6a; }

.map-banner {
  position: absolute; left: 50%; top: 60px; transform: translateX(-50%); z-index: 6;
  background: var(--warn-soft); color: var(--warn); border: 1px solid transparent; font-size: 12.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(560px, calc(100% - 24px)); text-align: center;
}

.time-bar {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.time-bar input[type=range] { flex: 1; accent-color: var(--primary); }
.time-label { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 190px; text-align: right; }
.map-wrap.has-chart .time-bar { bottom: 212px; }

.chart-panel {
  position: absolute; left: 12px; right: 12px; bottom: 12px; height: 192px; z-index: 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.chart-panel.collapsed { height: 40px; }
.chart-panel.collapsed .chart-body { display: none; }
.map-wrap.has-chart.chart-collapsed .time-bar { bottom: 60px; }
.chart-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 0 12px; font-size: 12.5px; font-weight: 700; height: 36px; }
.chart-head .icon-btn { margin-left: auto; }
.chart-panel.collapsed .chart-head .icon-btn svg { transform: rotate(180deg); }
.chart-legend { display: flex; gap: 12px; font-weight: 500; font-size: 12px; color: var(--ink-2); overflow: hidden; }
.chart-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.chart-body { position: relative; flex: 1; min-height: 0; }
#chart { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 2; background: var(--ink); color: var(--panel);
  font-size: 11.5px; padding: 6px 8px; border-radius: 8px; white-space: nowrap; box-shadow: var(--shadow);
}
.chart-tip b { font-weight: 700; }

.toast {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: var(--panel); padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px);
}
.toast.err { background: var(--bad); color: #fff; }

/* Інфовікна Google Maps */
.iw { font-family: Inter, system-ui, sans-serif; font-size: 12.5px; color: #0f1b2b; min-width: 180px; }
.iw b { font-size: 13px; }
.iw .r { display: flex; justify-content: space-between; gap: 12px; }
.iw .r span:first-child { color: #6b7a8e; }

/* ---------- Діалоги ---------- */
.dlg {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(520px, calc(100% - 24px));
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg);
}
.dlg::backdrop { background: rgba(8, 15, 25, .45); }
.dlg-head { display: flex; align-items: center; padding: 12px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { margin: 0; font-size: 15px; }
.dlg-head .icon-btn { margin-left: auto; }
.dlg-body { padding: 14px 16px; max-height: 70vh; overflow: auto; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.saved-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.saved-item .info { min-width: 0; flex: 1; }
.saved-item .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-item .sub { font-size: 12px; color: var(--muted); }

/* ---------- Адаптивність ---------- */
@media (max-width: 900px) {
  :root { --panel-w: 100%; }
  .only-mobile { display: inline-grid; }
  .app { grid-template-columns: 1fr; }
  .panel {
    position: absolute; top: 56px; left: 0; bottom: 0; width: min(430px, 100%);
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
    z-index: 15; padding: 12px 16px 0;
  }
  body.panel-open .panel { transform: none; }
  .topbar-actions .btn span { display: none; }
  .brand-sub { display: none; }

  .time-label { min-width: 0; font-size: 11.5px; }
  .chart-panel { height: 170px; }
  .map-wrap.has-chart .time-bar { bottom: 190px; }
}
@media (max-width: 480px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 16px; }
  .layer-bar .toggle span { display: none; }
}

/* ---------- v0.2 ---------- */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mode-switch label { text-align: center; padding: 8px 6px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.mode-switch input:checked + label { background: var(--primary); color: var(--primary-ink); }
body.mode-reverse .fwd-only, body.mode-plan .fwd-only, body:not(.mode-reverse) .rev-only, body:not(.mode-plan) .plan-only, body.mode-plan .fwd-rev { display: none !important; }
body.mode-plan .plan-sites { display: block !important; }
body.mode-plan .plan-sites .rev-only { display: none !important; }
.plan-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 8px 0; }
.plan-cal button { border: 1px solid var(--line); border-radius: 6px; padding: 6px 2px; font: inherit; font-size: 12px; line-height: 1.25; cursor: pointer; background: var(--panel, transparent); color: inherit; text-align: center; }
.plan-cal button.ok { background: #d6f2df; border-color: #4caf72; color: #10381f; }
.plan-cal button.near { background: #fdf0c8; border-color: #d4a515; color: #3d2e00; }
.plan-cal button.none { opacity: .6; }
.plan-cal button.sel { outline: 2px solid var(--accent, #0b6bcb); outline-offset: 1px; }
.plan-cal small { display: block; opacity: .8; }
.plan-table td, .plan-table th { font-size: 12px; }
.rel-high { color: #1b7f3b; } .rel-mid { color: #a36b00; } .rel-low { color: #b23b3b; }

.echelon-box { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 10px 2px; margin-bottom: 10px; }
.echelon-box input[type=range] { accent-color: var(--primary); }
.echelon-info { font-size: 12px; margin: -2px 0 8px; padding: 6px 8px; border-radius: 8px; background: var(--field); color: var(--ink-2); }
.echelon-info.ok { background: var(--good-soft); color: var(--good); }
.echelon-info.warn { background: var(--warn-soft); color: var(--warn); }
.calc-mini { height: 36px; display: flex; align-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.res-note { font-size: 12px; padding: 6px 8px; border-radius: 8px; margin-top: 8px; }
.res-note.warn { background: var(--warn-soft); color: var(--warn); }
.res-note.info { background: var(--primary-soft); color: var(--primary); }
details.wind5 { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
details.wind5 summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.wind-table { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; margin-top: 6px; }
.wind-table th, .wind-table td { padding: 2px 4px; text-align: right; border-bottom: 1px solid var(--line-2); }
.wind-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--card); }
.wind-wrap { max-height: 220px; overflow: auto; }
.res.best { border-color: var(--good); box-shadow: 0 0 0 2px var(--good-soft); }

/* ---------- v0.3 ---------- */
textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); font: inherit; resize: vertical; }
.posT { border: 1px solid var(--primary); background: var(--primary-soft); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.posT .h { font-size: 12px; font-weight: 700; color: var(--primary); }
.posT .c { font-family: var(--mono); font-size: 14px; font-weight: 700; cursor: pointer; }
.posT .s { font-size: 12px; color: var(--ink-2); }
.posT a { font-size: 12px; }
.cp-table { width: 100%; font-size: 12px; border-collapse: collapse; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.cp-table td, .cp-table th { padding: 2px 4px; text-align: right; border-bottom: 1px solid var(--line-2); }
.cp-table th { color: var(--muted); font-weight: 600; }
.cp-table td:first-child, .cp-table th:first-child { text-align: left; }
.extra { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; font-size: 12px; }
.extra h4 { margin: 0 0 4px; font-size: 12px; }
.cloud-strip { display: flex; height: 12px; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.cloud-strip i { flex: 1; }
.extra .row-btn { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sat-legend { position: absolute; right: 60px; bottom: 80px; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 11px; box-shadow: var(--shadow); }
.map-wrap.has-chart .sat-legend { bottom: 272px; }

.test-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; background: #fdf0c8; color: #6b4e00; vertical-align: middle; }

.eney-list { display: grid; gap: 6px; margin: 8px 0; }
.eney-item { display: grid; grid-template-columns: auto 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.eney-item .sw { width: 12px; height: 12px; border-radius: 3px; }
.eney-item .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eney-item .nm small { display: block; opacity: .7; font-size: 11px; }
.eney-item .on { color: #12a26b; } .eney-item .off { opacity: .6; }
.eney-item .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
