/* =========================================================
   Мой лучший агент — дизайн-система
   Фирменные цвета из логотипа: графит, красный, синий.
   ========================================================= */
:root {
  /* «Гражданская» палитра: светлый холодный фон, тёмно-синий текст, строгий синий акцент.
     Красный — только для экстренного (пропал человек, SOS). */
  --bg: #f3f5f8;
  --bg-2: #e9edf3;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ink: #18243a;
  --ink-2: #2b3850;
  --muted: #4e5b6e;
  --muted-2: #8591a3;
  --line: #dde3eb;
  --line-2: #c5cedb;
  --red: #c42b2b;
  --red-2: #a52222;
  --red-soft: #fbeceb;
  --blue: #1f55a6;
  --blue-2: #17448a;
  --blue-soft: #e8eff9;
  --green: #2c7a4b;
  --green-soft: #e6f3ea;
  --amber: #b06a00;
  --amber-soft: #fbf1df;
  --shadow-1: 0 1px 2px rgba(24, 36, 58, .06);
  --shadow-2: 0 4px 16px rgba(24, 36, 58, .08);
  --shadow-3: 0 18px 48px rgba(24, 36, 58, .18);
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --max: 1200px;
  --top-h: 72px;
  --tab-h: 70px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.2, .8, .2, 1);
  --font: "PT Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --display: "PT Serif", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
/* цвета акцентов для мелкого текста: смешаны с --ink, поэтому контраст ≥ 4.5:1 */
:root {
  --red-t: color-mix(in srgb, var(--red) 80%, var(--ink));
  --blue-t: color-mix(in srgb, var(--blue) 72%, var(--ink));
  --green-t: color-mix(in srgb, var(--green) 66%, var(--ink));
  --amber-t: color-mix(in srgb, var(--amber) 52%, var(--ink));
  --red-solid: #c42b2b; /* красная подложка под белый текст */
}
:root { --scroll-sh: rgba(14, 15, 19, .24); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 500 15px/1.55 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: clamp(30px, 6vw, 64px); letter-spacing: -.035em; }
h2 { font-size: clamp(22px, 3.4vw, 36px); }
h3 { font-size: 18px; }
p { margin: 0; }
::selection { background: var(--red-solid); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.sheet:focus, .lightbox:focus, #view:focus { outline: none; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; }
.skip-link:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.hide { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; fill: currentColor; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }

/* ---------- верхняя панель ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--top-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-in { height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.brand img { width: 46px; height: 38px; object-fit: contain; }

.brand span { font-size: 15px; line-height: 1; white-space: nowrap; }
.brand small { display: block; font: 600 10px/1.2 var(--font); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.nav { display: none; gap: 2px; margin-left: 18px; }
.nav a { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a:hover { background: var(--surface); }
.nav a.on { background: var(--ink); color: var(--bg); }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--ink-2); transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(.92); }
.dotbadge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--red-solid); color: #fff; font: 700 10px/17px var(--font); text-align: center;
  box-shadow: 0 0 0 2px var(--bg); animation: pop .4s var(--spring);
}
.lang-btn { font: 700 12px var(--font); letter-spacing: .04em; width: auto !important; padding: 0 11px; gap: 5px; display: inline-flex !important; align-items: center; border-radius: 999px; }
.lang-btn .ic { width: 16px; height: 16px; }
@media (min-width: 980px) { .nav { display: flex; } }

/* ---------- нижняя навигация (телефон) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); position: relative; padding: 6px 0; transition: color .2s; }
.tab .ic { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.tab.on { color: var(--ink); }
.tab.on .ic { transform: translateY(-1px) scale(1.08); }
.tab.on::before { content: ""; position: absolute; top: -1px; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); animation: grow .35s var(--ease); }
.tab .dotbadge { top: 0; right: calc(50% - 22px); }
.tab-fab { margin-top: -26px; }
.tab-fab .fab {
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--red), var(--red-2)); box-shadow: 0 10px 24px rgba(224, 25, 45, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .25s var(--spring);
}
.tab-fab .fab .ic { width: 28px; height: 28px; color: #fff; }
.tab-fab:active .fab { transform: scale(.9) rotate(90deg); }
@media (min-width: 980px) { .tabbar { display: none; } }
main { min-height: calc(100dvh - var(--top-h)); padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
@media (min-width: 980px) { main { padding-bottom: 48px; } }

/* ---------- кнопки ---------- */
.btn {
  --b: var(--ink); --c: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 14px; background: var(--b); color: var(--c); font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .25s, background .2s, opacity .2s; position: relative; overflow: hidden; user-select: none;
}
.btn:hover { box-shadow: var(--shadow-2); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-red { --b: var(--red); --c: #fff; background: linear-gradient(145deg, var(--red), var(--red-2)); }
.btn-red:hover { box-shadow: 0 10px 28px rgba(224, 25, 45, .35); }
.btn-blue { --b: var(--blue); --c: #fff; background: linear-gradient(145deg, var(--blue), var(--blue-2)); }
.btn-blue:hover { box-shadow: 0 10px 28px rgba(22, 135, 220, .32); }
.btn-ghost { --b: transparent; --c: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-soft { --b: var(--surface); --c: var(--ink); box-shadow: var(--shadow-1); }
.btn-danger { --b: var(--red-soft); --c: var(--red-t); }
.btn-sm { min-height: 36px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; }
.btn-xs { min-height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; gap: 5px; }
/* на сенсорных экранах мелкие кнопки и метки-кнопки получают площадь нажатия не меньше 36 px */
@media (pointer: coarse), (max-width: 760px) { .btn-xs { min-height: 36px; min-width: 36px; } .chip.chip-btn { height: 34px; } }
.btn-lg { min-height: 56px; padding: 0 26px; border-radius: 18px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.link { color: var(--blue-t); font-weight: 700; }
.link:hover { text-decoration: underline; }

/* ---------- метки ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line);
}
.chip .ic { width: 14px; height: 14px; }
.chip-lost { background: var(--red-soft); color: var(--red-t); border-color: transparent; }
.chip-found { background: var(--blue-soft); color: var(--blue-t); border-color: transparent; }
.chip-ok { background: var(--green-soft); color: var(--green-t); border-color: transparent; }
.chip-warn { background: var(--amber-soft); color: var(--amber-t); border-color: transparent; }
.chip-dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.chip-em { background: #d3172b; color: #fff; border-color: transparent; animation: blink 1.6s infinite; }
.filter-chip { cursor: pointer; height: 36px; padding: 0 14px; font-size: 13.5px; background: var(--surface); transition: all .2s; }
.filter-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--red); border-radius: 2px; }

/* ---------- поверхности ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.pad { padding: 20px; }
@media (min-width: 760px) { .pad { padding: 26px; } }
.section { padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 760px) { .section { padding-top: 72px; padding-bottom: 72px; } }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sec-head p { color: var(--muted); max-width: 560px; margin-top: 8px; }
.sec-head > :first-child { flex: 1 1 auto; min-width: 0; }
.sec-head > .btn, .sec-head > a.btn, .sec-head > button { flex: none; }
table.t td:first-child { white-space: nowrap; }
.page-head { padding: 22px 0 18px; }
.page-head h1 { font-size: clamp(26px, 4.5vw, 44px); }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 640px; }
.back { display: flex; width: fit-content; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.note {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px;
}
.note .ic { margin-top: 1px; }
.note-red { background: var(--red-soft); border-color: transparent; color: var(--ink); }
.note-red > .ic { color: var(--red); }
.note-blue { background: var(--blue-soft); border-color: transparent; }
.note-blue > .ic { color: var(--blue); }
.note-amber { background: var(--amber-soft); border-color: transparent; }
.note-amber > .ic { color: var(--amber); }
.note b { display: block; margin-bottom: 2px; }

/* ---------- формы ---------- */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px 2px; }
.field > span em { font-style: normal; color: var(--red); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 15px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s; font-size: 16px; font-weight: 500; appearance: none;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236a6d78' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.field .hint { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.field.err input, .field.err textarea, .field.err select { border-color: var(--red); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* пары коротких полей (рост и вес, дата и время) — в две колонки и на телефоне */
.grid-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
.wiz-sub { font-size: 16px; margin-top: 10px; }
.chk-grid { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 18px; }
.chk-grid legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.place-photo { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 16px; cursor: zoom-in; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; line-height: 1.45; }
.check input { appearance: none; flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; transition: all .2s; margin: 0; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: none; isolation: isolate; }
/* область нажатия 58×44 при том же размере переключателя (switch всегда внутри <label>) */
.switch::before { content: ""; position: absolute; inset: -7px -4px; z-index: -1; cursor: pointer; }
.switch input { appearance: none; width: 100%; height: 100%; margin: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background .25s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--spring); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(20px); }
/* ползунок: элемент 44px высотой (удобно попасть пальцем), визуально как прежде — отрицательные поля сохраняют вёрстку */
.range { display: block; width: 100%; accent-color: var(--red); height: 44px; margin: -8px 0; cursor: pointer; }
.range:focus-visible { outline-offset: -6px; }
.range-scale { display: flex; justify-content: space-between; margin-top: 2px; }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg-2); border-radius: 14px; }
.seg button { flex: 1; min-height: 40px; padding: 0 10px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: all .25s var(--ease); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 360px; }
.otp input { width: 100%; min-width: 0; height: 58px; padding: 0; text-align: center; font: 700 24px var(--display); border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); outline: none; transition: all .2s; padding: 0; }
.otp input:focus { border-color: var(--ink); background: var(--surface); transform: translateY(-2px); }

/* ---------- фото ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ph-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-2); animation: pop .35s var(--spring); }
.ph-item img { width: 100%; height: 100%; object-fit: cover; }
.ph-item button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.ph-add { aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); cursor: pointer; transition: all .2s; text-align: center; font-size: 12px; font-weight: 700; }
.ph-add:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.ph-add { position: relative; }
.ph-add input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
/* скрытые поля выбора файла остаются доступны с клавиатуры — рамка фокуса рисуется на подписи */
label:has(> input[type=file]:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.ph-item.up::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: shimmer 1s infinite; }

/* ---------- карточки заявок ---------- */
.apps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.apps-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.app-row > :not(.thumb) { min-width: 0; }
.app-card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; position: relative; isolation: isolate;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.app-card .media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; }
.app-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.app-card:hover .media img { transform: scale(1.05); }
.media-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; overflow: hidden; color: var(--muted-2); container-type: size; isolation: isolate; }
.media-ph::before { content: ""; position: absolute; inset: -30%; z-index: -1; background: repeating-radial-gradient(circle at 50% 50%, currentColor 0 1px, transparent 1.5px 26px); opacity: .13; animation: phRings 9s ease-in-out infinite; }
.media-ph::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 50%, transparent 30%, var(--bg-2) 78%); }
.media-ph .ph-ic { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: 0 10px 30px -12px currentColor, inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent); backdrop-filter: blur(6px); }
.media-ph .ph-ic .ic { width: 38px; height: 38px; }
.media-ph .ph-t { font: 700 10.5px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.media-ph.c-people { color: var(--red); background: linear-gradient(160deg, var(--red-soft), var(--bg-2) 70%); }
.media-ph.c-animals { color: var(--blue); background: linear-gradient(160deg, var(--blue-soft), var(--bg-2) 70%); }
.media-ph.c-things { color: var(--amber); background: linear-gradient(160deg, var(--amber-soft), var(--bg-2) 70%); }
@keyframes phRings { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@container (max-width: 150px) { .media-ph .ph-t { display: none; } .media-ph .ph-ic { width: 46px; height: 46px; border-radius: 15px; } .media-ph .ph-ic .ic { width: 26px; height: 26px; } }
.app-card .tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.app-card .tags .chip { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border: 0; }
.app-card .tags .chip-lost { background: #d3172b; color: #fff; }
.app-card .tags .chip-found { background: #0b6cb6; color: #fff; }
.app-card .tags .chip-em { background: #d3172b; color: #fff; }
.app-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-card h3 { font: 700 16px/1.3 var(--font); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: auto; padding-top: 6px; }
.app-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.app-card .meta .ic { width: 14px; height: 14px; }
.app-card.em { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 10px 30px rgba(224, 25, 45, .18); }
.app-card .score { position: absolute; bottom: 10px; right: 10px; height: 30px; padding: 0 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 700 13px/30px var(--display); }
.app-row { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: background .2s, transform .2s; }
.app-row:hover { background: var(--surface-2); }
.app-row:active { transform: scale(.99); }
.app-row .thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; background: var(--bg-2); position: relative; }
.app-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-row .thumb .ic { width: 26px; height: 26px; }
.app-row h4 { font: 700 15px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row .meta { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- главная ---------- */
.hero { position: relative; padding: 28px 0 36px; overflow: hidden; }
@media (min-width: 760px) { .hero { padding: 56px 0 72px; } }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 40px; } }
.hero h1 em { font-style: normal; color: var(--red); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .12em; background: var(--red); border-radius: 4px; transform-origin: left; animation: line 1.1s .5s var(--ease) both; opacity: .25; }
.hero .lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); margin-top: 18px; max-width: 560px; line-height: 1.55; }
.hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; max-width: 480px; }
.hero-cta .btn { min-height: 62px; border-radius: 18px; font-size: 16px; flex-direction: column; gap: 2px; }
.hero-cta .btn small { font-size: 11.5px; font-weight: 600; opacity: .8; }
.hero-stats { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div b { display: block; font: 600 28px/1 var(--display); letter-spacing: -.03em; }
.hero-stats div span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.radar { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin: 0 auto; }
.radar .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--line-2); }
.radar .ring:nth-child(2) { inset: 14%; }
.radar .ring:nth-child(3) { inset: 28%; border-style: dashed; }
.radar .ring:nth-child(4) { inset: 42%; background: var(--surface); box-shadow: var(--shadow-2); border: 0; }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--red) 28%, transparent) 100%); animation: spin 4.5s linear infinite; mask: radial-gradient(circle, #000 0 69%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 0 69%, transparent 70%); }
.radar .logo-fx { position: absolute; inset: 44%; width: 12%; margin: auto; left: 0; right: 0; top: 0; bottom: 0; width: 22%; height: auto; object-fit: contain; }
.radar .blip { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(224, 25, 45, .5); animation: ping 2.4s infinite; }
.radar .blip.b { background: var(--blue); animation-delay: .8s; box-shadow: 0 0 0 0 rgba(22, 135, 220, .5); }
.radar .float { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-2); font-size: 12.5px; font-weight: 700; animation: float 6s ease-in-out infinite; white-space: nowrap; }
.radar .float .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.cats { display: grid; gap: 12px; }
@media (min-width: 760px) { .cats { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.cat {
  position: relative; overflow: hidden; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s; display: flex; flex-direction: column; gap: 10px; min-height: 190px;
}
.cat:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.cat .cat-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; }
.cat .cat-ic .ic { width: 28px; height: 28px; }
.cat.people .cat-ic { background: linear-gradient(145deg, var(--red), var(--red-2)); }
.cat.animals .cat-ic { background: linear-gradient(145deg, var(--blue), var(--blue-2)); }
.cat.things .cat-ic { background: linear-gradient(145deg, #2a2c33, #0e0f13); }

.cat h3 { font-size: 22px; }
.cat p { color: var(--muted); font-size: 14px; }
.cat .cat-n { margin-top: auto; display: flex; gap: 14px; font-size: 13px; font-weight: 700; }
.cat .cat-n b { font-family: var(--display); }
.cat .arrow { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: transform .35s var(--ease), background .3s, color .3s; }
.cat:hover .arrow { transform: rotate(-45deg); background: var(--ink); color: var(--bg); }
.steps { display: grid; gap: 12px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); font: 600 13px var(--display); color: var(--red); }
.step h4 { font: 700 16px/1.3 var(--font); margin: 10px 0 6px; }
.step p { font-size: 13.5px; color: var(--muted); }
.em-strip { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); background: linear-gradient(110deg, var(--red), var(--red-2)); color: #fff; box-shadow: 0 14px 36px rgba(224, 25, 45, .3); }
.em-strip .pulse { width: 12px; height: 12px; border-radius: 50%; background: #fff; flex: none; animation: ping-w 1.6s infinite; }
.em-strip b { font-weight: 800; }
.stories { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 4px 16px 14px; margin: 0 -16px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .stories { margin: 0; padding: 4px 0 14px; display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; } }
@media (min-width: 1100px) { .stories { grid-template-columns: repeat(4, 1fr); } }
.story { scroll-snap-align: start; flex: 0 0 82%; padding: 24px; border-radius: var(--r-lg); background: #0e0f13; color: #fff; position: relative; overflow: hidden; min-height: 320px; isolation: isolate; transition: transform .45s var(--spring), box-shadow .45s; display: flex; flex-direction: column; gap: 10px; }
.story::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--red), transparent 70%); opacity: .55; }
.story.animals::after { background: radial-gradient(circle, var(--blue), transparent 70%); }
.story.things::after { background: radial-gradient(circle, #f5b400, transparent 70%); }
.story h3 { font-size: 20px; }
.story p { opacity: .78; font-size: 14px; position: relative; z-index: 1; }
.story.has-photo { min-height: 320px; background: #0e0f13; color: #fff; }
.story.has-photo::after { display: none; }
.story.has-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,9,12,.08) 25%, rgba(8,9,12,.55) 55%, rgba(8,9,12,.92)); }
.story .story-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.story:hover .story-bg { transform: scale(1.06); }
@media (hover: hover) { .story:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); } }

