/* Вариант C 2.0 «Мой район» (бывший «Лента города с картой»). Мобильный в первую очередь (390×844), светлая/тёмная тема.
   Анимации — только transform/opacity; карточки — обычные блоки, мини-карты — <img> (снимки одной WebGL-карты). */
:root {
  --bg: #f1f2f5;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e4e7ec;
  --glass: rgba(255, 255, 255, .94);
  --text: #121417;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, .08);
  --accent: #2d7ff9;
  --accent-soft: rgba(45, 127, 249, .12);
  --accent-text: #ffffff;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 10px rgba(15, 23, 42, .05);
  --shadow: 0 4px 12px rgba(15, 23, 42, .12), 0 12px 32px rgba(15, 23, 42, .14);
  --shadow-s: 0 1px 4px rgba(15, 23, 42, .14);
  --ok: #15803d; --ok-bg: #dcfce7;
  --warn: #c2410c; --warn-bg: #ffedd5;
  --bad: #dc2626; --bad-bg: #fee2e2;
  --plan: #2563eb; --plan-bg: #dbeafe;
  --wx-bg: #fff4cc; --wx-text: #5b4300;
  --mm-ph: #e9ecf0;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hdr: 58px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101114; --surface: #1c1e23; --surface-2: #262930; --surface-3: #343842; --glass: rgba(28, 30, 35, .94);
    --text: #f1f2f4; --muted: #9aa1ad; --line: rgba(255, 255, 255, .08);
    --accent: #4a92ff; --accent-soft: rgba(74, 146, 255, .18);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 4px 14px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .5); --shadow-s: 0 1px 4px rgba(0, 0, 0, .5);
    --ok: #4ade80; --warn: #fb923c; --bad: #f87171; --plan: #60a5fa;
    --ok-bg: rgba(22, 163, 74, .2); --warn-bg: rgba(234, 138, 12, .2); --bad-bg: rgba(229, 50, 45, .22); --plan-bg: rgba(37, 99, 235, .25);
    --wx-bg: #3a3215; --wx-text: #fde68a; --mm-ph: #23262c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101114; --surface: #1c1e23; --surface-2: #262930; --surface-3: #343842; --glass: rgba(28, 30, 35, .94);
  --text: #f1f2f4; --muted: #9aa1ad; --line: rgba(255, 255, 255, .08);
  --accent: #4a92ff; --accent-soft: rgba(74, 146, 255, .18);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 4px 14px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .5); --shadow-s: 0 1px 4px rgba(0, 0, 0, .5);
  --ok: #4ade80; --warn: #fb923c; --bad: #f87171; --plan: #60a5fa;
  --ok-bg: rgba(22, 163, 74, .2); --warn-bg: rgba(234, 138, 12, .2); --bad-bg: rgba(229, 50, 45, .22); --plan-bg: rgba(37, 99, 235, .25);
  --wx-bg: #3a3215; --wx-text: #fde68a; --mm-ph: #23262c;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); overscroll-behavior: none;
  font: 15px/1.38 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- шапка: сегменты */
.hdr { position: fixed; z-index: 20; top: 0; left: 0; right: 0; padding: calc(var(--safe-top) + 8px) 12px 8px; background: var(--bg);
  display: flex; gap: 8px; align-items: center; transition: box-shadow .2s; }
.hdr.scrolled { box-shadow: 0 1px 0 var(--line); }
.seg { flex: 1; min-width: 0; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-3); border-radius: 13px; padding: 3px; height: 42px; }
.seg button { position: relative; z-index: 1; font-size: 14.5px; font-weight: 600; color: var(--muted); border-radius: 10px; transition: color .2s; white-space: nowrap; }
.seg button[aria-selected="true"] { color: var(--text); }
.seg-ind { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-s); transition: transform .28s cubic-bezier(.2, .9, .25, 1); will-change: transform; }
:root[data-theme="dark"] .seg { background: var(--surface); }
:root[data-theme="dark"] .seg-ind { background: var(--surface-3); }
.seg-dot { position: absolute; top: 9px; margin-left: 4px; width: 8px; height: 8px; border-radius: 50%; background: #e5322d; }
.seg-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #e5322d; animation: dot 1.4s ease-out infinite; }
@keyframes dot { from { transform: scale(1); opacity: .6; } to { transform: scale(2.8); opacity: 0; } }

/* ---------------------------------------------------------------- панели */
.panes { position: fixed; top: calc(var(--safe-top) + var(--hdr)); left: 0; right: 0; bottom: 0; }
.pane { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pane-in { padding: 4px 12px calc(110px + var(--safe-bottom)); max-width: 640px; margin: 0 auto; }
.pane-map { overflow: hidden; }

/* чипы: липнут к верху при скролле */
.chips-wrap { position: sticky; top: 0; z-index: 5; margin: 0 -12px; padding: 8px 0 6px; background: var(--bg); }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; scroll-padding: 0 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px; border-radius: 17px;
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.chip .ce { font-size: 15px; }
.chip i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip.on i { color: inherit; opacity: .7; }

/* ---------------------------------------------------------------- верх ленты */
.dayrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px 8px; }
.dr-t b { display: block; font-size: 23px; line-height: 1.15; font-weight: 750; letter-spacing: -.01em; }
.dr-t span { font-size: 13px; color: var(--muted); }
.dr-t span::first-letter { text-transform: uppercase; }
.top-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 2px; }

.seg-s { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; flex: none; }
.seg-s button { padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg-s button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-s); }
.seg-s.small button { padding: 6px 10px; font-size: 13px; }

