/* «Тацпит» — дизайн-система.
   Образ: наблюдательный пункт. Спокойная «известняковая» карта днём и «ночное море» ночью;
   единственный яркий элемент — тревога и её отсчёт до укрытия (кольцо, которое тает).
   Иврит справа налево: только логические свойства (inline-start / inline-end). */

@font-face { font-family: 'Plex'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Plex'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Plex'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Plex'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Plex'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212; }
@font-face { font-family: 'Plex'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212; }
@font-face { font-family: 'Plex'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212; }
@font-face { font-family: 'Plex'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212; }
@font-face { font-family: 'Plex'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-hebrew-hebrew-400-normal.woff2') format('woff2'); unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: 'Plex'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-hebrew-hebrew-500-normal.woff2') format('woff2'); unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: 'Plex'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-hebrew-hebrew-600-normal.woff2') format('woff2'); unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: 'Plex'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/ibm-plex-sans-hebrew-hebrew-700-normal.woff2') format('woff2'); unicode-range: U+0590-05FF, U+FB1D-FB4F; }


/* «Тацпит» — дизайн-система, сессия 4.
   Образ: наблюдательный пункт. «Тихо» — бирюза наблюдателя, всё остальное спокойное и серо-синее;
   цвет угрозы появляется только с тревогой и тогда занимает экран: огромные цифры отсчёта.
   Учения — всегда со штриховкой. Иврит справа налево: только логические свойства (inline-start / inline-end). */