.story > :not(.story-bg) { position: relative; z-index: 2; }
.story.has-photo .chip { margin-bottom: auto; backdrop-filter: blur(10px); background: rgba(0,0,0,.35) !important; }
.story.has-photo .city { margin-top: 0; }
.story .city { margin-top: auto; font-size: 12px; opacity: .6; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dark-band { background: var(--ink); color: var(--bg); border-radius: var(--r-xl); padding: 28px; position: relative; overflow: hidden; }
.dark-band::before { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 25, 45, .45), transparent 65%); }
.dark-band > * { position: relative; }
.dark-band .muted { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.dark-band .field input, .dark-band .field textarea, .dark-band .field select { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: var(--bg); }

.dark-band .field > span { color: inherit; opacity: .8; }
.dark-band .check input { background: transparent; border-color: rgba(255, 255, 255, .3); }
@media (min-width: 760px) { .dark-band { padding: 48px; } }
.footer { border-top: 1px solid var(--line); padding: 32px 0 20px; margin-top: 30px; font-size: 13.5px; color: var(--muted); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.chip-btn { cursor: pointer; transition: background .2s, transform .15s; }
.chip-btn:hover { background: var(--bg-2); }
.chip-btn:active { transform: scale(.95); }
.steps3 { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 640px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.step3 { position: relative; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--spring), box-shadow .35s; }
.step3:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.step3-n { position: absolute; top: 16px; right: 18px; font: 700 26px/1 var(--display); color: var(--line-2); }
.step3-n::before { content: attr(data-n); }
.step3-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 14px; }
.step3-ic .ic { width: 28px; height: 28px; }
.step3:nth-child(2) .step3-ic { background: var(--amber-soft); color: var(--amber); }
.step3:nth-child(3) .step3-ic { background: var(--blue-soft); color: var(--blue); }
.step3 h4 { font-size: 16px; margin-bottom: 6px; }
.step3 p { font-size: 13.5px; color: var(--muted); }
.footer-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h5 { margin: 0 0 10px; font: 700 13px var(--font); color: var(--ink); }
.footer a { display: block; padding: 3px 0; }
.footer a:hover { color: var(--ink); }

/* ---------- карта ---------- */
.map-page { display: grid; grid-template-rows: auto 1fr; height: calc(100dvh - var(--top-h) - var(--tab-h) - var(--safe-b)); }
@media (min-width: 980px) { .map-page { height: calc(100dvh - var(--top-h)); grid-template-columns: 420px 1fr; grid-template-rows: 1fr; } }
.map-side { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-right: 1px solid var(--line); }
.map-filters { padding: 12px 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { width: 100%; height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 46px 0 44px; outline: none; font-size: 16px; transition: border-color .2s; }
.search-box input:focus { border-color: var(--ink); }
.search-box .fbtn { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.search-box .fbtn .ic { position: static; transform: none; color: var(--ink); }
.search-box .fbtn.has::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.hscroll::-webkit-scrollbar { display: none; }
.map-page { position: relative; }
.map-search input { padding-right: 50px; }
.map-search input:not(:placeholder-shown) { padding-right: 86px; }
.map-search input::-webkit-search-cancel-button { display: none; }
.search-box .sclear { position: absolute; right: 46px; top: 9px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.search-box .sclear:hover { background: var(--surface-2); color: var(--ink); }
.search-box .sclear .ic { position: static; transform: none; width: 18px; height: 18px; color: inherit; }
.search-box .sclear[hidden] { display: none; }
.search-box .fcount { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red-solid); color: #fff; font: 800 10.5px/18px var(--font); font-style: normal; text-align: center; display: none; }
.map-search .fbtn { transition: background .2s; }
.map-search .fbtn.has { background: var(--ink); }
.map-search .fbtn.has .ic { color: var(--bg); }
.map-search .fbtn.has::after { display: none; }
.map-search .fbtn.has .fcount { display: block; animation: zoom .25s var(--spring); }
.map-quick { align-items: center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); }
.map-quick .filter-chip { flex: none; }
.map-quick .filter-chip.sos.on { background: var(--red-solid); border-color: var(--red); color: #fff; }
.kind-seg { display: inline-flex; flex: none; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.kind-seg button { height: 32px; padding: 0 12px; border-radius: 9px; font: 700 13px var(--font); color: var(--muted); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.kind-seg button:hover { color: var(--ink); }
.kind-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.map-list { overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 104px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; transition: opacity .2s; }
.map-list.dim { opacity: .5; pointer-events: none; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; font-size: 13.5px; }
.sk-row { height: 86px; border-radius: var(--r); }
.mrow { min-width: 0; }
.mrow .app-row { transition: background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.mrow.sel .app-row { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow-1); }
.map-box { position: relative; min-height: 0; overflow: hidden; }
#bigmap, .map-host { width: 100%; height: 100%; background: var(--bg-2); }
.map-bar { position: absolute; z-index: 650; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .25s; }
.map-page.loading .map-bar { opacity: 1; }
.map-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 3px; background: var(--red); animation: barSlide 1s var(--ease) infinite; }
@keyframes barSlide { to { left: 100%; } }
.map-area { position: absolute; z-index: 650; top: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px; background: var(--ink); color: var(--bg); font: 700 13.5px var(--font); white-space: nowrap; box-shadow: var(--shadow-3); animation: areaIn .35s var(--spring); }
.map-area .ic { width: 16px; height: 16px; }
.map-area[hidden] { display: none; }
@keyframes areaIn { from { opacity: 0; transform: translate(-50%, -12px) scale(.96); } }
.map-fab { position: absolute; z-index: 650; right: 12px; top: 12px; display: grid; gap: 10px; }
.map-fab button { width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); color: var(--ink); transition: background .2s, color .2s; }
.map-fab button:hover { background: var(--surface-2); }
.fab-group { display: grid; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-2); }
.fab-group button + button { border-top: 1px solid var(--line); }
.map-fab .fab-one { border-radius: 14px; box-shadow: var(--shadow-2); }
.map-fab .fab-one.on { color: var(--blue); }
.map-fab .fab-one.busy .ic { animation: spin 1s linear infinite; }
@media (hover: none) { .fab-group { display: none; } }
.map-empty { position: absolute; z-index: 640; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100% - 32px)); padding: 22px 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-3); display: grid; justify-items: center; gap: 6px; animation: fade .3s; }
.map-empty[hidden] { display: none; }
.map-empty > .ic { width: 30px; height: 30px; color: var(--muted); margin-bottom: 4px; }
.map-empty p { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }
.peek { position: absolute; z-index: 660; left: 12px; right: 12px; bottom: 12px; transition: transform .2s, opacity .2s; }
.peek[hidden] { display: none; }
.peek.show { animation: peekIn .38s var(--spring); }
.peek.out { animation: peekOut .2s ease-in forwards; }
@keyframes peekIn { from { opacity: 0; transform: translateY(28px) scale(.97); } }
@keyframes peekOut { to { opacity: 0; transform: translateY(18px); } }
.peek-card { display: flex; gap: 12px; padding: 10px 52px 10px 10px; min-height: 112px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-3); transition: transform .2s; }
.peek-card:active { transform: scale(.99); }
.peek-media { position: relative; width: 92px; align-self: stretch; min-height: 92px; flex: none; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.peek-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.peek-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.peek-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.peek-tags .chip { height: 22px; padding: 0 8px; font-size: 11px; }
.peek-cat { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.peek-title { font: 700 15.5px/1.25 var(--font); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.peek-meta { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.peek-meta .ic { flex: none; }
.peek-go { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--bg); transition: transform .25s var(--spring); }
.peek-card:hover .peek-go { transform: translate(2px, -2px); }
.peek-x { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: color .2s; }
.peek-x:hover { color: var(--ink); }
.peek-x .ic { width: 16px; height: 16px; }
.map-seg { position: absolute; z-index: 700; left: 50%; bottom: 16px; transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 99px; background: var(--ink); box-shadow: var(--shadow-3); transition: opacity .25s, transform .35s var(--spring); }
.map-seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 99px; background: var(--bg); transition: transform .4s var(--spring); }
.map-page[data-view="list"] .map-seg::before { transform: translateX(100%); }
.map-seg button { position: relative; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 700 14px var(--font); color: color-mix(in srgb, var(--bg) 72%, transparent); white-space: nowrap; transition: color .25s; }
.map-seg button.on { color: var(--ink); }
.map-seg button .ic { width: 18px; height: 18px; }
.map-seg b { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--red-solid); color: #fff; font-size: 11.5px; }
.map-seg b.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.35); } }
.map-page.peeking[data-view="map"] .map-seg { opacity: 0; pointer-events: none; transform: translate(-50%, 24px); }
@media (max-width: 979px) {
  .map-page { grid-template-rows: auto minmax(0, 1fr); }
  .map-page[data-view="map"] .map-list { display: none; }
  .map-page[data-view="list"] .map-box { display: none; }
  .map-page[data-view="map"] .map-side { border: 0; }
  .map-page[data-view="list"] .map-side { grid-row: 1 / -1; }
  .map-page[data-view="list"] .map-list { animation: fade .25s; }
}
@media (min-width: 980px) {
  .map-seg { display: none; }
  .map-list { padding-bottom: 24px; }
  .peek { left: 16px; right: auto; bottom: 16px; width: 380px; }
  .map-area { top: 16px; }
}
.pin { position: relative; width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); border: 2.5px solid #fff; }
.pin svg { transform: rotate(45deg); width: 17px; height: 17px; fill: #fff; }
.pin.lost { background: var(--red); }
.pin.found { background: var(--blue); }
.pin.done { background: var(--muted-2); }
.pin.em::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--red); animation: ping-r 1.6s infinite; }
.pin.me { background: var(--ink); border-radius: 50%; width: 22px; height: 22px; transform: none; }
.pin { transition: transform .3s var(--spring), box-shadow .3s; cursor: pointer; }
.pin.hl { transform: rotate(-45deg) scale(1.18); box-shadow: 0 10px 22px rgba(0, 0, 0, .35); }
.pin.sel { transform: rotate(-45deg) scale(1.28); box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 0 5px rgba(255, 255, 255, .55); animation: pinPop .5s var(--spring); }
@keyframes pinPop { 0% { transform: rotate(-45deg) scale(.9); } 55% { transform: rotate(-45deg) scale(1.4); } 100% { transform: rotate(-45deg) scale(1.28); } }
.me-dot { position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.me-dot::after { content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 50%; background: var(--blue); animation: halo 2.2s ease-out infinite; }
@keyframes halo { from { transform: scale(.4); opacity: .45; } to { transform: scale(1.5); opacity: 0; } }
.mcl { position: relative; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: conic-gradient(var(--red) 0 var(--a), var(--blue) var(--a) var(--b), var(--muted-2) var(--b) 100%); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.mcl b { width: calc(100% - 9px); height: calc(100% - 9px); border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); font: 800 14px/1 var(--font); }
.mcl:hover, .mcl.hl { transform: scale(1.12); }
.mcl.em::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--red); animation: ping-r 1.6s infinite; }
.mini-map { height: 220px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.picker { height: 300px; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--line); position: relative; }
.picker .crosshint { position: absolute; z-index: 500; left: 10px; bottom: 10px; right: 10px; text-align: center; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); font-size: 12.5px; font-weight: 700; pointer-events: none; box-shadow: var(--shadow-1); }

/* ---------- мастер заявки ---------- */
.wizard { max-width: 760px; margin: 0 auto; }
.progress { height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; margin: 6px 0 22px; }
.progress i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--red), #ff5a6b); transition: width .5s var(--ease); }
.step-title { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.pick-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .pick-grid { grid-template-columns: repeat(3, 1fr); } }
.pick { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--line); text-align: left; transition: all .25s var(--ease); }
@media (min-width: 640px) { .pick { flex-direction: column; align-items: flex-start; } }
.pick:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pick.on { border-color: var(--ink); box-shadow: var(--shadow-2); }
.pick .cat-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; }
.pick b { display: block; font-size: 17px; }
.pick span { color: var(--muted); font-size: 13px; }
.wiz-foot { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 5; display: flex; gap: 10px; padding: 14px 0; margin-top: 18px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (min-width: 980px) { .wiz-foot { bottom: 0; } }
.wiz-foot .btn { flex: 1; }
.wiz-foot .btn-ghost { flex: 0 0 auto; }
.success { text-align: center; padding: 40px 10px; }
.success .big-ic { width: 92px; height: 92px; border-radius: 30px; margin: 0 auto 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--green), #0b7a3c); box-shadow: 0 16px 40px rgba(18, 161, 80, .35); animation: pop .6s var(--spring); }
.success .big-ic.wait { background: linear-gradient(145deg, var(--amber), #c47d00); box-shadow: 0 16px 40px rgba(230, 148, 0, .35); }
.success .big-ic .ic { width: 44px; height: 44px; }

/* ---------- страница заявки ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 980px) { .detail { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px; align-items: start; } .detail aside { position: sticky; top: calc(var(--top-h) + 16px); } }
.gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; }
.gallery .dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.gallery .dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .55); transition: all .3s; }
.gallery .dots i.on { width: 20px; background: #fff; }
.gallery .media-ph { position: relative; aspect-ratio: 16 / 9; }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.police { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--ink); color: var(--bg); }
.police .ic { color: #ff6b7a; }

.police a { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-width: 56px; padding: 0 12px; border-radius: 12px; background: var(--red-solid); color: #fff; font: 700 16px var(--display); }
.reward { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(110deg, var(--amber-soft), transparent); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.reward b { font: 600 22px var(--display); }
.actions { display: grid; gap: 10px; }
.actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.actions-row .btn { flex-direction: column; min-height: 64px; gap: 4px; font-size: 12px; padding: 0 6px; }
.status-line { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-weight: 700; font-size: 14px; }

/* ---------- чат ---------- */
.chat-page { display: flex; flex-direction: column; height: calc(100dvh - var(--top-h) - var(--tab-h) - var(--safe-b)); max-width: 820px; margin: 0 auto; }
@media (min-width: 980px) { .chat-page { height: calc(100dvh - var(--top-h) - 24px); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-ava { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--bg); flex: none; }
.chat-warn { margin: 10px 16px 0; padding: 10px 14px; border-radius: 14px; background: var(--amber-soft); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.chat-warn .ic { color: var(--amber); width: 18px; height: 18px; margin-top: 1px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.45; align-self: flex-start; border-bottom-left-radius: 6px; animation: msg .3s var(--ease); word-wrap: break-word; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--ink); color: var(--bg); border-color: transparent; border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.msg img { border-radius: 14px; margin: -4px -8px 6px; max-width: calc(100% + 16px); max-height: 280px; object-fit: cover; cursor: zoom-in; }
.msg time { display: block; font-size: 10.5px; opacity: .72; margin-top: 4px; text-align: right; }
.msg .loc { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.msg-day { align-self: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 8px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg); }
.composer textarea { flex: 1; resize: none; min-height: 46px; max-height: 140px; padding: 12px 16px; border-radius: 23px; border: 1.5px solid var(--line); background: var(--surface); outline: none; font-size: 16px; line-height: 1.35; }
.composer textarea:focus { border-color: var(--ink); }
.composer .icon-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); flex: none; }
.composer .send { background: var(--red); color: #fff; }
.composer .send:hover { background: var(--red-2); }
.chat-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: background .2s; }
.chat-item:hover { background: var(--surface-2); }
.unread-dot { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red-solid); color: #fff; font: 700 11.5px/22px var(--font); text-align: center; }

/* ---------- кабинет ---------- */
.profile-card { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: var(--r-xl); background: var(--ink); color: var(--bg); position: relative; overflow: hidden; }
.profile-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 25, 45, .55), transparent 65%); }

.profile-card > * { position: relative; z-index: 1; }
.ava { width: 68px; height: 68px; border-radius: 22px; background: var(--red-solid) center / cover; display: grid; place-items: center; font: 600 24px var(--display); color: #fff; flex: none; }
.ava-sm { width: 40px; height: 40px; border-radius: 13px; font-size: 15px; }
.lvl { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 700; }
.lvl-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-top: 10px; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff5a6b, #ffb020); border-radius: 6px; transition: width 1s var(--ease); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s; position: relative; min-height: 116px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tile .t-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); }
.tile b { font-size: 14.5px; }
.tile small { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: -6px; }
.tile .dotbadge { top: 14px; right: 14px; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.list > a:hover { background: var(--surface-2); }
.subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 18px; padding: 0 16px; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; height: 38px; padding: 0 14px; border-radius: 99px; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); transition: all .2s; }
.subnav a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.subnav a .ic { width: 16px; height: 16px; }

