:root {
  --bg: #ffffff;
  --bg2: #f5f8fb;
  --card: #ffffff;
  --card2: #eef3f7;
  --text: #0b1b2b;
  --muted: #5b6b7c;
  --accent: #157a5a;
  --accent2: #0d7a6a;
  --danger: #c0392b;
  --warn: #a9761a;
  --border: #e6ebf1;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11,27,43,.08);
  --surface: rgba(255,255,255,.88);
  --surface2: rgba(255,255,255,.97);
  --overlay: rgba(8,14,24,.42);
  --input-bg: #ffffff;
  --mono-bg: #f5f8fb;
  --pill-bg: #e8eef4;
  --close: #7b8a9a;
  --text-soft: #33465a;
  --map-bg: #edf3f0;
  --on-accent: #ffffff;
  --gate-tint: none;
}

html[data-theme="dark"] {
  --bg: #0a1119;
  --bg2: #0e1720;
  --card: #101b25;
  --card2: #17242f;
  --text: #e8eef6;
  --muted: #93a3b4;
  --accent: #2fbf8b;
  --accent2: #6ea8ff;
  --danger: #ff7a7a;
  --warn: #ffc966;
  --border: #1c2a38;
  --shadow: 0 14px 34px rgba(0,0,0,.5);
  --surface: rgba(10,17,25,.86);
  --surface2: rgba(10,17,25,.96);
  --overlay: rgba(4,8,13,.62);
  --input-bg: #0d1620;
  --mono-bg: #0b1220;
  --pill-bg: #22304a;
  --close: #93a3bd;
  --text-soft: #c3cfdb;
  --map-bg: #0c1620;
  --on-accent: #06231a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow-x: hidden; }
html { background: var(--bg); }
body { overscroll-behavior-x: none; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(78,195,138,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(110,168,255,.07), transparent 55%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 22px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-logo { font-size: 22px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand-sub { color: var(--muted); font-size: 13px; }

.nav { display: flex; gap: 6px; margin-left: auto; }
.nav-link {
  color: var(--muted); text-decoration: none;
  padding: 8px 14px; border-radius: 10px; font-size: 14px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--card2); }
.nav-link.active { color: var(--text); background: var(--card2); }

.btn {
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); padding: 9px 16px; border-radius: 10px;
  font-size: 14px; cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.1); color: var(--on-accent); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- layout ---------- */
.layout {
  /* панели справа больше нет — карта занимает всё место (иначе остаётся пустая полоса) */
  flex: 1; display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0; min-height: 0;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: 1fr; }
}

.map-wrap { position: relative; min-height: 0; /* карта не должна «протекать» подписями поверх панелей */
  isolation: isolate; contain: paint; }
#map { position: relative; z-index: 0; }
#map { width: 100%; height: 100%; min-height: 320px; background: var(--map-bg); }

/* ---------- legend ---------- */
.map-legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 10;
  background: var(--surface); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.swatch.paid    { background: rgba(76,195,138,.75); border: 1.5px solid #4cc38a; }
.swatch.exempt  { background: rgba(140,152,171,.35); border: 1.5px solid #8b98ab; }
.swatch.pending { background: rgba(255,122,122,.20); border: 1.5px solid #ff7a7a; }
.swatch.chat_both { background: rgba(76,195,138,.75); border: 1.5px solid #4cc38a; }
.swatch.chat_tg   { background: rgba(110,168,255,.60); border: 1.5px solid #6ea8ff; }
.swatch.chat_max  { background: rgba(255,201,102,.60); border: 1.5px solid #ffc966; }
.swatch.chat_none { background: rgba(140,152,171,.18); border: 1.5px solid #5a6a80; }
.swatch.bot_both { background: rgba(76,195,138,.75); border: 1.5px solid #4cc38a; }
.swatch.bot_tg   { background: rgba(110,168,255,.60); border: 1.5px solid #6ea8ff; }
.swatch.bot_max  { background: rgba(255,201,102,.60); border: 1.5px solid #ffc966; }
.swatch.bot_none { background: rgba(140,152,171,.18); border: 1.5px solid #5a6a80; }
.swatch.presence_in   { background: rgba(76,195,138,.75); border: 1.5px solid #4cc38a; }
.swatch.presence_off  { background: rgba(140,152,171,.18); border: 1.5px solid #5a6a80; }
.swatch.presence_paid { background: rgba(43,127,255,.70); border: 1.5px solid #2b7fff; }
.swatch.presence_paid_t1 { background: #a8dcff; border: 1.5px solid #7abeff; }
.swatch.presence_paid_t2 { background: #2f7cf6; border: 1.5px solid #2f7cf6; }
.swatch.presence_paid_t3 { background: #1446b4; border: 1.5px solid #1446b4; }
.swatch.presence_paid_t4 { background: #071e5c; border: 1.5px solid #071e5c; }

.view-switch { top: 14px; left: 14px; bottom: auto; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 6px; }
.btn-switch { border: none; background: transparent; padding: 6px 12px; font-size: 12.5px; color: var(--muted); border-radius: 8px; }
.btn-switch.active { background: var(--card2); color: var(--text); }

/* чёрная точка в левом верхнем углу: включает и выключает метку «вы здесь» */
.map-dot { position: absolute; left: 10px; top: 10px; z-index: 14; width: 12px; height: 12px;
  padding: 0; border: 0; border-radius: 50%; background: #10161d; box-shadow: none;
  cursor: pointer; opacity: .45; -webkit-appearance: none; appearance: none; outline: none; }
.map-dot[aria-pressed="true"] { background: #4ea1ff; opacity: 1;
  box-shadow: 0 0 0 3px rgba(78,161,255,.25); }
.map-dot:hover { opacity: .9; }

/* маркер геолокации «Вы здесь» */
.me-marker {
  width: 18px; height: 18px; border-radius: 50%;
  background: #4ea1ff; border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  animation: me-pulse 1.8s ease-out infinite;
}
@keyframes me-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(78,161,255,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(78,161,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(78,161,255,0); }
}

/* юридические страницы */
.legal-page .legal { max-width: 860px; margin: 28px auto 60px; padding: 0 22px; }
.legal h1 { font-size: 26px; margin: 18px 0 6px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p { color: var(--text-soft); font-size: 14.5px; line-height: 1.7; margin: 8px 0; }
.legal a { color: var(--accent2); }
.fill { background: rgba(255,201,102,.15); border-bottom: 1px dashed var(--warn);
  padding: 1px 6px; border-radius: 4px; color: var(--warn); }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* cookie/гео-баннер */
.legal-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 200;
  max-width: 880px; width: calc(100% - 32px);
  background: var(--surface2); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px 16px;
  display: flex; gap: 14px; align-items: center;
}
.legal-banner-text { font-size: 13px; color: var(--muted); line-height: 1.55; }
.legal-banner-text a { color: var(--accent2); }
.legal-banner .btn { flex-shrink: 0; }
.legal-banner[hidden] { display: none; }

.map-placeholder {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--muted); font-size: 13.5px; line-height: 1.6;
  background: repeating-linear-gradient(45deg, var(--map-bg), var(--map-bg) 12px, var(--bg2) 12px, var(--bg2) 24px);
}

.layer-bar {
  position: absolute; top: 10px; right: 10px; z-index: 12;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px;
}
.layer-bar[hidden] { display: none; }   /* у .layer-bar свой display, атрибут hidden сам по себе не работает */
.layer-bar select, .layer-bar input {
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 8px; font-size: 12.5px; max-width: 240px;
}
/* список сборов и голосований: стрелка и цвета как у остальных контролов */
.layer-bar select {
  -webkit-appearance: none; appearance: none;
  padding: 8px 28px 8px 10px; border-radius: 10px; font-size: 13px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b98ab' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 10px 6px;
  text-overflow: ellipsis;
}
.layer-bar select option { background: var(--card); color: var(--text); }
.layer-bar select:focus-visible { outline: none; border-color: var(--accent); }
/* Нативный попап <select> в тёмной теме остаётся системно-белым (вебвью мессенджеров и часть
   браузеров игнорируют color-scheme/option). Поэтому списки сборов, голосований, месяцев новостей
   и периода пульса рисуем своим меню на переменных темы, а сам <select> держим скрытым как модель. */
.kp-select { position: relative; min-width: 0; }
select[data-kp-select] { display: none; }
.kp-select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; text-align: left;
  cursor: pointer; min-height: 36px;
}
.kp-select-btn:focus-visible { outline: none; border-color: var(--accent); }
.kp-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-select-btn::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 6px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b98ab' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 10px 6px;
}
.kp-select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); padding: 4px;
  max-height: min(320px, 60vh); overflow-y: auto;
}
.kp-select-menu[hidden] { display: none; }
.kp-select.up .kp-select-menu { top: auto; bottom: calc(100% + 4px); }
.kp-select-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); font: inherit; font-size: 13px; line-height: 1.35;
  padding: 8px; border-radius: 7px; cursor: pointer;
}
.kp-select-item:hover, .kp-select-item:focus-visible { background: rgba(76,195,138,.16); outline: none; }
.kp-select-item[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.layer-bar .kp-select { width: 240px; max-width: 240px; }
.digests-bar .kp-select { width: auto; min-width: 160px; }
@media (max-width: 860px) {
  .layer-bar .kp-select { flex: 1; width: auto; max-width: none; }
  .digests-bar .kp-select { flex: 1; min-width: 0; }
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
@media (max-width: 860px) {
  .layer-bar { left: 10px; right: 10px; top: auto; bottom: 10px; flex-direction: row; }
  .layer-bar select { flex: 1; max-width: none; }
  .layer-bar input { max-width: 130px; }
  /* список сборов/голосований внизу: легенду поднимаем, чтобы он её не перекрывал */
  .map-wrap.has-layer-bar .map-legend { bottom: 74px; }
}

.map-hint[hidden] { display: none; }
.map-hint {
  position: absolute; z-index: 11; pointer-events: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: 13px;
  box-shadow: var(--shadow); transform: translate(-50%, -120%);
  white-space: nowrap;
}

/* ---------- panel ---------- */
.panel > .panel-summary { list-style: none; display: none; align-items: center;
  justify-content: space-between; gap: 10px; cursor: pointer; min-height: 44px; }
.panel > .panel-summary::-webkit-details-marker { display: none; }
.panel > .panel-summary .chev { color: var(--muted); font-size: 12px; line-height: 1; transition: transform .2s; }
.panel[open] > .panel-summary .chev { transform: rotate(180deg); }
.panel {
  background: var(--bg2); border-left: 1px solid var(--border);
  overflow-y: auto; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 18px;
}
@media (max-width: 860px) { .panel { border-left: none; border-top: 1px solid var(--border); } }

.panel-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.panel-section h2 { font-size: 15px; margin-bottom: 10px; letter-spacing: .2px; }
.panel-section > summary { list-style: none; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; cursor: pointer; min-height: 28px; }
.panel-section > summary::-webkit-details-marker { display: none; }
.panel-section > summary > h2 { margin-bottom: 0; }
.panel-section[open] > summary { margin-bottom: 10px; }
.panel-section > summary .chev { color: var(--muted); font-size: 12px; line-height: 1; transition: transform .2s; }
.panel-section[open] > summary .chev { transform: rotate(180deg); }
@media (max-width: 860px) {
  .panel-section:not([open]) { padding-top: 14px; padding-bottom: 14px; }
  .panel-section > summary { min-height: 44px; }
}
.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* карточка участка */
.card-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.card-line:last-child { border-bottom: none; }
.card-line .k { color: var(--muted); }
.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.paid    { background: rgba(76,195,138,.15); color: var(--accent); border: 1px solid rgba(76,195,138,.4); }
.badge.pending { background: rgba(255,122,122,.12); color: var(--danger); border: 1px solid rgba(255,122,122,.4); }
.badge.exempt  { background: rgba(140,152,171,.15); color: var(--muted); border: 1px solid rgba(140,152,171,.4); }
.badge.none    { background: rgba(110,168,255,.12); color: var(--accent2); border: 1px solid rgba(110,168,255,.4); }
.badge.chat_both { background: rgba(76,195,138,.15); color: var(--accent); border: 1px solid rgba(76,195,138,.4); }
.badge.presence_in   { background: rgba(76,195,138,.15); color: #4cc38a; border: 1px solid rgba(76,195,138,.4); }
.badge.presence_off  { background: rgba(140,152,171,.12); color: #8b98ab; border: 1px solid rgba(140,152,171,.35); }
.badge.presence_paid { background: rgba(43,127,255,.15); color: #2b7fff; border: 1px solid rgba(43,127,255,.45); }
.badge.chat_tg   { background: rgba(110,168,255,.15); color: var(--accent2); border: 1px solid rgba(110,168,255,.4); }
.badge.chat_max  { background: rgba(255,201,102,.15); color: var(--warn); border: 1px solid rgba(255,201,102,.4); }
.badge.chat_none { background: rgba(140,152,171,.12); color: var(--muted); border: 1px solid rgba(140,152,171,.4); }

/* прогресс сбора */
.progress { height: 10px; background: var(--card2); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), #9be8c4); border-radius: 999px; transition: width .6s ease; }
.sbor-stat { font-size: 13px; color: var(--muted); }

.footer {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 22px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
  background: var(--bg2);
}

/* кнопка «Открыть Яндекс Карты» от ymaps3 висела поверх нашей легенды — прячем её;
   обязательный копирайт «© Яндекс / Условия использования» и логотип остаются */
.ymaps3--controls_bottom.ymaps3--controls_left > .ymaps3--control { display: none; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow); z-index: 100; opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
#toast.show { opacity: 1; }

/* ---------- мобильная адаптация ---------- */
html { -webkit-text-size-adjust: 100%; }

/* шапка: одна строка (бренд + тема + профиль), ниже — строка разделов */
.topbar { flex-wrap: wrap; }
.brand { flex: 1 1 auto; min-width: 0; }
.nav { flex: 1 1 100%; order: 4; margin-left: 0; }
.theme-switch { order: 2; margin-left: auto; }
.auth { order: 3; margin-left: 8px; }
.theme-cycle { width: 38px; height: 38px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 18px; line-height: 1; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.theme-cycle:hover { background: var(--card2); }
.auth .chip::before { content: "👤"; margin-right: 6px; }

/* выпадающие разделы меню */
.nav-group { position: relative; }
.nav-btn { font: inherit; color: var(--muted); background: transparent; border: 1px solid transparent;
  padding: 7px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.nav-btn::after { content: "▾"; margin-left: 6px; font-size: 11px; opacity: .55; }
.nav-btn-icon { min-width: 40px; justify-content: center; font-weight: 700; font-size: 16px; }
.nav-btn-icon::after { content: none; }
.nav-btn:hover { color: var(--text); background: var(--card2); }
.nav-group:has(.nav-link.active) .nav-btn { color: var(--text); background: var(--card2); }
.nav-group.open .nav-btn { color: var(--text); background: var(--card2); border-color: var(--border); }
.nav-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 200px; max-width: calc(100vw - 16px); padding: 6px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.28);
  flex-direction: column; gap: 2px; }
.nav-group.open .nav-menu { display: flex; }
.nav-menu .nav-link { display: block; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
.nav-menu button.nav-link { width: 100%; text-align: left; background: transparent; border: 0;
  font: inherit; color: var(--muted); cursor: pointer; }
.nav-menu button.nav-link:hover { color: var(--text); background: var(--card2); }
.login-item::before { content: "👤"; margin-right: 8px; }

/* мобильный первый экран: вкладки-таблетки, прокрутка пальцем, цель нажатия 44 px */
@media (max-width: 860px) {
  .nav { position: sticky; top: 0; z-index: 30; background: var(--bg);
    padding: 4px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { min-height: 44px; display: inline-flex; align-items: center;
    padding: 0 14px; font-size: 14px; border-radius: 10px; scroll-snap-align: start;
    border: 1px solid transparent; }
  .nav-btn { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 10px;
    display: inline-flex; align-items: center; }
  /* выпадашка фиксированная (иначе обрезает .nav с прокруткой) и по ширине кнопки */
  .nav-menu { position: fixed; left: var(--menu-left, 8px); right: auto;
    top: var(--menu-top, 130px); bottom: auto; width: max-content; min-width: 176px;
    max-width: min(258px, calc(100vw - 16px)); max-height: 62vh; overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0,0,0,.4); }
  .topbar { padding: 6px 10px; gap: 4px 8px; }
  .brand-name { font-size: 15px; }
  .auth { gap: 6px; order: 2; }
  .auth .btn { padding: 6px 10px; font-size: 12px; }
  .theme-switch { padding: 2px; order: 2; margin-left: auto; }
  .theme-switch button { padding: 4px 9px; font-size: 12px; }
  .nav-menu .nav-link { min-height: 44px; display: flex; align-items: center; font-size: 15px; }
  .nav-link.active { border-color: var(--border); }
}

@media (max-width: 860px) {
  html, body { height: 100%; }
  body { min-height: 100vh; min-height: 100dvh; }

  .topbar { flex-wrap: wrap; gap: 6px 8px; padding: 8px 12px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 16px; }
  .brand-logo { font-size: 20px; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-link { padding: 7px 11px; font-size: 13px; white-space: nowrap; }
  .auth { margin-left: auto; }
  #btn-login { padding: 8px 12px; font-size: 13px; }

  .layout { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    grid-template-columns: none; grid-template-rows: none; }
  .map-wrap { flex: 1 1 auto; height: auto; min-height: 240px; }
  #map { min-height: 240px; }

  .panel { flex: 0 0 auto; border-left: none; border-top: 1px solid var(--border); padding: 14px 12px; gap: 14px; overflow: visible; }
  .panel > .panel-summary { display: flex; font-size: 14px; font-weight: 600; color: var(--text); }
  .panel:not([open]) { padding: 12px; }
  .panel:not([open]) > .panel-summary { min-height: 44px; }
  .panel-section { padding: 14px; }
  .panel-section:not([open]) { padding: 9px 14px; }
  .panel-section:not([open]) > summary { min-height: 40px; }

  .map-legend { left: 10px; bottom: 30px; padding: 8px 10px; font-size: 12px; gap: 5px; max-height: 34dvh; overflow: auto; }
  .map-legend.view-switch { top: 10px; left: 10px; bottom: auto; right: auto; height: fit-content; padding: 5px; gap: 4px; }
  .btn-switch { padding: 8px 11px; font-size: 12px; }

  .btn { min-height: 44px; padding: 11px 16px; }
  .card-actions .btn { width: 100%; }

  .legal-banner { flex-direction: column; align-items: stretch; gap: 10px; width: calc(100% - 20px);
    padding: 12px 14px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); max-height: 62dvh; overflow-y: auto; }
  .legal-banner .btn { width: 100%; }
  .legal-banner-text { font-size: 12.5px; }

  #toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 24px); }

  .footer { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 11px; }
  .footer > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .footer .foot-api { display: none; }
  .footer .footer-links { flex-shrink: 0; }
  #map-status { flex-shrink: 0; text-overflow: ellipsis; }

  .legal-page .legal { margin: 18px auto 40px; padding: 0 14px; }
  .legal h1 { font-size: 22px; }
}

/* телефон в горизонтали: карта на весь экран, меню в одну строку */
@media (orientation: landscape) and (max-height: 560px) {
  .layout { display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; min-height: 0; }
  .map-wrap { height: auto; min-height: 200px; }
  #map { min-height: 200px; }
  .nav { width: auto; order: 2; }
  .auth { order: 3; }
  .legal-banner { flex-direction: row; align-items: center; max-height: 46dvh; }
  .legal-banner .btn { width: auto; }
}

/* узкие экраны */
@media (max-width: 380px) {
  .btn-switch { padding: 7px 9px; font-size: 11.5px; }
  .map-legend { font-size: 11.5px; padding: 7px 9px; }
}

/* на тач-устройствах hover-эффекты не залипают */
@media (hover: none) {
  .btn:hover { border-color: var(--border); color: var(--text); }
  .btn-primary:hover { filter: none; }
  .nav-link:hover { color: var(--muted); background: transparent; }
  .btn:active { border-color: var(--accent); }
}


/* ---- вход (M1) ---- */
.modal { position: fixed; inset: 0; background: var(--overlay); display: flex;
  align-items: center; justify-content: center; z-index: 70; padding: 16px;
  overflow-y: auto; overscroll-behavior: contain; }
.modal[hidden] { display: none; }
.modal-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; max-width: 420px; width: 100%; position: relative; color: var(--text);
  max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 700px) {
  .modal { padding: 10px; align-items: center; }
  .modal-card { padding: 16px; max-width: 100%; max-height: calc(100dvh - 20px); }
}
.modal-card h2 { margin: 0 0 10px; font-size: 18px; }
.modal-close { position: absolute; top: 8px; right: 10px; background: none; border: 0;
  color: var(--close); font-size: 22px; cursor: pointer; }
#auth-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
#auth-links code { background: var(--mono-bg); padding: 4px 6px; border-radius: 6px;
  display: inline-block; margin-top: 6px; word-break: break-all; }
.auth-note { min-height: 18px; margin: 12px 0 0; font-size: 13px; }
.pill { background: var(--pill-bg); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.dev-list { list-style: none; padding: 0; margin: 6px 0 12px; }
.dev-list li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.btn-mini { padding: 2px 8px; font-size: 12px; }

.auth-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 26px;
  letter-spacing: 4px; text-align: center; background: var(--mono-bg); border: 1px dashed var(--border);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0; user-select: all; }
/* ---------- гейт: до входа карта и данные закрыты (§5) ---------- */
.map-gate[hidden] { display: none; }
.map-gate { position: absolute; inset: 0; overflow: hidden; z-index: 20; background: var(--map-bg); }
.gate-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gate-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(430px, 88%); padding: 22px 24px; text-align: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px);
}
.gate-card h3 { margin: 0 0 10px; font-size: 18px; }
.gate-card .muted { margin: 0; font-size: 14px; line-height: 1.45; }
.gate-card .btn { margin-top: 16px; }
body.gated #view-switch, body.gated #legend, body.gated #layer-bar { display: none !important; }

/* карточка участка: всплывает поверх карты (заменила нижнюю панель) */
.plot-card { position: absolute; left: 12px; bottom: 12px; z-index: 15;
  width: min(360px, calc(100% - 24px)); max-height: 60%; overflow: auto;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 16px 44px rgba(0,0,0,.5); }
.plot-card[hidden] { display: none; }
.plot-card h2 { font-size: 15px; margin: 0 0 10px; letter-spacing: .2px; }
.plot-card-close { position: absolute; top: 4px; right: 8px; background: none; border: 0;
  color: var(--close); font-size: 20px; cursor: pointer; line-height: 1; }
@media (max-width: 700px) { .plot-card { left: 8px; right: 8px; width: auto; bottom: 8px; max-height: 52%; } }

/* ---- предложения жителей (§19) ---- */
.ideas-panel { position: absolute; inset: 0; z-index: 20; overflow: auto;
  background: var(--surface2); padding: 18px 20px 28px;
  scrollbar-width: none; -ms-overflow-style: none; }
.ideas-panel::-webkit-scrollbar { width: 0; height: 0; display: none; }
.ideas-panel[hidden] { display: none; }
.ideas-panel h2 { font-size: 20px; margin: 0 0 8px; }
.ideas-panel .plot-card-close { top: 10px; right: 14px; }
.ideas-form { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 18px; max-width: 720px; }
.ideas-form input, .ideas-form textarea, .idea-comment-form textarea, .modal-card input[type="text"] {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; }
.ideas-form input:focus, .ideas-form textarea:focus, .idea-comment-form textarea:focus,
.modal-card input[type="text"]:focus { outline: none; border-color: var(--accent); }
.ideas-form button, .idea-comment-form button { align-self: flex-start; }
.ideas-list { display: flex; flex-direction: column; gap: 12px; max-width: 780px; }
.idea-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; }
.idea-head { display: flex; align-items: baseline; gap: 10px; }
.idea-title { font-size: 15.5px; margin: 0; flex: 1; }
.idea-votes { background: rgba(76,195,138,.16); border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.idea-body { color: var(--text-soft); font-size: 14px; line-height: 1.6; margin: 8px 0 0; white-space: pre-wrap; }
.idea-meta { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.idea-voters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px;
  color: var(--muted); margin-top: 8px; }
.idea-voter { background: var(--card2); border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 9px; color: var(--text); }
.idea-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.idea-comments { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.idea-comment { padding: 6px 0; border-bottom: 1px dashed rgba(42,54,72,.7); }
.idea-comment-head { font-size: 12.5px; color: var(--muted); }
.idea-comment-body { font-size: 14px; line-height: 1.55; margin-top: 2px; white-space: pre-wrap; }
.idea-comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
@media (max-width: 700px) { .ideas-panel { padding: 14px 12px 24px; } }


/* ---------- тема оформления ---------- */
.theme-switch { display: flex; gap: 2px; background: var(--card2); border: 1px solid var(--border);
  border-radius: 10px; padding: 2px; }
.theme-switch button { border: 0; background: transparent; color: var(--muted); font: inherit;
  font-size: 12.5px; padding: 6px 10px; border-radius: 8px; cursor: pointer; transition: color .15s, background .15s; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* гейт до входа: скрин карты тонируется под тему */
.gate-card { z-index: 2; }
.map-gate::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,17,25,0), rgba(10,17,25,0)); transition: background .3s; }
html[data-theme="dark"] .map-gate::after { background: linear-gradient(180deg, rgba(10,17,25,.10), rgba(10,17,25,.50)); }
html[data-theme="light"] .map-gate::after { background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.18)); }
html[data-theme="dark"] .gate-img { filter: brightness(.62) saturate(.55) contrast(1.05); }
html[data-theme="light"] .gate-img { filter: invert(1) hue-rotate(180deg) brightness(1.04) saturate(.45) contrast(.92); }
/* статичная карта Яндекса: без инверсии и фильтров — на изображении его копирайт */
html[data-theme] .gate-img[data-map="yandex"] { filter: none; }
/* зелёный тон поверх скрина — под палитру сайта */
.map-gate::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: #1f9d6b; mix-blend-mode: color; opacity: 0; transition: opacity .3s; }
html[data-theme="dark"] .map-gate::before { opacity: .55; }
html[data-theme="light"] .map-gate::before { opacity: .42; }

@media (max-width: 860px) {
  .theme-switch { order: 2; }
  .theme-switch button { padding: 6px 8px; font-size: 11.5px; }
}
/* ---------- слой «Чат»: давность ---------- */
.chat-when {
  position: absolute; top: 10px; right: 10px; z-index: 12; width: 240px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow);
}
.chat-when[hidden] { display: none; }
/* узкая ручка: тонкая полоса с маркером положения ползунка */
.cw-handle { display: block; width: 100%; height: 14px; padding: 0; margin-bottom: 8px;
  border: 0; background: transparent; cursor: pointer; position: relative; }
.cw-track { position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, #56db40 0%, #b9e05a 33%, #ffd21e 55%, #ed4543 78%, #8b98ab 100%);
  opacity: .45; }
.cw-knob { position: absolute; top: 2px; left: 0; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(0,0,0,.35); transition: left .15s ease; }
.chat-when.collapsed { width: 132px; padding: 4px 8px; }
.chat-when.collapsed .cw-body { display: none; }
/* ручка-индикатор видна только в свёрнутом виде: иначе получается второй ползунок */
.chat-when:not(.collapsed) .cw-handle { display: none; }
.chat-when-head { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; cursor: pointer; user-select: none; white-space: nowrap; }
.chat-when-head::after { content: "⌃"; font-size: 12px; opacity: .6; }
.chat-when.collapsed .cw-handle { margin-bottom: 0; }
.chat-when-head { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chat-when input[type="range"] { width: 100%; accent-color: var(--accent); }
.chat-when-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 860px) {
  /* держим панельку сверху справа: внизу её перекрывает легенда */
  .chat-when { left: auto; right: 10px; top: 10px; width: 234px; padding: 8px 10px; }
  .chat-when-labels { font-size: 9.5px; }
}
/* ---------- «Онлайн-пульс» (админ) ---------- */
.pulse-panel {
  position: absolute; top: 10px; right: 10px; z-index: 13; width: 250px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px;
}
.pulse-panel[hidden] { display: none; }
.pulse-clock { color: var(--text); font-variant-numeric: tabular-nums; }
.pulse-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.pulse-row input[type="range"] { flex: 1; min-width: 0; accent-color: #ff5f5f; }
.pulse-row b { color: var(--text); font-weight: 600; min-width: 16px; text-align: right; }
.pulse-row select { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 3px 6px; font-size: 11.5px; }
.pulse-btns { display: flex; gap: 6px; }
.pulse-btns .btn { flex: 1; }
@media (max-width: 860px) { .pulse-panel { width: 220px; right: 8px; top: 8px; } }
/* ---------- «сердцебиение» посёлка: спокойная линия внизу ---------- */
.heart-strip {
  position: fixed; left: 0; right: 0; bottom: 0; height: 46px; z-index: 45;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg2), transparent);
  border-top: 1px solid rgba(76,195,138,.10);
}
.heart-strip[hidden] { display: none; }
#heart-canvas { width: 100%; height: 100%; display: block; }
.heart-label {
  position: absolute; left: 12px; top: 5px; font-size: 10px; color: rgba(145,165,185,.60);
  letter-spacing: .04em; text-transform: uppercase;
}
.heart-label b { color: rgba(120,200,160,.85); font-size: 11.5px; }
/* подсказка на полосе «пульса» */
.heart-tip {
  position: fixed; z-index: 46; pointer-events: none; display: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 9px; padding: 6px 10px; font-size: 11px; color: var(--text);
  white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.heart-tip b { color: rgba(130,210,170,.95); font-weight: 600; }
.heart-tip .kind { color: rgba(145,165,185,.8); margin-left: 6px; }
/* ---------- карта не загрузилась: подложка + объяснение ---------- */
.map-fallback { position: absolute; inset: 0; overflow: hidden; }
.map-fallback img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.map-fallback-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, 88%); padding: 20px 22px; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.map-fallback-card b { display: block; margin-bottom: 8px; font-size: 15px; }
.map-fallback-card p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
/* подсказка с номером участка */
.plot-hint {
  /* «стеклянная» пилюля в цвете участка: не чёрная плашка, а подсвеченное стекло */
  --ph-hue: 76, 195, 138;
  position: fixed; z-index: 60; pointer-events: none;
  transform: translate(-50%, -150%) scale(.96);
  padding: 3px 9px; border-radius: 4px;   /* угловатый бейдж: округлость в карте лишняя */
  background: rgba(var(--ph-hue), .22);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(var(--ph-hue), .55);
  color: #f4fffa; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 8px 22px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.12);
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  transition: transform .12s ease;
  animation: ph-in .14s ease-out forwards;
}
.plot-hint::after {           /* тонкая риска-указатель вместо хвостика */
  content: "";
  position: absolute; left: 50%; bottom: -6px;
  width: 1px; height: 5px; margin-left: -.5px;
  background: rgba(var(--ph-hue), .75);
}
@keyframes ph-in {
  from { opacity: 0; transform: translate(-50%, -140%) scale(.9); }
  to   { opacity: 1; transform: translate(-50%, -150%) scale(1); }
}
.plot-hint[hidden] { display: none; }
/* сегмент-переключатель источника: TG · MAX · Оба */
.seg { display: flex; gap: 4px; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.seg button { flex: 1; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 11px; padding: 3px 6px; border-radius: 6px; }
.seg button.on { background: rgba(76,195,138,.20); color: var(--text); }

/* ---- дайджесты ---- */
.digests-bar { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; flex-wrap: wrap; }
.digests-bar select { background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; }
.digest-card summary { cursor: pointer; display: block; list-style: none; line-height: 1.5; }
.digest-card summary::-webkit-details-marker { display: none; }
.digest-day { color: var(--muted); font-size: 12.5px; white-space: nowrap; margin-right: 8px; }
.digest-title { font-weight: 600; font-size: 14.5px; display: inline; }
.digest-src { font-size: 11px; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 0 8px; }
.digest-body { margin-top: 10px; color: var(--text); font-size: 14px; line-height: 1.65; }
.digest-head-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.digest-toggle { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 0 2px; line-height: 1; margin-right: 6px; }
.digest-toggle:hover { color: var(--accent); }
.digest-topic { border-top: 1px solid var(--border); padding: 7px 0; }
.digest-topic:first-child { border-top: 0; padding-top: 0; }
.digest-topic summary { cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; }
.digest-topic summary::-webkit-details-marker { display: none; }
.digest-topic-body { margin: 6px 0 2px 14px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.digest-topic-plain { border-top: 1px solid var(--border); padding: 7px 0; font-weight: 600; font-size: 13.5px; }
  white-space: pre-wrap; max-height: 60vh; overflow: auto; }

/* ---- специалисты ---- */
.spec-bar { display: flex; gap: 12px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.spec-bar input { flex: 1; min-width: 220px; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; }
.spec-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.spec-chip { background: var(--card2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.spec-chip.on { color: var(--text); border-color: var(--accent); }
.spec-card .spec-head { display: flex; gap: 8px; align-items: center; }
.spec-cat { font-size: 11.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; }
.spec-promo { font-size: 11px; border: 1px solid var(--warn); color: var(--warn);
  border-radius: 999px; padding: 0 8px; }
.spec-name { font-weight: 600; font-size: 15.5px; margin-top: 4px; }
.spec-contact { margin-top: 4px; font-size: 15px; }
.spec-contact a { color: var(--accent2); text-decoration: none; }
.spec-note { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.5; }
.spec-cta { margin-top: 18px; padding: 14px; border: 1px dashed var(--border);
  border-radius: var(--radius); max-width: 780px; }
.spec-cta p { margin: 6px 0 10px; }
/* оценки и отзывы */
.spec-rate { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.spec-rate button { background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 2px 8px; cursor: pointer; color: var(--text); font-size: 13px; line-height: 1.4; }
.spec-rate button:hover { border-color: var(--accent); }
.spec-rate .spec-rev-toggle { color: var(--muted); font-size: 12px; }
.spec-rev-box { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.spec-rev { font-size: 12.5px; margin-bottom: 6px; }
.spec-rev-mark { margin-right: 4px; }
.spec-rev-form textarea { width: 100%; box-sizing: border-box; background: var(--card2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12px; resize: vertical; }
.spec-rev-actions { display: flex; gap: 6px; margin-top: 6px; }
.spec-rec-row { margin-top: 8px; }
.spec-contact-rec { background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 3px 9px; cursor: pointer; color: var(--text); font-size: 12px; }
.spec-contact-rec:hover { border-color: var(--accent); }
.spec-contact-box { margin-top: 8px; }
.spec-contact-box textarea { width: 100%; box-sizing: border-box; background: var(--card2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12px; }
.chat-when-count { margin-top: 6px; font-size: 10.5px; line-height: 1.4; color: var(--muted); }
.chat-when-labels b { color: var(--text); font-weight: 600; margin-left: 2px; }

/* стартовая страница: авторизация на фоне карты */
.gate-logo { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.gate-card h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: .2px; }
.gate-card .muted { margin: 0 0 14px; }
.gate-hint { margin: 12px 0 0; font-size: 12.5px; opacity: .8; }
@media (max-width: 700px) {
  .gate-card { width: min(360px, 90%); padding: 20px 18px; }
  .gate-card h1 { font-size: 21px; }
}
.swatch.vote_for { background: rgba(90,169,230,.75); border: 1.5px solid #5aa9e6; }
.swatch.vote_in  { background: rgba(86,219,64,.70); border: 1.5px solid #56db40; }
.swatch.vote_no  { background: rgba(237,69,67,.55); border: 1.5px solid #ed4543; }
.legend-title { font-size: 11px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.swatch.vote_against { background: rgba(237,69,67,.65); border: 1.5px solid #ed4543; }
.swatch.vote_off { background: rgba(140,152,171,.35); border: 1.5px solid #8b98ab; }
.digest-head { font-size: 12.5px; color: var(--muted); margin: 3px 0 0 0; padding-left: 10px; }
.digest-head::before { content: "• "; }
summary .digest-head { display: none; }

/* сборы: карточка активного сбора на карте */
.fund-strip { position: absolute; left: 12px; bottom: 74px; z-index: 6; max-width: 300px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 12px; font-size: 12.5px; cursor: pointer; line-height: 1.35; }
.fund-strip b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.fund-strip .bar { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 5px 0; }
.fund-strip .bar i { display: block; height: 100%; background: var(--accent); }
.fund-strip:hover { border-color: var(--accent); }
@media (max-width: 860px) { .fund-strip { display: none; } }