.home-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-card); }
.home-row .hr-e { font-size: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); flex: none; }
.home-row.warn .hr-e { background: var(--bad-bg); }
.home-row.ok .hr-e { background: var(--ok-bg); }
.home-row .hr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-row .hr-t b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row .hr-t span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row.warn .hr-t span { color: var(--bad); }
.home-row .hr-go { font-size: 22px; color: var(--muted); }
.hr-st { display: flex; gap: 4px; flex: none; }
.hs { position: relative; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; background: var(--surface-2); }
.hs i { position: absolute; right: 2px; bottom: 2px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--surface); }
.hs.ok i { background: #16a34a; } .hs.bad i { background: #e5322d; } .hs.warn i { background: #f28c1a; } .hs.plan i { background: #2563eb; } .hs.unk i { background: #9ca3af; }
.home-row.na .hr-t span { color: var(--accent); }

.wx-row-s { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px;
  background: var(--wx-bg); color: var(--wx-text); font-size: 14px; }
.wx-row-s b { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-row-s i { font-style: normal; font-size: 12.5px; opacity: .75; }
.wx-row-s em { font-style: normal; font-size: 18px; opacity: .6; }

.al-card { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 8px 0 4px; padding: 14px;
  border-radius: 18px; color: #fff; background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 6px 18px rgba(220, 38, 38, .32); cursor: pointer; }
.al-card .alc-e { font-size: 26px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.al-card .alc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.al-card .alc-t b { font-size: 16.5px; line-height: 1.25; }
.al-card .alc-t span { font-size: 13.5px; opacity: .92; }
.al-card .alc-t i { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 700; }
.al-card .alc-b { display: flex; gap: 8px; width: 100%; }
.pill { flex: 1; height: 38px; border-radius: 12px; background: #fff; color: #b91c1c; font-weight: 700; font-size: 14.5px; }
.pill.ghost { background: rgba(255, 255, 255, .18); color: #fff; }
.al-card.ok { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 6px 18px rgba(22, 163, 74, .25); }
.al-card .x { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; color: #fff; font-size: 22px; opacity: .85; }

.ref { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 2px; padding: 12px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-card); }
.ref-t { min-width: 0; display: flex; flex-direction: column; }
.ref-l { font-size: 12.5px; color: var(--muted); }
.ref-t b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- секции и карточки */
.sec { display: flex; align-items: baseline; gap: 8px; padding: 16px 4px 2px; font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; }
.sec i { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; }

.card { position: relative; margin: 10px 0 0; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden;
  cursor: pointer; transition: transform .12s; }
.card:active { transform: scale(.985); }
.card .cb { padding: 11px 14px 12px; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.meta .cat { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meta .ce { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 14px;
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.meta .tm { white-space: nowrap; }
.meta .tm::before { content: "·"; margin-right: 8px; }
.meta .tm.new { color: var(--accent); font-weight: 600; }
.meta .tm.when { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meta .ds { margin-left: auto; flex: none; padding: 3px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px; }
.card h3 { margin: 7px 0 0; font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: -.005em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 .rt { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 1px; }
.card .sum { margin: 5px 0 0; font-size: 14px; line-height: 1.42; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.when-l { margin-top: 6px; font-size: 14.5px; font-weight: 650; color: var(--c); }
[data-theme="dark"] .when-l { color: color-mix(in srgb, var(--c) 55%, #fff); }
.noaddr { margin-top: 6px; font-size: 12px; color: var(--muted); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; min-height: 34px; }
.src { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.src.pub { color: var(--accent); font-weight: 600; }
.src.off { color: var(--ok); font-weight: 600; }
.src.ppl { color: var(--text); font-weight: 600; }
.unv { opacity: .75; font-weight: 400; color: var(--muted); }
.ib { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); flex: none; }
.ib:active { background: var(--surface-2); }
.vt { display: flex; gap: 6px; flex: none; }
.vbtn { height: 34px; padding: 0 11px; border-radius: 17px; background: var(--surface-2); font-size: 14px; }
.vbtn b { font-weight: 700; }
.vbtn.on { background: var(--accent-soft); color: var(--accent); }
.vbtn:disabled { opacity: .6; cursor: default; }
.k-report { box-shadow: var(--shadow-card), inset 3px 0 0 var(--c); }
.k-report .mm { height: 112px; }

/* мини-карта */
.mm { position: relative; height: 136px; background: var(--mm-ph); overflow: hidden; }
.mm::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, transparent 0 48%, rgba(127, 127, 127, .08) 48% 52%, transparent 52%) 0 0 / 46px 46px,
  linear-gradient(0deg, transparent 0 48%, rgba(127, 127, 127, .08) 48% 52%, transparent 52%) 0 0 / 46px 46px;
  transition: opacity .3s; pointer-events: none; }
.mm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.mm.ok img { opacity: 1; }
.mm.ok::after { opacity: 0; }
.mm-pin { position: absolute; z-index: 2; left: 50%; top: 50%; width: 38px; height: 38px; margin: -45px 0 0 -19px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg); background: var(--c); border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); display: grid; place-items: center; }
.mm-pin > span { transform: rotate(45deg); font-size: 17px; line-height: 1; }
.k-outage .mm-pin { border-radius: 11px; transform: none; margin-top: -19px; width: 36px; height: 36px; }
.k-outage .mm-pin > span { transform: none; }
.mm.area::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, transparent); border: 2px dashed color-mix(in srgb, var(--c) 70%, transparent); }
.mm.area .mm-pin { border-radius: 50%; transform: none; margin-top: -19px; }
.mm.area .mm-pin > span { transform: none; }
.fresh .mm-pin::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--c); opacity: 0; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.mm-where { position: absolute; z-index: 3; left: 10px; bottom: 10px; max-width: 62%; padding: 4px 9px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  background: var(--glass); box-shadow: var(--shadow-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-where i { font-style: normal; font-weight: 400; color: var(--muted); }
.mm-go { position: absolute; z-index: 3; right: 10px; bottom: 10px; height: 30px; padding: 0 11px; border-radius: 15px; font-size: 13px; font-weight: 650;
  background: var(--glass); color: var(--accent); box-shadow: var(--shadow-s); }
.mm-go.big { height: 38px; padding: 0 15px; border-radius: 19px; font-size: 14px; }
.mm-attr { position: absolute; z-index: 3; right: 6px; top: 5px; font-size: 9px; color: rgba(60, 60, 60, .7); background: rgba(255, 255, 255, .55); padding: 0 4px; border-radius: 4px; }
[data-theme="dark"] .mm-attr { color: rgba(220, 220, 220, .7); background: rgba(0, 0, 0, .4); }

.mm-render { position: fixed; left: -10000px; top: 0; width: 344px; height: 136px; pointer-events: none; visibility: visible; }

/* пустые состояния, скелетоны, подгрузка */
.empty { text-align: center; padding: 42px 22px 30px; }
.empty .em { font-size: 46px; line-height: 1; margin-bottom: 12px; }
.empty b { font-size: 18px; display: block; }
.empty p { color: var(--muted); margin: 6px auto 16px; max-width: 300px; }
.empty .eb { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.skel { cursor: default; }
.skel .sk { display: block; height: 12px; margin: 8px 0; border-radius: 6px; background: var(--surface-2); }
.skel .w40 { width: 40%; } .skel .w90 { width: 90%; height: 16px; } .skel .w70 { width: 70%; }
.skel .mm::after { opacity: 1; }
.skel .mm, .skel .sk { animation: shimmer 1.2s ease-in-out infinite alternate; }
@keyframes shimmer { from { opacity: 1; } to { opacity: .55; } }
.more { display: grid; place-items: center; height: 70px; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.end { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 10px 8px; }

/* ---------------------------------------------------------------- кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 13px;
  background: var(--accent); color: var(--accent-text); font-weight: 650; font-size: 15px; text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; }
.btn:active { transform: scale(.98); }
.link-btn { color: var(--accent); font-weight: 600; font-size: 14px; padding: 6px 0; }

/* FAB «＋ Сообщить» */
.fab { position: fixed; z-index: 30; right: 16px; bottom: calc(18px + var(--safe-bottom)); height: 54px; padding: 0 20px 0 16px; border-radius: 27px;
  display: flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 18px rgba(45, 127, 249, .45), 0 2px 6px rgba(0, 0, 0, .15); transition: transform .25s cubic-bezier(.2, .9, .25, 1), padding .2s; }
.fab-plus { font-size: 22px; line-height: 1; }
.fab-t { display: inline-block; max-width: 120px; overflow: hidden; white-space: nowrap; transition: max-width .22s, opacity .18s; }
.fab.mini { padding: 0 16px; }
.fab.mini .fab-t { max-width: 0; opacity: 0; }
.fab:active { transform: scale(.96); }
body.has-mcard .fab, body.picking .fab, body.has-screen .fab { transform: translateY(140px); }

.newpill { position: fixed; z-index: 25; left: 50%; top: calc(var(--safe-top) + var(--hdr) + 54px); transform: translateX(-50%);
  height: 36px; padding: 0 16px; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 650; font-size: 14px; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- карта */
#map { position: absolute; inset: 0; background: var(--mm-ph); }
.map-top { position: absolute; z-index: 4; top: 6px; left: 0; right: 0; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-chips .chip { background: var(--glass); box-shadow: var(--shadow-s); }
.map-chips .chip.on { background: var(--text); }
.map-chips { padding-bottom: 6px; }
.chip.radar.on { background: #0ea5e9; color: #fff; }
.map-alert { display: flex; align-items: center; gap: 8px; margin: 2px 12px 0; height: 40px; padding: 0 14px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 4px 14px rgba(220, 38, 38, .35); font-size: 14px; }
.map-alert b { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-alert i { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 700; }
.map-alert em { font-style: normal; font-size: 18px; opacity: .8; }
.map-btns { position: absolute; z-index: 4; right: 16px; bottom: calc(86px + var(--safe-bottom)); transition: transform .25s; }
.round { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
body.has-mcard .map-btns, body.picking .map-btns { transform: translateY(200px); }
.maplibregl-ctrl-bottom-left { bottom: calc(8px + var(--safe-bottom)); }
body.has-mcard .maplibregl-ctrl-bottom-left { opacity: 0; }

.mcard { position: absolute; z-index: 6; left: 10px; right: 10px; bottom: calc(10px + var(--safe-bottom)); transform: translateY(115%);
  transition: transform .3s cubic-bezier(.2, .9, .25, 1); will-change: transform; }
.mcard.on { transform: none; }
.mcard .card { margin: 0; box-shadow: var(--shadow); border-radius: 20px 20px 0 0; cursor: pointer; }
.mcard .card .cb { padding-right: 44px; }
.mc-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 46px; border-radius: 0 0 20px 20px;
  background: var(--surface); border-top: 1px solid var(--line); color: var(--accent); font-weight: 650; box-shadow: var(--shadow); }
.mc-x { position: absolute; z-index: 2; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; }

.home-mk span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #111827; border: 2.5px solid #fff; font-size: 16px; box-shadow: var(--shadow-s); }
.me-mk { width: 18px; height: 18px; border-radius: 50%; background: #2d7ff9; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(45, 127, 249, .25); }
.at-mk { width: 30px; height: 40px; }
.at-mk::before { content: ""; position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: #e5322d; border: 3px solid #fff; box-shadow: var(--shadow-s); }

/* выбор точки */
.pick { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.pick-pin { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -60px 0 0 -25px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg);
  background: var(--accent); border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); display: grid; place-items: center; }
.pick-pin span { transform: rotate(45deg); font-size: 22px; }
.pick::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 4px; margin: -2px 0 0 -5px; border-radius: 50%; background: rgba(0, 0, 0, .35); }
.pick-bar { position: absolute; z-index: 7; left: 10px; right: 10px; bottom: calc(10px + var(--safe-bottom)); padding: 14px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow); }
.pb-t b { display: block; font-size: 17px; }
.pb-t span { font-size: 13.5px; color: var(--muted); }
.pb-b { display: flex; gap: 8px; margin-top: 12px; }
.pb-b .btn { flex: 1; padding: 0 10px; font-size: 14.5px; }
.pb-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 20px; }
body.picking .map-chips, body.picking .map-alert { opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- экраны */
.screen { position: fixed; z-index: 50; inset: 0; display: flex; flex-direction: column; background: var(--bg); transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2, .9, .25, 1); will-change: transform; box-shadow: -8px 0 24px rgba(0, 0, 0, .12); }
.screen.in { transform: none; }
.s-head { flex: none; display: grid; grid-template-columns: 96px 1fr 96px; align-items: center; height: calc(52px + var(--safe-top)); padding: var(--safe-top) 6px 0;
  background: var(--bg); border-bottom: 1px solid var(--line); }
.s-back { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px 0 2px; color: var(--accent); font-size: 16px; font-weight: 500; }
.s-title { text-align: center; font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-share { justify-self: end; width: 40px; height: 40px; display: grid; place-items: center; color: var(--accent); }
.s-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(24px + var(--safe-bottom)); }
.d-map { height: 230px; }
.d-map .mm-pin { width: 46px; height: 46px; margin: -55px 0 0 -23px; }
.d-map .mm-pin > span { font-size: 21px; }
.k-outage.d-map .mm-pin { margin-top: -23px; }
.d-in { padding: 16px 16px 8px; max-width: 640px; margin: 0 auto; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 9px; font-size: 13px; font-weight: 650;
  background: color-mix(in srgb, var(--c) 14%, transparent); }
.d-in h1 { margin: 10px 0 6px; font-size: 23px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; }
.d-meta { font-size: 13.5px; color: var(--muted); }
.note { display: inline-block; margin-top: 10px; padding: 5px 10px; border-radius: 9px; font-size: 13px; background: var(--surface); color: var(--muted); }
.note.pub { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lead { font-size: 16.5px; line-height: 1.5; margin: 14px 0 4px; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 9px 10px; margin: 16px 0; padding: 14px; border-radius: 16px; background: var(--surface); font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.sub-h { margin: 18px 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.addr { margin: 0; padding: 4px 14px; border-radius: 16px; background: var(--surface); list-style: none; font-size: 14px; }
.addr li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.addr li:last-child { border: 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.links.col { flex-direction: column; }
.votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 8px; }
.vote { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 14px; border-radius: 15px; background: var(--surface); font-weight: 600; box-shadow: var(--shadow-card); }
.vote b { font-size: 18px; }
.vote.yes.on { background: var(--ok-bg); color: var(--ok); }
.vote.no.on { background: var(--bad-bg); color: var(--bad); }
.vote:disabled { opacity: .7; }
.fuel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 14px 0 6px; }
.fg { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 12px; background: var(--surface); font-size: 12.5px; }
.fg b { font-size: 13px; }
.fg.yes { background: var(--ok-bg); color: var(--ok); } .fg.no { background: var(--bad-bg); color: var(--bad); }

.al-hero { padding: 26px 18px 22px; text-align: center; color: #fff; background: linear-gradient(160deg, #ef4444, #991b1b); }
.al-hero.ok { background: linear-gradient(160deg, #22c55e, #166534); }
.al-hero.calm { background: var(--surface); color: var(--text); }
.al-e { font-size: 50px; line-height: 1; }
.al-hero h1 { margin: 10px 0 4px; font-size: 24px; }
.al-t { font-size: 15px; opacity: .92; }
.al-t b { font-variant-numeric: tabular-nums; }
.advice { margin: 0; padding: 0; list-style: none; counter-reset: a; }
.advice li { position: relative; padding: 12px 12px 12px 48px; margin-bottom: 8px; border-radius: 14px; background: var(--surface); font-size: 15px; counter-increment: a; }
.advice li::before { content: counter(a); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: 14px; }
.advice.plain li::before { content: "•"; background: var(--surface-2); color: var(--muted); }
.sh-hero { font-size: 46px; margin-top: 8px; }

.home-h { display: flex; gap: 12px; align-items: center; }
.home-h h1 { margin: 0; font-size: 21px; }
.hh-e { font-size: 30px; width: 54px; height: 54px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 10px; }
.tile { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border-radius: 16px; background: var(--surface); }
.tile .te { font-size: 24px; }
.tile b { font-size: 14px; margin-top: 2px; }
.tile span { font-size: 13px; font-weight: 600; }
.tile.ok { background: var(--ok-bg); } .tile.ok span { color: var(--ok); }
.tile.bad { background: var(--bad-bg); } .tile.bad span { color: var(--bad); }
.tile.warn { background: var(--warn-bg); } .tile.warn span { color: var(--warn); }
.tile.plan { background: var(--plan-bg); } .tile.plan span { color: var(--plan); }
.st-row { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); margin-bottom: 8px; font-size: 14.5px; }
.st-row > span { font-size: 20px; }
.near-l { list-style: none; margin: 0; padding: 4px 12px; border-radius: 16px; background: var(--surface); }
.near-l li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.near-l li:last-child { border: 0; }
.near-l li div { flex: 1; }
.near-l li i { font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; }
.addr-f { display: flex; gap: 8px; margin-top: 12px; }
.addr-f input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); outline: none; font-size: 16px; }
.addr-f input:focus { border-color: var(--accent); }
.err { color: var(--bad); font-size: 14px; margin: 10px 0; }
.channel { margin-top: 22px; }
.wx-row { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--wx-bg); color: var(--wx-text); margin: 10px 0; }
.wx-row > span { font-size: 26px; }
.wx-row p { margin: 4px 0 0; font-size: 14px; }
.wx-row.lvl-orange { background: var(--warn-bg); color: var(--warn); }

/* ---------------------------------------------------------------- нижний лист (форма) */
.scrim { position: fixed; z-index: 59; inset: 0; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 90vh; display: flex; flex-direction: column; border-radius: 22px 22px 0 0;
  background: var(--bg); box-shadow: var(--shadow); transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .9, .25, 1); will-change: transform;
  max-width: 640px; margin: 0 auto; }
.sheet.on { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 8px auto 2px; flex: none; }
.sheet-body { overflow-y: auto; padding: 6px 16px calc(18px + var(--safe-bottom)); }
.sh-h h2 { margin: 6px 0 2px; font-size: 21px; }
.sh-h p { margin: 0 0 12px; }
.sh-h.row { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.big-e { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c) 18%, transparent); flex: none; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.type { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); }
.type .te { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 16%, transparent); }
.type b { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.2; }
.type:active { transform: scale(.96); }
.fuel-in { display: grid; gap: 6px; }
.fi { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--surface); }
.fi b { flex: 1; font-size: 14.5px; }
.fi button { height: 34px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.fi button.on.yes { background: var(--ok-bg); color: var(--ok); font-weight: 650; }
.fi button.on.no { background: var(--bad-bg); color: var(--bad); font-weight: 650; }
.ta { position: relative; display: block; margin: 14px 0 12px; }
.ta textarea { width: 100%; padding: 12px 14px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); outline: none; resize: none; font-size: 16px; }
.ta textarea:focus { border-color: var(--accent); }
.ta .cnt { position: absolute; right: 12px; bottom: 8px; font-size: 12px; color: var(--muted); }
.send { min-height: 52px; font-size: 16.5px; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 11px 16px; border-radius: 14px; background: rgba(17, 24, 39, .94); color: #fff; font-size: 14.5px; box-shadow: var(--shadow); }
.toast.show { animation: toast .25s ease-out; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 700px) {
  .mcard { left: auto; right: 16px; width: 380px; }
}

/* =====================================================================================================
   C 2.0 — «Мой район», опросы соседей, фото, помощники, экран «Я»
   ===================================================================================================== */
:root { --ok-c: #16a34a; --some-c: #f59e0b; --many-c: #ef4444; --grad-a: #2d7ff9; --grad-b: #7c3aed; }
:root[data-theme="dark"] { --grad-a: #2563eb; --grad-b: #6d28d9; }

.me-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 2px 8px rgba(45, 127, 249, .35); transition: transform .15s; }
.me-btn:active { transform: scale(.92); }
.me-i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--surface); color: var(--text);
  font-weight: 750; font-size: 15px; }

/* общие заголовки блоков */
.row-h { display: flex; align-items: baseline; gap: 8px; padding: 18px 4px 8px; }
.row-h b { font-size: 17px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; }
.row-h span { font-size: 13.5px; color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-a { color: var(--accent); font-weight: 650; font-size: 14px; flex: none; padding: 4px 0 4px 8px; }

/* появление блоков */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.94); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: none; } }
.dh, .ph-sec, .hp-card, .dp-hero, .dmap-w { animation: rise .45s cubic-bezier(.2, .9, .25, 1) both; }
.pop { animation: pop .35s cubic-bezier(.2, .9, .25, 1) both; }

/* ---------------------------------------------------------------- шапка района */
.dh { position: relative; margin: 8px 0 4px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.dh-band { position: relative; padding: 16px 16px 46px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.dh.quiet .dh-band { background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .25), transparent 55%), linear-gradient(135deg, #10b981, #0e7490); }
.dh-kick { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.dh h1 { margin: 2px 0 0; font-size: 31px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; max-width: 78%; }
.dh h1.long { font-size: 25px; }
.dh-ch { position: absolute; z-index: 2; top: 14px; right: 14px; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(255, 255, 255, .2);
  color: #fff; font-size: 13px; font-weight: 650; }
.dh-deco { position: absolute; right: 10px; bottom: 0; display: flex; align-items: flex-end; gap: 5px; opacity: .2; pointer-events: none; }
.dh-deco i { display: block; width: 30px; background: #fff; border-radius: 4px 4px 0 0; }
.dh-deco i:nth-child(1) { height: 40px; } .dh-deco i:nth-child(2) { height: 66px; width: 38px; } .dh-deco i:nth-child(3) { height: 52px; }
.dh-tiles { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -34px 12px 0; }
.dt { display: flex; flex-direction: column; align-items: center; padding: 10px 4px 9px; border-radius: 16px; background: var(--surface);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .12); }
:root[data-theme="dark"] .dt { background: var(--surface-2); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .dt.bad { box-shadow: 0 4px 14px rgba(0, 0, 0, .4), inset 0 0 0 2px var(--bad); }
:root[data-theme="dark"] .dt.warn { box-shadow: 0 4px 14px rgba(0, 0, 0, .4), inset 0 0 0 2px var(--warn); }
.dt-e { font-size: 22px; line-height: 1.1; }
.dt b { font-size: 13px; margin-top: 3px; }
.dt i { font-style: normal; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.dt i::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dt.ok i { color: var(--ok); } .dt.bad i { color: var(--bad); } .dt.warn i { color: var(--warn); } .dt.plan i { color: var(--plan); } .dt.unk i { color: var(--muted); }
.dt.bad { box-shadow: 0 4px 14px rgba(229, 50, 45, .25), inset 0 0 0 2px var(--bad); }
.dt.warn { box-shadow: 0 4px 14px rgba(234, 138, 12, .2), inset 0 0 0 2px var(--warn); }
.dt.bad .dt-e { animation: wob 2.4s ease-in-out infinite; }
@keyframes wob { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
.dh-warn { margin: 10px 14px 0; padding: 9px 12px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; font-weight: 600; }
.dh-quiet { display: flex; gap: 12px; align-items: center; margin: 12px 14px 0; padding: 12px; border-radius: 16px; background: var(--ok-bg); }
.dh-quiet b { display: block; font-size: 16px; color: var(--ok); }
.dh-quiet span { font-size: 13.5px; color: var(--muted); }
.q-dot { flex: none; position: relative; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; margin: 0 4px; }
.q-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: dot 1.8s ease-out infinite; }
.dh-cnt { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 14px 2px; }
.dh-cnt::-webkit-scrollbar { display: none; }
.cn { flex: none; display: flex; flex-direction: column; align-items: flex-start; min-width: 88px; padding: 9px 12px; border-radius: 15px; background: var(--surface-2); text-align: left; }
.cn span { font-size: 16px; }
.cn b { font-size: 24px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cn i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.cn:active { transform: scale(.96); }
.dh-act { display: flex; gap: 8px; padding: 12px 14px 14px; }
.dh-ask { flex: 1; min-height: 48px; font-size: 16px; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); box-shadow: 0 6px 16px rgba(76, 90, 249, .35); }
.dh-act .ghost { width: 52px; padding: 0; font-size: 20px; background: var(--surface-2); box-shadow: none; }

/* ---------------------------------------------------------------- опрос */
.polls { margin-top: 2px; }
.poll { position: relative; margin: 10px 0 0; padding: 14px 14px 12px; border-radius: 22px; background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-card), inset 0 0 0 1.5px color-mix(in srgb, var(--c) 30%, transparent); transition: transform .2s, opacity .2s;
  animation: rise .45s cubic-bezier(.2, .9, .25, 1) both; }
.poll::before { content: ""; position: absolute; inset: 0 0 auto; height: 90px; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 13%, transparent), transparent); }
.poll.hl { animation: pop .5s cubic-bezier(.2, .9, .25, 1) both; box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.poll.busy { opacity: .7; }
.pl-top { position: relative; display: flex; gap: 12px; align-items: center; }
.pl-e { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 27px;
  background: var(--surface); box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 30%, transparent); }
.poll:not(.done) .pl-e { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-3px) rotate(-4deg); } }
.pl-h { min-width: 0; display: flex; flex-direction: column; }
.pl-kick { font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c) 80%, var(--text)); text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .pl-kick { color: color-mix(in srgb, var(--c) 55%, #fff); }
.pl-h b { font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; }
.pl-meta { position: relative; display: flex; gap: 10px; justify-content: space-between; margin: 8px 2px 0; font-size: 13px; color: var(--muted); }
.pl-left { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pl-b { height: 58px; border-radius: 17px; font-size: 18px; font-weight: 750; transition: transform .12s; }
.pl-b span { font-weight: 800; }
.pl-b.yes { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 35%, transparent); }
.pl-b.no { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 35%, transparent); }
.pl-b:active { transform: scale(.95); }
.pl-foot { margin-top: 9px; font-size: 12.5px; color: var(--muted); text-align: center; }
.pl-res { margin-top: 10px; }
.pl-lead { display: flex; align-items: baseline; gap: 6px; }
.pl-lead b { font-size: 34px; line-height: 1; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--bad); }
.pl-lead span { font-size: 16px; font-weight: 650; }
.pl-bar { position: relative; height: 14px; margin: 10px 0 6px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.pl-bar i { position: absolute; inset: 0; transform-origin: left center; transition: transform .9s cubic-bezier(.2, .9, .25, 1); }
.pl-good { background: linear-gradient(90deg, #22c55e, #16a34a); }
.pl-bad { background: linear-gradient(90deg, #f87171, #dc2626); transform: scaleX(var(--s)); }
.pl-bar.none .pl-good { opacity: .2; }
.pl-res.pre .pl-bad, .pl-res.pre .pl-good { transform: scaleX(0); }
.pl-res .pl-bad { transition-delay: .15s; }
.pl-leg { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.pl-me { margin-top: 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.pl-me b { color: var(--text); }
/* карусель «Соседи спрашивают» в «Городе» */
.poll-rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 6px; }
.poll-rail::-webkit-scrollbar { display: none; }
.poll-rail .poll { flex: 0 0 84%; margin: 0; scroll-snap-align: center; }
.poll.compact .pl-h b { font-size: 17.5px; }
.poll.compact .pl-e { width: 42px; height: 42px; font-size: 22px; }
.poll.compact .pl-b { height: 48px; font-size: 16px; }
.poll.compact .pl-lead b { font-size: 26px; }
.mcard .poll { margin: 0; box-shadow: var(--shadow); animation: none; }
.mcard .poll .pl-h { padding-right: 34px; }
.mcard .dcard { margin: 0; border-radius: 20px; box-shadow: var(--shadow); cursor: default; }
.mcard .dcard .foot .btn { width: 100%; }

/* «Спросить соседей» */
.ask { display: grid; gap: 8px; margin: 4px 0 12px; }
.ask-o { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); transition: transform .12s, opacity .2s; }
.ask-o:active { transform: scale(.97); }
.ask-o.busy { opacity: .55; }
.ao-e { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.ask-o b { font-size: 17px; font-weight: 750; }
.ask-o i { font-style: normal; font-size: 13px; color: var(--muted); }
.ask-o i.ao-live { color: var(--accent); font-weight: 650; }

/* ---------------------------------------------------------------- фото соседей */
.ph-sec { margin-top: 4px; }
.ph-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 6px; scroll-padding: 0 12px; }
.ph-strip::-webkit-scrollbar { display: none; }
.ph { position: relative; flex: none; width: 138px; height: 184px; border-radius: 20px; overflow: hidden; background: var(--mm-ph); scroll-snap-align: start;
  box-shadow: var(--shadow-card); transition: transform .15s; animation: rise .5s cubic-bezier(.2, .9, .25, 1) both; animation-delay: var(--d, 0ms); }
.ph:active { transform: scale(.96); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .4s, transform .6s; }
.ph.ok img { opacity: 1; transform: none; }
.ph-g { position: absolute; inset: auto 0 0; height: 70%; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .62)); }
.ph-a { position: absolute; left: 10px; right: 10px; bottom: 9px; color: #fff; font-size: 12px; line-height: 1.25; text-align: left; opacity: .92; }
.ph-a b { display: block; font-size: 14px; }
.ph-pub { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: rgba(255, 255, 255, .9); }
.ph.add { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px; padding: 12px; text-align: left; color: #fff;
  background: radial-gradient(100% 80% at 100% 0%, rgba(255, 255, 255, .25), transparent 60%), linear-gradient(160deg, #f97316, #db2777); }
.ph.add .pa-e { font-size: 26px; margin-bottom: auto; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); }
.ph.add b { font-size: 16px; }
.ph.add.wide { width: 100%; height: 104px; display: grid; grid-template-columns: 46px 1fr; align-content: center; column-gap: 14px; row-gap: 2px; padding: 14px 16px; }
.ph.add.wide .pa-e { margin: 0; grid-row: span 2; }
.ph.add.wide b { display: block; font-size: 17px; }
.ph.add.wide i { display: block; font-size: 13px; }
.ph.add i { font-style: normal; font-size: 12px; opacity: .9; line-height: 1.25; }

/* просмотр фото */
.pv { position: fixed; z-index: 90; inset: 0; background: #000; color: #fff; opacity: 0; transition: opacity .25s; }
.pv.in { opacity: 1; }
.pv-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; transition: transform .2s; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-s { flex: 0 0 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; scroll-snap-stop: always; }
.pv-s img { max-width: 100%; max-height: 100%; object-fit: contain; transform: scale(.94); transition: transform .35s cubic-bezier(.2, .9, .25, 1); }
.pv.in .pv-s img { transform: none; }
.pv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--safe-top) + 10px) 12px 30px; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.pv-n { font-size: 14px; font-weight: 650; padding: 5px 11px; border-radius: 12px; background: rgba(255, 255, 255, .14); }
.pv-x { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 26px; line-height: 1; }
.pv-dots { position: absolute; left: 0; right: 0; top: calc(var(--safe-top) + 64px); display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.pv-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .4); transition: transform .25s, background .25s; }
.pv-dots i.on { background: #fff; transform: scaleX(2.2); }
.pv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 18px calc(var(--safe-bottom) + 22px);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .8) 45%); pointer-events: none; }
.pv-cap > * { pointer-events: auto; }
.pv-cap.swap { animation: rise .3s ease-out both; }
.pv-cap p { margin: 0 0 8px; font-size: 17px; line-height: 1.35; font-weight: 600; }
.pv-m { display: flex; align-items: center; gap: 8px; font-size: 13.5px; opacity: .88; }
.pv-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 13px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.pv-post { margin-top: 12px; height: 38px; padding: 0 14px; border-radius: 19px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 650; font-size: 14px; }

/* «Прислать фото» */
.sp { text-align: center; padding: 4px 4px 0; }
.sp-e { font-size: 44px; width: 84px; height: 84px; margin: 6px auto 4px; border-radius: 26px; display: grid; place-items: center;
  background: linear-gradient(160deg, #f97316, #db2777); box-shadow: 0 8px 20px rgba(219, 39, 119, .35); animation: pop .4s both; }
.sp h2 { margin: 12px 0 6px; font-size: 21px; }
.sp p { color: var(--muted); margin: 0 0 12px; }
.sp-l { list-style: none; margin: 0 0 16px; padding: 4px 14px; border-radius: 16px; background: var(--surface); text-align: left; font-size: 14.5px; }
.sp-l li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.sp-l li:last-child { border: 0; }

/* «＋» — верхние кнопки */
.plus-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 6px; }
.pt-b { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 12px; border-radius: 18px; color: #fff; text-align: left; transition: transform .12s; }
.pt-b:active { transform: scale(.97); }
.pt-b span { font-size: 24px; margin-bottom: 4px; }
.pt-b b { font-size: 15.5px; }
.pt-b i { font-style: normal; font-size: 12.5px; opacity: .88; }
.pt-b.pt-ask { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.pt-b.pt-photo { background: linear-gradient(160deg, #f97316, #db2777); }

/* ---------------------------------------------------------------- помощники */
.hp-card { margin: 14px 0 4px; padding: 0 14px 12px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card);
  background-image: radial-gradient(120% 80% at 100% 0%, rgba(250, 204, 21, .16), transparent 60%); }
.hp-card .row-h { padding: 14px 0 0; }
.hp-sub { font-size: 13px; color: var(--muted); padding-bottom: 4px; }
.hp-l { list-style: none; margin: 0; padding: 0; }
.hp-r { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); animation: rise .4s both; animation-delay: var(--d); }
.hp-r:last-child { border: 0; }
.hp-m { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
  font-weight: 750; font-size: 14px; color: var(--muted); }
.hp-r.top .hp-m { font-size: 24px; background: transparent; }
.hp-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hp-n b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-n i { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-n i.hp-p { color: var(--text); opacity: .7; }
.hp-s { flex: none; text-align: right; display: flex; flex-direction: column; }
.hp-s b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hp-s i { font-style: normal; font-size: 11px; color: var(--muted); }
.hp-f { font-size: 12.5px; color: var(--muted); padding-top: 8px; }
.hp-e { margin: 0; padding: 4px 0 6px; color: var(--muted); font-size: 14px; }
.hp-l.full { padding: 4px 14px; margin-top: 12px; border-radius: 18px; background: var(--surface); }
.hp-l.full .hp-r { padding: 11px 0; }
.hp-hero { text-align: center; padding: 6px 0 4px; }
.hh-cup { font-size: 52px; animation: pop .5s both; }
.hp-hero h1 { margin: 6px 0 2px; }
.seg-s.wide { display: flex; width: 100%; margin-top: 14px; }
.seg-s.wide button { flex: 1; }
.hp-how { margin: 16px 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); font-size: 14px; }
.hp-how ul { margin: 6px 0 0; padding: 0; list-style: none; }
.hp-how li { padding: 3px 0; }

/* ---------------------------------------------------------------- экран «Я» */
.me-hero { padding: 22px 16px 26px; text-align: center; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
.me-av { width: 78px; height: 78px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 800;
  background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5); animation: pop .45s both; }
.me-hero h1 { margin: 10px 0 8px; font-size: 24px; }
.me-d { height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 650; font-size: 14px; }
.me-st { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ms { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); }
.ms span { font-size: 20px; }
.ms b { font-size: 28px; font-weight: 850; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ms i { font-style: normal; font-size: 12px; color: var(--muted); }
.bdg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bd { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 6px; border-radius: 18px; background: var(--surface); }
.bd span { font-size: 28px; filter: grayscale(1); opacity: .45; }
.bd b { font-size: 13px; margin-top: 4px; line-height: 1.2; color: var(--muted); }
.bd i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.25; margin-top: 2px; opacity: .8; }
.bd.on { box-shadow: var(--shadow-card), inset 0 0 0 1.5px rgba(250, 204, 21, .6);
  background-image: radial-gradient(100% 70% at 50% 0%, rgba(250, 204, 21, .22), transparent 70%); }
.bd.on span { filter: none; opacity: 1; animation: pop .5s both; }
.bd.on b { color: var(--text); }
.bd.on i { color: #ca8a04; font-weight: 700; opacity: 1; }
.tg { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); cursor: pointer; }
.tg-t { flex: 1; display: flex; flex-direction: column; }
.tg-t b { font-size: 15px; }
.tg-t i { font-style: normal; font-size: 13px; color: var(--muted); }
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg-s { flex: none; position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-3); transition: background .2s; }
.tg-s::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .22s cubic-bezier(.2, .9, .25, 1); }
.tg input:checked + .tg-s { background: #22c55e; }
.tg input:checked + .tg-s::after { transform: translateX(20px); }
.tg input:disabled + .tg-s { opacity: .5; }
.s-me .s-head, .s-me .s-body { background: var(--bg); }

/* ---------------------------------------------------------------- выбор района */
.dp { padding-bottom: 8px; }
.s-dp .dp { padding: 0 16px 8px; max-width: 640px; margin: 0 auto; }
.dp-hero { text-align: center; padding: 18px 8px 6px; }
.dp-e { width: 86px; height: 86px; margin: 0 auto 4px; border-radius: 28px; display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); box-shadow: 0 10px 26px rgba(76, 90, 249, .35); }
.dp-e span { animation: bob 2.6s ease-in-out infinite; display: block; }
.dp-hero h1 { margin: 14px 0 6px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.dp-hero p { margin: 0 auto; max-width: 320px; color: var(--muted); font-size: 15px; }
.dp-quick { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 18px 0 4px; }
.dq { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px; border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-card); text-align: left; }
.dq > span { font-size: 20px; }
.dq b { font-size: 15.5px; }
.dq i { font-style: normal; color: var(--muted); font-size: 14px; }
button.dq { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff; box-shadow: 0 6px 16px rgba(76, 90, 249, .3); }
button.dq i { color: rgba(255, 255, 255, .85); }
.dq-f { padding-right: 6px; }
.dq-f input { flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: transparent; font-size: 16px; }
.dq-f button { flex: none; width: 42px; height: 42px; border-radius: 13px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 700; }
.dmap-w { position: relative; margin: 14px 0 4px; padding: 6px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.dmap { display: block; width: 100%; height: auto; }
.dpp { fill: hsl(var(--h, 210) 75% 91%); stroke: var(--surface); stroke-width: 5; stroke-linejoin: round; cursor: pointer;
  transition: fill .2s; }
.dpp:hover { fill: hsl(var(--h, 210) 75% 84%); }
:root[data-theme="dark"] .dpp { fill: hsl(var(--h, 210) 28% 24%); }
:root[data-theme="dark"] .dpp:hover { fill: hsl(var(--h, 210) 34% 30%); }
.dpp.mine { stroke: var(--accent); stroke-dasharray: 10 7; }
:root .dmap .dpp.on { fill: var(--accent); stroke-dasharray: none; }
.dpl { font-size: 25px; font-weight: 650; fill: var(--text); text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  paint-order: stroke; stroke: var(--surface); stroke-width: 6px; stroke-linejoin: round; }
.dpl.on { fill: #fff; stroke: var(--accent); font-weight: 800; }
.dmap-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); padding: 5px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--glass); box-shadow: var(--shadow-s); white-space: nowrap; pointer-events: none; }
.dmap-hint:empty { display: none; }
.dp-ok { min-height: 54px; margin-top: 10px; font-size: 16.5px; background: linear-gradient(135deg, #10b981, #0e7490); box-shadow: 0 6px 16px rgba(16, 185, 129, .35); }
.dp-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.dpg { height: 40px; padding: 0 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; font-weight: 550; }
.dpg.on { background: var(--accent); color: #fff; box-shadow: none; }
.dpg:active { transform: scale(.95); }
#pane-mine.no-district #mineChipsWrap { display: none; }
body.no-district[data-tab="mine"] .fab { transform: translateY(140px); }

/* сортировка ленты района */
.sortrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 4px 2px; }
.sortrow b { font-size: 17px; font-weight: 750; white-space: nowrap; }
#mineTop .top-row { margin-top: 12px; }

/* ---------------------------------------------------------------- карта: ответы соседей */
.nb { display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 4px 4px 4px 12px; border-radius: 16px; background: var(--glass);
  box-shadow: var(--shadow-s); width: max-content; max-width: calc(100% - 24px); }
.nb-l { font-size: 12.5px; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nb-s { display: flex; gap: 2px; flex: none; }
.nb-s button { height: 32px; padding: 0 9px; border-radius: 12px; font-size: 13.5px; font-weight: 650; white-space: nowrap; transition: background .2s, color .2s; }
.nb-s button.on { background: var(--text); color: var(--bg); }
.nb-legend { position: absolute; z-index: 4; left: 12px; bottom: calc(86px + var(--safe-bottom)); max-width: 250px; padding: 10px 12px; border-radius: 16px;
  background: var(--glass); box-shadow: var(--shadow); font-size: 13px; animation: rise .3s both; }
.nb-legend b { display: block; font-size: 13.5px; margin-bottom: 6px; }
.lg-r { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); }
.lg-r span { display: inline-flex; align-items: center; gap: 5px; }
.lg-r i { width: 12px; height: 12px; border-radius: 4px; }
.lg-r i.ok { background: var(--ok-c); } .lg-r i.some { background: var(--some-c); } .lg-r i.many { background: var(--many-c); }
.lg-n { display: block; margin-top: 6px; color: var(--accent); font-weight: 600; }
body.has-mcard .nb-legend, body.picking .nb-legend, body.picking .nb { opacity: 0; pointer-events: none; }