/* ---------- тарифы и оплата ---------- */
.plans { display: grid; gap: 14px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { padding: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; transition: transform .3s var(--ease), box-shadow .3s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.plan.hl { background: var(--ink); color: var(--bg); }
.plan.hl .muted { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.plan .price { font: 600 36px/1 var(--display); letter-spacing: -.03em; }
.plan .price s { font-size: 16px; opacity: .45; margin-left: 6px; }
.plan .price small { font: 600 14px var(--font); opacity: .6; }
.plan .btn { margin-top: auto; }
.paybox { max-width: 460px; margin: 20px auto; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-3); border: 1px solid var(--line); }
.paybox .pay-top { padding: 18px 22px; background: linear-gradient(120deg, #0e0f13, #2a2c33); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.paybox .pay-top b { font: 600 26px var(--display); }
.cardviz { aspect-ratio: 1.6; border-radius: 18px; padding: 18px; color: #fff; background: linear-gradient(135deg, #1687dc, #0b3f73 60%, #e0192d 140%); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 16px 36px rgba(11, 63, 115, .35); font-family: var(--display); }
.qr { width: 200px; height: 200px; margin: 0 auto; display: grid; grid-template-columns: repeat(21, 1fr); gap: 1px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-2); }
.qr i { background: #0e0f13; border-radius: 1px; }
.qr i.w { background: transparent; }

/* ---------- таблицы и админ ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
/* подсказка «таблица листается»: тень у края, за которым есть ещё колонки (без JS — background-attachment: local) */
.table-wrap { background:
  linear-gradient(90deg, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
  linear-gradient(270deg, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, var(--scroll-sh), transparent) left / 18px 100% no-repeat scroll,
  radial-gradient(farthest-side at 100% 50%, var(--scroll-sh), transparent) right / 18px 100% no-repeat scroll,
  var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr:hover td { background: var(--surface-2); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .t th, .t td { padding-left: 10px; padding-right: 10px; } }
.admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 18px; }
@media (min-width: 980px) { .admin { grid-template-columns: 236px minmax(0, 1fr); gap: 28px; } }
/* навигация админки — те же .me-nav / .me-pick / .me-sheet, что и в личном кабинете (см. ниже); здесь только отличия */
.admin .me-pick { margin-bottom: 14px; }
.admin .me-pick b { white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
.admin .admin-nav a, .me-sheet.admin-sheet a { font-size: 13.5px; }
.admin-nav a .grow, .admin-sheet a .grow { min-width: 0; }
.admin-nav a .cnt, .admin-sheet a .cnt, .me-pick-all .cnt { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red-solid); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
/* в листе счётчик — бейджем в углу плитки, чтобы длинным названиям хватало ширины */
.me-sheet.admin-sheet a { position: relative; gap: 10px; padding: 0 10px; }
.admin-sheet a .cnt { position: absolute; top: -7px; right: -5px; box-shadow: 0 0 0 2px var(--surface); }
@media (min-width: 980px) {
  /* 18 пунктов: компактнее и с собственной прокруткой, чтобы колонка помещалась в экран */
  .admin-nav { align-self: start; max-height: calc(100dvh - var(--top-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
  .admin .admin-nav a { min-height: 38px; }
  .admin .admin-nav a .ic { width: 18px; height: 18px; }
}
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.kpi { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.kpi b { display: block; font: 600 28px/1.1 var(--display); letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi.red b { color: var(--red); }
.kpi.blue b { color: var(--blue); }
.kpi.green b { color: var(--green); }
.chart { width: 100%; height: 180px; display: block; }
.chart .bar { transition: opacity .2s; }
.chart .bar:hover { opacity: .75; }
.hbar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar i { display: block; height: 10px; border-radius: 5px; background: var(--ink); transform-origin: left; animation: grow .8s var(--ease) both; }
.hbar .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mod-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
@media (min-width: 760px) { .mod-card { grid-template-columns: 120px 1fr auto; align-items: start; } }
.mod-card .thumb { width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-2); position: relative; }
.mod-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-card .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 760px) { .mod-card .acts { flex-direction: column; } }

/* ---------- всплывающие окна ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 9, 12, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s var(--ease); }
@media (min-width: 640px) { .overlay { align-items: center; padding: 20px; } }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 20px calc(22px + var(--safe-b)); animation: up .4s var(--ease); box-shadow: var(--shadow-3); overscroll-behavior: contain; }
@media (min-width: 640px) { .sheet { border-radius: 26px; padding: 22px 26px 26px; animation: zoom .3s var(--ease); } }
.sheet.wide { max-width: 860px; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 14px; }
@media (min-width: 640px) { .sheet .grab { display: none; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h3 { font-size: 20px; }
.overlay.closing { animation: fade .2s reverse forwards; }
.overlay.closing .sheet { animation: down .25s var(--ease) forwards; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .92); display: grid; place-items: center; animation: fade .2s; }
.lightbox img { max-width: 96vw; max-height: 90dvh; border-radius: 10px; animation: zoom .3s var(--ease); }
.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 12px); display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-3); font-size: 14px; font-weight: 600; animation: toast .5s var(--spring); cursor: pointer; }
.toast.err .ic { color: #ff6b7a; }
.toast.ok .ic { color: #3ddc84; }
.toast.out { animation: toast-out .3s var(--ease) forwards; }
.toast small { display: block; opacity: .7; font-weight: 500; }

/* ---------- состояния ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); }
.empty > .ic { width: 42px; height: 42px; margin: 0 auto 12px; color: var(--muted-2); } /* только значок пустого блока, не иконки в кнопках */
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.sk { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--r-lg); }
.sk-card { height: 300px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line-2); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }

/* ---------- анимации ---------- */
.view { animation: view .5s var(--ease) backwards; } /* backwards: после анимации transform не остаётся — иначе карта «на весь экран» запирается внутри страницы */
.rise { opacity: 0; animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
@keyframes view { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes zoom { from { opacity: 0; transform: scale(.94); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes line { from { transform: scaleX(0); } }
@keyframes msg { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes toast { from { opacity: 0; transform: translateY(-24px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, #d3172b 28%, transparent); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(224, 25, 45, .5); } 80%, 100% { box-shadow: 0 0 0 22px rgba(224, 25, 45, 0); } }
@keyframes ping-w { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 80%, 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
@keyframes ping-r { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- узкие экраны ---------- */
@media (max-width: 560px) {
  .brand small { display: none; }
  .brand span { font-size: 13.5px; white-space: normal; line-height: 1.15; max-width: 120px; }
  .brand img { width: 40px; height: 34px; }
  .top-in { gap: 8px; }
  .top-act { gap: 2px; }
  .icon-btn { width: 38px; height: 38px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hero-stats div b { font-size: 24px; }
  .radar { max-width: 320px; }
  .radar .float { font-size: 11.5px; padding: 7px 10px; }
}

/* лента событий в кабинете */
.feed-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--bg-2); color: var(--ink-2); }
.feed-ic .ic { width: 22px; height: 22px; }
.feed-ic.n-match, .feed-ic.n-chat { background: var(--blue-soft); color: var(--blue); }
.feed-ic.n-emergency { background: var(--red-soft); color: var(--red); }
.feed-ic.n-points, .feed-ic.n-payment { background: var(--amber-soft); color: var(--amber); }
.feed-ic.n-status { background: var(--green-soft); color: var(--green); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* преимущества партнёрства */
.perks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.perks li { display: flex; gap: 14px; align-items: flex-start; }
.perks .perk-ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #ff5a6a; }
.perks .perk-ic .ic { width: 24px; height: 24px; }
.perks b { display: block; font-size: 15px; }
.perks li > div > span { font-size: 13px; opacity: .65; }

/* блок «рядом» на странице заявки */
.near-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.near-list a { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 14px; transition: background .2s; }
.near-list a:hover { background: var(--surface-2); }
.near-th { position: relative; width: 52px; height: 52px; flex: none; border-radius: 13px; overflow: hidden; background: var(--bg-2); }
.near-th img { width: 100%; height: 100%; object-fit: cover; }

/* ===== мобильное удобство ===== */
a, button, .btn, .chip, .tab, .icon-btn, label, summary, [data-cat] { touch-action: manipulation; }
/* поле ввода при фокусе не прячется под шапкой или нижним меню */
input, textarea, select { scroll-margin: calc(var(--top-h) + 20px) 0 calc(var(--tab-h) + 96px); }
/* iOS не увеличивает страницу при фокусе, если шрифт поля ≥ 16 px */
@media (pointer: coarse) { input, textarea, select { font-size: max(16px, 1em); } }
@media (max-width: 759px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 979px) {
  /* открыта клавиатура: нижнее меню уходит, кнопки мастера прижимаются к клавиатуре */
  .tabbar { transition: transform .25s var(--ease); }
  body.kb .tabbar { transform: translateY(115%); pointer-events: none; }
  body.kb main { padding-bottom: 24px; }
  body.kb .wiz-foot { bottom: 0; }
  body.kb .m-cta { display: none; }
  /* чат — на весь экран, как в мессенджере, поле ввода всегда над клавиатурой */
  body[data-route="chat"] .tabbar { display: none; }
  body[data-route="chat"] main { padding-bottom: 0; min-height: 0; }
  body[data-route="chat"] .chat-page { height: calc(var(--vvh, 100dvh) - var(--top-h)); padding-bottom: var(--safe-b); }
  /* горизонтальные меню: мягкие края и доводка к пункту */
  .subnav { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 30px), transparent); }
  .subnav a { scroll-snap-align: center; }
}
/* крупнее области нажатия на сенсорных экранах */
@media (pointer: coarse) {
  .btn-sm { min-height: 40px; }
  .back { min-height: 40px; padding-right: 8px; }
  .subnav a { height: 40px; }
}
/* плавающая кнопка «Написать» на странице заявки (телефон) */
.m-cta { position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(var(--tab-h) + var(--safe-b) + 36px); z-index: 55;
  transform: translateY(160%); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .4s var(--spring), opacity .25s, visibility 0s .4s; }
/* скрытая копия не должна получать фокус с клавиатуры и читаться экранным диктором — отсюда visibility */
.m-cta.show { transform: none; opacity: 1; pointer-events: auto; visibility: visible; transition: transform .4s var(--spring), opacity .25s, visibility 0s; }
.m-cta .btn { box-shadow: 0 14px 34px -6px rgba(224, 25, 45, .5); }
@media (min-width: 980px) { .m-cta { display: none; } }
/* платежи на телефоне — карточками вместо таблицы */
@media (max-width: 560px) {
  table.t-cards thead { display: none; }
  table.t-cards, table.t-cards tbody { display: block; width: 100%; }
  table.t-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.t-cards tr:last-child { border-bottom: 0; }
  table.t-cards td { display: block; padding: 0 !important; border: 0 !important; text-align: left; white-space: normal !important; }
  table.t-cards td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 12.5px; color: var(--muted); }
  table.t-cards td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 700; }
  table.t-cards td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  table.t-cards td:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
  table.t-cards td:nth-child(5) { grid-column: 1 / -1; }
  table.t-cards td:empty { display: none; }
}

/* ---------- правовые документы ---------- */
.doc-link { color: var(--blue-t); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color .2s; }
.doc-link:hover { text-decoration-color: currentColor; }
.dark-band .doc-link { color: inherit; }
.legal-wrap { max-width: 1080px; }
.legal-wrap .page-head h1 { font-size: clamp(22px, 6.2vw, 42px); line-height: 1.12; overflow-wrap: anywhere; hyphens: auto; text-wrap: balance; }
.legal-tabs { margin: 12px -16px 16px; }
.legal-tabs .chip { flex: none; min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.legal-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.legal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.legal-layout { display: grid; gap: 16px; align-items: start; }
.legal-toc { padding: 0; overflow: hidden; }
.legal-toc summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none; }
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc summary::after { content: ""; width: 8px; height: 8px; border: 2px solid var(--muted); border-top: 0; border-left: 0; transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease); }
.legal-toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.legal-toc ol { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; gap: 2px; }
.legal-toc button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.35; color: var(--ink-2); transition: background .2s, color .2s; }
.legal-toc button span { flex: none; min-width: 20px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.legal-toc button:hover { background: var(--surface-2); }
.legal-toc button.on { background: var(--bg-2); color: var(--ink); font-weight: 700; }
.legal-toc button.on span { color: var(--red); }
.legal-doc { padding: 22px 18px; }
.legal-body { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.legal-sec { scroll-margin-top: calc(var(--top-h) + 16px); }
.legal-sec + .legal-sec { margin-top: 26px; }
.legal-sec h2 { font-size: 19px; line-height: 1.3; margin: 0 0 12px; color: var(--ink); display: flex; gap: 8px; }
.legal-sec h2 span { color: var(--red); font-variant-numeric: tabular-nums; }
.legal-p { display: flex; gap: 12px; margin: 0 0 10px; }
.legal-n { flex: none; min-width: 34px; color: var(--muted); font-weight: 700; font-size: 13.5px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.legal-li { position: relative; margin: -4px 0 8px 46px; }
.legal-li::before { content: ""; position: absolute; left: -14px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.legal-req { margin-top: 28px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.legal-req dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; }
.legal-req dt { color: var(--muted); }
.legal-req dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  /* на телефоне подпись над значением — номера счетов не рвутся посередине */
  .legal-req dl { grid-template-columns: 1fr; gap: 0; }
  .legal-req dt { font-size: 13px; margin-top: 10px; }
  .legal-req dt:first-child { margin-top: 0; }
}
.legal-end { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-index { display: grid; gap: 12px; }
.legal-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s; }
.legal-card:hover { box-shadow: var(--shadow-2); }
.legal-card-main { display: flex; align-items: center; gap: 14px; padding: 18px; }
.legal-card-main b { display: block; font-size: 16px; line-height: 1.3; }
.legal-card-main .small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; min-height: 2.9em; }
.legal-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.legal-ic .ic { width: 24px; height: 24px; }
.legal-dl { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--blue-t); transition: background .2s; }
.legal-dl:hover { background: var(--surface-2); }
.legal-sheet .legal-body { font-size: 14.5px; margin-top: 18px; }
.legal-sheet .legal-sec h2 { font-size: 16.5px; }
.legal-sheet-foot { position: sticky; bottom: calc(-22px - var(--safe-b)); display: flex; gap: 10px; margin: 18px -20px calc(-22px - var(--safe-b)); padding: 12px 20px calc(14px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.legal-skel { display: grid; gap: 10px; }
.legal-skel i { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2)); background-size: 200% 100%; animation: lgsk 1.2s infinite linear; }
.legal-skel i:nth-child(2n) { width: 80%; }
@keyframes lgsk { to { background-position: -200% 0; } }
@media (min-width: 720px) { .legal-index { grid-template-columns: 1fr 1fr; } .legal-doc { padding: 34px 40px; } .legal-tabs { margin-left: 0; margin-right: 0; padding: 0; } }
@media (min-width: 980px) {
  .legal-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
  .legal-toc { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100dvh - var(--top-h) - 32px); overflow-y: auto; }
  .legal-toc summary { pointer-events: none; }
  .legal-toc summary::after { display: none; }
}
@media print {
  .top, .tabbar, .footer, .legal-tabs, .legal-actions, .legal-toc, .legal-end, .page-head .back, #toasts { display: none !important; }
  body, main { background: #fff !important; color: #000 !important; padding: 0 !important; min-height: 0 !important; }
  .legal-wrap { max-width: none; padding: 0; }
  .legal-layout { display: block; }
  .legal-doc { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .legal-body { font-size: 11pt; color: #000; }
  .legal-sec h2 { break-after: avoid; }
  .legal-p, .legal-li { break-inside: avoid; }
}
/* карта: компактные строки списка — метаданные в одну строку */
.mrow .app-row .meta { flex-wrap: nowrap; gap: 8px; overflow: hidden; }
.mrow .app-row .meta span { white-space: nowrap; flex: none; }
.mrow .app-row .meta span:nth-child(2) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mrow .app-row .meta span + span::before { content: "·"; margin-right: 8px; opacity: .6; }
.mrow .app-row .meta span:empty, .mrow .app-row .meta span:first-child { display: none; }
.mrow .app-row .meta span:nth-child(2)::before { content: none; }
body[data-route="map"] main { padding-bottom: 0; min-height: 0; }

/* ===== Личный кабинет → Профиль ===== */
.prof { max-width: 1040px; }
.prof-hero { position: relative; overflow: hidden; padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.prof-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 92px; background: radial-gradient(120% 140% at 0% 0%, var(--red-soft), transparent 60%), radial-gradient(90% 120% at 100% 0%, var(--blue-soft), transparent 65%); pointer-events: none; }
.prof-hero > * { position: relative; }
.prof-hero-top { display: flex; gap: 16px; align-items: center; }
.prof-id { min-width: 0; flex: 1; }
.prof-id h2 { font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.prof-since { margin-top: 8px; }
.prof-chip { background: var(--surface-2); }
.prof-ava { position: relative; flex: none; }
.ava-xl { width: 92px; height: 92px; border-radius: 30px; font-size: 32px; box-shadow: 0 0 0 4px var(--surface), var(--shadow-2); }
.prof-ava-btn { position: absolute; right: -6px; bottom: -6px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--ink); color: var(--bg); box-shadow: 0 0 0 3px var(--surface); transition: transform .25s var(--spring); }
.prof-ava-btn:hover { transform: scale(1.08); }
.prof-ava-btn:active { transform: scale(.94); }
.prof-ava-btn .ic { width: 18px; height: 18px; }
.prof-ava.loading .ava { opacity: .45; }
.prof-ava.loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  border: 3px solid var(--line-2); border-top-color: var(--red); animation: spin .8s linear infinite; }
.prof-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.prof-stats a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); transition: background .2s, transform .2s var(--spring); min-width: 0; }
.prof-stats a:hover { background: var(--bg-2); transform: translateY(-2px); }
.prof-stats b { font: 700 24px/1.1 var(--display); }
.prof-stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.prof-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
@media (min-width: 980px) { .prof-layout { grid-template-columns: minmax(0, 1fr) 320px; } .prof-layout > aside { position: sticky; top: calc(var(--top-h) + 16px); } }
.prof-h { margin-bottom: 16px; }
.prof-h p { margin-top: 4px; }
.prof-ro { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 12px 15px; border-radius: 14px; background: var(--bg-2); color: var(--ink-2); font-weight: 600; }
.prof-ro .ic { color: var(--muted); }
.field.bad input { border-color: var(--red) !important; }
/* панель сохранения: появляется только при изменениях и прилипает над нижним меню */
.prof-save { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 6; display: none; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); }
.prof-save.on { display: flex; animation: saveIn .35s var(--spring); }
@keyframes saveIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.prof-save .btn-ghost { --c: var(--bg); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.prof-save .btn-ghost:hover { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }
.prof-save .btn:not(.btn-ghost) { --b: var(--bg); --c: var(--ink); }
@media (min-width: 980px) { .prof-save { bottom: 16px; } }
@media (max-width: 420px) { .prof-save .grow { flex-basis: 100%; } .prof-save .btn { flex: 1; } }
/* контакты для входа */
.prof-cts { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.prof-ct { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; min-width: 0; }
.prof-ct + .prof-ct { border-top: 1px solid var(--line); }
.prof-ct-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.prof-ct-v { display: block; font-size: 15.5px; margin-top: 2px; }
.prof-ct-v.muted { font-weight: 600; }
.prof-ct-act { display: flex; align-items: center; gap: 4px; flex: none; }
.prof-ok { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--green-t); font-weight: 700; }
.prof-ok .ic { width: 12px; height: 12px; }
@media (max-width: 420px) { .prof-ct { flex-wrap: wrap; } .prof-ct-act { width: 100%; justify-content: flex-end; padding-left: 54px; } .prof-ct-act .btn { flex: 1; } }
.prof-links small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.prof-links > a > .ic:first-child { color: var(--muted); }
@media (max-width: 560px) {
  .prof-hero { padding: 18px 16px; }
  .prof-hero-top { flex-direction: column; text-align: center; gap: 12px; }
  .prof-id .row-wrap { justify-content: center; }
  .prof-stats a { align-items: center; padding: 12px 6px; }
  .prof-stats b { font-size: 22px; }
}
@media (min-width: 760px) {
  .prof-hero { display: flex; align-items: center; gap: 24px; padding: 24px; }
  .prof-hero-top { flex: 1; min-width: 0; }
  .prof-stats { margin-top: 0; width: 360px; flex: none; }
}

/* ===== Карта: быстрые фильтры без горизонтальной прокрутки ===== */
.map-quick { display: grid; gap: 8px; margin: 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.mq-row { display: flex; gap: 8px; align-items: stretch; }
.mq-row .kind-seg { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mq-row .kind-seg button { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
.mq-row .sos { flex: none; height: auto; }
.cat-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cat-seg .filter-chip { justify-content: center; min-width: 0; padding: 0 8px; }
.cat-seg .filter-chip span { overflow: hidden; text-overflow: ellipsis; }
@media (pointer: coarse) { .mq-row .kind-seg button { height: 32px; } .cat-seg .filter-chip { height: 40px; } }
/* узкие телефоны (360 px): «Животные» помещается без многоточия */
@media (max-width: 380px) { .cat-seg .filter-chip { padding: 0 4px; gap: 4px; font-size: 13px; } }
/* сортировка списка */
.list-head { min-height: 34px; flex-wrap: wrap; }
.sort-sel { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 28px 0 10px; margin-left: auto; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.sort-sel:hover { border-color: var(--line-2); }
.sort-sel:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.sort-sel select { appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 0; margin: 0; height: 100%; width: auto; min-width: 0; font: 700 13px var(--font); color: var(--ink); cursor: pointer; outline: none; }
.sort-sel .chev { position: absolute; right: 9px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%) rotate(90deg); pointer-events: none; }
@media (pointer: coarse) { .sort-sel select { font-size: 16px; } }

/* ===== Главная: последние заявки компактной сеткой ===== */
@media (max-width: 639px) {
  .apps-latest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .apps-latest .app-card { border-radius: 18px; }
  .apps-latest .app-card .media { aspect-ratio: 1 / 1; }
  .apps-latest .app-card .tags { top: 8px; left: 8px; right: 8px; gap: 4px; }
  .apps-latest .app-card .tags .chip { height: 24px; padding: 0 8px; font-size: 11px; gap: 4px; }
  .apps-latest .app-card .tags .chip:not(.chip-lost):not(.chip-found):not(.chip-em):not(.chip-ok) { width: 24px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .apps-latest .app-card .body { padding: 10px 12px 12px; gap: 4px; }
  .apps-latest .app-card h3 { font-size: 14px; }
  .apps-latest .app-card .chip-warn { height: 22px; font-size: 11px; padding: 0 8px; }
  .apps-latest .app-card .meta { flex-direction: column; gap: 2px; font-size: 11.5px; padding-top: 4px; }
  .apps-latest .app-card .meta span { display: block; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .apps-latest .app-card .meta .ic { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
  .apps-latest .media-ph .ph-t { display: none; }
  .apps-latest .media-ph .ph-ic { width: 56px; height: 56px; border-radius: 18px; }
  .apps-latest .media-ph .ph-ic .ic { width: 28px; height: 28px; }
}

/* ===== Истории успешных находок ===== */
.story-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: auto; }
.story-chip, .story-ok { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.story-chip { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.story-ok { background: rgba(18, 161, 80, .92); color: #fff; }
.story-chip .ic, .story-ok .ic { width: 14px; height: 14px; }
.story-body { display: grid; gap: 8px; }
.story-body h3 { font-size: 21px; line-height: 1.15; }
.story-body p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.story .city { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
.story .city .ic { width: 13px; height: 13px; }
.story > .story-ic { position: absolute; z-index: 0; right: -18px; top: 48px; color: #fff; opacity: .16; pointer-events: none; }
.story > .story-ic .ic { width: 150px; height: 150px; }
@media (max-width: 759px) {
  .stories { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
  .story { flex: none; min-height: 0; }
  .story:first-child { min-height: 340px; }
  /* остальные истории — аккуратные строки: фото слева, текст справа */
  .story:not(:first-child) { display: flex; flex-direction: column; gap: 6px; min-height: 136px; padding: 12px 12px 12px 122px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: none; }
  .story:not(:first-child)::before, .story:not(:first-child)::after { display: none; }
  .story:not(:first-child) > .story-bg, .story:not(:first-child) > .story-ic { position: absolute; left: 12px; top: 12px; bottom: auto; right: auto; width: 96px; height: calc(100% - 24px); border-radius: 14px; object-fit: cover; opacity: 1; z-index: 0; }
  .story:not(:first-child) > .story-ic { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
  .story:not(:first-child) > .story-ic .ic { width: 40px; height: 40px; }
  .story:not(:first-child) .story-top { margin: 0; }
  .story:not(:first-child) .story-body { gap: 4px; align-content: start; }
  .story:not(:first-child) .story-chip { background: var(--surface-2); color: var(--ink-2); height: 24px; padding: 0 9px; font-size: 11px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .story:not(:first-child) .story-ok { display: none; }
  .story:not(:first-child) h3 { font-size: 16px; }
  .story:not(:first-child) p { font-size: 13px; -webkit-line-clamp: 3; }
  .story:not(:first-child) .city { color: var(--muted); opacity: 1; font-size: 11px; }
  .story:not(:first-child):hover .story-bg { transform: none; }
}

/* ===== Страница заявки: на телефоне действия сразу под заголовком ===== */
@media (max-width: 979px) {
  .detail > .d-side { display: contents; }
  .detail > .d-side > * { order: 1; }
  .detail > .d-side > #near { order: 3; }
  .detail > .d-side > #near:empty { display: none; }
  .detail > .d-rest { order: 2; }
}
@media (min-width: 980px) {
  .detail > .d-top { grid-column: 1; grid-row: 1; }
  .detail > .d-rest { grid-column: 1; grid-row: 2; }
  .detail > .d-side { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
}
.aside-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s; }
.aside-link:hover { background: var(--surface-2); }
.aside-link > .ic:first-child { width: 22px; height: 22px; color: var(--blue); flex: none; }
.aside-link b { display: block; font-size: 14px; }
.aside-link small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ===== Личный кабинет: навигация без горизонтальной ленты ===== */
.me-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.me-main { min-width: 0; }
.me-nav { display: none; }
.me-nav nav, .me-sheet { display: grid; gap: 2px; }
.me-nav a, .me-sheet a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.me-nav a .ic, .me-sheet a .ic { width: 20px; height: 20px; flex: none; }
.me-nav a:hover, .me-sheet a:hover { background: var(--surface-2); color: var(--ink); }
.me-nav a.on, .me-sheet a.on { background: var(--ink); color: var(--bg); }
.me-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.me-sheet a { min-height: 54px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; line-height: 1.2; }
.me-pick { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; margin-bottom: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--ink); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.me-pick:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.me-pick-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.me-pick-ic .ic { width: 20px; height: 20px; }
.me-pick small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.me-pick b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-pick-all { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 32px; padding: 0 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.me-pick-all .ic { transform: rotate(90deg); }
@media (min-width: 980px) {
  .me-layout { grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
  .me-nav { display: block; position: sticky; top: calc(var(--top-h) + 16px); padding: 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
  .me-pick { display: none; }
}

/* ---------- страница заявки: сетка и детали ---------- */
@media (min-width: 980px) {
  .detail { grid-template-areas: "top side" "rest side"; row-gap: 22px; }
  .detail .d-top { grid-area: top; } .detail .d-rest { grid-area: rest; }
  .detail .d-side { grid-area: side; align-self: start; max-height: calc(100dvh - var(--top-h) - 32px); overflow-y: auto; scrollbar-width: none; }
  .detail .d-side::-webkit-scrollbar { display: none; }
  .gallery .media-ph { aspect-ratio: 21 / 9; }
}
.kv { margin: 0; }
.detail .card.pad:has(> .kv) { padding-top: 6px; padding-bottom: 6px; }
.detail h1 { overflow-wrap: anywhere; }
.actions-row { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.actions-row .btn { white-space: nowrap; }
.owner-contact { display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.owner-contact b { color: var(--ink); font-weight: 700; }
.owner-danger { display: flex; justify-content: center; gap: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.owner-danger .link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); min-height: 36px; }
.owner-danger .link:hover { color: var(--ink); }
.owner-danger #del:hover { color: var(--red); }
.aside-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.aside-link:hover { border-color: var(--line-2); transform: translateY(-1px); }
.aside-link > .ic:first-child { color: var(--blue); flex: none; }
.aside-link b { display: block; font-size: 14px; }
.aside-link small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 520px) {
  .police { padding: 14px; gap: 12px; }
  .police a { min-width: 48px; height: 40px; padding: 0 10px; font-size: 15px; }
  .reward b { font-size: 20px; }
}
/* заявка без фото: заглушка ниже, чтобы не занимать пол-экрана */
@media (min-width: 980px) { .gallery > .media-ph { aspect-ratio: 21 / 9; } }
@media (min-width: 980px) { .gallery .track { max-height: 520px; } }
.actions-row .btn[aria-pressed="true"] .ic { fill: currentColor; }

/* радиус SOS в панели автора */
.em-rad { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, currentColor 12%, transparent); white-space: nowrap; }

/* =========================================================
   Редакция «Сервис объявлений»
   Серый фон, белые скруглённые блоки, крупный поиск, плитки
   категорий с фото, плотная сетка заявок. Фирменный цвет —
   вишнёвый из исходного макета (#b31746). Только светлая тема.
   Для взрослых: текст ≥ 16px, кнопки ≥ 48px, понятные подписи.
   ========================================================= */
:root {
  --bg: #f0f1f4;
  --bg-2: #e6e8ec;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --fill: #eceef2;
  --fill-2: #e0e3e8;
  --ink: #1b1b1f;
  --ink-2: #303139;
  --muted: #676a74;
  --muted-2: #9a9da6;
  --line: #e7e8ec;
  --line-2: #d5d8de;
  --blue: #b31746;
  --blue-2: #8f1239;
  --blue-soft: #fbe9ef;
  --btn: #b31746;
  --btn-2: #8f1239;
  --red: #e0262f;
  --red-2: #b81d25;
  --red-soft: #fdeaea;
  --red-solid: #d9232c;
  --green: #12804a;
  --green-soft: #e3f4ea;
  --amber: #b06d00;
  --amber-soft: #fcf1dd;
  --wine-1: #2a0410;
  --wine-2: #5c0c26;
  --wine-3: #8f1239;
  --shadow-1: 0 1px 3px rgba(20, 20, 30, .06);
  --shadow-2: 0 10px 28px rgba(20, 20, 30, .09);
  --shadow-3: 0 24px 60px rgba(20, 20, 30, .18);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --top-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.25, .5, 1);
  --font: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

body { background: var(--bg); }

/* ---------- типографика ---------- */
body { font: 400 17px/1.55 var(--font); letter-spacing: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(28px, 3.3vw, 40px); letter-spacing: -.02em; line-height: 1.12; }
h2 { font-size: clamp(22px, 2.3vw, 28px); }
h3 { font-size: 19px; letter-spacing: -.01em; line-height: 1.3; }
.small { font-size: 15px; }
.xs { font-size: 13.5px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
a.link, .link { color: var(--blue-t); font-weight: 600; }
a.link:hover, .link:hover { text-decoration: underline; text-underline-offset: 3px; }

.sec-head .eyebrow, .hero .eyebrow, #partner .eyebrow, .page-head .eyebrow:has(~ h1) { display: none; }
.sec-head h2, .page-head h1 { margin-top: 0 !important; }
.eyebrow { text-transform: none; letter-spacing: 0; font: 600 15px var(--font); color: var(--muted); }
.eyebrow::before { display: none; }

/* ---------- шапка ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.top.scrolled { box-shadow: var(--shadow-1); }
.brand span { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.brand small { font: 400 13px/1.2 var(--font); text-transform: none; letter-spacing: 0; color: var(--muted); }
.nav a { border-radius: 10px; font-size: 16px; font-weight: 500; color: var(--ink-2); padding: 9px 14px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--fill); color: var(--ink); }
.nav a.on { background: var(--blue-soft); color: var(--blue-t); font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; }
.icon-btn:hover { background: var(--fill); }
.lang-btn { font: 600 14px var(--font); border-radius: 12px; }
.top-new { margin-right: 4px; }
@media (max-width: 1179px) { .top-new { display: none !important; } }
@media (max-width: 520px) { .brand span { font-size: 17px; } }

/* ---------- нижняя панель (телефон) ---------- */
.tabbar { background: var(--surface); border-top: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tab { font-size: 12px; font-weight: 600; }
.tab.on { color: var(--blue-t); }
.tab.on::before { background: var(--blue); width: 28px; }
.tab-fab .fab { background: var(--btn); border-radius: 16px; box-shadow: 0 8px 20px color-mix(in srgb, var(--btn) 40%, transparent); }

/* ---------- кнопки ---------- */
.btn { --b: var(--btn); --c: #fff; min-height: 50px; border-radius: var(--r); font-weight: 600; font-size: 16px; letter-spacing: 0; padding: 0 22px;
  transition: background .2s, box-shadow .2s, color .2s, transform .15s; }
.btn:hover { box-shadow: none; }
.btn:active { transform: scale(.98); }
.btn-blue, .btn-red { background: var(--btn); }
.btn-blue:hover, .btn-red:hover { background: var(--btn-2); box-shadow: none; }
.btn-red.btn-urgent { background: var(--red-solid); }
.btn-red.btn-urgent:hover { background: var(--red-2); }
.btn-ghost, .btn-soft { background: var(--fill); box-shadow: none; }
.btn-ghost:hover, .btn-soft:hover { background: var(--fill-2); box-shadow: none; }
.btn.btn-soft, .btn.btn-ghost { --c: var(--ink); color: var(--ink); }
.btn.btn-danger { --b: var(--red-soft); --c: var(--red-t); background: var(--red-soft); color: var(--red-t); }
.btn-sm { min-height: 42px; border-radius: 10px; font-size: 15px; padding: 0 16px; }
.btn-xs { min-height: 36px; border-radius: 8px; font-size: 14px; }
.btn-lg { min-height: 56px; border-radius: 14px; font-size: 17px; padding: 0 26px; }

/* ---------- метки ---------- */
.chip { border-radius: 8px; font-weight: 600; font-size: 13.5px; letter-spacing: 0; }
.chip-lost { background: var(--blue-soft); color: var(--blue-t); }
.chip-em { background: var(--red-solid); color: #fff; }
.app-card .tags .chip { box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.app-card .tags .chip-lost { background: var(--btn); color: #fff; }
.app-card .tags .chip-em { background: var(--red-solid); color: #fff; }
.app-card .tags .chip-found, .app-card .tags .chip-ok { background: var(--green); color: #fff; }

/* ---------- поверхности ---------- */
.card { border-radius: var(--r-xl); border: 0; box-shadow: none; background: var(--surface); }
.card h1, .card h2 { font-size: clamp(24px, 2.4vw, 28px); line-height: 1.2; }
.note { border-radius: var(--r); font-size: 16px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.sec-head { margin-bottom: 20px; }
.sec-head p, .page-head p { font-size: 17px; }

/* ---------- формы: серая заливка, как в сервисах объявлений ---------- */
.field > span { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select { min-height: 52px; border-radius: var(--r); font-size: 17px; background: var(--fill); border: 1.5px solid transparent; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-2); }
.field input:focus, .field textarea:focus, .field select:focus { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.seg { border-radius: var(--r); background: var(--fill); }
.seg button { border-radius: 10px; font-size: 15px; min-height: 44px; font-weight: 600; }
.check { font-size: 16px; }
.search-box { border-radius: var(--r); background: var(--fill); border: 1.5px solid transparent; box-shadow: none; }
.search-box:focus-within { background: var(--surface); border-color: var(--blue); }

/* ---------- главная: белые блоки на сером фоне ---------- */
.home { display: grid; gap: 16px; padding-top: 16px; padding-bottom: 40px; }
.blk { background: var(--surface); border-radius: var(--r-xl); padding: 28px 32px; min-width: 0; }
@media (max-width: 640px) { .home { gap: 12px; padding-top: 12px; } .blk { padding: 20px 16px; border-radius: 20px; } }
.blk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.blk-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 16px; color: var(--blue-t); white-space: nowrap; }
.blk-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.hb-top { display: grid; gap: 20px; align-items: end; }
@media (min-width: 980px) { .hb-top { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; } }
.hb-text .lead { margin-top: 10px; font-size: 17px; color: var(--muted); max-width: 40em; }
.hb-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hb-cta .btn { gap: 10px; }
@media (max-width: 520px) { .hb-cta .btn { flex: 1 1 100%; } }

/* большая строка поиска */
.big-search { display: flex; align-items: stretch; margin-top: 24px; min-height: 60px; border: 2px solid var(--btn); border-radius: 16px; overflow: hidden; background: var(--surface); transition: box-shadow .25s; }
.big-search:focus-within { box-shadow: 0 0 0 4px var(--blue-soft); }
.bs-cat { display: flex; border-right: 1px solid var(--line); background: var(--surface-2); }
.bs-cat select { appearance: none; -webkit-appearance: none; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23676a74'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  padding: 0 40px 0 18px; font: 600 16px var(--font); color: var(--ink); min-width: 190px; cursor: pointer; }
.bs-cat select:focus-visible { outline-offset: -3px; }
.bs-in { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--muted); }
.bs-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 17px var(--font); color: var(--ink); min-height: 56px; }
.bs-in input::placeholder { color: var(--muted); }
.big-search .btn { border-radius: 0; min-height: 0; padding: 0 34px; font-size: 17px; }
@media (max-width: 640px) {
  .big-search { min-height: 54px; border-radius: 14px; }
  .bs-cat { display: none; }
  .bs-in { padding: 0 12px; } .bs-in input { min-height: 50px; font-size: 16px; }
  .big-search .btn { padding: 0 18px; font-size: 16px; }
}

.hero-stats { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 16px; }
.hero-stats div { display: flex; align-items: baseline; gap: 6px; }
.hero-stats div b { font: 700 20px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-stats div span { font-size: 15px; color: var(--muted); }

/* плитки категорий с фото */
.ctiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
@media (min-width: 900px) { .ctiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.ctile { position: relative; display: block; min-height: 176px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink); overflow: hidden; isolation: isolate; transition: background .25s; }
.ctile:hover { background: var(--fill); }
.ctile-people { background: var(--blue-soft); }
.ctile-people:hover { background: color-mix(in srgb, var(--blue) 18%, var(--surface)); }
.ctile-tx { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; max-width: 62%; }
.ctile b { font-size: 18px; font-weight: 600; line-height: 1.25; }
.ctile-tx > span { font-size: 14.5px; color: var(--muted); line-height: 1.35; }
.ctile img { position: absolute; right: -8px; bottom: -8px; width: 46%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow-2); transition: transform .5s var(--ease); }
.ctile-found img { object-position: 50% 62%; }
.ctile:hover img { transform: translate(-4px, -4px) scale(1.05); }
.svc-n { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.svc-n:empty { display: none; }
.svc-n b { color: var(--ink); font-weight: 700; }
@media (max-width: 520px) {
  .ctile { min-height: 168px; padding: 14px; }
  .ctile-tx { max-width: 100%; }
  .ctile b { font-size: 16px; }
  .ctile-tx > span { font-size: 13.5px; }
  .ctile img { width: 54%; right: -6px; bottom: -6px; border-radius: 14px; }
  .svc-n { display: none; }
}
/* Телефоны экстренных служб: одна компактная строка; на телефоне листается вбок, номера нажимаются */
.sos-phones { display: flex; align-items: center; gap: 8px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sos-phones::-webkit-scrollbar { display: none; }
.sos-lbl { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 14px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.sos-lbl .ic { color: var(--red); }
.sos-ph { display: inline-flex; align-items: baseline; gap: 6px; flex: none; min-height: 36px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.sos-ph b { font-weight: 800; font-variant-numeric: tabular-nums; }
.sos-ph span { color: var(--muted); }
.sos-ph:hover { border-color: var(--red); background: var(--red-soft); }
.sos-ph:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (max-width: 760px) { .hero-blk .sos-phones { margin-left: -16px; margin-right: -16px; padding: 0 16px; } }
/* в окне «Новая заявка» — под выбором, с подписью сверху */
.sos-phones.sheet { flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); overflow: visible; }
.sos-phones.sheet .sos-lbl { flex-basis: 100%; }
/* в подвале — только номера, мелко */
.footer .sos-phones.mini { flex-wrap: wrap; overflow: visible; gap: 6px; margin-top: 14px; }
.footer .sos-phones.mini .sos-lbl { flex-basis: 100%; font-size: 13px; }
.footer .sos-phones.mini .sos-ph { display: inline-flex; padding: 5px 10px; min-height: 32px; font-size: 13px; }
.footer .sos-phones.mini .sos-ph:hover { color: var(--ink); }

/* ---------- карточки заявок: фото и текст без рамок ---------- */
.app-card { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; transition: none; }
.app-card:hover { transform: none; box-shadow: none; }
.app-card .media { border-radius: var(--r-lg); background: var(--surface-2); }
.app-card .media img { transition: transform .6s var(--ease); }
.app-card:hover .media img { transform: scale(1.05); }
.app-card .body { padding: 10px 2px 4px; gap: 4px; }
.app-card h3 { font: 600 17px/1.3 var(--font); letter-spacing: 0; color: var(--ink); transition: color .2s; }
.app-card:hover h3 { color: var(--blue-t); }
.app-card .meta { font-size: 14px; font-weight: 400; color: var(--muted); padding-top: 4px; }
.app-card.em { border: 0; box-shadow: none; }
.app-card.em .media { box-shadow: 0 0 0 3px var(--red-solid); }
.app-card .score { background: var(--btn); color: #fff; }
/* на сером фоне (кабинет, избранное) карточка — белым блоком */
:not(.blk) > .apps > .app-card, .apps:not(.apps-latest) > .app-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
:not(.blk) > .apps > .app-card .body, .apps:not(.apps-latest) > .app-card .body { padding: 12px 14px 14px; }
.apps:not(.apps-latest) > .app-card .media { border-radius: 0; }
@media (max-width: 639px) {
  .apps-latest .app-card { border-radius: 0; }
  .apps-latest .app-card .body { padding: 8px 2px 4px; }
  .apps-latest .app-card h3 { font-size: 15px; }
  .apps-latest .app-card .meta { font-size: 13px; }
}
.app-row { border-radius: var(--r-lg); }

/* ---------- промо-баннеры ---------- */
.promos { display: grid; gap: 16px; }
@media (min-width: 900px) { .promos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.promo { position: relative; display: flex; min-height: 220px; padding: 28px 32px; border-radius: var(--r-xl); overflow: hidden; isolation: isolate; }
.promo-tx { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.promo b { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.promo-tx > span:not(.btn) { font-size: 16px; line-height: 1.45; }
.promo-wine { background: linear-gradient(120deg, var(--wine-1) 0%, var(--wine-2) 55%, var(--wine-3) 100%); color: #fff; }
.promo-wine .promo-tx { max-width: 58%; }
.promo-wine .promo-tx > span:not(.btn) { color: rgba(255, 255, 255, .84); }
.promo-wine img { position: absolute; inset: 0 0 0 auto; width: 46%; height: 100%; object-fit: cover; z-index: 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 45%); mask-image: linear-gradient(to right, transparent, #000 45%); transition: transform .8s var(--ease); }
.promo-wine:hover img { transform: scale(1.05); }
.promo-btn { align-self: flex-start; margin-top: 10px; background: #fff; color: var(--wine-3) !important; --c: var(--wine-3); }
.promo-wine:hover .promo-btn { background: #ffe9f0; }
.promo-light { background: var(--surface); color: var(--ink); }
.promo-light .promo-tx { width: 100%; }
.promo-light .promo-tx > span { color: var(--muted); }
.promo-light .search-box { margin-top: 10px; }
@media (max-width: 640px) {
  .promo { min-height: 0; padding: 20px 16px; border-radius: 20px; }
  .promo b { font-size: 19px; }
  .promo-wine .promo-tx { max-width: 68%; }
  .promo-wine img { width: 52%; }
}

/* ---------- шаги ---------- */
.steps { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { padding: 20px; border: 0; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: none; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--btn); color: #fff; font: 700 18px var(--font); }
.step h4 { font: 600 18px/1.3 var(--font); margin: 14px 0 6px; }
.step p { font-size: 15.5px; color: var(--muted); }

.em-strip { border-radius: var(--r-lg); background: var(--red-solid); box-shadow: none; font-size: 16px; }

/* ---------- успешные находки ---------- */
.stories .story { padding: 0; min-height: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; background: var(--surface-2); color: var(--ink); border: 0; border-radius: var(--r-lg); box-shadow: none; }
.stories .story::before, .stories .story::after { display: none; }
.stories .story > .story-bg, .stories .story > .story-ic { position: relative; inset: auto; left: auto; top: auto; right: auto; bottom: auto; width: 100%; height: 190px; object-fit: cover; border-radius: 0; opacity: 1; display: block; flex: none; z-index: 0; transition: transform .7s var(--ease); }
.stories .story:hover > .story-bg { transform: scale(1.04); }
.stories .story > .story-ic { display: grid; place-items: center; background: var(--fill); color: var(--muted); }
.stories .story > .story-ic .ic { width: 56px; height: 56px; }
.stories .story .story-top { margin: 0; padding: 14px 18px 0; position: relative; }
.stories .story .story-body { padding: 8px 18px 20px; gap: 6px; align-content: start; position: relative; }
.stories .story .story-chip { background: var(--surface); color: var(--ink-2); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 8px; height: 28px; padding: 0 10px; font-size: 13.5px; font-weight: 600; }
.stories .story .story-ok { display: inline-flex; background: var(--green-soft); color: var(--green-t); border-radius: 8px; height: 28px; padding: 0 10px; font-size: 13.5px; font-weight: 600; }
.stories .story h3 { font-size: 18px; line-height: 1.25; }
.stories .story p { font-size: 15.5px; color: var(--muted); opacity: 1; -webkit-line-clamp: 4; }
.stories .story .city { color: var(--muted); font-size: 14px; opacity: 1; text-transform: none; letter-spacing: 0; font-weight: 500; }
@media (max-width: 759px) {
  .stories { display: grid; gap: 10px; overflow: visible; margin: 0; padding: 0; }
  .stories .story { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .stories .story > .story-bg, .stories .story > .story-ic { grid-row: 1 / span 2; height: 100%; min-height: 150px; }
  .stories .story .story-top { padding: 12px 14px 0; }
  .stories .story .story-body { padding: 6px 14px 14px; }
  .stories .story h3 { font-size: 17px; }
  .stories .story p { -webkit-line-clamp: 3; font-size: 15px; }
}

/* ---------- сотрудничество ---------- */
.partner-grid { gap: 32px; align-items: start; }
.perks .perk-ic { border-radius: 12px; background: var(--blue-soft); color: var(--blue-t); }
.perks b { font-size: 16px; }
.perks li > div > span { font-size: 15px; opacity: 1; color: var(--muted); }
.dark-band { background: var(--surface); color: var(--ink); border: 0; border-radius: var(--r-xl); box-shadow: none; }
.dark-band::before { display: none; }
.dark-band .muted { color: var(--muted); }
.dark-band .field > span { opacity: 1; }

/* ---------- страница заявки ---------- */
.police { background: var(--red-soft); color: var(--ink); box-shadow: inset 4px 0 0 var(--red); border: 0; border-radius: var(--r-lg); }
.police .ic { color: var(--red-t); }
.police .xs { opacity: 1 !important; color: var(--ink-2); font-size: 15px; }
.police a { border-radius: 10px; font: 700 18px var(--font); height: 46px; min-width: 64px; }
.gallery .media-ph { background: var(--surface); border: 0; border-radius: var(--r-xl); }

/* заявка без фото: спокойная заглушка с иконкой категории */
.media-ph, .media-ph.c-people, .media-ph.c-animals, .media-ph.c-things { background: var(--surface-2); color: var(--muted-2); }
.media-ph::before, .media-ph::after { display: none; }
.media-ph .ph-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); box-shadow: none; backdrop-filter: none; color: var(--muted); }
.media-ph .ph-ic .ic { width: 30px; height: 30px; }
.media-ph .ph-t { font: 500 13px var(--font); letter-spacing: 0; text-transform: none; color: var(--muted); }

/* ---------- кабинет ---------- */
.profile-card { background: var(--surface); color: var(--ink); border: 0; border-radius: var(--r-xl); box-shadow: none; }
.profile-card::after { display: none; }
.profile-card .lvl { background: var(--fill); color: var(--ink-2); box-shadow: none; border-radius: 8px; font-size: 13.5px; height: 30px; }
.profile-card .xs[style*="opacity"] { opacity: 1 !important; color: var(--muted); }
.lvl-bar { background: var(--fill); height: 8px; border-radius: 4px; }
.lvl-bar i, .progress i { background: var(--btn); }
.ava { border-radius: 50%; background-color: var(--btn); font-family: var(--font); font-weight: 700; }
.profile-card .ava[style*="gradient"] { background: var(--amber-soft) !important; color: var(--amber-t); }
.me-nav { border: 0; }
.me-nav a { font-size: 16px; border-radius: 10px; }
.me-nav a:hover { background: var(--fill); }
.me-nav a.on, .me-sheet a.on { background: var(--blue-soft); color: var(--blue-t); font-weight: 600; box-shadow: none; }
.prof-hero::before { display: none; }

/* «Назад» с длинным e-mail на шаге кода не выходит за край экрана */
.back { max-width: 100%; min-width: 0; overflow-wrap: anywhere; text-align: left; }

/* ---------- подвал ---------- */
.footer { background: var(--surface); font-size: 15.5px; border-top: 0; margin-top: 0; }
.footer h5 { font: 600 16px var(--font); }
.footer a { padding: 5px 0; transition: color .2s; }
.footer a:hover { color: var(--blue-t); }

/* ---------- движение: спокойное появление; уважение к «меньше движения» ---------- */
.rise { opacity: 0; animation: up .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.in { opacity: 1; transform: none; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rise, .reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .ctile img, .promo-wine img, .app-card .media img, .stories .story > .story-bg { transition: none; }
}

/* шире сетка — как у сервисов объявлений; пункты меню не переносятся */
:root { --max: 1280px; }
.nav a { white-space: nowrap; }
@media (min-width: 900px) { .apps-latest { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; } }
@media (min-width: 521px) { .ctile { min-height: 190px; } .ctile-tx { max-width: 60%; } }

/* шапка: когда видна кнопка «Разместить заявку», пункты «Потерял»/«Нашёл» не дублируются */
@media (min-width: 1180px) { .nav a.nav-new { display: none; } }
@media (min-width: 521px) { .ctile img { width: 40%; } .ctile-tx { max-width: 57%; } .ctile .svc-n { flex-direction: column; gap: 2px; } }

/* «Найдено» — всегда зелёным, «Потеряно» — фирменным: статусы не путаются */
.chip-found, .chip-ok { background: var(--green-soft); color: var(--green-t); border-color: transparent; }
/* плитки кабинета и админки — белые блоки без рамок, подписи крупнее */
.tile { border: 0; border-radius: var(--r-lg); min-height: 124px; transition: box-shadow .25s; }
.tile:hover { transform: none; box-shadow: var(--shadow-2); }
.tile .t-ic { background: var(--blue-soft); color: var(--blue-t); border-radius: 12px; }
.tile b { font-size: 16px; }
.tile small { font-size: 13.5px; font-weight: 500; margin-top: -4px; }
/* переключатель разделов кабинета на телефоне */
.me-pick { border: 0; border-radius: var(--r-lg); }
.me-pick-ic { background: var(--btn); color: #fff; border-radius: 12px; }
.me-pick small { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.me-pick-all { background: var(--fill); font-size: 14px; }
.app-row { border: 0; }

/* карта: «потеряно» — фирменный вишнёвый, «найдено» — зелёный, экстренно — красная пульсация */
.pin.lost { background: var(--btn); }
.pin.found { background: var(--green); }

.mcl { background: conic-gradient(var(--btn) 0 var(--a), var(--green) var(--a) var(--b), var(--muted-2) var(--b) 100%); }

/* ---------- карты: выше, метка заметная, разворот на весь экран ---------- */
.picker { height: clamp(380px, 56vh, 600px); border-radius: var(--r-lg); border: 0; background: var(--surface-2); }
.picker .crosshint { display: flex; align-items: center; justify-content: center; gap: 8px; left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 10px 16px; border-radius: 12px; font-size: 15px; font-weight: 600; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); transition: background .3s, color .3s; }
.picker:not(.picked) .crosshint { background: var(--btn); color: #fff; }
.picker .crosshint .ic { flex: none; }
.pin.pick-pin { box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 8px 18px rgba(0, 0, 0, .35); animation: pickDrop .45s var(--spring); }
@keyframes pickDrop { 0% { transform: rotate(-45deg) translate(-14px, -14px) scale(.6); opacity: 0; } 100% { transform: rotate(-45deg); opacity: 1; } }
.mini-map { height: clamp(260px, 38vh, 380px); border-radius: var(--r-lg); border: 0; position: relative; }
.map-fab > button, .map-full-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); cursor: pointer; }
.map-fab > button:hover, .map-full-btn:hover { background: var(--fill); }
.mini-map > .map-fab { z-index: 650; }
.map-done { display: none; }
.map-full { position: fixed !important; inset: 0 !important; z-index: 150 !important; width: auto !important; height: auto !important; max-height: none !important; border-radius: 0 !important; margin: 0 !important; }
.map-full .map-host { height: 100% !important; }
.map-full .map-fab { top: calc(env(safe-area-inset-top, 0px) + 12px); }
.map-full .map-done { display: inline-flex; position: absolute; z-index: 700; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); min-width: 200px; gap: 8px; box-shadow: var(--shadow-3); }
.map-full .crosshint { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px) !important; }
body.map-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .pin.pick-pin { animation: none; } }
/* кнопки масштаба карты — крупные, удобно попадать пальцем */
/* слои карты не вылезают поверх кнопок формы и шапки */
.picker, .mini-map { isolation: isolate; z-index: 0; }
.map-full { isolation: isolate; }
@media (max-width: 640px) {
  .picker:not(.map-full) .crosshint { top: 12px; bottom: auto; max-width: calc(100% - 136px); font-size: 14px; padding: 8px 12px; text-align: center; }
}

/* ---------- карта (Leaflet + OpenStreetMap) ---------- */
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { transition: transform .3s ease-out, opacity .3s ease-in; }
.leaflet-cluster-spider-leg { transition: stroke-dashoffset .3s ease-out, stroke-opacity .3s ease-in; }
.leaflet-container { font-family: var(--font) !important; background: var(--surface-2); }

.leaflet-popup-content-wrapper { border-radius: 16px !important; box-shadow: var(--shadow-3) !important; background: var(--surface) !important; color: var(--ink) !important; }
.leaflet-popup-tip { background: var(--surface) !important; }
.leaflet-popup-content { margin: 12px 14px !important; font-size: 13px !important; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-2) !important; border-radius: 12px !important; overflow: hidden; }
/* кнопки масштаба карты — крупные, удобно попадать пальцем */
.leaflet-touch .leaflet-control-zoom a, .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 22px !important; }
.map-full .leaflet-top { top: env(safe-area-inset-top, 0px); }
/* подпись в углу — только «© OpenStreetMap», мелко и аккуратно */
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted) !important; font-size: 10px !important; padding: 0 6px !important; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted) !important; }

/* админка → «Система»: готовность к работе */
.ready-ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; margin-right: 10px; }
.ready-ic.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.ready-ic.no { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.warn-t { color: var(--red); font-weight: 600; text-align: right; }

/* шапка на ноутбуках и планшетах (980–1279 px): пункты меню плотнее, подзаголовок логотипа скрыт; до 1100 px — только знак */
@media (max-width: 979px) { .icon-btn.desk-only { display: none; } }
@media (min-width: 980px) and (max-width: 1279px) {
  .brand small { display: none; }
  .brand span { font-size: 17px; }
  .top-in { gap: 10px; }
  .nav { margin-left: 4px; }
  .nav a { padding: 8px 10px; font-size: 15px; }
  .top-act { gap: 4px; }
}
@media (min-width: 980px) and (max-width: 1099px) { .brand > span { display: none; } }

/* тарифы: заголовок выделенного тарифа — цветом карточки */
.plan.hl h3 { color: inherit; }
/* листы и диалоги — поверх элементов карты (переключатель «Карта / Список», кнопки, слои Leaflet) */
.overlay { z-index: 1100; }
.lightbox { z-index: 1150; }
.toasts { z-index: 1200; }
/* главная, телефон: фото в плитке категорий — под текстом, а не поверх него */
@media (max-width: 520px) {
  .ctile { display: flex; flex-direction: column; }
  .ctile img { position: relative; right: auto; bottom: auto; display: block; width: 58%; margin: auto -6px -6px auto; padding-top: 0; }
  .ctile-tx { margin-bottom: 10px; }
}
/* галерея заявки на широком экране: фото на всю ширину блока (высота ограничена) */
@media (min-width: 980px) { .gallery .track { width: 100%; } }
/* ошибка у поля формы: красная рамка и пояснение под полем */
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--red-solid) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-solid) 16%, transparent) !important; }
.picker.has-err { outline: 2px solid var(--red-solid); outline-offset: 2px; }
.check.has-err { color: var(--red-t); flex-wrap: wrap; }
.ferr { margin: 6px 0 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--red-t); }
.check.has-err .ferr { flex-basis: 100%; }
/* переключатели-сегменты на узком экране: кнопки делят ширину поровну и не вылезают за карточку */
.seg button { flex: 1 1 0; min-width: 0; }
@media (max-width: 400px) { .seg button { padding: 0 6px; gap: 5px; font-size: 14.5px; } }
.check.has-err input { border-color: var(--red-solid); }
/* реестр ценностей: статус слева, «изменить/удалить» — справа в одну строку; без фото — невысокая заглушка */
.reg-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.reg-st { display: flex; gap: 6px; flex: none; }
.reg-st .btn-xs { padding: 0 12px; }
.reg-tools { display: flex; gap: 4px; margin-left: auto; flex: none; }
.btn-xs.btn-ic { width: 40px; min-width: 40px; min-height: 40px; padding: 0; }
.reg-card .media.no-photo { aspect-ratio: 16 / 7; }
/* админка на телефоне: широкие таблицы — карточками, без горизонтальной прокрутки */
@media (max-width: 640px) {
  .table-wrap:has(> table.t-stack) { background: var(--surface); overflow-x: visible; }
  table.t-stack thead { display: none; }
  table.t-stack, table.t-stack tbody, table.t-stack tr { display: block; width: 100%; }
  table.t-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.t-stack tr:last-child { border-bottom: 0; }
  table.t-stack tr:hover td { background: none; }
  table.t-stack td { position: relative; display: block; min-height: 26px; padding: 4px 0 4px 112px !important; border: 0 !important; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  table.t-stack td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; width: 102px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
  table.t-stack td:not([data-label]) { padding: 8px 0 0 !important; }
  table.t-stack td:not([data-label])::before { content: none; }
  table.t-stack td:empty { display: none; }
  table.t-stack td select { max-width: 100%; }
}
/* звёздочка обязательного поля — контраст не ниже 4.5:1 */
.field > span em { color: var(--red-t); }
/* графики админки: подписи осей обычным текстом (читаемы на телефоне) */
.chart-box { position: relative; }
.chart-box .chart { display: block; width: 100%; height: auto; }
.chart-y { position: absolute; right: 0; transform: translateY(-120%); font-size: 12.5px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface); padding: 1px 0 1px 4px; }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
/* сенсорные экраны: зоны нажатия не меньше 40 px */
@media (pointer: coarse), (max-width: 760px) {
  .footer a { padding: 9px 0; }
  .search-box .fbtn { width: 40px; height: 40px; top: 4px; right: 4px; }
  .filter-chip { height: 40px; }
  .row.between > a.link, .sec-head a.link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; margin: -8px -6px; }
  .msg .loc { min-height: 40px; }
}
/* главная, телефон: заголовок в узкой карточке ленты — до трёх строк */
@media (max-width: 520px) { .apps-latest .app-card h3 { -webkit-line-clamp: 3; } }
@media (pointer: coarse) { .sos-ph, .footer .sos-phones.mini .sos-ph { min-height: 40px; align-items: center; } }
.footer-grid > * { min-width: 0; }
.footer .sos-phones.mini .sos-ph { white-space: normal; }
@media (max-width: 759px) { .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- цвета действий: «Потерял» — красный, «Нашёл» — зелёный, поиск — индиго (белый текст, контраст ≥ 4.9:1) ---------- */
:root {
  --lost: #d9232c; --lost-2: #b81d25; --lost-soft: #fdeaea;
  --found: #12804a; --found-2: #0d6a3c; --found-soft: #e3f4ea;
  --search: #3f4fd6; --search-2: #3341bf; --search-soft: #eceefe;
}
.btn.btn-lost { --b: var(--lost); --c: #fff; background: var(--lost); color: #fff; }
.btn.btn-lost:hover { background: var(--lost-2); }
.btn.btn-found { --b: var(--found); --c: #fff; background: var(--found); color: #fff; }
.btn.btn-found:hover { background: var(--found-2); }
.btn.btn-search { --b: var(--search); --c: #fff; background: var(--search); color: #fff; gap: 8px; }
.btn.btn-search:hover { background: var(--search-2); }
.btn.btn-lost:focus-visible, .btn.btn-found:focus-visible, .btn.btn-search:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* большая строка поиска на главной — в цвет поиска */
.big-search { border-color: var(--search); }
.big-search:focus-within { box-shadow: 0 0 0 4px var(--search-soft); }
.big-search .btn.btn-search:focus-visible { outline-offset: -4px; outline-color: #fff; }
/* кнопка-стрелка в поиске по реестру */
.search-box .fbtn.fbtn-search { background: var(--search); }
.search-box .fbtn.fbtn-search .ic { color: #fff; }
.search-box .fbtn.fbtn-search:hover { background: var(--search-2); }
.search-box:focus-within { border-color: var(--search); }
/* «Искать в этой области» на карте */
.map-area.map-area-search { background: var(--search); color: #fff; }
.map-area.map-area-search:hover { background: var(--search-2); }
/* переключатель «Потеряно / Найдено» на карте */
.kind-seg button.k-lost.on { background: var(--lost); color: #fff; }
.kind-seg button.k-found.on { background: var(--found); color: #fff; }
/* «Потерял» / «Нашёл» в шапке (видны на средних экранах) */
.nav a.nav-lost { color: var(--lost-2); }
.nav a.nav-found { color: var(--found-2); }
.nav a.nav-lost:hover { background: var(--lost-soft); color: var(--lost-2); }
.nav a.nav-found:hover { background: var(--found-soft); color: var(--found-2); }
.nav a.nav-lost.on { background: var(--lost); color: #fff; }
.nav a.nav-found.on { background: var(--found); color: #fff; }

/* ==================================================
   Кнопка SOS в шапке и окно экстренных служб
   ========================================================= */
.sos-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 11px; border-radius: 12px; flex: none; cursor: pointer; border: 0;
  font: 700 15px/1 var(--font); letter-spacing: .07em; color: color-mix(in srgb, var(--red-solid) 82%, #000);
  background: color-mix(in srgb, var(--red-solid) 7%, var(--surface));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red-solid) 38%, transparent);
  transition: background .2s, color .2s, transform .15s;
}
.sos-btn:hover { background: var(--red-solid); color: #fff; }
.sos-btn:hover .sos-dot { background: #fff; }
.sos-btn:active { transform: scale(.95); }
.sos-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--red-solid) 45%, transparent); outline-offset: 2px; }
.sos-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-solid); animation: sosPulse 1.8s ease-out infinite; }
@keyframes sosPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red-solid) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@media (min-width: 980px) { .sos-btn { height: 44px; padding: 0 14px 0 12px; margin-right: 2px; } }

.svc-list { display: grid; gap: 10px; }
.svc {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-areas: "ic tx" "ic num"; column-gap: 14px; row-gap: 10px; align-items: start;
  padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: background .2s, transform .2s;
}
.svc:hover { background: var(--fill); }
.svc:active { transform: scale(.985); }
.svc-ic { grid-area: ic; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--red-solid); background: color-mix(in srgb, var(--red-solid) 10%, var(--surface)); }
.svc-ic .ic { width: 23px; height: 23px; }
.svc-tx { grid-area: tx; display: grid; gap: 3px; min-width: 0; }
.svc-tx b { font-size: 16px; font-weight: 700; line-height: 1.3; }
.svc-tx > span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.svc-num {
  grid-area: num; justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 11px; border-radius: 999px;
  font: 700 16px/1.1 var(--font); letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink);
}
.svc-num .ic { color: var(--red-solid); width: 16px; height: 16px; }
.svc[href^="#"] .svc-num { font-size: 14px; color: var(--muted); }
.svc[href^="#"] .svc-ic { color: var(--ink); background: var(--surface); }
.svc-main { background: linear-gradient(140deg, var(--red-solid), color-mix(in srgb, var(--red-solid) 72%, #000)); color: #fff; box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--red-solid) 80%, transparent); }
.svc-main:hover { background: linear-gradient(140deg, color-mix(in srgb, var(--red-solid) 92%, #fff), color-mix(in srgb, var(--red-solid) 72%, #000)); }
.svc-main .svc-ic { background: rgba(255, 255, 255, .16); color: #fff; }
.svc-main .svc-tx > span { color: rgba(255, 255, 255, .9); }
.svc-main .svc-num { background: #fff; color: var(--red-solid); box-shadow: none; font-size: 22px; padding: 7px 16px 7px 13px; }
.svc-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.svc-foot .ic { flex: none; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .sos-dot { animation: none; } .svc, .sos-btn { transition: none; } }

/* =========================================================
   SOS — красная кнопка с белой надписью, мигает (кольцо-«маяк» и точка)
   ========================================================= */
.sos-btn { color: #fff; background: var(--red-solid); box-shadow: 0 0 0 0 color-mix(in srgb, var(--red-solid) 60%, transparent); animation: sosBeacon 1.6s ease-out infinite; }
.sos-btn:hover { background: color-mix(in srgb, var(--red-solid) 86%, #000); color: #fff; }
.sos-dot, .sos-btn:hover .sos-dot { background: #fff; box-shadow: none; animation: sosBlink 1.6s steps(1, end) infinite; }
@keyframes sosBeacon { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red-solid) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes sosBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }
@media (max-width: 520px) { .sos-btn { padding: 0 10px 0 9px; gap: 6px; height: 38px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .sos-btn, .sos-dot { animation: none; } }

/* Язык: значок глобуса + RU/EN всегда, в одной «таблетке» */
.lang-btn { gap: 5px; padding: 0 10px; color: var(--ink); }
.lang-btn .ic { display: block; width: 18px; height: 18px; color: var(--blue); }
@media (max-width: 420px) {
  .brand { gap: 7px; }
  .brand img { width: 38px; height: 32px; }
  .brand span { font-size: 14.5px; max-width: 96px; }
  .lang-btn { padding: 0 7px; gap: 4px; }
  .lang-btn .ic { width: 17px; height: 17px; }
  .top-act { gap: 2px; }
}

/* =========================================================
   Нижняя панель: значок раздела в «таблетке» — выделяется и увеличивается, как плюс
   ========================================================= */
.tab { gap: 2px; padding: 4px 0; }
.tab.on::before { display: none; }
.tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s, transform .25s var(--spring); }
.tab .tab-ic .ic { width: 23px; height: 23px; transform: none; }
.tab.on { color: var(--blue-t); font-weight: 700; }
.tab.on .tab-ic { background: var(--blue-soft); color: var(--blue); transform: scale(1.12); animation: tabPop .38s var(--spring); }
.tab:active .tab-ic { background: var(--blue-soft); transform: scale(.9); }
.tab-fab:active .fab { transform: scale(.9) rotate(90deg); }
@keyframes tabPop { 0% { transform: scale(.86); } 60% { transform: scale(1.2); } 100% { transform: scale(1.12); } }
.tab .dotbadge { top: -2px; right: calc(50% - 26px); z-index: 1; }
@media (prefers-reduced-motion: reduce) { .tab.on .tab-ic { animation: none; } .tab-ic { transition: none; } }

/* =========================================================
   Документы: разделы сворачиваются, номер раздела не переносится
   ========================================================= */
.legal-fold-bar { display: flex; justify-content: flex-end; margin: -4px 0 6px; }
.legal-fold-all { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; font: 600 14px var(--font); color: var(--blue-t); background: var(--blue-soft); cursor: pointer; }
.legal-fold-all:hover { background: color-mix(in srgb, var(--blue) 14%, var(--surface)); }
.legal-fold-all:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: 2px; }
details.legal-sec { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
.legal-sec + .legal-sec { margin-top: 0; }
.legal-sec-plain { margin-bottom: 10px; }
details.legal-sec > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; border-radius: 10px; }
details.legal-sec > summary::-webkit-details-marker { display: none; }
details.legal-sec > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: 2px; }
details.legal-sec > summary h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 1.3; display: flex; gap: 8px; }
.legal-sec h2 .legal-hn { flex: none; white-space: nowrap; color: var(--red); font-variant-numeric: tabular-nums; }
.legal-plus { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); transition: background .2s, transform .3s var(--spring); }
.legal-plus::before, .legal-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.5px; margin: -1.25px 0 0 -7px; border-radius: 2px; background: var(--blue); transition: transform .3s var(--spring); }
.legal-plus::after { transform: rotate(90deg); }
details.legal-sec[open] .legal-plus { background: var(--blue); }
details.legal-sec[open] .legal-plus::before, details.legal-sec[open] .legal-plus::after { background: #fff; }
details.legal-sec[open] .legal-plus::after { transform: rotate(0deg); }
details.legal-sec > summary:hover .legal-plus { transform: scale(1.08); }
.legal-sec-body { padding: 0 0 14px; }
details.legal-sec::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
details.legal-sec[open]::details-content { block-size: auto; }
.legal-sheet details.legal-sec > summary h2 { font-size: 16px; }
.legal-sheet .legal-plus { width: 30px; height: 30px; }
@media (prefers-reduced-motion: reduce) { details.legal-sec::details-content, .legal-plus, .legal-plus::before, .legal-plus::after { transition: none; } }
@media print {
  .legal-fold-bar, .legal-plus { display: none !important; }
  details.legal-sec { border: 0; }
  details.legal-sec::details-content { block-size: auto !important; content-visibility: visible !important; }
  details.legal-sec > summary { padding: 0; margin: 14px 0 8px; }
}
.legal-sec h2 span:not(.legal-hn) { color: var(--ink); }
/* самые узкие телефоны (до 380 px): SOS мигает кольцом без точки, кнопки плотнее — название остаётся в две строки */
@media (max-width: 380px) {
  .sos-dot { display: none; }
  .sos-btn { padding: 0 10px; }
  .lang-btn { padding: 0 5px; }
  .top-act .btn-sm { padding: 0 12px; }
}
/* Тип вещи в мастере заявки: переключатели-«пилюли» */
.tpick { display: flex; flex-wrap: wrap; gap: 8px; }
.tpick label { position: relative; display: inline-flex; }
.field .tpick input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.tpick span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-2); font-weight: 700; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; }
.tpick label:hover span { border-color: var(--ink); }
.tpick input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tpick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.field.has-err .tpick span { border-color: var(--red-solid); }

/* =========================================================
   Шапка: логотип крупный везде. Компьютер и планшет — название в одну строку с подписью, как было;
   телефон (до 560 px) — название мелко, ровно в три строки, подпись скрыта
   ========================================================= */
.top .brand { gap: 12px; flex: none; }
.top .brand img { width: 74px; height: 60px; object-fit: contain; }
@media (max-width: 560px) {
  .top .brand { gap: 8px; }
  .top .brand img { width: 64px; height: 52px; }
  .top .brand .brand-name {
    display: block; width: min-content; max-width: none; white-space: normal;
    font: 700 13px/1.08 var(--display); letter-spacing: -.01em; color: var(--ink);
  }
  .top .brand .brand-name small { display: none; }
}
@media (max-width: 349px) {
  .top .brand { gap: 6px; }
  .top .brand img { width: 56px; height: 46px; }
  .top .brand .brand-name { font-size: 12px; }
}

/* ноутбуки 1040–1099 px: название одной строкой, без подписи; уже 1040 px — только знак, как было (иначе не помещаются значки кабинета) */
@media (min-width: 1040px) and (max-width: 1099px) {
  .top .brand > .brand-name { display: block; font-size: 16px; }
  .top .brand { gap: 8px; }
  .top .brand img { width: 64px; height: 52px; }
}

/* =========================================================
   Мобильная полировка: плотнее, ровнее, понятный отклик на касание
   ========================================================= */
/* касание: нажатая карточка чуть «проседает» — видно, что нажатие сработало */
.app-card .media { transition: transform .15s var(--ease); }
.app-card:active .media { transform: scale(.97); }
.ctile:active, .chat-item:active { background: var(--fill); }
.pick:active, .tile:active { transform: scale(.98); transition-duration: .12s; }
/* на сенсорных экранах эффекты наведения не «залипают» после касания */
@media (hover: none) {
  .app-card:hover .media img, .ctile:hover img { transform: none; }
  .app-card:hover h3 { color: inherit; }
  .tile:hover, .pick:hover, .step3:hover { transform: none; box-shadow: none; }
  .pick:hover { border-color: var(--line); }
}
/* мелкие ссылки-действия: область нажатия не меньше 40 px, вид прежний */
@media (pointer: coarse) {
  .blk-more, #view a.link { display: inline-flex; align-items: center; min-height: 40px; }
  .blk-more { padding: 0 6px; margin: -8px -6px; }
}
/* заголовок раздела с кнопкой справа — по центру строки, а не по нижнему краю */
.sec-head:not(:has(p)) { align-items: center; }

@media (max-width: 639px) {
  /* «Как это работает» и шаги волонтёра: номер слева от текста — в 1,6 раза короче */
  .step { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px; }
  .step::before { grid-row: 1 / span 2; }
  .step h4 { margin: 0 0 4px; font-size: 17px; align-self: center; min-height: 40px; display: flex; align-items: center; }
  .step p { grid-column: 2; font-size: 15px; line-height: 1.45; margin: 0; }
  /* реестр: значок слева, номер шага прячем — порядок и так виден */
  .step3 { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; padding: 16px; align-items: start; }
  .step3-n { display: none; }
  .step3-ic { grid-row: 1 / span 2; margin: 0; }
  .step3 h4 { margin: 2px 0 4px; }
  .step3 p { grid-column: 2; }
  /* заявка без фото: заглушка ниже, сразу видно заголовок и кнопки */
  .gallery > .media-ph, .gallery .media-ph { aspect-ratio: 2 / 1; }
  /* карточка экстренной заявки: «Экстренно» — только значком, чипы не наезжают друг на друга */
  .apps-latest .app-card .tags .chip-em { font-size: 0; gap: 0; padding: 0 7px; }
  .apps-latest .app-card .tags .chip-em .ic { width: 14px; height: 14px; }
}
@media (max-width: 759px) {
  /* подвал: документы на всю ширину — названия не рвутся на 4 строки */
  .footer-grid > :last-child { grid-column: 1 / -1; }
  /* лента телефонов и вкладки документов прокручиваются вбок — край мягко гаснет */
  .hero-blk .sos-phones, .legal-tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .hero-blk .sos-phones { padding-right: 28px; }
}
/* длинные заголовки документов не режутся дефисом посреди слова */
.legal-wrap .page-head h1 { hyphens: manual; overflow-wrap: break-word; }

/* мастер заявки на телефоне: нижняя панель скрыта, кнопки «Назад / Далее» прижаты к низу экрана */
@media (max-width: 979px) {
  body[data-route="new"] .tabbar, body[data-route="edit"] .tabbar { display: none; }
  body[data-route="new"] main, body[data-route="edit"] main { padding-bottom: var(--safe-b); }
  body[data-route="new"] .wiz-foot, body[data-route="edit"] .wiz-foot { bottom: 0; padding-bottom: calc(12px + var(--safe-b)); }
}
/* пустой выпадающий список («Выберите») — серым, как подсказка в поле */
.field select:has(option[value=""]:checked) { color: var(--muted); }
/* стрелка ▾ у выпадающих списков (её стирало правило фона полей выше) */
.field select, .field select:focus, .field select:hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236a6d78' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
/* телефон: отступ под нижнюю панель — у подвала (последнего блока), а не у содержимого.
   Без этого между страницей и подвалом пустая полоса, а низ подвала прячется под панелью */
@media (max-width: 979px) {
  main:has(+ .footer:not(.hide)) { padding-bottom: 28px; }
  .footer { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 20px); }
}
/* однострочные поля — того же вида, что многострочные и списки: заливка без рамки, рамка при наведении и фокусе
   (старое правило с :not() перебивало новое по специфичности, и поля в одной форме были разного цвета) */
.field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]) { background-color: var(--fill); border-color: transparent; }
.field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):hover { border-color: var(--line-2); }
.field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus { background-color: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field.err input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field.err textarea, .field.err select { border-color: var(--red); }

/* подвал на 760–859 px: в четыре колонки длинные названия документов не помещаются — две колонки, описание и документы на всю ширину */
@media (min-width: 760px) and (max-width: 859px) { .footer-grid > :first-child, .footer-grid > :last-child { grid-column: 1 / -1; } }
.footer-grid a { overflow-wrap: break-word; }


/* карта: источник данных — маленький значок «©», подпись по нажатию */
.osm-attr { display: flex; align-items: center; gap: 4px; margin: 0 8px 8px 0 !important; font: 500 11px/1.2 var(--font); }
.osm-i { width: 22px; height: 22px; border: 0; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  font: 600 12px/1 var(--font); color: var(--muted); background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: 0 0 0 1px var(--line); }
.osm-i:focus-visible { outline: 2px solid var(--blue-t); outline-offset: 1px; }
.osm-attr a { display: none; padding: 3px 7px; border-radius: 7px; color: var(--muted) !important; text-decoration: none; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 0 0 1px var(--line); }
.osm-attr.open a { display: inline-block; }

/* =========================================================
   Телефон: шапка и нижнее меню до самых краёв экрана
   ========================================================= */
/* шапка: под вырезом/строкой состояния (приложение на экране «Домой», альбомная ориентация) — тот же фон;
   при оттягивании страницы вниз сверху не появляется серая полоса */
.top { padding-top: env(safe-area-inset-top, 0px); height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }
.top::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 160px; background: var(--surface); pointer-events: none; }
/* нижнее меню: стоит над строкой браузера, фон продолжается до самого низа экрана (без просвета при сворачивании строки) */
.tabbar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 160px; background: var(--surface); pointer-events: none; }
/* название в шапке на телефоне — чуть крупнее */
@media (max-width: 560px) { .top .brand .brand-name { font-size: 14.5px; line-height: 1.06; } }
@media (max-width: 349px) { .top .brand .brand-name { font-size: 13px; } }

/* карта на телефоне: «Карта / Список» — две равные половины, подложка ровно под выбранной */
.map-seg { left: 0; right: 0; margin: 0 auto; width: max-content; transform: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.map-seg button { min-width: 128px; padding: 0 14px; }
.map-seg b { margin-left: 2px; }
.map-page.peeking[data-view="map"] .map-seg { transform: translateY(24px); }

/* =========================================================
   Выпадающие списки: свой список выбора (лист на телефоне, меню на компьютере)
   ========================================================= */
.opt-list { display: grid; gap: 4px; margin: 6px -6px 0; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 14px; border: 0; border-radius: 14px; background: transparent;
  color: var(--ink); font: 500 17px/1.3 var(--font); text-align: left; cursor: pointer; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.opt > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt-ck { flex: none; width: 20px !important; height: 20px !important; color: var(--search); opacity: 0; transform: scale(.5); transition: opacity .15s, transform .25s var(--spring); }
.opt.on { background: var(--search-soft); color: var(--search-2); font-weight: 650; }
.opt.on .opt-ck { opacity: 1; transform: none; }
.opt:not(.on):not([disabled]):active { background: var(--fill); }
.opt[disabled] { color: var(--muted); opacity: .55; cursor: default; }
.opt-head { padding: 14px 14px 4px; font-size: 13px; font-weight: 650; color: var(--muted); }
.sheet-opts .sheet-head { margin-bottom: 4px; }
.sel-pop { position: fixed; z-index: 1200; overflow-y: auto; overscroll-behavior: contain; padding: 6px; display: grid; gap: 2px; align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(20, 24, 40, .28), 0 2px 6px rgba(20, 24, 40, .06);
  animation: selIn .16s var(--ease); transform-origin: top center; }
.sel-pop.up { transform-origin: bottom center; animation-name: selInUp; }
.sel-pop.out { opacity: 0; transform: scale(.98); transition: opacity .12s, transform .12s; }
.sel-pop .opt { min-height: 40px; padding: 8px 12px; gap: 10px; border-radius: 10px; font-size: 15px; }
.sel-pop .opt.act:not(.on) { background: var(--fill); }
.sel-pop .opt.act.on { background: color-mix(in srgb, var(--search) 14%, var(--surface)); }
.sel-pop .opt-head { padding: 10px 12px 2px; font-size: 12px; }
@keyframes selIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes selInUp { from { opacity: 0; transform: translateY(4px) scale(.98); } }
select[aria-expanded="true"] { border-color: var(--search) !important; }
.sort-sel:has(select[aria-expanded="true"]) { border-color: var(--search); box-shadow: 0 0 0 3px var(--search-soft); }
.sort-sel:has(select[aria-expanded="true"]) .chev { transform: translateY(-50%) rotate(-90deg); }
.sort-sel .chev { transition: transform .2s var(--ease); }
@media (prefers-reduced-motion: reduce) { .sel-pop { animation: none; } .opt-ck { transition: none; } }

/* =========================================================
   Рекламная строка: бегущая, на всю ширину под шапкой
   ========================================================= */
.adline { background: var(--search); color: #fff; font-size: 15px; line-height: 1.2; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .1); }
.adline-in { display: flex; align-items: center; gap: 14px; height: 46px; min-width: 0; }
.ad-tag { flex: none; padding: 3px 7px; border-radius: 5px; font: 600 11.5px/1.2 var(--font); letter-spacing: .01em; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); cursor: help; }
/* один рекламодатель: название слева, отделено тонкой чертой */
.ad-who { flex: none; display: flex; align-items: center; height: 22px; padding-right: 14px; font-weight: 700; white-space: nowrap; box-shadow: 1px 0 0 rgba(255, 255, 255, .35); }
.adline.one .ad-brand { display: none; }
.ad-vp { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ad-track { display: flex; width: max-content; will-change: transform; }
.ad-run { display: flex; align-items: center; flex: none; }
.adline.go .ad-track { animation: adRun var(--ad-dur, 30s) linear infinite; }
.adline.off .ad-track { animation-play-state: paused; }
@media (hover: hover) { .adline:hover .ad-track { animation-play-state: paused; } }
.adline:focus-within .ad-track { animation-play-state: paused; }
@keyframes adRun { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ad-item { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px; border-radius: 6px; white-space: nowrap; color: #fff; text-decoration: none; }
.ad-brand { font-weight: 700; }
.ad-tx { font-weight: 500; }
.ad-go { flex: none; width: 15px; height: 15px; opacity: .7; transition: opacity .2s, transform .2s; }
.ad-item:hover .ad-tx { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .6); text-underline-offset: 4px; }
.ad-item:hover .ad-go { opacity: 1; transform: translate(1px, -1px); }
.ad-item:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.ad-sep { flex: none; width: 4px; height: 4px; margin: 0 28px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.adline.still .ad-vp { overflow-x: auto; scrollbar-width: none; }
.adline.still .ad-vp::-webkit-scrollbar { display: none; }
@media (max-width: 640px) {
  .adline { font-size: 14px; }
  .adline-in { height: 44px; gap: 10px; }
  .ad-tag { font-size: 11px; padding: 2px 6px; }
  /* на телефоне места мало: название — внутри каждого объявления */
  .ad-who { display: none; }
  .adline.one .ad-brand { display: inline; }
  .ad-sep { margin: 0 20px; }
}
@media print { .adline { display: none; } }

/* =========================================================
   Личный кабинет: одна рамка для всех разделов (в том числе «Сообщения», «Уведомления», «Поддержка»).
   Компьютер — колонка разделов слева; телефон — «Кабинет» и «Разделы» над разделом, обзор — список разделов.
   ========================================================= */
.acc-wrap { padding-top: 16px; padding-bottom: 32px; }
.acc-body > .wrap { max-width: none !important; padding: 0 !important; }
.acc-body > .wrap > .page-head:first-child { margin-top: 0; padding-top: 0; }
.acc-grp { display: grid; gap: 2px; }
.me-nav .acc-grp + .acc-grp { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.acc-grp-t { padding: 4px 12px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.me-nav a .cnt, .acc-sheet a .cnt, .acc-rlist .cnt, .acc-all .cnt { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red-solid); color: #fff; font: 700 11px/20px var(--font); text-align: center; }
.me-nav a.acc-me { min-height: 0; gap: 10px; padding: 6px 8px 12px; margin-bottom: 8px; border-radius: 0; border-bottom: 1px solid var(--line); font-weight: 400; color: var(--ink); }
.me-nav a.acc-me:hover { background: transparent; }
.acc-me .grow { min-width: 0; }
.acc-me b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-me small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.me-nav a.acc-admin { margin-top: 10px; background: var(--ink); color: #fff; font-size: 14px; }
.me-nav a.acc-admin:hover { background: color-mix(in srgb, var(--ink) 88%, #fff); color: #fff; }

/* телефон: над разделом — «Кабинет» и «Разделы» */
.acc-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.acc-back, .acc-all { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px 0 10px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.acc-all { padding: 0 12px; }
.acc-back .ic, .acc-all .ic { width: 18px; height: 18px; }
.acc-back:active, .acc-all:active { transform: scale(.97); background: var(--surface-2); }
.acc-back:focus-visible, .acc-all:focus-visible { outline: 2px solid var(--blue-t); outline-offset: 2px; }

/* обзор на телефоне — все разделы списком, по группам */
.acc-rows { display: grid; gap: 18px; margin-top: 16px; }
.acc-rgrp h3 { margin: 0 0 8px 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.acc-rlist { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); }
.acc-rlist a { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 14px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.acc-rlist a + a { border-top: 1px solid var(--line); }
.acc-rlist a:active { background: var(--surface-2); }
.acc-rlist .grow { min-width: 0; }
.acc-rlist b { display: block; font-size: 15.5px; font-weight: 600; }
.acc-rlist small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-ric { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--blue-t); }
.acc-ric .ic { width: 20px; height: 20px; }
.acc-chev { flex: none; color: var(--muted); }

/* лист «Разделы» */
.acc-sheet { display: grid; gap: 6px; }
.acc-sheet .acc-grp + .acc-grp { padding-top: 6px; border-top: 1px solid var(--line); }
.acc-sheet a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--ink); font-size: 15.5px; font-weight: 600; text-decoration: none; }
.acc-sheet a .ic { width: 20px; height: 20px; flex: none; }
.acc-sheet a:active { background: var(--surface-2); }
.acc-sheet a.on { background: var(--blue-soft); color: var(--blue-t); }

@media (min-width: 980px) { .acc-bar, .acc-rows { display: none; } }
@media (max-width: 979px) { .acc-tiles { display: none !important; } }
/* заголовок раздела с пояснением и кнопкой на узком экране: кнопка под текстом, текст не сжимается */
@media (max-width: 560px) {
  .acc-body .sec-head:has(> div > p) { flex-wrap: wrap; align-items: flex-start; }
  .acc-body .sec-head:has(> div > p) > :first-child { flex-basis: 100%; }
}

/* зона оповещений: радиус кнопками, карта с кругом */
.zone { max-width: 760px; }
.zone-on { cursor: pointer; gap: 14px; }
.zone-card { display: grid; gap: 12px; }
.zone-r-head { display: grid; gap: 2px; }
.zone-r-head b { font-size: 16px; }
.rchips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rchip { min-height: 44px; padding: 0 4px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); font: 600 15px/1 var(--font); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.rchip:hover { background: var(--fill); }
.rchip:active { transform: scale(.96); }
.rchip.on { background: var(--blue-soft); color: var(--blue-t); box-shadow: inset 0 0 0 2px var(--blue-t); }
.rchip:focus-visible { outline: 2px solid var(--blue-t); outline-offset: 2px; }
.picker.zone-map { height: 340px; }
.zone-save { justify-self: start; }
@media (max-width: 560px) { .picker.zone-map { height: 290px; } .zone-save { justify-self: stretch; width: 100%; } .rchip { font-size: 14px; } }

/* семья */
.fam { max-width: 760px; }
.fam-card { display: grid; gap: 18px; }
.fam-top { display: flex; align-items: center; gap: 14px; }
.fam-top .grow { min-width: 0; }
.fam-top h3 { font-size: 18px; }
.fam-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--blue-soft); color: var(--blue-t); }
.fam-ic .ic { width: 24px; height: 24px; }
.fam-pros { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.fam-pros li { display: flex; align-items: flex-start; gap: 12px; }
.fam-pro-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.fam-pro-ic .ic { width: 18px; height: 18px; }
.fam-pros b { display: block; font-size: 15px; }
.fam-pros li > div > span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.fam-invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.fam-invite .field { margin: 0; }
.fam-invite .btn { min-height: 52px; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.fam-m .btn { flex: none; }
.fam-m { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.fam-m .grow { min-width: 0; }
.fam-m b { display: block; font-size: 14.5px; }
.fam-pend-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--surface); color: var(--muted); }
.fam-foot { padding-top: 14px; border-top: 1px solid var(--line); }
.fam-inv { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.fam-inv .grow { min-width: 160px; }
.fam-inv-act { display: flex; gap: 8px; }
@media (max-width: 560px) { .fam-invite { grid-template-columns: 1fr; } .fam-invite .btn { width: 100%; } .fam-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .rchip, .acc-back, .acc-all, .acc-rlist a { transition: none; } }
/* заголовки «Сообщения», «Уведомления», «Поддержка» внутри кабинета — того же размера, что у остальных разделов */
.acc-body .page-head h1 { font-size: clamp(24px, 2.6vw, 30px); }

/* =========================================================
   Уведомления и установка приложения (личный кабинет)
   ========================================================= */
.pn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pn-state { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.pn-state b, .pn-nudge b, .ins-top b { display: block; font-size: 15.5px; line-height: 1.3; }
.pn-state span:not(.pn-badge), .pn-nudge .grow > span, .ins-top .grow > span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pn-on { background: var(--green-soft); }
.pn-warn { background: var(--amber-soft); }
.pn-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; }
.pn-badge-off { background: color-mix(in srgb, var(--search) 12%, var(--surface)); color: var(--search); }
.pn-badge-warn { background: color-mix(in srgb, var(--amber) 16%, var(--surface)); color: var(--amber-t); }
.pn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-main { align-self: flex-start; justify-content: center; min-height: 48px; font-size: 16px; padding-inline: 22px; }
.pn-hint { margin-top: 0; }
.pn-retry { align-self: flex-start; }
.pn-devs { border-radius: var(--r-lg); border: 1px solid var(--line); padding: 0 14px; }
.pn-devs summary { cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.pn-devs summary::-webkit-details-marker { display: none; }
.pn-devs summary::after { content: "+"; margin-left: auto; font-size: 18px; font-weight: 500; }
.pn-devs[open] summary::after { content: "−"; }
.pn-devs ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.pn-devs li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pn-types { display: grid; gap: 2px; padding-top: 6px; border-top: 1px solid var(--line); }
.pn-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 0 4px; }
.pn-type { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; min-height: 52px; }
.pn-type + .pn-type { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.pn-type b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.pn-type .grow > span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.pn-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.pn-mail { border-top: 1px solid var(--line); padding-top: 14px; }
.pn-nudge { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.me-nudge { margin-top: 14px; }
.me-nudge:empty, .me-nudge[hidden] { display: none; }

.ins { display: grid; gap: 14px; }
.ins-compact { padding: 14px; border-radius: var(--r-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--search) 8%, var(--surface)), var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--search) 22%, var(--line)); }
.ins-top { display: flex; align-items: flex-start; gap: 12px; }
.ins-app { flex: none; width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); }
.ins-x { margin: -6px -6px 0 0; }
.ins-go { justify-content: center; min-height: 48px; font-size: 16px; }
.ins-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: none; }
.ins-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-lg); background: var(--surface-2); font-size: 14.5px; line-height: 1.4; }
.ins-compact .ins-step { background: var(--surface); }
.ins-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--font); color: #fff; background: var(--search); }
.ins-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--search); }
.ins-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ins-ic svg circle { fill: currentColor; stroke: none; }
.ins-done { display: flex; align-items: center; gap: 8px; color: var(--green-t); }
#installCard.flash { animation: insFlash 1.4s ease; }
@keyframes insFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--search) 40%, transparent); } }
@media (max-width: 520px) {
  .pn-actions .btn { flex: 1 1 100%; justify-content: center; }
  .pn-nudge { flex-wrap: wrap; }
  .pn-nudge .grow { flex: 1 1 calc(100% - 90px); }
  .pn-nudge .btn { order: 3; flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { #installCard.flash { animation: none; } }
.ins-how { justify-content: space-between; width: 100%; min-height: 46px; }
.ins-how .ic { transition: transform .2s; }
.ins-how.open .ic { transform: rotate(90deg); }
.ins-more .ins-steps { margin-top: 2px; }
@media (max-width: 520px) { .pn-main { align-self: stretch; width: 100%; } .pn-hint { text-align: center; } .pn-retry { align-self: stretch; justify-content: center; } }

/* текст только для поисковиков и экранных дикторов */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* =========================================================
   Чаты и поддержка — как в мессенджере
   ========================================================= */
.chip-done { background: var(--surface-2); color: var(--muted); border-color: transparent; }
/* оболочка: на компьютере диалоги слева, переписка справа */
.chat-shell { display: grid; grid-template-columns: 360px minmax(0, 1fr); width: calc(100% - 32px); max-width: calc(var(--max) - 32px); margin: 16px auto 0;
  height: calc(100dvh - var(--top-h) - env(safe-area-inset-top, 0px) - 32px); min-height: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.chat-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.chat-side-head { padding: 18px 18px 10px; }
.chat-side-head h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.chat-side-head p { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.chat-list .empty { margin: auto 0; padding: 24px 12px; }
.chat-item { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); text-decoration: none; transition: background .15s; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: color-mix(in srgb, var(--blue) 9%, var(--surface)); }
.chat-item:focus-visible { outline: 2px solid var(--blue-t); outline-offset: -2px; }
.ci-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ci-top { display: flex; align-items: baseline; gap: 8px; }
.ci-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 650; }
.ci-top time { flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-item.unread .ci-top time { color: var(--blue); font-weight: 650; }
.ci-app { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.ci-last { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ci-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); }
.chat-item.unread .ci-text { color: var(--ink); font-weight: 600; }
.ci-last .ic { flex: none; color: var(--muted); }
.ci-text .you, .tk-last .you { color: var(--muted); font-weight: 500; }
.chat-item .unread-dot { flex: none; background: var(--blue); }
.chat-ava { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.chat-ava .ic { width: 22px; height: 22px; }
.chat-ava.lost { background: color-mix(in srgb, var(--red-solid) 12%, var(--surface)); color: var(--red-solid); }
.chat-ava.found { background: var(--green-soft); color: var(--green-t); }
.chat-support { display: flex; align-items: center; gap: 12px; margin: 0 8px 8px; padding: 12px; min-height: 56px; border-radius: 14px; background: var(--surface-2); color: var(--ink); text-decoration: none; transition: background .15s; }
.chat-support:hover { background: var(--fill); }
.chat-support > .ic:first-child { width: 22px; height: 22px; color: var(--blue); flex: none; }
.chat-support span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.chat-support b { font-size: 14.5px; }
.chat-support small { font-size: 12.5px; color: var(--muted); }
.chat-main { position: relative; display: flex; min-width: 0; min-height: 0; background: var(--bg); }
.chat-pick { margin: auto; display: grid; justify-items: center; gap: 6px; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.chat-pick .ic { width: 44px; height: 44px; color: color-mix(in srgb, var(--muted) 60%, transparent); margin-bottom: 4px; }
.chat-pick b { color: var(--ink); font-size: 16px; }

/* переписка */
.chat-main > .chat-page { flex: 1; height: auto; max-width: none; margin: 0; min-height: 0; }
.chat-page { position: relative; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-head .chat-ava { width: 42px; height: 42px; }
.chat-title { flex: 1; min-width: 0; display: grid; gap: 1px; color: var(--ink); text-decoration: none; }
.chat-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 650; }
.chat-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.chat-title:hover span { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 0; background: var(--bg); }
.chat-warn { align-self: center; display: flex; align-items: flex-start; gap: 8px; max-width: 520px; margin: 4px auto 6px; padding: 8px 12px; border-radius: 12px;
  background: var(--amber-soft); color: var(--amber-t); font-size: 12.5px; line-height: 1.45; }
.chat-warn .ic { flex: none; margin-top: 1px; color: inherit; width: 16px; height: 16px; }
.chat-empty { margin: auto; display: grid; justify-items: center; gap: 6px; max-width: 320px; padding: 24px 8px; text-align: center; font-size: 14px; color: var(--muted); }
.chat-empty .ic { width: 36px; height: 36px; color: var(--muted); }
.chat-empty b { color: var(--ink); font-size: 16px; }
.msg-day { position: sticky; top: 0; z-index: 1; align-self: center; margin: 12px 0 4px; padding: 0; font-size: 12px; }
.msg-day span { display: inline-block; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 0 0 1px var(--line); color: var(--muted); font-weight: 600; }
.msg { position: relative; max-width: min(78%, 560px); margin-top: 8px; padding: 8px 12px 7px; border: 1px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px;
  background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.42; align-self: flex-start; overflow-wrap: anywhere; }
.msg.cont { margin-top: 3px; border-top-left-radius: 8px; }
.msg.mine { align-self: flex-end; border-color: transparent; background: var(--blue); color: #fff; border-radius: 18px; border-bottom-right-radius: 6px; }
.msg.mine.cont { border-top-right-radius: 8px; }
.msg.pending { opacity: .72; }
.msg-text { white-space: pre-wrap; }
.msg-who { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; font-size: 12.5px; font-weight: 650; color: var(--blue); }
.msg-who .ic { width: 14px; height: 14px; }
.msg-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 7px 0 -3px 12px; font-size: 11px; line-height: 1; opacity: .68; white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg .msg-meta time { display: inline; margin: 0; font-size: 11px; text-align: left; opacity: 1; }
.tick { display: inline-flex; }
.tick svg { width: 17px; height: 11px; }
.tick .ic { width: 12px; height: 12px; }
.msg.mine .tick.read { opacity: 1; }
.msg img { display: block; max-width: calc(100% + 16px); max-height: 320px; margin: -4px -8px 6px; border-radius: 12px; object-fit: cover; cursor: zoom-in; }
.msg.photo-only { padding: 4px 4px 6px; }
.msg.photo-only img { max-width: 100%; margin: 0 0 4px; }
.msg.photo-only .msg-meta { margin-right: 6px; }
.msg .loc { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 650; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.msgs-down { position: absolute; right: 16px; bottom: 82px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .14), 0 0 0 1px var(--line); cursor: pointer; }
.msgs-down .ic { transform: rotate(90deg); }
.msgs-down.hide { display: none; }

/* поле ввода: скрепки внутри одного поля, круглая кнопка отправки */
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.composer-box { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 0; padding: 3px; border: 1.5px solid transparent; border-radius: 24px; background: var(--surface-2); transition: border-color .2s, background .2s; }
.composer-box:focus-within { border-color: color-mix(in srgb, var(--blue) 45%, transparent); background: var(--surface); }
.composer .composer-box textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 140px; padding: 10px 10px; border: 0; border-radius: 0; background: transparent; outline: none; resize: none; font: inherit; font-size: 15.5px; line-height: 1.4; color: var(--ink); }
.composer .cb-btn { width: 42px; height: 42px; border-radius: 50%; background: transparent; color: var(--muted); flex: none; cursor: pointer; }
.composer .cb-btn:hover { background: var(--fill); color: var(--ink); }
.composer .cb-btn:focus-visible { outline: 2px solid var(--blue-t); outline-offset: -2px; }
.composer .send { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; cursor: pointer; transition: transform .15s, opacity .2s, background .2s; }
.composer .send:hover { background: color-mix(in srgb, var(--blue) 88%, #000); }
.composer .send:disabled { opacity: .4; cursor: default; }
.composer .send:not(:disabled):active { transform: scale(.92); }
.composer .send .ic { width: 22px; height: 22px; }
.composer-note { justify-content: center; align-items: center; gap: 8px; padding: 16px; color: var(--muted); font-size: 14px; text-align: center; }

/* поддержка: список обращений */
.sup-wrap { max-width: 820px; padding-top: 24px; }
.sup-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sup-head h1 { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; }
.sup-head p { margin-top: 6px; max-width: 52ch; color: var(--muted); }
.sup-h2 { font-size: 18px; margin: 0 0 10px; }
.sup-empty { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.sup-mail { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.sup-mail a { color: var(--ink); font-weight: 600; }
.tk-list { display: grid; gap: 8px; }
.tk-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; transition: background .15s, border-color .15s; }
.tk-item:hover { background: var(--surface-2); }
.tk-item:focus-visible { outline: 2px solid var(--blue-t); outline-offset: 2px; }
.tk-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--blue) 10%, var(--surface)); color: var(--blue); }
.tk-closed .tk-ic { background: var(--surface-2); color: var(--muted); }
.tk-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tk-top { display: flex; align-items: baseline; gap: 10px; }
.tk-top b { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.tk-top time { flex: none; font-size: 12.5px; color: var(--muted); }
.tk-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); }
.tk-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.tk-go { flex: none; color: var(--muted); }
.tk-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-f { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; }
.tk-f span { min-width: 22px; padding: 3px 7px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--muted); text-align: center; }
.tk-f.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tk-f.on span { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }
.tk-f:focus-visible { outline: 2px solid var(--blue-t); outline-offset: 2px; }
/* новое обращение: темы кнопками */
.tk-topics { border: 0; padding: 0; margin: 0; }
.tk-topics legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-chip { position: relative; cursor: pointer; }
.tk-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tk-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.tk-chip:hover span { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.tk-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tk-chip input:focus-visible + span { outline: 2px solid var(--blue-t); outline-offset: 2px; }
.tk-err { margin: 0; font-size: 14px; color: var(--red-solid); }
/* поддержка: переписка */
.tk-page { max-width: 820px; padding-top: 16px; }
.tk-head { display: flex; align-items: center; gap: 10px; padding: 8px 0 12px; }
.tk-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tk-title b { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.tk-title span { font-size: 13px; color: var(--muted); }
.tk-head .chip { flex: none; }
.tk-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.tk-user span { color: var(--muted); overflow-wrap: anywhere; }
.tk-user .link { margin-left: auto; }
.tk-msgs { display: flex; flex-direction: column; padding: 4px 0 12px; }
.tk-msgs > :last-child { scroll-margin-bottom: calc(var(--tab-h) + var(--safe-b) + 140px); }
.tk-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 12px; font-size: 13.5px; color: var(--muted); text-align: center; }
.tk-actions > span { display: inline-flex; align-items: center; gap: 6px; }
.tk-composer { position: sticky; bottom: 12px; z-index: 5; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }

@media (max-width: 979px) {
  .chat-shell { display: block; width: auto; max-width: none; height: auto; min-height: 0; margin: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
  .chat-shell.has-chat .chat-side { display: none; }
  .chat-shell:not(.has-chat) .chat-main { display: none; }
  .chat-side { border: 0; padding: 0 max(16px, env(safe-area-inset-left)); }
  .chat-side-head { padding: 20px 2px 12px; }
  .chat-side-head h1 { font-size: 28px; }
  .chat-list { overflow: visible; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
  .chat-list:has(> .empty) { padding: 0; }
  .chat-support { margin: 12px 0 0; background: var(--surface); border: 1px solid var(--line); }
  .chat-main { display: block; background: none; }
  /* переписка на телефоне — на весь экран, как в мессенджере; шапка сайта скрыта, назад — стрелкой */
  body[data-route="chat"] .top { display: none; }
  body[data-route="chat"] .chat-page { height: var(--vvh, 100dvh); padding-bottom: 0; }
  .chat-head { padding-top: calc(8px + env(safe-area-inset-top, 0px)); min-height: calc(60px + env(safe-area-inset-top, 0px)); }
  body[data-route="chat"] .composer { padding-bottom: calc(10px + var(--safe-b)); }
  body.kb[data-route="chat"] .composer { padding-bottom: 10px; }
  .msgs { padding: 10px 12px 14px; }
  .msg { max-width: 84%; }
  .tk-composer { bottom: calc(var(--tab-h) + var(--safe-b) + 10px); }
  body.kb .tk-composer { bottom: 8px; }
}
@media (min-width: 980px) {
  .chat-back { display: none !important; }
  body[data-route="chat"] main, body[data-route="chats"] main { padding-bottom: 16px; min-height: 0; }
}
@media (max-width: 560px) {
  .sup-head { align-items: stretch; }
  .sup-head .btn { width: 100%; justify-content: center; }
  .tk-item { padding: 12px 14px; gap: 12px; }
  .tk-go { display: none; }
  .tk-title b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .chat-item, .tk-item, .composer .send { transition: none; } }
/* время и галочки в пузырях — контраст не ниже 4.5:1 */
.msg .msg-meta { opacity: 1; color: var(--muted); }
.msg.mine .msg-meta { color: rgba(255, 255, 255, .92); }

/* =========================================================
   Шапка сама подстраивается под ширину (классы ставит fitTop в app.js — по шагам, пока всё не поместится в строку)
   ========================================================= */
.top-in { min-width: 0; }
.top-in.fit1 .brand small { display: none; }
.top-in.fit2 .nav { margin-left: 2px; gap: 0; }
.top-in.fit2 .nav a { padding-left: 8px; padding-right: 8px; }
.top-in.fit2 .top-act { gap: 2px; }
.top-in.fit3 .brand > span { display: none; }
.top-in.fit4 .lang-btn span { display: none; }
.top-in.fit4 .lang-btn { padding: 0 9px; }

/* =========================================================
   Низкий экран (телефон боком, низкое окно браузера): тоньше шапка, нижнее меню и рекламная строка —
   чтобы под содержимое оставалось больше места
   ========================================================= */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --top-h: 56px; --tab-h: 54px; }
  .brand img { width: 40px; height: 33px; }
  .brand small { display: none; }
  .sos-btn { height: 38px; }
  .top-act .btn-sm, .top-act .btn { min-height: 38px; height: 38px; }
  .adline-in { height: 38px; }
  .tab { flex-direction: row; gap: 6px; font-size: 13px; padding: 0; }
  .tab-ic { width: 40px; height: 30px; }
  .tab.on .tab-ic { transform: none; }
  .tab .dotbadge { top: 2px; right: auto; left: calc(50% + 2px); }
  .tab-fab { margin-top: 0; }
  .tab-fab .fab { width: 46px; height: 40px; border-radius: 14px; }
  .tab-fab .fab .ic { width: 24px; height: 24px; }
  .m-cta { bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
}

/* Карта на телефоне боком (и на любом низком широком окне): как на компьютере — фильтры и список слева, карта справа */
@media (max-width: 979px) and (min-width: 540px) and (max-height: 500px) and (orientation: landscape) {
  .map-page { grid-template-columns: minmax(280px, 40%) 1fr; grid-template-rows: minmax(0, 1fr); }
  .map-page[data-view] .map-list, .map-page[data-view] .map-box { display: grid; }
  .map-page[data-view] .map-box { display: block; }
  .map-page[data-view] .map-side { grid-row: auto; border-right: 1px solid var(--line); }
  .map-seg { display: none; }
  .map-filters { padding: 10px 12px; gap: 8px; }
  .map-list { padding: 10px 12px 16px; }
  .peek { left: 12px; right: auto; width: min(360px, calc(100% - 24px)); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .top .brand img { width: 54px; height: 44px; }
  /* мастер заявки: карточки выбора — в строку, чтобы все три были видны над кнопкой «Далее» */
  .pick { flex-direction: row; align-items: center; padding: 12px 14px; gap: 12px; }
  .pick .cat-ic { width: 40px; height: 40px; border-radius: 12px; }
  .wiz-foot { padding: 10px 0; margin-top: 12px; }
}

/* Быстрые фильтры карты подстраиваются под ширину своей колонки (телефон 320 px, узкая колонка рядом с картой):
   ни одна подпись не обрезается многоточием — на узкой колонке убираем значки и лишние отступы */
.map-filters { container-type: inline-size; }
.mq-row .kind-seg { grid-template-columns: minmax(min-content, .8fr) minmax(min-content, 1fr) minmax(min-content, 1fr); }
.mq-row .kind-seg button { text-overflow: clip; }
@container (max-width: 380px) {
  .cat-seg .filter-chip .ic { display: none; }
  .cat-seg .filter-chip { padding: 0 4px; }
  .mq-row { gap: 6px; }
  .mq-row .kind-seg button { padding: 0 7px; }
  .mq-row .sos { padding: 0 10px; gap: 5px; }
}
@container (max-width: 300px) {
  .mq-row .kind-seg button { padding: 0 5px; font-size: 12.5px; }
  .mq-row .sos .ic { display: none; }
  .cat-seg { gap: 6px; }
  .cat-seg .filter-chip { font-size: 13px; }
}

/* Заголовок списка заявок: число слева, сортировка справа — всегда в одну строку (в узкой колонке сортировка сжимается, а не наезжает на первую карточку) */
.list-head { flex-wrap: nowrap; }
.list-head > b { flex: none; }
.sort-sel { min-width: 0; flex: 0 1 auto; max-width: 70%; }
.sort-sel select { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Кнопки: если подпись не помещается (узкий телефон, узкая колонка), она переносится на вторую строку, а не обрезается.
   В строках кнопок с переносом (flex-wrap) кнопка сначала уходит на новую строку целиком — переносится текст только у той, что уже во всю ширину */
.btn { white-space: normal; text-align: center; line-height: 1.2; padding-top: 6px; padding-bottom: 6px; min-width: 0; text-wrap: balance; }
.btn > .ic { flex: none; }
/* Пара кнопок в строке: если обе не помещаются целиком — каждая уходит на свою строку во всю ширину, а не сжимается */
.row:has(> .btn + .btn) { flex-wrap: wrap; }
.row:has(> .btn + .btn) > .btn { flex: 1 1 auto; }
/* самые узкие телефоны: подписи нижнего меню чуть мельче, чтобы «Кабинет» не упирался в край */
@media (max-width: 350px) { .tab { font-size: 11px; } .tab-ic { width: 46px; } }
/* админка на широком экране: меню разделов шире — длинные названия («Волонтёры и партнёры», «Запросы на удаление») в одну строку */
@media (min-width: 1180px) { .admin { grid-template-columns: 272px minmax(0, 1fr); } }
/* в шапке кнопки всегда в одну строку — если места мало, шапка сама убирает второстепенное (fitTop) */
.top .btn { white-space: nowrap; flex: none; }
/* узкие телефоны: главные кнопки («Сообщить о пропаже», «Я видел этого человека») — в одну строку */
@media (max-width: 380px) {
  .btn-lg { font-size: 16px; padding-left: 14px; padding-right: 14px; gap: 6px; }
  .btn { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 380px) { .actions-row .btn { padding: 0 2px; } }