/* ---------- токены ---------- */
:root, [data-theme='light'] {
  --bg: #e9eeed;
  --surface: #ffffff;
  --surface-2: #f2f5f4;
  --line: #d4dddb;
  --ink: #0f1e26;
  --muted: #586b74;
  --accent: #0b7a6e;          /* бирюза наблюдателя: «тихо», ссылки, выбор */
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 122, 110, 0.11);
  --calm: #0b7a6e;
  --siren: #d3142a;
  --pre: #a86400;
  --uav: #6a3fd6;
  --drill: #f2b300;
  --on-alert: #ffffff;
  --map-water: #d2dfe3;
  --map-land: #f7f8f5;
  --map-edge: #b7c6c3;
  --shadow: 0 1px 2px rgba(15, 30, 38, 0.06), 0 8px 24px -14px rgba(15, 30, 38, 0.28);
  --shadow-up: 0 -8px 30px -18px rgba(15, 30, 38, 0.4);
  --scrim: rgba(15, 30, 38, 0.4);
  color-scheme: light;
}
[data-theme='dark'] {
  /* Светлее, чем было (08.11: «чёрный экран — ничего не видно»): сине-серый, как ночная подложка. */
  --bg: #1b2738;
  --surface: #243246;
  --surface-2: #2c3c53;
  --line: #3b4e68;
  --ink: #f1f5f9;
  --muted: #a9b8c9;
  --accent: #3cc4b0;
  --accent-ink: #052622;
  --accent-soft: rgba(60, 196, 176, 0.14);
  --calm: #3cc4b0;
  --siren: #ff4252;
  --pre: #ffae2b;
  --uav: #a88dff;
  --drill: #f2b300;
  --on-alert: #ffffff;
  --map-water: #27324a;
  --map-land: #4b5876;
  --map-edge: #7d8eaa;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 30px -16px rgba(0, 0, 0, 0.75);
  --shadow-up: 0 -10px 30px -16px rgba(0, 0, 0, 0.8);
  --scrim: rgba(0, 0, 0, 0.58);
  color-scheme: dark;
}
:root {
  --t-xs: 12.5px; --t-s: 14px; --t-b: 15.5px; --t-m: 17px; --t-l: 20px; --t-xl: 26px;
  --r-s: 10px; --r-m: 14px; --r-l: 22px;
  --bar-h: 58px; --tab-h: 62px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --side: 420px;
}
[data-size='large'] { --t-xs: 14px; --t-s: 16px; --t-b: 17.5px; --t-m: 19px; --t-l: 23px; --t-xl: 30px; }

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Plex', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: var(--t-b); line-height: 1.45;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
svg { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pad { padding: 4px 6px; }
.note { margin: 14px 6px 0; font-size: var(--t-xs); color: var(--muted); max-width: 64ch; }
kbd { font: inherit; font-size: var(--t-xs); padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; font-size: var(--t-xs); font-weight: 600;
  background: var(--drill); color: #111; box-shadow: inset 0 -3px 0 #111; }
.ico-gap { width: 20px; flex: none; }
[hidden] { display: none !important; }

/* ---------- шапка ---------- */
.drillbar { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px;
  padding-top: calc(7px + env(safe-area-inset-top)); color: #111;
  background: repeating-linear-gradient(-45deg, var(--drill) 0 14px, #ffd24d 14px 28px); font-size: var(--t-s); }
.drillbar > span { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.drillbar svg { width: 16px; height: 16px; fill: currentColor; }
.drillbar .muted { color: #333; }
.drillbar .btn { background: #111; color: #fff; border-color: #111; min-height: 36px; }
.drillbar .btn svg { fill: currentColor; stroke: none; width: 14px; height: 14px; }

.bar { grid-row: 2; display: flex; align-items: center; gap: 10px; height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--bg); position: relative; z-index: 20; }
.in-drill .bar { padding-top: 0; height: var(--bar-h); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.brand-tile { fill: #0c7d70; } /* бирюзовый радар-глаз (решение штаба 11.11: цвет A, значок B) */
.brand-pupil { fill: #ff3b46; }
.brand-name { font-weight: 700; font-size: var(--t-m); letter-spacing: -0.01em; }
.conn { display: flex; align-items: center; gap: 7px; font-size: var(--t-xs); color: var(--muted); min-width: 0; border: 0; background: transparent; padding: 6px 4px; border-radius: 8px; }
.conn:hover { color: var(--ink); }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; position: relative; }
.conn[data-state='ok'] .conn-dot { background: var(--calm); }
.conn[data-state='ok'] .conn-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--calm); opacity: 0; animation: beat 3s var(--ease) infinite; }
.conn[data-state='degraded'] .conn-dot { background: var(--pre); }
.conn[data-state='down'] .conn-dot { background: var(--siren); }
.conn-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes beat { 0% { transform: scale(0.6); opacity: 0.7; } 70%, 100% { transform: scale(1.6); opacity: 0; } }

.seg { display: none; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; margin-inline: auto; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 11px;
  background: transparent; color: var(--muted); font-weight: 500; white-space: nowrap; }
.seg button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button[aria-selected='true'] svg { color: var(--accent); }

.bar-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.clock { font-weight: 600; font-size: var(--t-b); padding: 0 8px; color: var(--ink); letter-spacing: 0.01em; }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; min-width: 40px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; white-space: nowrap; }
.tool.icon { padding: 0; width: 40px; }
.tool.small { min-height: 34px; padding: 0 10px; font-size: var(--t-s); border-radius: 10px; }
.tool.lang { font-weight: 700; font-size: var(--t-s); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool.small svg { width: 17px; height: 17px; }
.tool:hover { border-color: var(--muted); }
.tool[aria-pressed='true'] { color: var(--accent); border-color: var(--accent); }
.drill-btn { background: repeating-linear-gradient(-45deg, var(--drill) 0 8px, #ffd24d 8px 16px); color: #111; border-color: #c99400; font-weight: 600; }
.drill-btn svg { fill: currentColor; stroke: none; width: 14px; height: 14px; }
.wide-only { display: none; }
@media (min-width: 900px) {
  .seg { display: flex; }
  .wide-only { display: inline-flex; }
  .bar-tools { margin-inline-start: 0; }
}
@media (max-width: 899px) {
  .drillbar { font-size: var(--t-xs); padding-block: 5px; }
  .drillbar .btn { min-height: 32px; padding: 0 10px; }
  .in-drill .drill-btn { display: none; }
  /* Шапка телефона «B» (решение штаба 11.11): логотип и связь целиком; язык и настройки — во вкладке «עוד», 🔈 остаётся. */
  .conn { flex: 1; }
  .conn-text { white-space: normal; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: start; }
  .drill-btn span { display: none; }
  .drill-btn { width: 40px; padding: 0; }
}
@media (max-width: 330px) { .conn-text { display: none; } }

/* ---------- нижние вкладки (телефон) ---------- */
.tabbar { grid-row: 6; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); position: relative; z-index: 15; }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tab-h);
  border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 500; padding: 6px 2px; }
.tabbar button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-selected='true'] { color: var(--accent); }
.tabbar button[aria-selected='true'] svg { stroke-width: 2.2; }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- полоса тревоги ---------- */
.strip { --k: var(--siren); grid-row: 3; display: flex; align-items: center; gap: 12px; width: 100%; border: 0; margin: 0;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: var(--k); color: var(--on-alert);
  text-align: start; font-size: var(--t-b); position: relative; z-index: 19; }
.strip[data-family='prealert'] { --k: var(--pre); }
.strip[data-family='uav'] { --k: var(--uav); }
.strip[data-drill]::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(-45deg, var(--drill) 0 8px, #111 8px 16px); }
.strip-what { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; overflow: hidden; }
.strip-what b { font-weight: 700; white-space: nowrap; }
.strip-what span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.95; }
.strip-sec { font-size: var(--t-xl); font-weight: 700; line-height: 1; }
.strip-sec small { font-size: var(--t-xs); font-weight: 500; margin-inline-start: 3px; }

/* ---------- сцена: раскладка видов ---------- */
.stage { grid-row: 4; position: relative; min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.stage > * { min-height: 0; min-width: 0; grid-area: 1 / 1; }
.places, .feed, .ops, .sheet, .map-host { display: none; }
.places, .feed { overflow-y: auto; overscroll-behavior: contain; }
.stage[data-view='places'] .places,
.stage[data-view='feed'] .feed { display: block; }
.stage[data-view='map'] .map-host { display: block; }
.stage[data-view='map'] .sheet { display: flex; }
.stage[data-view='ops'] .ops { display: block; overflow-y: auto; }
.map-host { position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; }

@media (min-width: 900px) {
  .stage[data-view='places'] { grid-template-columns: var(--side) minmax(0, 1fr); }
  .stage[data-view='places'] .places { grid-area: 1 / 1; border-inline-end: 1px solid var(--line); }
  .stage[data-view='places'] .map-host { display: block; grid-area: 1 / 2; }
  .stage[data-view='map'] { grid-template-columns: minmax(0, 1fr) var(--side); }
  .stage[data-view='map'] .map-host { grid-area: 1 / 1; }
  .stage[data-view='map'] .sheet { grid-area: 1 / 2; }
  .stage[data-view='map']:has(.sheet[data-snap='peek']) { grid-template-columns: minmax(0, 1fr) 0; }
  .stage[data-view='ops'] { grid-template-columns: 380px minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr); }
  .stage[data-view='ops'] .ops { display: contents; }
  .stage[data-view='ops'] .map-host { display: block; grid-area: 2 / 2; }
}

/* ---------- «Мои места» ---------- */
.places { padding: 10px max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left)); }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 4px 8px; }
.p-head h2 { margin: 0; font-size: var(--t-m); font-weight: 700; letter-spacing: -0.01em; }
.group { background: var(--surface); border-radius: var(--r-m); border: 1px solid var(--line); overflow: hidden; }
.group > * + * { border-top: 1px solid var(--line); }

/* Главный блок: «Тихо» или отсчёт. Единственное громкое место в приложении. */
.hero { --k: var(--accent); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 18px 18px 18px 20px; padding-inline: 20px 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--k); }
.hero-main { min-width: 0; }
.hero p { margin: 0; }
.hero-word { font-size: clamp(40px, 11vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.hero-word.calm { color: var(--accent); }
.hero-sub { margin-top: 6px !important; font-size: var(--t-b); }
.hero-sub.strong { font-weight: 600; }
.hero-sub.warn { color: var(--pre); font-weight: 500; cursor: pointer; }
.hero-sub.muted { font-size: var(--t-s); }
.hero-live { display: flex; align-items: center; gap: 8px; margin-top: 12px !important; font-size: var(--t-s); color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--calm); position: relative; flex: none; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--calm); opacity: 0; animation: beat 3s var(--ease) infinite; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-glance { border: 0; padding: 0; background: transparent; width: clamp(78px, 22vw, 116px); align-self: stretch; display: grid; place-items: center; }
.glance { width: 100%; max-height: 210px; }
.g-land { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; stroke-linejoin: round; }
.g-hit { fill: var(--siren); }
.g-hit[data-f='prealert'] { fill: var(--pre); }
.g-hit[data-f='uav'] { fill: var(--uav); }
.g-pin circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.g-pin .c { fill: var(--accent); stroke: none; }
.g-pin[data-s] circle { stroke: var(--siren); }
.g-pin[data-s] .c { fill: var(--siren); }

.hero[data-state='missile'], .hero[data-state='uav'], .hero[data-state='prealert'], .hero[data-state='other'] {
  background: var(--k); border-color: var(--k); color: var(--on-alert); }
.hero[data-state='missile'], .hero[data-state='other'] { --k: var(--siren); }
.hero[data-state='prealert'] { --k: var(--pre); }
.hero[data-state='uav'] { --k: var(--uav); }
.hero[data-state]:not([data-state='calm'])::before { display: none; }
.hero[data-drill]::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 8px; background: repeating-linear-gradient(-45deg, var(--drill) 0 10px, #111 10px 20px); }
.hero-where { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--t-b); }
.hero-where svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-count { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; }
.hero-count b { font-size: clamp(96px, 30vw, 168px); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em; }
.hero-count span { font-size: var(--t-m); font-weight: 500; max-width: 7em; line-height: 1.2; }
.hero-say { font-size: var(--t-l); font-weight: 700; margin-top: 6px !important; }
.hero:not([data-state='calm']) .hero-word { font-size: clamp(32px, 9vw, 48px); margin-top: 8px; }
.hero:not([data-state='calm']) .hero-sub { opacity: 0.95; }
.hero-official { margin-top: 10px !important; font-size: var(--t-s); opacity: 0.95; max-width: 46ch; }
.hero-official span { font-weight: 600; }
.hero-also { margin-top: 8px !important; font-size: var(--t-s); }
.hero:not([data-state='calm']) .g-land { fill: rgba(255, 255, 255, 0.18); stroke: rgba(255, 255, 255, 0.5); }
.hero:not([data-state='calm']) .g-hit { fill: #fff; }
.hero:not([data-state='calm']) .g-pin circle { fill: var(--k); stroke: #fff; }
.hero:not([data-state='calm']) .g-pin .c { fill: #fff; }
.btn.on-alert { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn.on-alert:hover { background: rgba(255, 255, 255, 0.26); }

.place { --k: var(--siren); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border: 0; background: transparent; text-align: start; }
.place:hover { background: var(--surface-2); }
.place-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.place-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.place-txt { display: flex; flex-direction: column; min-width: 0; }
.place-name { font-weight: 600; font-size: var(--t-m); line-height: 1.2; }
.place-zone { font-size: var(--t-s); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-meta { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.place-meta.near { color: var(--pre); font-weight: 500; }
.place-state { text-align: end; font-size: var(--t-s); }
.place-state .calm { display: inline-flex; align-items: center; gap: 6px; color: var(--calm); font-weight: 600; }
.place-state .calm::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.place-state .norm { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.place[data-state] { color: var(--on-alert); background: var(--k); }
.place[data-state='prealert'] { --k: var(--pre); }
.place[data-state='uav'] { --k: var(--uav); }
.place[data-state] .place-ico { background: rgba(255, 255, 255, 0.2); color: #fff; }
.place[data-state] .place-zone, .place[data-state] .place-meta { color: rgba(255, 255, 255, 0.9); }
.place[data-state='shelter'] { background: color-mix(in srgb, var(--siren) 13%, var(--surface)); color: var(--ink); }
.place[data-state='shelter'] .place-ico { background: var(--siren); }
.place[data-state='shelter'] .place-zone, .place[data-state='shelter'] .place-meta { color: var(--muted); }
.place-alert { font-weight: 600; font-size: var(--t-s); }
.place-alert small { display: block; font-weight: 400; font-size: var(--t-xs); opacity: 0.92; }
.place-add { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: transparent; color: var(--accent); font-weight: 600; text-align: start; }
.place-add .place-ico { background: transparent; border: 1.5px dashed var(--accent); }

.now-row { --k: var(--siren); display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; background: transparent; text-align: start; }
.now-row:hover { background: var(--surface-2); }
.now-row[data-family='prealert'] { --k: var(--pre); }
.now-row[data-family='uav'] { --k: var(--uav); }
.now-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k); flex: none; }
.now-row .what { flex: 1; min-width: 0; font-size: var(--t-s); }
.now-row .what strong { display: block; font-size: var(--t-b); }
.now-row .sec { font-weight: 700; color: var(--k); font-size: var(--t-m); }
.now-row .when { text-align: end; font-size: var(--t-s); line-height: 1.2; }
.now-row .when small { display: block; font-size: var(--t-xs); }
.calm-line { display: flex; align-items: center; gap: 10px; padding: 13px 14px; font-size: var(--t-s); }
.calm-line svg { width: 20px; height: 20px; fill: none; stroke: var(--calm); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: var(--t-s); }
.btn.icon { padding: 0; width: 36px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--siren); }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { border-color: var(--muted); }
.btn.primary:hover { filter: brightness(1.06); }

/* ---------- кольцо отсчёта ---------- */
.ring { --k: var(--siren); position: relative; width: 64px; height: 64px; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
[dir='rtl'] .ring svg { transform: rotate(-90deg) scaleY(-1); }
.ring .track { fill: none; stroke: color-mix(in srgb, var(--k) 18%, transparent); stroke-width: 5; }
.ring .prog { fill: none; stroke: var(--k); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.5s linear; }
.ring b { position: relative; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: var(--k); }
.ring b small { display: block; font-size: 10.5px; font-weight: 500; text-align: center; margin-top: 2px; color: var(--muted); }
.ring.big { width: 84px; height: 84px; }
.ring.done { display: none; }
.ring.big b { font-size: 32px; }
.place[data-state] .ring { --k: #fff; }
.place[data-state] .ring .track { stroke: rgba(255, 255, 255, 0.3); }
.place[data-state] .ring b small { color: rgba(255, 255, 255, 0.9); }

/* ---------- шторка карты (телефон — снизу, компьютер — колонка) ---------- */
.sheet { position: absolute; z-index: 10; flex-direction: column; background: var(--surface); }
@media (max-width: 899px) {
  .sheet { inset-inline: 0; bottom: 0; height: var(--sheet-h); border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: var(--shadow-up);
    transition: height 0.32s var(--ease); }
  .sheet.dragging { transition: none; }
  .sheet[data-snap='peek'] { --sheet-h: 150px; }
  .sheet[data-snap='half'] { --sheet-h: 52%; }
  .sheet[data-snap='full'] { --sheet-h: calc(100% - 8px); }
}
@media (min-width: 900px) {
  .sheet { position: relative; border-inline-start: 1px solid var(--line); overflow: hidden; }
  .sheet-grip { display: none !important; }
  .sheet-head { padding-top: 12px !important; }
  .sheet[data-snap='peek'] { display: none !important; }
  .sheet-toggle svg { transform: rotate(90deg); }
  [dir='rtl'] .sheet-toggle svg { transform: rotate(-90deg); }
}
.sheet-grip { display: flex; justify-content: center; padding: 10px 0 4px; touch-action: none; cursor: grab; }
.grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; touch-action: none; }
.sheet-sum { flex: 1; margin: 0; font-size: var(--t-s); color: var(--muted); }
.sheet-toggle svg { transition: transform 0.25s var(--ease); }
@media (max-width: 899px) { .sheet[data-snap='full'] .sheet-toggle svg { transform: rotate(180deg); } }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 14px 18px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.block-title { margin: 14px 4px 8px; font-size: var(--t-s); font-weight: 600; color: var(--muted); }

.map-tools { position: absolute; z-index: 5; inset-inline-start: 12px; bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) {
  .stage[data-view='map'] .map-tools { bottom: calc(150px + 12px); transition: bottom 0.32s var(--ease); }
  .stage[data-view='map']:has(.sheet[data-snap='half']) .map-tools, .stage[data-view='map']:has(.sheet[data-snap='full']) .map-tools { opacity: 0; pointer-events: none; }
}
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 500; font-size: var(--t-s); }
.chip.icon { padding: 0; }
.chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stage[data-view='map']:has(.sheet[data-snap='peek']) .map-host::after { content: none; }
@media (min-width: 900px) {
  .stage[data-view='map']:has(.sheet[data-snap='peek']) #btn-fit::after { content: ''; }
}

/* ---------- карточка волны ---------- */
.wave { --k: var(--siren); background: var(--surface-2); border-radius: var(--r-m); padding: 14px 16px; border-inline-start: 4px solid var(--k); position: relative; }
.wave[data-family='prealert'] { --k: var(--pre); }
.wave[data-family='uav'] { --k: var(--uav); }
.wave[data-drill] { border-image: repeating-linear-gradient(-45deg, var(--drill) 0 6px, #111 6px 12px) 1; border-inline-start-width: 6px; }
.wave-top { display: flex; align-items: flex-start; gap: 12px; }
.wave-head { flex: 1; min-width: 0; }
.wave-kind { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: var(--t-m); color: var(--k); }
.wave-since { display: block; font-size: var(--t-xs); color: var(--muted); }
.wave-precision { margin: 6px 0 0; font-weight: 500; }
.wave-act { display: block; margin-top: 4px; font-size: var(--t-s); font-weight: 600; }
.wave-act small { font-weight: 400; color: var(--muted); }
.wave-facts { margin: 12px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-size: var(--t-s); }
.wave-facts dt { color: var(--muted); }
.wave-facts dd { margin: 0; }
/* Подробно по зонам тревоги */
.zinfo { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.zinfo summary { cursor: pointer; padding: 10px 12px; font-weight: 600; font-size: var(--t-s); }
.zinfo .todo { margin: 0 12px 10px; font-size: var(--t-s); }
.zinfo ul { list-style: none; margin: 0; padding: 0; }
.zinfo li { padding: 10px 12px; border-top: 1px solid var(--line); font-size: var(--t-s); }
.zi-head { display: flex; justify-content: space-between; gap: 10px; }
.zi-head .num { color: var(--muted); white-space: nowrap; }
.zinfo dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; margin: 6px 0; }
.zinfo dt { color: var(--muted); }
.zinfo dd { margin: 0; }
.nbs { display: flex; flex-wrap: wrap; gap: 4px; }
.nb { padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: var(--t-xs); }
.nb[data-family] { border-color: var(--siren); color: var(--siren); font-weight: 600; }
.nb[data-family='prealert'] { border-color: var(--pre); color: var(--pre); }
.nb[data-family='uav'] { border-color: var(--uav); color: var(--uav); }
.zi-act { display: flex; flex-wrap: wrap; gap: 6px; }
.zinfo .note { margin: 0; padding: 8px 12px 10px; font-size: var(--t-xs); color: var(--muted); }
.sync-line { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); font-size: var(--t-s); color: var(--muted); }
.sync-line[data-ok='1'] { background: var(--accent-soft); color: var(--ink); }
.sync-line small { display: block; color: var(--muted); font-size: var(--t-xs); }
.acct { margin-bottom: 14px; }
.gbtn { min-height: 44px; margin: 4px 0 6px; }
.acct-actions { display: flex; gap: 8px; margin: 6px 0; }
.hamal-list { width: 100%; font-family: ui-monospace, monospace; font-size: var(--t-s); resize: vertical; }
.sync-line svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
/* Слои объектов */
.obj-ico { --k: var(--accent); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--k); color: #fff; flex: none; border: 2px solid #fff; box-shadow: var(--shadow); }
.obj-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.obj-row { gap: 10px; }
.switch-row .obj-ico, .obj-row .obj-ico { flex: 0 0 28px; width: 28px; }
.obj-row > span:nth-child(2) { flex: 1; }
.obj-user { display: flex; align-items: center; gap: 4px; }
.obj-user .obj-row { flex: 1; }
.obj-upload { cursor: pointer; }
.obj-upload small { display: block; color: var(--muted); font-size: var(--t-xs); }
.icons-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.icons-pick .pick { width: 40px; height: 40px; cursor: pointer; opacity: 0.55; }
.icons-pick .pick[aria-pressed='true'] { opacity: 1; outline: 3px solid var(--ink); outline-offset: 1px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-size: var(--t-s); }
.obj-kind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--k); }
.obj-kind svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nb.obj { display: inline-flex; align-items: center; gap: 4px; border-color: var(--k); }
.nb.obj svg { width: 12px; height: 12px; fill: none; stroke: var(--k); stroke-width: 2.4; }
.drill-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Телефон: полоса учений не шире экрана (иначе браузер уменьшает всю страницу). */
.drillbar { flex-wrap: wrap; }
.drillbar .speed { flex-wrap: wrap; }
@media (max-width: 600px) {
  .drillbar .speed .btn { padding-inline: 7px; min-height: 30px; }
  /* Телефон: полоса учений в одну строку (было две — карта ниже на ~45 px). Скорость — в окне учений перед запуском. */
  .drillbar { flex-wrap: nowrap; }
  .drillbar > span:first-child { flex-wrap: nowrap; overflow: hidden; }
  .drillbar > span:first-child b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .drillbar > span:first-child .muted { white-space: nowrap; flex: none; }
  .drillbar .drill-tools { flex: none; flex-wrap: nowrap; }
  .drillbar .speed { display: none; }
}
/* Палец: кнопки «+ / −» карты крупнее (были 29 px). */
@media (pointer: coarse) {
  .maplibregl-ctrl-group button { width: 40px; height: 40px; }
  .maplibregl-ctrl-group button .maplibregl-ctrl-icon { background-size: 26px; }
}
.speed { display: inline-flex; gap: 4px; }
.drillbar .speed .btn { background: transparent; color: #111; border-color: #111; min-height: 32px; padding-inline: 10px; }
.drillbar .speed .btn[aria-pressed='true'] { background: #111; color: var(--drill); }
.dlg-body h3 { margin: 16px 0 8px; font-size: var(--t-s); color: var(--muted); }
.wave-facts .why { color: var(--muted); font-size: var(--t-xs); }
.est { border-bottom: 1px dotted var(--muted); }
.zones { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.zones li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.zones li.mine { font-weight: 600; }
.zones li.mine::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); align-self: center; flex: none; margin-inline-end: -4px; }
.zones li > span:first-of-type { flex: 1; }
.zones .he { color: var(--muted); font-size: var(--t-xs); }
.zones .t { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.zones-more { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 9px 0 2px; color: var(--accent); font-size: var(--t-s); font-weight: 600; cursor: pointer; }

.calm-card { padding: 6px 4px 0; }
.calm-card h3 { margin: 0 0 4px; font-size: var(--t-l); color: var(--accent); }
.calm-card p { margin: 0; color: var(--muted); max-width: 52ch; }
.legend ul { list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; font-size: var(--t-s); }
.sw { flex: none; width: 18px; height: 12px; margin-top: 4px; border-radius: 3px; }
.sw.zones { background: color-mix(in srgb, var(--accent) 35%, transparent); border: 1px solid var(--accent); }
.sw.missile { background: var(--siren); }
.sw.prealert { background: var(--pre); }
.sw.uav { background: var(--uav); }
.sw.mine { background: transparent; border: 2.5px solid var(--ink); }
.sw.dashed { height: 0; margin-top: 10px; border-top: 2px dashed var(--ink); border-radius: 0; }
.sw.shelter { width: 12px; border-radius: 50%; background: var(--calm); border: 2px solid #fff; }

/* ---------- лента ---------- */
.feed-in { max-width: 780px; margin: 0 auto; padding: 10px max(14px, env(safe-area-inset-right)) 32px max(14px, env(safe-area-inset-left)); }
.feed h2 { display: flex; align-items: center; gap: 8px; margin: 22px 4px 10px; font-size: var(--t-l); font-weight: 700; letter-spacing: -0.01em; }
.feed h2 svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fchips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.fchip { --k: var(--accent); flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: var(--t-s); }
.fchip[data-family='missile'] { --k: var(--siren); }
.fchip[data-family='uav'] { --k: var(--uav); }
.fchip[data-family='prealert'] { --k: var(--pre); }
.fchip[aria-pressed='true'] { background: var(--k); border-color: var(--k); color: #fff; }
.fchip[aria-pressed='true']:not([data-family]) { color: var(--accent-ink); }
.zone-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r-m); background: var(--accent-soft); font-weight: 600; }
.feed .wave { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); margin-bottom: 12px; }
.feed .wave .mini { width: 168px; height: 168px; }
.news { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.news li + li { border-top: 1px solid var(--line); }
.news a, .news .news-row { display: flex; gap: 12px; padding: 11px 14px; color: inherit; text-decoration: none; font-size: var(--t-s); }
.news a:hover { background: var(--surface-2); }
.news time { color: var(--muted); flex: none; }
.day::first-letter { text-transform: uppercase; }
.day { margin: 22px 4px 8px; font-size: var(--t-s); font-weight: 600; color: var(--muted); }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ''; position: absolute; inset-block: 18px; inset-inline-start: 13px; width: 2px; background: var(--line); }
.tl-item { --k: var(--siren); position: relative; padding-inline-start: 34px; margin-bottom: 10px; }
.tl-item[data-family='prealert'] { --k: var(--pre); }
.tl-item[data-family='uav'] { --k: var(--uav); }
.tl-item::before { content: ''; position: absolute; inset-inline-start: 8px; top: 20px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--k); border: 2px solid var(--bg); box-sizing: content-box; }
.tl-card { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; width: 100%;
  padding: 12px; padding-inline: 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; }
.tl-card:hover { border-color: var(--muted); }
.tl-card:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.tl-card > span { display: flex; flex-direction: column; align-items: flex-start; }
.tl-time { font-weight: 700; font-size: var(--t-m); }
.tl-kind { font-weight: 600; color: var(--k); font-size: var(--t-s); }
.tl-zones { margin-top: 2px; font-size: var(--t-s); color: var(--muted); }
.tl-mine { display: inline-flex; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: var(--t-xs); font-weight: 600; }
.mini { width: 92px; height: 92px; border-radius: var(--r-s); background: var(--map-water); display: block; }
.mini .ctx { fill: var(--map-land); stroke: var(--map-edge); stroke-width: 0.6; }
.mini .hit { fill: var(--k); fill-opacity: 0.75; stroke: var(--k); stroke-width: 1; }
.mini .me { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
@media (max-width: 520px) {
  .feed .wave { grid-template-columns: 1fr; }
  .feed .wave .mini { width: 100%; height: 150px; order: -1; }
  .mini { width: 78px; height: 78px; }
}

/* ---------- пульт ---------- */
.ops { padding: 10px max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left)); }
.ops-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); min-width: 0; }
.kpi .k { font-size: var(--t-xs); color: var(--muted); }
.kpi b { font-size: var(--t-xl); font-weight: 700; line-height: 1.1; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.kpi small { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.hot { background: var(--siren); color: #fff; }
.kpi.hot .k, .kpi.hot small { color: rgba(255, 255, 255, 0.88); }
.led { width: 12px; height: 12px; border-radius: 50%; background: var(--siren); flex: none; }
.led[data-ok='1'] { background: var(--calm); }
.ops section { margin-top: 18px; min-height: 0; }
.ops section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; flex-wrap: wrap; }
.ops h2 { margin: 0; font-size: var(--t-m); font-weight: 700; }
.ops h3 { margin: 18px 4px 8px; font-size: var(--t-s); font-weight: 600; color: var(--muted); }
.hdr-tools { display: flex; gap: 6px; }
.area-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.area { --k: var(--line); display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 70px; align-items: center; gap: 10px; width: 100%; padding: 9px 12px;
  border: 0; border-top: 1px solid var(--line); background: transparent; text-align: start; font-size: var(--t-s); }
.area:first-child { border-top: 0; }
.area:hover { background: var(--surface-2); }
.area .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.area[data-family] { background: color-mix(in srgb, var(--k) 12%, var(--surface)); font-weight: 600; }
.area[data-family='missile'], .area[data-family='other'] { --k: var(--siren); }
.area[data-family='prealert'] { --k: var(--pre); }
.area[data-family='uav'] { --k: var(--uav); }
.area .an { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area .star svg { width: 14px; height: 14px; fill: var(--pre); stroke: var(--pre); }
.area .ac { color: var(--k); font-weight: 700; white-space: nowrap; }
.area .ad { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 4px; }
.area .ad i { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.area .ad em { font-style: normal; font-size: var(--t-xs); color: var(--muted); text-align: end; }
/* Хайфа на пульте: зона · сейчас · до укрытия · за сутки */
/* Режим зала «חמ״ל / מנ״מ» (11.11): цифры видно с другого конца зала. */
.mode-hamal .kpi { padding: 14px 20px; }
.mode-hamal .kpi .k { font-size: var(--t-s); }
.mode-hamal .kpi b { font-size: calc(var(--t-xl) * 1.7); }
.mode-hamal .kpi small { font-size: var(--t-s); }
.mode-hamal .hz { font-size: var(--t-m); }
/* Зал (экран на стене): полоса тревоги читается издалека — крупно тип, район и секунды (пересмотр 11.11). */
@media (min-width: 900px) {
  .mode-hamal .strip { padding-block: 14px; font-size: calc(var(--t-l) * 1.35); gap: 20px; }
  .mode-hamal .strip-what { gap: 18px; }
  .mode-hamal .strip-sec { font-size: calc(var(--t-xl) * 2.1); }
  .mode-hamal .strip-sec small { font-size: var(--t-m); }
}
/* Камеру отпустили во время тревоги — «עקוב» заметнее. */
.chip.follow { background: var(--siren); color: #fff; border-color: transparent; }

/* Пульт в тишине: одна строка вместо списка зон (замечание 11.11). */
.ops-haifa.calm .calm-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-inline-start: 4px solid var(--calm); border-radius: var(--r-m); }
.ops-haifa.calm .calm-line > .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--calm); flex: none; }
.ops-haifa.calm p { margin: 0; flex: 1 1 200px; min-width: 0; font-size: var(--t-s); }
.ops-areas > header .tool { margin-inline-start: auto; }
.hz .ht.hot { color: var(--k); font-weight: 700; }
.hz-head, .hz { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 62px 38px; align-items: center; gap: 10px; }
.hz-head { padding: 0 12px 6px; font-size: var(--t-xs); color: var(--muted); }
.hz-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.hz { --k: var(--calm); width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: start; font-size: var(--t-s); }
.hz:first-child { border-top: 0; }
.hz:hover { background: var(--surface-2); }
.hz .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.hz .hn { min-width: 0; overflow: hidden; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; } /* название целиком, до двух строк */
.hz .hs { color: var(--muted); white-space: nowrap; }
.hz .ht, .hz .hd { text-align: end; color: var(--muted); }
.hz[data-family] { background: color-mix(in srgb, var(--k) 16%, var(--surface)); }
.hz[data-family] .hs { color: var(--k); font-weight: 700; }
.hz[data-family='missile'], .hz[data-family='other'] { --k: var(--siren); }
.hz[data-family='prealert'] { --k: var(--pre); }
.hz[data-family='uav'] { --k: var(--uav); }
.log { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.log li { --k: var(--siren); border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log li[data-family='prealert'] { --k: var(--pre); }
.log li[data-family='uav'] { --k: var(--uav); }
.log li[data-type='end'] { --k: var(--calm); }
.log li button { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; width: 100%; padding: 9px 12px; border: 0; background: transparent; text-align: start; font-size: var(--t-s); border-inline-start: 4px solid var(--k); }
.log li button:hover { background: var(--surface-2); }
.log li[data-drill] button { border-image: repeating-linear-gradient(-45deg, var(--drill) 0 5px, #111 5px 10px) 1; }
.log time { grid-row: span 2; font-weight: 600; }
.log .lt { font-weight: 600; }
.log .lz { color: var(--muted); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .empty { padding: 14px; color: var(--muted); font-size: var(--t-s); }
.hours svg { display: block; width: 100%; height: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.hours rect { fill: var(--siren); }
.hours rect[data-f='prealert'] { fill: var(--pre); }
.hours rect[data-f='uav'] { fill: var(--uav); }
.hours-x { position: relative; height: 18px; font-size: var(--t-xs); color: var(--muted); }
.hours-x span { position: absolute; transform: translateX(-50%); top: 2px; }
[dir='rtl'] .hours-x span { transform: translateX(50%); }
[dir='rtl'] .hours svg { transform: scaleX(-1); }
.hours-legend { display: flex; gap: 14px; list-style: none; margin: 6px 4px 0; padding: 0; font-size: var(--t-xs); color: var(--muted); }
.hours-legend li { display: flex; align-items: center; gap: 6px; }
.hours-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--siren); }
.hours-legend li[data-f='prealert'] i { background: var(--pre); }
.hours-legend li[data-f='uav'] i { background: var(--uav); }
@media (min-width: 900px) {
  .ops-kpis { grid-area: 1 / 1 / 2 / 4; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 14px 0; }
  .ops-left { grid-area: 2 / 1; margin-block: 12px 14px; margin-inline: 14px 0; overflow-y: auto; min-height: 0; }
  .ops-left > section:first-child { margin-top: 0; }
  .ops-log { grid-area: 2 / 3; margin: 12px 14px 14px 0 !important; margin-inline: 0 14px !important; overflow-y: auto; }
  .stage[data-view='ops'] .map-host { margin: 12px; border-radius: var(--r-m); border: 1px solid var(--line); }
}

/* ---------- контекстное меню ---------- */
.menu { position: fixed; z-index: 100; min-width: 240px; max-width: min(340px, calc(100vw - 16px)); padding: 6px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.45); }
.menu.as-sheet { inset-inline: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto !important; left: auto; max-width: none; max-height: 70dvh; overflow-y: auto; animation: rise 0.22s var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: start; font-size: var(--t-s); }
.menu button:hover, .menu button:focus-visible { background: var(--accent-soft); outline: none; }
.menu button:disabled { opacity: 0.45; cursor: default; }
.menu button.danger { color: var(--siren); }
.menu button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.menu button.danger svg { color: var(--siren); }
.menu button > span { flex: 1; }
.menu kbd { margin-inline-start: auto; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-head { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 10px; font-size: var(--t-s); }
.menu-head strong { font-size: var(--t-b); }
.zstate { --k: var(--calm); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 600; color: var(--k); }
.zstate::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.zstate[data-family='missile'], .zstate[data-family='other'] { --k: var(--siren); }
.zstate[data-family='prealert'] { --k: var(--pre); }
.zstate[data-family='uav'] { --k: var(--uav); }

/* ---------- «установить приложение» (install.js): свой ряд сетки над нижними кнопками — ничего не закрывает ---------- */
.inst { grid-row: 5; justify-self: center; width: min(720px, calc(100% - 20px)); margin: 8px 0; display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 12px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent); box-shadow: var(--shadow); position: relative; z-index: 16; animation: rise 0.28s var(--ease); }
.inst-ico { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.inst-txt { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inst-txt b { font-size: var(--t-m); font-weight: 700; }
.inst-txt span { font-size: var(--t-s); color: var(--muted); }
.inst-txt .inst-note { font-size: var(--t-xs); }
.inst-act { display: flex; gap: 8px; margin-inline-start: auto; }
@media (max-width: 520px) { .inst-act { flex: 1 1 100%; } .inst-act .btn { flex: 1; } }
@media (min-width: 900px) { .inst { margin-bottom: 14px; } }

/* ---------- всплывающее сообщение ---------- */
.toast { position: fixed; z-index: 120; inset-inline: 0; margin: 0 auto; width: max-content; max-width: calc(100vw - 32px);
  bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-weight: 500; font-size: var(--t-s); box-shadow: var(--shadow); animation: rise 0.25s var(--ease); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------- новая версия (update.js): полоса снизу, не закрывает полосу тревоги сверху ---------- */
.upd { position: fixed; z-index: 121; inset-inline: 0; margin: 0 auto; width: max-content; max-width: calc(100vw - 24px);
  bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
  padding: 7px; padding-inline: 16px 7px; border-radius: 999px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: var(--t-s); animation: rise 0.25s var(--ease); }
.upd[hidden] { display: none; }
.upd-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.upd-t b { font-weight: 600; }
.upd-t small { color: var(--muted); font-size: var(--t-xs); }
.upd-btn { flex: none; border: 0; border-radius: 999px; padding: 9px 18px; min-height: 40px; font-weight: 600; background: var(--accent); color: var(--bg); }
.upd-btn:hover { filter: brightness(1.08); }
body.has-upd .toast { bottom: calc(var(--tab-h) + 82px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .upd { bottom: 24px; margin: 0; inset-inline: 24px auto; }
  body.has-upd .toast { bottom: 28px; }
}

/* ---------- диалоги ---------- */
.dlg { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(560px, 100%); max-height: min(88dvh, 860px);
  border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; }
.dlg-wide { width: min(860px, 100%); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: var(--scrim); }
@media (max-width: 640px) {
  .dlg { margin: auto 0 0; max-width: 100%; width: 100%; max-height: 92dvh; border-radius: var(--r-l) var(--r-l) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dlg[open] { animation: rise 0.28s var(--ease); }
}
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px; padding-inline: 20px 14px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { flex: 1; margin: 0; font-size: var(--t-l); }
.dlg-body { overflow-y: auto; padding: 8px 20px 22px; }
.dlg-foot { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlg-foot .btn { flex: 1; }
.dlg-body > h3, .set > h3 { margin: 18px 0 8px; font-size: var(--t-s); font-weight: 600; color: var(--muted); }
.set { margin-top: 14px; }
.set-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 0; flex: 1; }
.set-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-inline-end: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; }
.set-nav button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; text-align: start; font-weight: 500; font-size: var(--t-s); color: var(--muted); }
.set-nav button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.set-nav button[aria-current='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.set-nav button[aria-current='true'] svg { color: var(--accent); }
.set-title { margin: 8px 0 12px; font-size: var(--t-l); }
.set-body .group { margin-top: 12px; }
@media (max-width: 640px) {
  .set-wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .set-nav { flex-direction: row; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 8px; scrollbar-width: none; }
  .set-nav button { flex: none; }
  .set-title { display: none; }
}
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 11px 8px; border-radius: var(--r-s);
  border: 1.5px solid var(--line); background: var(--surface); font-size: var(--t-s); font-weight: 500; text-align: center; }
.opt svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.opt[aria-checked='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.opt[aria-checked='true'] svg { color: var(--accent); }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.switch-row > span { flex: 1; }
.voice-test { flex-wrap: wrap; align-items: flex-start; }
.voice-test > span:first-child { flex: 0 0 auto; padding-block-start: 6px; }
.voice-test .vt-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 260px; }
.switch-row small { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 2px; }
.switch-row input[type='range'] { flex: 1; max-width: 240px; accent-color: var(--accent); }
.switch { appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start 0.2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch:checked { background: var(--accent); }
.switch:checked::after { inset-inline-start: 23px; }
.set-place { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: transparent; text-align: start; }
.set-place .place-ico { width: 36px; height: 36px; }
.set-place .place-ico svg { width: 19px; height: 19px; }
.set-place span.t { flex: 1; min-width: 0; }
.set-place small { display: block; color: var(--muted); }
.chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
[dir='rtl'] .chev { transform: scaleX(-1); }
.watch { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--t-s); cursor: pointer; }
.wchip input { accent-color: var(--accent); margin: 0; }
.wchip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.keys, .diag { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: var(--t-s); }
.keys dt, .diag dt { color: var(--muted); }
.keys dd, .diag dd { margin: 0; }
.drills { display: grid; gap: 8px; margin-top: 14px; }
.drill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--surface-2); text-align: start; }
.drill:hover { border-color: var(--drill); }
.drill strong { font-size: var(--t-b); }
.drill span { grid-column: 1; font-size: var(--t-s); color: var(--muted); }
.drill svg { grid-row: 1 / 3; grid-column: 2; width: 34px; height: 34px; padding: 9px; border-radius: 50%; background: var(--drill); fill: #111; }

.search { position: relative; margin-top: 10px; }
.search input { width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: var(--surface-2); font-size: 16px; }
.search input:focus { border-color: var(--accent); outline: none; }
.results { list-style: none; margin: 10px 0 0; padding: 0; }
.results button { all: unset; box-sizing: border-box; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 6px;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.results button:focus-visible, .results button:hover { background: var(--accent-soft); }
.results strong { font-weight: 600; }
.results small { display: block; color: var(--muted); font-size: var(--t-xs); }
.results .alt { color: var(--muted); font-size: var(--t-s); white-space: nowrap; }
.results.shel li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.results.shel li > div { flex: 1; min-width: 0; }
.icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.icons .opt { min-width: 0; padding: 10px 4px; font-size: var(--t-xs); }
.field { width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: var(--surface-2); font-size: 16px; }
.field:focus { border-color: var(--accent); outline: none; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-s); background: var(--accent-soft); margin-top: 12px; }
.chosen small { display: block; color: var(--muted); }

/* ---------- карта: метки и всплывающая карточка ---------- */
.mk-center { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: var(--k, var(--siren)); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.25); }
.mk-origin { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px dashed var(--muted); color: var(--ink); white-space: nowrap; box-shadow: var(--shadow); }
.mk-missile { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--k, var(--siren)); box-shadow: 0 0 0 6px color-mix(in srgb, var(--k, var(--siren)) 35%, transparent), 0 0 18px 6px color-mix(in srgb, var(--k, var(--siren)) 55%, transparent); pointer-events: none; }
.flight-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.flight-layer path { fill: none; stroke: var(--k, var(--siren)); stroke-linecap: round; stroke-linejoin: round; }
.flight-layer .fl-rest { stroke-width: 2; stroke-dasharray: 2 6; opacity: 0.9; }
.flight-layer .fl-passed { stroke-width: 3; opacity: 0.95; }
.flight-layer .fl-dot { fill: #fff; stroke: var(--k, var(--siren)); stroke-width: 3; }
.flight-layer .fl-glow { fill: var(--k, var(--siren)); opacity: 0.35; }
.fl-edge-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; direction: ltr; }
.fl-edge { position: absolute; inset-block-start: 0; inset-inline-start: 0; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--siren); color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); will-change: transform; }
.fl-edge[hidden] { display: none; }
.fl-edge-arrow { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--siren); color: #fff; flex: none; }
.fl-edge-arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* БПЛА: значок у зоны последней тревоги + подпись. Не траектория. */
.mk-uav { display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.mk-uav[hidden] { display: none; }
.mk-uav-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--k, var(--uav)); color: #fff; border: 2px solid #fff;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--k, var(--uav)) 60%, transparent); animation: uav-ring 1.6s ease-out infinite; }
.mk-uav-ico svg { width: 20px; height: 20px; }
.mk-uav-txt { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 2px solid var(--k, var(--uav)); color: var(--ink); white-space: nowrap; box-shadow: var(--shadow); }
@keyframes uav-ring { to { box-shadow: 0 0 0 16px color-mix(in srgb, var(--k, var(--uav)) 0%, transparent); } }
.calm-motion .mk-uav-ico { animation: none; }
.mk-aim { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 2px solid var(--k, var(--siren)); color: var(--ink); white-space: nowrap; box-shadow: var(--shadow); pointer-events: none;
  /* длинный список зон не шире карты (телефон, пульт 1366): переносится и обрезается (пересмотр 11.11) */
  max-width: min(520px, calc(100vw - 32px)); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1500px) {
  .mk-aim { white-space: normal; border-radius: 14px; text-align: center; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .stage[data-view="ops"] .mk-aim { max-width: 300px; }
}
.mk-aim em { font-style: normal; font-weight: 400; color: var(--muted); }
.mk-origin em { font-style: normal; color: var(--muted); }
.mk-place { position: absolute; /* не relative: у метки MapLibre left/top 0 — иначе в иврите (RTL) она уезжает к правому краю карты */  display: grid; place-items: center; padding: 3px; border-radius: 999px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1.5px solid var(--ink); cursor: pointer; }
.mk-place .place-ico { width: 24px; height: 24px; background: var(--ink); color: var(--surface); }
.mk-place .place-ico svg { width: 14px; height: 14px; stroke-width: 2.4; }
/* Значок — точно в середине зоны; подпись сбоку и только вблизи (#map.z-near), без наезда (.clash прячет лишние). */
.mk-label { position: absolute; inset-inline-start: calc(100% + 4px); top: 50%; transform: translateY(-50%); display: none;
  padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); pointer-events: none; }
#map.z-near .mk-label { display: block; }
#map .mk-label.clash { display: none; }
.mk-place[data-family] { border-color: var(--siren); background: var(--siren); color: #fff; }
.mk-place[data-family='prealert'] { border-color: var(--pre); background: var(--pre); }
.mk-place[data-family='uav'] { border-color: var(--uav); background: var(--uav); }
.mk-place[data-family] .place-ico { background: #fff; color: var(--siren); }
.mk-place[data-family] .mk-label { background: var(--siren); color: #fff; }
.mk-hevel { font: 700 14px/1.2 'Plex', system-ui, sans-serif; color: #1d4ed8; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; white-space: nowrap; }
#map:not(.z-hevel) .mk-hevel { display: none; }
.hevel-tag { color: #1d4ed8; font-weight: 600; }
.zone-pop .maplibregl-popup-content { padding: 14px; }
.zcard { display: flex; flex-direction: column; gap: 2px; font-size: var(--t-s); min-width: 220px; }
.zcard strong { font-size: var(--t-b); }
.zcard-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.zcard .btn { margin-top: 6px; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-popup-content { font-family: 'Plex', system-ui, sans-serif; color: var(--ink); background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-ctrl-group { background: var(--surface) !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
[data-theme='dark'] .maplibregl-ctrl-icon { filter: invert(1); }
[dir='rtl'] .maplibregl-ctrl-top-right { right: auto; left: 0; }
[dir='rtl'] .maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 10px 0 0 10px; }

.calm-motion *, .calm-motion *::before, .calm-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 900px) {
  .hero-count b { font-size: 124px; }
  .hero-glance { width: 88px; }
}

/* ---------- слои «שכבות» — меню и карточки как в «Карте разрушений» (11.11) ---------- */
.ly-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ly-tools .ly-q { flex: 1; min-width: 0; }
.ly-tools .btn { flex: none; white-space: nowrap; }
.ly-sum { margin: 0 2px 8px; font-size: var(--t-xs); }
.ly-list { margin-top: 8px; }
.lyg { --c: var(--accent); border-radius: var(--r-s); }
.lyg + .lyg { border-top: 1px solid var(--line); border-radius: 0; padding-top: 2px; }
.lyg-h { display: flex; align-items: center; gap: 4px; padding-block: 2px; }
.lyg-tg { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: inherit; padding: 10px 4px; border-radius: 8px; cursor: pointer; text-align: start; min-width: 0; min-height: 44px; }
.lyg-tg:hover { background: var(--accent-soft); }
.lyg-tg b { font-size: var(--t-b); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lyg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.lyg-n { margin-inline-start: auto; font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.lyg.some .lyg-n { color: var(--ink); font-weight: 700; }
.lyg-n small { font-weight: 400; color: var(--muted); }
.lyg-chev { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--muted); transition: transform 0.18s; flex: none; }
.lyg-chev svg { width: 16px; height: 16px; }
[dir="rtl"] .lyg-chev svg { transform: scaleX(-1); }
.lyg.open .lyg-chev { transform: rotate(90deg); }
[dir="rtl"] .lyg.open .lyg-chev { transform: rotate(-90deg); }
.lyg-b { display: none; padding: 0 2px 8px; }
.lyg.open .lyg-b { display: block; }
.ly-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; margin-inline-start: 24px; border-radius: 9px; cursor: pointer; font-size: var(--t-s); min-height: 40px; }
.ly-row:hover { background: var(--accent-soft); }
.ly-row.on .ly-name { font-weight: 650; }
.ly-name { flex: 1; min-width: 0; }
.ly-n { color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
.ly-svg { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.18)); }
.ly-svg.big { width: 38px; height: 38px; }
.ly-chk { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0 6px; border: 1.6px solid var(--muted); border-radius: 5px; background: var(--surface); flex: none; cursor: pointer;
  display: inline-grid; place-items: center; }
.ly-chk:checked, .ly-chk:indeterminate { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); }
.ly-chk:checked::after { content: ""; width: 9px; height: 5px; border-style: solid; border-color: #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.ly-chk:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 1px; }
.ly-chk:focus-visible { outline: 2px solid var(--c, var(--accent)); outline-offset: 2px; }
.nb.obj .ly-svg { width: 18px; height: 18px; vertical-align: -4px; margin-inline-end: 4px; filter: none; }
/* карточка объекта / улицы (во всплывающем окне карты) */
.ly-card { min-width: 240px; max-width: 290px; }
.ly-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ly-ttl { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ly-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 2px 6px; }
.ly-dl dt { color: var(--muted); }
.ly-dl dd { margin: 0; font-weight: 600; }
.ly-approx { font-size: 11.5px; font-weight: 500; color: #8a6d1f; background: #fbf4dc; border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.ly-doc { margin: 2px 0 6px; border: 1px solid var(--line); background: var(--accent-soft); border-radius: 10px; padding: 6px 8px; max-height: 220px; overflow: auto; }
.ly-doc-h { font-size: var(--t-xs); font-weight: 700; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ly-doc-r { font-size: 12.5px; line-height: 1.35; padding: 3px 0; border-top: 1px solid var(--line); }
.ly-doc-r:first-of-type { border-top: 0; }
.ly-doc-r small { display: block; color: var(--muted); font-size: 11.5px; }
.ly-more { margin: 2px 0 6px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; max-height: 190px; overflow: auto; }
.ly-more-h { font-size: var(--t-xs); color: var(--muted); padding: 2px 6px 4px; }
.ly-more-i { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: inherit; font: inherit; font-size: 13.5px; padding: 4px 6px; border-radius: 7px; cursor: pointer; text-align: start; }
.ly-more-i:hover { background: var(--accent-soft); }
.ly-more-i .ly-svg { width: 22px; height: 22px; }
.ly-more-i span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-more-i small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ly-card .ly-src { margin-top: 6px; font-size: 11px; }


/* ---------- 11.11 вечер: решения штаба по виду ---------- */
/* Пульт ≤ 1500 px (1366): без колонки «יממה», названия зон в одну строку. */
@media (max-width: 1500px) {
  .hz-head, .hz { grid-template-columns: 10px minmax(0, 1fr) auto 62px; }
  .hz .hd, .hz-head > span:nth-child(5) { display: none; }
  .hz .hn { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }
}

/* Экран тревоги: моё место — на весь экран (как приложение Службы тыла). */
.alarm { --k: var(--siren); position: fixed; inset: 0; z-index: 80; display: grid; place-items: safe center; overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: var(--k); color: #fff; }
.alarm[data-state='prealert'] { --k: #b86e00; }
.alarm[data-state='uav'] { --k: #5b33c4; }
.alarm[data-drill]::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 10px; background: repeating-linear-gradient(-45deg, var(--drill) 0 10px, #111 10px 20px); }
.alarm-mute { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline-end: max(12px, env(safe-area-inset-right)); width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, 0.7); background: rgba(0, 0, 0, 0.18); color: #fff; }
.alarm-mute svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alarm-mute[aria-pressed='false'] { background: #fff; color: var(--k); }
.alarm-in { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.alarm-kind { margin: 0; font-size: var(--t-l); font-weight: 700; letter-spacing: 0.01em; opacity: 0.95; }
/* Район — крупно и целиком: «🏠 בית · חיפה - מערב»; длинное название зоны переносится (до двух строк), не обрезается. */
.alarm-where { margin: 0; max-width: 100%; font-size: calc(var(--t-xl) * 1.1); font-weight: 700; line-height: 1.22; text-wrap: balance; overflow-wrap: anywhere; }
.alarm-where.long { font-size: var(--t-xl); }
.alarm-where .aw-place { white-space: nowrap; }
.alarm-where .aw-dot { opacity: 0.75; font-weight: 400; }
.alarm-where svg { width: 1.05em; height: 1.05em; vertical-align: -0.16em; margin-inline-end: 6px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alarm-count { display: flex; flex-direction: column; align-items: center; line-height: 1; margin: 2px 0 0; }
/* Красный экран целиком — землетрясение/цунами. */
.alarm-count b { font-size: clamp(84px, min(30vw, 14dvh), 200px); font-weight: 700; letter-spacing: -0.04em; }
.alarm-count span { font-size: var(--t-m); font-weight: 600; margin-top: 2px; }
.alarm-say { margin: 2px 0 0; font-size: calc(var(--t-xl) * 1.05); font-weight: 700; line-height: 1.2; }
.alarm-say.big { font-size: calc(var(--t-xl) * 1.3); margin-top: 6px; }
.alarm-sub { margin: 0; font-size: var(--t-m); opacity: 0.95; }
.alarm-official { margin: 6px 0 0; font-size: var(--t-s); opacity: 0.9; max-width: 46ch; }
.alarm-also { margin: 0; font-size: var(--t-s); opacity: 0.9; }
.alarm-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; margin-top: 8px; }
.alarm-actions .btn { flex: 1 1 140px; min-height: 56px; font-size: var(--t-m); font-weight: 700; justify-content: center;
  background: rgba(255, 255, 255, 0.16); border: 2px solid rgba(255, 255, 255, 0.7); color: #fff; }
.alarm-actions .btn.ok { flex-basis: 100%; background: #fff; color: var(--k); border-color: #fff; }
.alarm-actions svg { width: 22px; height: 22px; }
.alarm-note { margin: 4px 0 0; font-size: var(--t-xs); opacity: 0.85; }
.alarm-on .tabbar, .alarm-on .strip { visibility: hidden; }

/* Экран тревоги «карта главная» (решение штаба 11.11 21:54): ракеты, БПЛА, предупреждение — карта на весь экран
   (полёт, районы, моё место, камера «עקוב»), сверху плашка цвета тревоги ≤ 25% высоты, снизу «מקלטים קרובים» и «הבנתי»,
   по краям — тонкая пульсирующая рамка. Сам слой прозрачен для пальца: карту можно двигать. */
.alarm.as-map { display: block; padding: 0; overflow: visible; background: transparent; pointer-events: none; color: #fff; }
.alarm.as-map > * { pointer-events: auto; }
.alarm.as-map[data-state='ended'] { --k: #1f7a4d; }
.am-frame { position: fixed; inset: 0; pointer-events: none !important; border: 4px solid var(--k); animation: am-pulse 1.3s ease-in-out infinite; }
@keyframes am-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.calm-motion .am-frame { animation: none; }
@media (prefers-reduced-motion: reduce) { .am-frame { animation: none; } }
.am-top { position: fixed; top: 0; inset-inline: 0; z-index: 2; max-height: 25dvh; box-sizing: border-box; overflow: visible;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'kind side' 'where count' 'say say' 'sub sub' 'also also';
  column-gap: 12px; row-gap: 2px; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  background: var(--k); color: #fff; border-radius: 0 0 18px 18px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55); text-align: start; }
.am-top.nocount { grid-template-areas: 'kind side' 'where where' 'say say' 'sub sub' 'also also'; }
.alarm[data-drill] .am-top { border-top: 6px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--drill) 0 8px, #111 8px 16px) 6 0 0 0; }
.alarm.as-map[data-drill]::before { content: none; }
.am-top .alarm-kind { grid-area: kind; font-size: var(--t-m); line-height: 1.2; }
.am-top .alarm-kind .tag { font-size: var(--t-xs); }
.am-top .alarm-mute, .am-top > .btn.ok { grid-area: side; position: static; justify-self: end; width: 44px; height: 44px; }
.am-top > .btn.ok { width: auto; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--k); border: 0; font-weight: 700; gap: 6px; }
.am-top > .btn.ok svg { width: 18px; height: 18px; }
.am-top .alarm-mute svg { width: 22px; height: 22px; }
.am-top .alarm-where { grid-area: where; justify-self: stretch; font-size: calc(var(--t-l) * 1.08); line-height: 1.2; text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.am-count { grid-area: count; display: flex; flex-direction: column; align-items: center; line-height: 0.9; }
.am-count b { font-size: clamp(64px, 19vw, 92px); font-weight: 700; letter-spacing: -0.04em; }
.am-count span { font-size: var(--t-xs); font-weight: 600; margin-top: 2px; }
.am-say { grid-area: say; margin: 0; min-width: 0; font-size: var(--t-m); font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-sub { grid-area: sub; margin: 0; font-size: var(--t-s); opacity: 0.95; }
.am-also { grid-area: also; margin: 0; font-size: var(--t-xs); opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «סכמה · הערכה» — под плашкой, на карте. */
.am-tag { position: absolute; top: calc(100% + 8px); inset-inline-start: 12px; padding: 3px 10px; border-radius: 999px; pointer-events: none;
  background: rgba(17, 24, 39, 0.72); color: #fff; font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.am-bottom { position: fixed; bottom: 0; inset-inline: 0; z-index: 2; box-sizing: border-box;
  padding: 10px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--k); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 24px -12px rgba(0, 0, 0, 0.5); text-align: center; }
.am-bottom .alarm-actions { margin: 0; flex-wrap: nowrap; }
.am-bottom .alarm-actions .btn { flex: 1 1 0; min-height: 52px; }
.am-bottom .alarm-note { margin: 6px 0 0; font-size: 11px; }
@media (min-width: 900px) {
  .am-top { top: 12px; inset-inline: 0; margin-inline: auto; width: min(760px, calc(100% - 24px)); border-radius: 18px; }
  .am-bottom { bottom: 12px; inset-inline: 0; margin-inline: auto; width: min(560px, calc(100% - 24px)); border-radius: 18px; }
}
/* Плашка сверху, кнопки снизу: шторка тревог прячется (её место — кнопки), кнопки карты — над нижними кнопками. */
.alarm-onmap:not(.alarm-ended) .sheet { display: none !important; }
.alarm-onmap:not(.alarm-ended) .stage[data-view='map'] .map-tools, .alarm-onmap:not(.alarm-ended) .map-tools { bottom: calc(var(--am-b, 0px) + 10px); opacity: 1; pointer-events: auto; }
.alarm-onmap:not(.alarm-ended) .inst, .alarm-onmap:not(.alarm-ended) .upd { visibility: hidden; }

/* Зал: тревога в Хайфе на время отсчёта — вид «B» (верх экрана огромно), потом сам сворачивается в «A». */
.hall-alert { --k: var(--siren); position: absolute !important; inset-inline: 0; top: 0; height: min(58%, 560px); z-index: 30; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 28px 48px;
  background: var(--k); color: #fff; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6); }
.hall-alert[data-family='uav'] { --k: #5b33c4; }
.hall-alert[data-drill]::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 10px; background: repeating-linear-gradient(-45deg, var(--drill) 0 12px, #111 12px 24px); }
.ha-text { min-width: 0; }
.ha-kind { margin: 0; font-size: clamp(34px, 3.4vw, 64px); font-weight: 700; line-height: 1.1; }
.ha-where { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: clamp(26px, 2.4vw, 46px); font-weight: 600; line-height: 1.15; }
.ha-go { margin: 18px 0 0; font-size: clamp(18px, 1.5vw, 28px); opacity: 0.95; }
.ha-count { display: flex; flex-direction: column; align-items: center; line-height: 0.95; }
.ha-count b { font-size: clamp(110px, 12vw, 240px); font-weight: 700; letter-spacing: -0.04em; }
.ha-count span { font-size: clamp(20px, 1.6vw, 30px); font-weight: 600; }
.ha-hint { position: absolute; inset-inline-end: 18px; bottom: 14px; margin: 0; font-size: var(--t-xs); opacity: 0.75; }
.hall-b .mode-hamal .strip, .mode-hamal.hall-b .strip { display: none; }

/* «עוד / Ещё» */
.more-list { margin-top: 16px; }
.more-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: start; font-weight: 500; }
.more-row:first-child { border-top: 0; }
.more-row > span { flex: 1; }
.more-row svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); }
.more-row .chev { color: var(--muted); width: 18px; height: 18px; }
[dir='rtl'] .more-row .chev { transform: scaleX(-1); }

/* «בדיקת מערכת» */
.chk-run { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.chk-sum[data-level='ok'] { color: var(--calm); }
.chk-sum[data-level='warn'] { color: var(--pre); }
.chk-list { list-style: none; margin: 14px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.chk-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line); }
.chk-list li:first-child { border-top: 0; }
.chk-list li svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.chk-list li[data-level='ok'] svg { color: var(--calm); }
.chk-list li[data-level='warn'] svg { color: var(--pre); }
.chk-list li[data-level='bad'] svg { color: var(--siren); }
.chk-list li span { display: flex; flex-direction: column; }
.chk-list li small { color: var(--muted); font-size: var(--t-s); }
.about-c { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.about-c svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2; }

/* Первый запуск */
.intro { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 12px; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.intro > div { flex: 1 1 260px; }
.intro b { font-size: var(--t-m); }
.intro p { margin: 4px 0 0; }
.intro .intro-c { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; color: var(--accent); }
.intro .intro-c svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; margin-top: 3px; }

/* Заставка установленного приложения */
.splash { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 40%, #0f8f80, #075a51); color: #fff; text-align: center; transition: opacity 0.35s; }
.splash img { width: 132px; height: 132px; border-radius: 30px; margin-bottom: 10px; }
.splash b { font-size: 30px; font-weight: 700; }
.splash span { font-size: 16px; opacity: 0.9; padding: 0 24px; }
.splash.out { opacity: 0; }
/* «+ / −» карты — под плашкой тревоги, не за ней. */
.alarm-onmap #map .maplibregl-ctrl-top-right, .alarm-onmap #map .maplibregl-ctrl-top-left { top: var(--am-t, 0px); }
