:root {
  --bg: #ffffff;
  --fg: #111418;
  --muted: #5f6b76;
  --card: #f2f4f6;
  --line: #d9dee3;
  --accent: #2a7fd4;
  --green: #2e7d32;
  --confirmed: #c62828;   /* підтверджено двома джерелами: НЕ зелений (зелений читався як «безпечно») */
  --yellow: #f9a825;
  --grey: #8a939b;
}
:root.dark {
  --bg: #17212b;
  --fg: #f2f4f6;
  --muted: #9aa6b2;
  --card: #1f2c38;
  --line: #2b3a48;
  --accent: #5aa8ef;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 15px/1.35 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body { display: flex; flex-direction: column; overflow: hidden; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; background: var(--card); border-radius: 10px; padding: 3px; gap: 2px; }
.tab { all: unset; padding: 6px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.tab:focus-visible { outline: 2px solid var(--accent); }
#map { position: relative; }
.locate { position: absolute; z-index: 2; right: 10px; bottom: 34px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--bg); color: var(--fg); font-size: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.3); cursor: pointer; }
.locate:focus-visible { outline: 3px solid var(--accent); }
.shelter-btn { bottom: 86px; }
.bell { all: unset; font-size: 20px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.bell:focus-visible { outline: 2px solid var(--accent); }
.panel { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.panel[hidden] { display: none; }
.panel-box { background: var(--bg); color: var(--fg); width: 100%; max-height: 90vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
.panel h2 { margin: 0 0 6px; font-size: 18px; }
.panel label[for], .panel legend { display: block; font-weight: 600; margin: 12px 0 6px; }
.panel input[list] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font-size: 16px; }
.panel fieldset { border: 0; padding: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; margin: 0 6px 6px 0;
  border-radius: 20px; background: var(--card); cursor: pointer; font-size: 14px; }
.row { display: flex; gap: 8px; margin-top: 12px; }
.row > * { flex: 1; margin-top: 0 !important; }
.ghost { padding: 9px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--fg);
  font-weight: 600; font-size: 14px; cursor: pointer; }
.link { all: unset; color: var(--accent); cursor: pointer; margin-top: 8px; display: inline-block; font-weight: 600; }
.link:focus-visible, .ghost:focus-visible { outline: 2px solid var(--accent); }
.danger { color: #c62828; margin-top: 12px; }
.small { font-size: 12px; margin-top: 12px; }
.panel .m { color: var(--muted); font-size: 13px; margin: 4px 0; }
.suggest { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  max-height: 200px; overflow-y: auto; background: var(--bg); }
.suggest li { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest li:last-child { border-bottom: 0; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--card); }
.suggest li.none { color: var(--muted); cursor: default; }
.row2 { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tg-open { display: block; text-align: center; text-decoration: none; margin-top: 10px; }
.phead { display: flex; justify-content: space-between; align-items: center; }
.x { all: unset; width: 36px; height: 36px; text-align: center; line-height: 36px; border-radius: 50%; cursor: pointer;
  background: var(--card); font-size: 16px; }
.x:focus-visible { outline: 2px solid var(--accent); }
.panel h3 { margin: 4px 0 10px; font-size: 17px; }
.stepno { margin: 8px 0 0; color: var(--accent); font-size: 13px; font-weight: 700; }
.big { display: block; width: 100%; padding: 12px; margin: 0 0 8px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.big:focus-visible { outline: 2px solid var(--accent); }
.field { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font-size: 16px; }
.field:focus-visible { outline: 2px solid var(--accent); }
.chosen { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(46,125,50,.12); font-weight: 600; }
.ok-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; margin: 8px 0; border-radius: 12px;
  background: rgba(46,125,50,.12); }
.replay:disabled { opacity: .45; cursor: default; }
.danger-btn { color: #c62828; border-color: #c62828; }
/* вибір точки: хрестик по центру карти + панель знизу */
.cross { position: fixed; z-index: 15; left: 50%; top: 50%; width: 40px; height: 40px; margin: -38px 0 0 -20px;  /* вістря шпильки — точно в центрі */
  pointer-events: none; font-size: 34px; line-height: 40px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.pickbar { position: fixed; z-index: 15; left: 12px; right: 12px; bottom: max(14px, env(safe-area-inset-bottom));
  padding: 12px; border-radius: 14px; background: var(--bg); color: var(--fg); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.pickbar p { margin: 0 0 8px; font-weight: 600; text-align: center; }
.pickbar .row { margin-top: 0; }
.alertbar { padding: 7px 12px; font-weight: 700; font-size: 14px; color: #fff; }
.alertbar.red { background: #c62828; }
.alertbar.yellow { background: #f9a825; color: #1b1b1b; }
.alertbar.clear { background: #2e7d32; }
.alertbar small { font-weight: 400; opacity: .85; margin-left: 6px; }
/* один рядок, натискання — повний список районів (власник 29.10: карта на телефоні була смужкою) */
.alertbar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alertbar[tabindex="0"] { cursor: pointer; }
.alertbar.full { white-space: normal; }
.alertbar:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.sheet:not(.open) .journal-open { display: none; }
.me { width: 16px; height: 16px; border-radius: 50%; background: #1e88e5; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(30,136,229,.25); }
.item.sel { outline: 2px solid var(--accent); }
.item .d { color: var(--accent); font-weight: 600; }
.status { color: var(--muted); font-size: 13px; white-space: normal; max-width: 110px; min-width: 0; }
.status.stale { color: #d84315; }

#map { flex: 1; min-height: 0; }

.sheet { border-top: 1px solid var(--line); background: var(--bg); max-height: 46vh; display: flex;
  flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.handle { all: unset; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px;
  font-weight: 600; cursor: pointer; }
.handle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chev { transition: transform .2s; color: var(--muted); }
.sheet.open .chev { transform: rotate(180deg); }
.list { list-style: none; margin: 0; padding: 0 10px; overflow-y: auto; display: none; }
.sheet.open .list { display: block; }
/* згорнута панель — лише рядок-заголовок: карта на весь екран (власник 24.10: «область не опускається») */
.sheet:not(.open) .map-help, .sheet:not(.open) .note { display: none; }
.note { margin: 6px 14px 10px; color: var(--muted); font-size: 12px; }

.item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; margin-bottom: 8px; background: var(--card);
  border-radius: 12px; cursor: pointer; }
.item:focus-visible { outline: 2px solid var(--accent); }
.item.closed { opacity: .6; }
.item img { width: 34px; height: 34px; flex: none; }
.item .t { font-weight: 700; }
.item .m { color: var(--muted); font-size: 13px; }
.trust { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.trust.green { background: var(--confirmed); } .trust.yellow { background: var(--yellow); } .trust.white { background: var(--grey); }

/* маркер цілі */
.mk { position: absolute; top: 0; left: 0; width: 46px; height: 46px; cursor: pointer; }
.mk img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.45); display: block; }
.mk.green img { outline: 3px solid var(--confirmed); }
.mk.yellow img { outline: 3px solid var(--yellow); }
/* «👂 з місця» — люди з групи жителів, монітори ще не підтвердили: фіолетовий пунктир */
.mk.witness img { outline: 3px dashed #7b4fa0; }
.mk.closed { opacity: .5; transform: scale(.8); }
/* «привид» закритої цілі: бліда сіра позначка з підписом «закрито о …» (непрозорість — від віку, змінна --g) */
.mk.gmark img { opacity: var(--g, .5); filter: grayscale(1); outline: 2px dashed #85919b; width: 36px; height: 36px; margin: 5px; }
.mk.gmark .tag { opacity: .85; font-style: italic; }
.mk .tag.tag-hide { visibility: hidden; }
/* загроза FPV у районі (власник 02.11): знак попередження замість дрона — де саме дрон, невідомо */
.mk.zone .zb { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%;
  font-size: 26px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); border: 3px solid #f9a825; }
.mk.zone.zone_several .zb { border-color: #ef6c00; }
.mk.zone.zone_monitor .zb { border-color: #d32f2f; }
/* тип під значком: «FPV», «МОЛНІЯ», «РЕАКТИВНИЙ · 4 хв тому» */
.mk .tag { position: absolute; left: 50%; top: 49px; transform: translateX(-50%); padding: 1px 6px; border-radius: 5px;
  background: rgba(17,20,24,.82); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .3px; line-height: 15px;
  white-space: nowrap; pointer-events: none; }
.mk.faded .tag { opacity: .75; }
/* ціль з однією точкою курсу («FPV на Золочів»): позначка на селі, куди летить, — не «дрон уже тут» */
.mk.aim::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px dashed #1f2937;
  box-shadow: 0 0 0 2px rgba(255,255,255,.7); pointer-events: none; }
.mk.aim img { opacity: .8; }
.mk .arrow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.mk .arrow::after { content: ""; position: absolute; left: -9px; top: -46px; border: 9px solid transparent;
  border-bottom: 15px solid #d32f2f; }
.mk.pulse::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #d32f2f;
  animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk.pulse::before { animation: none; } }

.maplibregl-popup-content { background: var(--bg); color: var(--fg); border-radius: 12px; padding: 10px 12px; }
.maplibregl-popup-tip { border-top-color: var(--bg) !important; border-bottom-color: var(--bg) !important; }
.pop .t { font-weight: 700; margin-bottom: 4px; }
.pop .r { font-size: 13px; color: var(--muted); }
.replay { margin-top: 8px; width: 100%; padding: 9px; border: 0; border-radius: 9px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.replay:focus-visible { outline: 3px solid var(--fg); }
.place-label { font-size: 12px; font-weight: 600; color: var(--fg); text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg); }

/* «Зараз» без цілей */
.calm { position: absolute; z-index: 3; left: 12px; right: 58px; top: 12px; max-width: 420px;  /* праворуч — кнопки +/− */
  padding: 14px 16px; border-radius: 14px; background: var(--bg); color: var(--fg); text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); pointer-events: none; }
.calm[hidden] { display: none; }
/* мітка каналу: невелика, видна на скриншотах карти */
.mapfoot { position: absolute; z-index: 2; left: 8px; bottom: 30px; display: flex; gap: 6px; align-items: center; }
/* «👁 N на карті» (власник 08.11) */
.online { padding: 4px 9px; border-radius: 12px; background: var(--bg); color: var(--fg); opacity: .85; font-size: 12px;
  font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.25); white-space: nowrap; }
.online[hidden] { display: none; }
.archive-mode .online { display: none; }
.chan { padding: 4px 9px; border-radius: 12px;
  background: var(--bg); color: var(--fg); opacity: .85; font-size: 12px; font-weight: 600; text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.chan:focus-visible { outline: 2px solid var(--accent); }
.calm-x { all: unset; position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%;
  text-align: center; line-height: 32px; font-size: 16px; color: var(--fg); background: var(--card); cursor: pointer;
  pointer-events: auto; }
.calm-x:focus-visible { outline: 2px solid var(--accent); }
.calm b { padding: 0 30px; }
/* хрестик у картці цілі: білий на темній темі й більший — легше закрити пальцем */
.maplibregl-popup-close-button { color: var(--fg); font-size: 24px; width: 36px; height: 36px; line-height: 36px;
  padding: 0; right: 2px; top: 2px; border-radius: 50%; }
.maplibregl-popup-close-button:hover { background: var(--card); }
.maplibregl-popup-close-button:focus-visible { outline: 2px solid var(--accent); }
.pop { padding-right: 26px; }
/* праворуч над 🛡: 📞 екстрені номери, 📲 встановлення (власник 25.10 — власні кнопки, не плашка) */
.phones-btn { bottom: 138px; }
.install-btn { bottom: 190px; }
.locate[hidden] { display: none; }
/* «🔊 У дорозі»: озвучка змін, екран не гасне (власник 25.10) */
.voice-btn { position: absolute; z-index: 2; left: 8px; bottom: 64px; min-height: 44px; padding: 0 14px;
  border-radius: 22px; border: 0; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px;
  font-weight: 700; box-shadow: 0 1px 6px rgba(0,0,0,.3); cursor: pointer; }
.voice-btn[aria-pressed="true"] { background: var(--green); color: #fff; }
.voice-btn:focus-visible { outline: 3px solid var(--accent); }
.voice-note { position: absolute; z-index: 2; left: 8px; right: 64px; bottom: 116px; max-width: 360px;
  padding: 8px 12px; border-radius: 10px; background: var(--bg); color: var(--fg); font-size: 13px;
  box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.voice-note[hidden] { display: none; }
.archive-mode .voice-btn, .archive-mode .voice-note { display: none; }
.phones { list-style: none; margin: 8px 0; padding: 0; }
.phones li + li { margin-top: 6px; }
.phones a { display: block; padding: 10px 12px; border-radius: 10px; background: var(--card); color: var(--fg);
  text-decoration: none; line-height: 1.35; }
.phones a:focus-visible { outline: 2px solid var(--accent); }
.phones b { white-space: nowrap; margin-right: 4px; }
.phones-more summary { cursor: pointer; min-height: 40px; line-height: 40px; font-weight: 600; }
.phones-more summary:focus-visible { outline: 2px solid var(--accent); }
#inst ol { padding-left: 22px; line-height: 1.5; }
#inst-copy-row .ghost { margin-left: 6px; padding: 4px 10px; }
.calm b { display: block; font-size: 17px; }
.calm small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

/* повзунок часу «Історії» */
.timebar { display: flex; align-items: center; gap: 10px; padding: 6px 12px 8px; border-bottom: 1px solid var(--line); }
.timebar[hidden] { display: none; }
.timebar input[type=range] { flex: 1; min-width: 0; accent-color: #e8590c; height: 28px; }
.timebar #tlabel { min-width: 82px; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--fg); }
.tplay { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--fg);
  font-size: 16px; cursor: pointer; flex: none; }
.tplay:focus-visible, .timebar input:focus-visible { outline: 3px solid #2a7fd4; outline-offset: 2px; }
.tspeed { font-size: 13px; font-variant-numeric: tabular-nums; }
/* запасна схема, коли підкладка карти недоступна */
.vlabel { font: 11px/1.2 system-ui, sans-serif; color: #3b4754; text-shadow: 0 0 2px #fff, 0 0 2px #fff; white-space: nowrap; pointer-events: none; }
.vlabel.main { font-size: 13px; font-weight: 700; color: #1d2733; }
.dark .vlabel { color: #c9d3dc; text-shadow: 0 0 2px #17212b, 0 0 2px #17212b; }
.dark .vlabel.main { color: #fff; }
.lite-note { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 4px 8px; border-radius: 6px; font-size: 12px;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); }
/* ціль без оновлень понад 3 хв — бліда: імовірно вже змістилась */
.mk.faded img { opacity: .55; filter: saturate(.5); }
.mk.faded.pulse::before { animation: none; opacity: 0; }
/* кількість цілей у групі */
.mk .cnt { position: absolute; right: -6px; bottom: -4px; min-width: 20px; padding: 1px 4px; border-radius: 10px;
  background: #d32f2f; color: #fff; font: 700 12px/16px system-ui, sans-serif; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.5); pointer-events: none; }

/* Explicit freshness and archive labels; no changes to map geometry. */
.data-status {position:absolute;top:10px;left:10px;right:55px;z-index:5;background:var(--bg);color:var(--fg);padding:9px 12px;border-radius:10px;box-shadow:0 2px 9px #0002;font-size:13px;pointer-events:none;}
.data-status.stale {border:2px solid #ba7900;}
.record-notice {position:absolute;top:62px;left:10px;right:55px;z-index:5;background:var(--bg);padding:9px 12px;border:1px solid #85919b;border-radius:10px;font-size:13px;pointer-events:none;}
.archive-badge {display:inline-block;background:#e2e6e9;color:#33414b;font-size:11px;padding:2px 5px;border-radius:4px;}
.uncertainty,.publication-note {font-size:12px;padding:6px 0;color:var(--muted);}
.publication-note {color:#a16500;}
.pop {max-height:55vh;overflow:auto;}
.tab,.bell,.handle,.locate {min-height:44px;}
.item {min-height:48px;}
.archive-mode .data-status {border-left:4px solid #85919b;}
.bell {min-width:44px;box-sizing:border-box;}
.record-notice {position:relative;top:auto;left:auto;right:auto;margin:6px 10px;z-index:auto;}
.sheet:not(.open) .record-notice {display:none;}
.archive-mode .mk img,.archive-mode .item img {filter:grayscale(1);opacity:.65;outline-color:#85919b;}
.archive-mode .mk.pulse::before {animation:none;opacity:0;}

/* Status notices share a flow layout so wrapped text never overlaps. */
.map-notices {position:absolute;top:10px;left:10px;right:58px;z-index:5;display:flex;flex-direction:column;align-items:flex-start;gap:8px;pointer-events:none;max-height:calc(100% - 20px);overflow-y:auto;}
.map-notices .data-status {position:static;width:100%;flex:none;overflow-wrap:anywhere;}
.map-notices .calm {position:relative;inset:auto;width:100%;max-width:420px;flex:none;overflow-wrap:anywhere;}
.map-notices .calm[hidden] {display:none;}
/* «Історія» на телефоні (власник 24.10: «не дуже зручно»): дата й фільтр — компактні кнопки,
   довідка й примітка сховані, список займає решту панелі */
.archive-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:6px 12px;border-bottom:1px solid var(--line)}
.archive-controls[hidden]{display:none}
.archive-controls button,.archive-controls input{flex:none;min-height:36px;border:1px solid var(--line);border-radius:8px;padding:4px 10px;background:var(--card);color:var(--fg);font:inherit;font-size:14px;white-space:nowrap}
.archive-controls label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.type-filter{display:flex;gap:4px;flex:none}
.archive-mode .sheet{max-height:62vh}
.archive-mode .sheet .map-help,.archive-mode .sheet .note{display:none}
.archive-mode .timebar{padding:4px 12px 6px}
.archive-mode .tplay{width:36px;height:36px}
.sheet.open .list{flex:1 1 auto;min-height:0}
.type-filter button[aria-pressed="true"]{background:var(--fg);color:var(--card);border-color:var(--fg)}
.bell{display:flex;align-items:center;gap:4px;justify-content:center;font-size:17px;padding:8px}
.bell-label{font-size:12px}
.bar .status{min-width:0;overflow-wrap:anywhere}
.map-help{padding:8px 12px;font-size:13px;color:var(--muted)}
.map-help summary{cursor:pointer;min-height:32px}
.map-help p{line-height:1.5}
@media(max-width:500px){
  .bar{display:grid;grid-template-columns:1fr auto;gap:4px 8px}
  .bar .tabs{grid-column:1;grid-row:1;justify-self:start}
  .bar{grid-template-columns:1fr auto auto}
  .bar .theme-btn{grid-column:2;grid-row:1}
  .bar .bell:not(.theme-btn){grid-column:3;grid-row:1}
  .bar .status{grid-column:1/-1;grid-row:2;max-width:none;justify-self:center;font-size:12px}
}

/* код цілі («Р12») і журнал подій (codes.py) */
.code { display: inline-block; padding: 0 5px; border-radius: 5px; background: var(--card); border: 1px solid var(--line);
  font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--fg); }
.journal-open { display: block; margin: 8px 10px 0; width: calc(100% - 20px); min-height: 44px; cursor: pointer; }
a.text-link { box-sizing: border-box; text-align: center; text-decoration: none; line-height: 24px; }
.journal-list { list-style: none; margin: 8px 0; padding: 0; }
.journal-list li { border-bottom: 1px solid var(--line); }
.jrow { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 10px 4px; min-height: 44px; line-height: 1.4; }
button.jrow { cursor: pointer; }
button.jrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.jt { color: var(--muted); font-variant-numeric: tabular-nums; }
.jk-alert .jrow { color: #c62828; }
:root.dark .jk-alert .jrow { color: #ff8a80; }

/* ---------- «Моє село», статус сіл, легка карта, широкий екран (власник 08.11) ---------- */
.theme-btn { font-size: 18px; }
.sheet.open { overflow-y: auto; }
.sheet.open .list { flex: none; overflow: visible; }
.handle { position: sticky; top: 0; z-index: 1; background: var(--bg); }
.home { margin: 0 10px 8px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.home.red { background: #fdecea; border-color: #e57373; }
.home.amber { background: #fff6e0; border-color: #f0b44c; }
:root.dark .home.red { background: #3a1a1a; border-color: #7a2a2a; }
:root.dark .home.amber { background: #33270f; border-color: #6a4a10; }
.home-top { display: flex; align-items: center; gap: 8px; }
.home-top label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.vsel { flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; font-size: 15px; }
.vsel:focus-visible { outline: 2px solid var(--accent); }
.home-state { margin: 8px 0 0; font-weight: 700; font-size: 16px; }
.home.red .home-state { color: #b71c1c; }
.home.amber .home-state { color: #8a5300; }
:root.dark .home.red .home-state { color: #f7c1c1; }
:root.dark .home.amber .home-state { color: #fac775; }
.home-detail { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.home-detail:empty { display: none; }
.home-shelter { margin-top: 8px; width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.home.red .home-shelter { background: #c62828; border-color: #c62828; color: #fff; }
.home-shelter:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.home-shelter[hidden] { display: none; }
/* згорнута панель на телефоні: картку видно лише коли ціль біля обраного села */
.sheet:not(.open) .home:not(.red):not(.amber) { display: none; }
.sheet:not(.open) .home .home-top { display: none; }
.sheet:not(.open) .home .home-state { margin-top: 0; }
.archive-mode .home { display: none; }
.villages { padding: 4px 10px 6px; }
.villages[hidden], .sheet:not(.open) .villages { display: none; }
.vh { margin: 10px 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vlist { list-style: none; margin: 0; padding: 0; }
.vrow { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 6px 6px; border-radius: 8px; cursor: pointer; }
.vrow:hover { background: var(--card); }
.vrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vdot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey); flex: none; }
.vrow.lv2 .vdot { background: #d32f2f; }
.vrow.lv1 .vdot { background: #f0a000; }
.vn { flex: 1; }
.vrow.lv2 .vn { font-weight: 700; }
.vs { font-size: 13px; color: var(--muted); text-align: right; }
.vrow.lv2 .vs { color: #c62828; }
:root.dark .vrow.lv2 .vs { color: #f09595; }
.legend { margin: 8px 4px 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.lite-full { margin-left: 6px; padding: 3px 8px; min-height: 30px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.lite-full:focus-visible { outline: 2px solid var(--accent); }
.map-notices .lite-note { position: static; flex: none; pointer-events: auto; }

/* широкий екран: панель — стовпчик ліворуч, карта праворуч на всю висоту; вікна — по центру, не знизу */
@media (min-width: 1000px) {
  body { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .bar, .alertbar { grid-column: 1 / -1; }
  #map { grid-column: 2; grid-row: 3; }
  .sheet { grid-column: 1; grid-row: 3; max-height: none; border-top: 0; border-right: 1px solid var(--line); min-height: 0; }
  .archive-mode .sheet { max-height: none; }
  .handle { cursor: default; }
  .chev { display: none; }
  .home { margin-top: 4px; }
  .panel { align-items: center; justify-content: center; }
  .panel-box { max-width: 560px; border-radius: 16px; max-height: 86vh; }
  .bar .status { max-width: none; flex: 1; text-align: center; }
}
.legend-list { margin: 6px 0 4px; padding-left: 18px; font-size: 13px; line-height: 1.4; }
.legend-list li { margin: 3px 0; }
