/* ═══════════════════════════════════════════════════════════════
   Laula — дизайн-система
   Токены → база → раскладка → компоненты → утилиты.
   Цвета только через токены: тёмная тема переопределяет их целиком.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --brand: #5b3df5;
  --brand-600: #4a2ee0;
  --brand-50: #f1edff;
  --brand-100: #e4dcff;
  --brand-grad: linear-gradient(135deg, #5b3df5 0%, #8a5cff 55%, #c06bff 100%);
  --accent: #ff6b4a;
  --accent-600: #f0532f;
  --accent-50: #fff1ec;
  --good: #0fa968;
  --good-50: #e6f8f0;
  --warn: #e8890c;
  --warn-50: #fff5e6;
  --danger: #e5383b;
  --danger-50: #fdecec;
  --gold: #f5b301;

  --ink: #10132a;
  --ink-2: #3b3f5c;
  --muted: #6b7091;
  --faint: #9aa0bd;
  --line: #e7e8f2;
  --line-2: #f0f1f7;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --overlay: rgba(12, 14, 34, .55);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 19, 42, .06);
  --shadow: 0 6px 24px -8px rgba(16, 19, 42, .14), 0 2px 6px rgba(16, 19, 42, .05);
  --shadow-lg: 0 24px 60px -18px rgba(40, 26, 140, .28), 0 6px 18px rgba(16, 19, 42, .08);
  --ring: 0 0 0 4px rgba(91, 61, 245, .16);

  --container: 1240px;
  --header-h: 68px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8b74ff;
    --brand-600: #9d89ff;
    --brand-50: #211b45;
    --brand-100: #2c2560;
    --accent: #ff7d5e;
    --accent-600: #ff9277;
    --accent-50: #3a2119;
    --good: #2fd08d;
    --good-50: #11301f;
    --warn: #ffad3d;
    --warn-50: #352612;
    --danger: #ff6467;
    --danger-50: #3a1a1b;
    --ink: #eef0ff;
    --ink-2: #c9ccec;
    --muted: #9da2c7;
    --faint: #6c7199;
    --line: #2a2d4a;
    --line-2: #22253e;
    --bg: #0d0f1f;
    --surface: #15182c;
    --surface-2: #1a1d34;
    --overlay: rgba(0, 0, 0, .66);
    --shadow: 0 8px 28px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #8b74ff; --brand-600: #9d89ff; --brand-50: #211b45; --brand-100: #2c2560;
  --accent: #ff7d5e; --accent-600: #ff9277; --accent-50: #3a2119;
  --good: #2fd08d; --good-50: #11301f; --warn: #ffad3d; --warn-50: #352612;
  --danger: #ff6467; --danger-50: #3a1a1b;
  --ink: #eef0ff; --ink-2: #c9ccec; --muted: #9da2c7; --faint: #6c7199;
  --line: #2a2d4a; --line-2: #22253e; --bg: #0d0f1f; --surface: #15182c; --surface-2: #1a1d34;
  --overlay: rgba(0, 0, 0, .66); --shadow: 0 8px 28px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7); color-scheme: dark;
}

/* ── база ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--brand); font-weight: 600; }
a.link:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(24px, 3.2vw, 34px); }
h2 { font-size: clamp(20px, 2.4vw, 26px); }
h3 { font-size: 18px; }
h1 svg, h2 svg, h3 svg { width: 1em; height: 1em; vertical-align: -0.12em; }
.feature-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.feature-ico svg { width: 28px; height: 28px; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
::selection { background: var(--brand-100); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── раскладка ── */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.section { padding: 32px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head p { color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.two-col { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .two-col { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.sticky { position: sticky; top: calc(var(--header-h) + 16px); }

/* ── шапка ── */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.04em; }
.logo svg { width: 32px; height: 32px; }
.logo b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Шапка шире колонки страницы: восемь разделов, переключатель языка, иконки и кнопка в
   1192 px не помещались. Пункты .xl уходят в «Ещё», а кнопка теряет «объявление», пока
   места мало; казахские подписи длиннее — для них пороги выше (замер: scratch hdr.js). */
.header .container { max-width: 1440px; }
.nav { display: none; gap: 2px; }
.nav a { padding: 8px 8px; border-radius: 10px; font-weight: 600; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.nav a.xl { display: none; }
.header .btn-accent .long { display: none; }
.nav a:hover, .nav a.active { background: var(--brand-50); color: var(--brand); }
@media (min-width: 1200px) { .nav { display: flex; } }
@media (min-width: 1440px) {
  html:not([lang="kk"]) .nav a.xl { display: inline-block; }
  html:not([lang="kk"]) .nav .nav-more { display: none; }
  html:not([lang="kk"]) .header .btn-accent .long { display: inline; }
}
@media (min-width: 1560px) {
  html[lang="kk"] .nav a.xl { display: inline-block; }
  html[lang="kk"] .nav .nav-more { display: none; }
  html[lang="kk"] .header .btn-accent .long { display: inline; }
}
@media (max-width: 1319px) { html[lang="kk"] .nav { display: none; } }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-2); transition: background .15s;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.city-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--line-2); padding: 8px 12px;
  border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.city-btn svg { width: 16px; height: 16px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: 800;
  display: inline-grid; place-items: center; font-size: 14px; overflow: hidden; flex: none; object-fit: cover;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 112px; height: 112px; font-size: 36px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.hide-sm { display: none !important; }
@media (min-width: 768px) { .hide-sm { display: inline-flex !important; } .show-sm { display: none !important; } }

/* нижняя навигация на телефоне */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700;
  color: var(--muted); padding: 4px; position: relative; }
.tabbar a.active { color: var(--brand); }
.tabbar svg { width: 24px; height: 24px; }
.tabbar .plus { width: 46px; height: 46px; margin-top: -18px; border-radius: 16px; background: var(--accent);
  color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(255, 107, 74, .7); }
.tabbar .dot { position: absolute; top: 0; right: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
body { padding-bottom: 72px; }
@media (min-width: 768px) { .tabbar { display: none; } body { padding-bottom: 0; } }

/* ── подвал ── */
.footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 28px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer h4 { font-size: 14px; margin-bottom: 10px; }
.footer a { display: block; color: var(--muted); padding: 3px 0; font-size: 14px; }
.footer a:hover { color: var(--brand); }
.footer a.logo { display: flex; color: var(--ink); padding: 0; font-size: 22px; }
.footer .copy { color: var(--faint); font-size: 13px; margin-top: 26px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 15px; white-space: nowrap;
  background: var(--line-2); color: var(--ink); transition: transform .08s, background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { background: var(--line); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(91, 61, 245, .8); }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(255, 107, 74, .8); }
.btn-accent:hover { background: var(--accent-600); }
.btn-good { background: var(--good); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── формы ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.hint { color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
  width: 100%; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px;
  background: var(--surface); transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: var(--ring); }
.input.invalid { border-color: var(--danger); }
.select { appearance: none; padding-right: 38px; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b7091' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 12px 0 0 12px; }
.input-group .input + .input { border-radius: 0 12px 12px 0; border-left: 0; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 46px; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.range-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.range-pair .input:first-child { border-radius: 12px 0 0 12px; }
.range-pair .input:last-child { border-radius: 0 12px 12px 0; border-left-width: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: 14.5px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative;
  transition: background .2s; margin: 0; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: var(--shadow-sm); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

/* чипы-переключатели (комнаты, типы) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--ink-2);
  cursor: pointer; user-select: none; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip input { display: none; }
.chip.on, .chip:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .x { opacity: .7; margin-left: 2px; }
.seg { display: inline-flex; background: var(--line-2); padding: 4px; border-radius: 14px; gap: 2px; }
.seg button, .seg a, .seg label { border: 0; background: transparent; padding: 8px 16px; border-radius: 10px; font-weight: 700;
  color: var(--muted); font-size: 14.5px; cursor: pointer; }
.seg .on, .seg button.on, .seg a.on, .seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input { display: none; }

/* ── карточки ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin-bottom: 14px; }

/* карточка объявления */
.lcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; display: flex; flex-direction: column; }
.lcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: transparent; }
.lcard-media { position: relative; aspect-ratio: 4 / 3; background: var(--line-2); overflow: hidden; }
.lcard-media .slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lcard-media .slides::-webkit-scrollbar { display: none; }
.lcard-media .slides img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.lcard-media .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint);
  background: linear-gradient(135deg, var(--brand-50), var(--line-2)); }
.lcard-media .placeholder svg { width: 56px; height: 56px; opacity: .55; }
.lcard-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.lcard-count { position: absolute; bottom: 10px; right: 10px; background: rgba(10, 12, 30, .62); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; display: flex; align-items: center; gap: 4px; z-index: 2; }
.lcard-count svg { width: 13px; height: 13px; }
.lcard-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 2; }
.lcard-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
.lcard-dots i.on { background: #fff; width: 14px; }
.fav-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--shadow-sm);
  transition: transform .15s; }
.fav-btn:hover { transform: scale(1.08); }
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn.on { color: var(--accent); }
.fav-btn.on svg { fill: var(--accent); }
.lcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lcard-price b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.lcard-price span { color: var(--muted); font-size: 13px; font-weight: 600; }
.lcard-title { font-weight: 700; color: var(--ink-2); font-size: 15px; }
.lcard-addr { color: var(--muted); font-size: 13.5px; display: flex; gap: 4px; align-items: center; }
.lcard-addr svg { width: 14px; height: 14px; flex: none; }
.lcard-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; align-items: center;
  color: var(--faint); font-size: 12.5px; font-weight: 600; }
.lcard-mortgage { font-size: 13px; color: var(--brand); font-weight: 700; }
.lcard a.cover { position: absolute; inset: 0; z-index: 1; }
.lcard .fav-btn { z-index: 3; }
.lcard-media .slides { position: absolute; inset: 0; z-index: 2; }
.lcard.sold .lcard-media::after { content: "Продано"; position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: rgba(10, 12, 30, .45); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .02em; }

/* горизонтальная карточка (выдача списком) */
@media (min-width: 720px) {
  .list-view .lcard { flex-direction: row; }
  .list-view .lcard-media { width: 330px; flex: none; aspect-ratio: auto; min-height: 230px; }
  .list-view .lcard-body { padding: 18px 20px; }
  .list-view .lcard-desc { display: -webkit-box; }
}
.lcard-desc { display: none; color: var(--muted); font-size: 14px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* бейджи */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px;
  font-weight: 800; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge-top { background: var(--brand); color: #fff; }
.badge-hot { background: linear-gradient(135deg, #ff6b4a, #ff3d6e); color: #fff; }
.badge-urgent { background: var(--warn); color: #fff; }
.badge-good { background: var(--good-50); color: var(--good); }
.badge-warn { background: var(--warn-50); color: var(--warn); }
.badge-even { background: var(--line-2); color: var(--muted); }
.badge-brand { background: var(--brand-50); color: var(--brand); }
.badge-glass { background: rgba(255, 255, 255, .92); color: var(--ink); }
.badge-verified { background: var(--good-50); color: var(--good); }
.badge-sold { background: var(--ink); color: #fff; }

/* ── герой главной ── */
.hero { position: relative; overflow: hidden; background: var(--brand-grad); color: #fff; padding: 46px 0 120px; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% 10%, rgba(255, 255, 255, .22), transparent 70%),
  radial-gradient(500px 260px at 10% 90%, rgba(255, 107, 74, .35), transparent 70%); }
.hero .container { position: relative; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); max-width: 760px; letter-spacing: -.035em; }
.hero p.lead { margin-top: 12px; font-size: 18px; opacity: .9; max-width: 620px; }
.hero-stats { display: flex; gap: 26px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 22px; }
.hero-stats div span { opacity: .8; font-size: 13.5px; }
.search-box { position: relative; margin-top: -92px; z-index: 5; background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 18px; border: 1px solid var(--line); }
.search-box .tabs-line { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.search-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .search-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, 1fr) auto auto; align-items: end; } }
.search-row .field label { font-size: 12.5px; color: var(--muted); }
.search-extra { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }

/* категории-плитки */
.cats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex;
  flex-direction: column; gap: 10px; transition: all .2s; }
.cat:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.cat .ico svg { width: 24px; height: 24px; }
.cat b { font-size: 15px; }
.cat span { color: var(--muted); font-size: 13px; }

/* промо-блоки */
.promo { border-radius: var(--radius-xl); padding: 28px; display: grid; gap: 20px; position: relative; overflow: hidden; }
.promo-brand { background: var(--brand-grad); color: #fff; }
.promo-soft { background: var(--brand-50); }
.promo-accent { background: linear-gradient(135deg, #ff8a5c, #ff4f7b); color: #fff; }
.promo-dark { background: #10132a; color: #fff; }
.promo h2 { font-size: clamp(22px, 2.6vw, 30px); }
.promo p { opacity: .9; }
@media (min-width: 900px) { .promo.split { grid-template-columns: 1.1fr 1fr; align-items: center; } }

/* горизонтальная прокрутка */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.hscroll > * { scroll-snap-align: start; }

/* ── выдача ── */
.breadcrumbs { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin: 18px 0 10px; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span::before { content: "›"; margin-right: 6px; color: var(--faint); }
.filterbar { position: sticky; top: var(--header-h); z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); padding: 10px 0; border-bottom: 1px solid var(--line); }
.filterbar .container { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.filterbar .container::-webkit-scrollbar { display: none; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); font-weight: 700; font-size: 14px; white-space: nowrap; }
.dd-btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.dd-btn svg { width: 16px; height: 16px; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 280px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px; display: none; }
.dd.open .dd-menu { display: block; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.results-head .count { color: var(--muted); font-weight: 600; }
.results { display: grid; gap: 16px; }
.results.grid-view { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.split-map { display: grid; gap: 0; grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .split-map.on { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .split-map.on .map-col { display: block; }
}
.map-col { display: none; position: sticky; top: calc(var(--header-h) + 70px); height: calc(100vh - var(--header-h) - 90px);
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.map-col #map, .map-full #map { width: 100%; height: 100%; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* выезжающая панель (фильтры, детали) */
.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer.open { display: block; }
.drawer-bg { position: absolute; inset: 0; background: var(--overlay); animation: fade .2s; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 100%); background: var(--surface);
  display: flex; flex-direction: column; animation: slideIn .25s ease-out; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 22px; }
.drawer-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* модальное окно */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal-bg { position: absolute; inset: 0; background: var(--overlay); animation: fade .2s; }
.modal-box { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 24px; animation: pop .2s; }
@media (min-width: 640px) { .modal { align-items: center; } .modal-box { border-radius: var(--radius-xl); } }
.modal-box.wide { max-width: 760px; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-box h3 { margin-bottom: 6px; padding-right: 40px; }
.modal-box .sub { color: var(--muted); margin-bottom: 18px; }

/* тосты */
.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: 88px; display: flex; flex-direction: column;
  gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 24px)); }
@media (min-width: 768px) { .toasts { bottom: 28px; } }
.toast { pointer-events: auto; background: #151833; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: 14.5px; display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 100%; }
.toast.err { background: var(--danger); }
.toast.ok { background: #0b7a4f; }
.toast a { color: #fff; text-decoration: underline; margin-left: auto; }

/* ── страница объявления ── */
.gallery { position: relative; display: grid; gap: 8px; grid-template-columns: 1fr; border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 900px) { .gallery.multi { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 470px; }
  .gallery.multi .g-main { grid-row: span 2; } }
.gallery .g-item { position: relative; overflow: hidden; background: var(--line-2); cursor: zoom-in; min-height: 120px; }
.gallery .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery .g-item:hover img { transform: scale(1.03); }
.gallery .g-main { aspect-ratio: 4 / 3; }
@media (max-width: 899px) { .gallery .g-item:not(.g-main) { display: none; } .gallery { border-radius: var(--radius); } }
@media (min-width: 900px) { .gallery.multi .g-main { aspect-ratio: auto; } }
.gallery .g-more { position: absolute; right: 12px; bottom: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: #05060f; display: none; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox .lb-stage { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lightbox .lb-stage::-webkit-scrollbar { display: none; }
.lightbox .lb-stage img { flex: none; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }
.lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); border: 0; color: #fff; display: none; place-items: center; }
@media (min-width: 768px) { .lightbox .lb-nav { display: grid; } }
.lightbox .lb-prev { left: 18px; } .lightbox .lb-next { right: 18px; }
.price-big { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.03em; }
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fact span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.fact b { font-size: 16px; }
.specs { display: grid; grid-template-columns: 1fr; gap: 0 32px; }
@media (min-width: 720px) { .specs { grid-template-columns: 1fr 1fr; } }
.spec { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.spec span { color: var(--muted); }
.spec b { font-weight: 700; text-align: right; }
.desc { white-space: pre-line; line-height: 1.7; color: var(--ink-2); font-size: 15.5px; }
.desc.clamped { max-height: 220px; overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); }
.seller { display: flex; gap: 14px; align-items: center; }
.seller .name { font-weight: 800; font-size: 16px; }
.seller .role { color: var(--muted); font-size: 13.5px; }
.market-bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--good), #ffd166 50%, var(--danger)); margin: 18px 0 6px; }
.market-bar i { position: absolute; top: -6px; width: 4px; height: 22px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); }
.market-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-map { height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--warn-50); color: var(--ink-2); font-size: 14px; }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--warn); margin-top: 1px; }
.notice.info { background: var(--brand-50); } .notice.info svg { color: var(--brand); }
.notice.good { background: var(--good-50); } .notice.good svg { color: var(--good); }
.notice.err { background: var(--danger-50); } .notice.err svg { color: var(--danger); }

/* ── риэлторы ── */
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex;
  flex-direction: column; gap: 14px; transition: box-shadow .2s, transform .2s; position: relative; }
.rcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rcard-top { display: flex; gap: 14px; align-items: center; }
.rcard-photo { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; background: var(--brand-50); flex: none; }
.rcard .name { font-weight: 800; font-size: 17px; }
.rcard .agency { color: var(--muted); font-size: 13.5px; }
.rstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rstats div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; }
.rstats b { display: block; font-size: 17px; }
.rstats span { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .off { color: var(--line); }
.profile-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 28px;
  display: grid; gap: 24px; }
@media (min-width: 900px) { .profile-hero { grid-template-columns: 180px 1fr; } }
.profile-photo { width: 180px; height: 180px; border-radius: 32px; object-fit: cover; background: var(--brand-50); }
.timeline { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 16px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline > div { position: relative; }
.timeline > div::before { content: ""; position: absolute; left: -22px; top: 5px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--brand); }
.review { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }

/* ── табы ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tabs a, .tabs button { border: 0; background: none; padding: 12px 14px; font-weight: 700; color: var(--muted); white-space: nowrap;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs .on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .cnt { background: var(--line-2); color: var(--muted); border-radius: 8px; padding: 1px 7px; font-size: 12px; margin-left: 4px; }
.tabs .on .cnt { background: var(--brand-50); color: var(--brand); }

/* ── кабинет ── */
.cabinet { display: grid; gap: 24px; grid-template-columns: 1fr; padding-top: 24px; }
.cabinet > * { min-width: 0; }
@media (min-width: 1024px) { .cabinet { grid-template-columns: 260px minmax(0, 1fr); } }
.side-menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
@media (min-width: 1024px) { .side-menu { flex-direction: column; position: sticky; top: calc(var(--header-h) + 20px); } }
.side-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--ink-2);
  white-space: nowrap; }
.side-menu a svg { width: 20px; height: 20px; color: var(--muted); }
.side-menu a:hover { background: var(--line-2); }
.side-menu a.on { background: var(--brand-50); color: var(--brand); }
.side-menu a.on svg { color: var(--brand); }
.side-menu .cnt { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; border-radius: 9px; padding: 1px 7px; }
.mrow { display: grid; gap: 14px; grid-template-columns: 120px 1fr; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; }
@media (min-width: 720px) { .mrow { grid-template-columns: 170px 1fr auto; align-items: center; } }
.mrow img, .mrow .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--line-2); }
.mrow .actions { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; }
@media (min-width: 720px) { .mrow .actions { grid-column: auto; flex-direction: column; align-items: stretch; } }
.sold-row { grid-template-columns: 96px minmax(0, 1fr); }
.sold-row .badge { grid-column: 2; justify-self: start; white-space: normal; height: auto; padding: 4px 9px; }
@media (min-width: 720px) { .sold-row { grid-template-columns: 110px minmax(0, 1fr) auto; } .sold-row .badge { grid-column: auto; } }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi b { display: block; font-size: 26px; letter-spacing: -.02em; }
.kpi .stars { color: var(--gold); font-size: inherit; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 14px; color: var(--faint); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 14px; color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .04em; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.bar { height: 8px; border-radius: 4px; background: var(--brand-50); overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--brand-grad); border-radius: 4px; }

/* ── вход ── */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 32px 28px; box-shadow: var(--shadow); }
.code-cells { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }
.code-cells input { width: 58px; height: 64px; text-align: center; font-size: 26px; font-weight: 800; border: 1.5px solid var(--line);
  border-radius: 14px; background: var(--surface); outline: none; }
.code-cells input:focus { border-color: var(--brand); box-shadow: var(--ring); }

/* ── карта ── */
.map-full { position: relative; height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .map-full { grid-template-columns: 420px 1fr; } }
.map-side { display: none; overflow-y: auto; padding: 16px; border-right: 1px solid var(--line); background: var(--bg); }
@media (min-width: 1024px) { .map-side { display: block; } }
.map-pin { background: var(--surface); color: var(--ink); border: 2px solid var(--brand); border-radius: 10px; padding: 3px 7px; font-weight: 800;
  font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); transform: translate(-50%, -100%); position: relative; }
.map-pin.good { border-color: var(--good); }
.map-pin.hl { background: var(--brand); color: #fff; }
.leaflet-container { font-family: var(--font) !important; background: var(--line-2) !important; }
.leaflet-popup-content-wrapper { border-radius: 14px !important; }
.leaflet-div-icon { background: transparent !important; border: 0 !important; }
.marker-cluster-custom { background: var(--brand); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  border: 4px solid rgba(255, 255, 255, .8); box-shadow: var(--shadow); }

/* ── мессенджер ── */
.chat { display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--header-h)); background: var(--surface); }
.chat > * { min-width: 0; }
@media (max-width: 767px) { .chat { height: calc(100vh - var(--header-h) - 64px - env(safe-area-inset-bottom)); } }
@media (min-width: 900px) { .chat { grid-template-columns: 360px minmax(0, 1fr); } .chat.with-info { grid-template-columns: 360px minmax(0, 1fr) 340px; } }
@media (max-width: 767px) {
  body.in-conv { padding-bottom: 0; }
  body.in-conv .tabbar { display: none; }
  body.in-conv .chat { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
}
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.chat-items { flex: 1; overflow-y: auto; }
.chat-item { display: flex; gap: 12px; padding: 12px 16px; align-items: center; cursor: pointer; border-bottom: 1px solid var(--line-2); position: relative; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: var(--brand-50); }
.chat-item .ava { position: relative; flex: none; }
.chat-item .ava .online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--good);
  border: 2px solid var(--surface); }
.chat-item .title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .preview { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .time { color: var(--faint); font-size: 12px; font-weight: 600; }
.chat-item .unread { background: var(--good); color: #fff; font-size: 11.5px; font-weight: 800; min-width: 20px; height: 20px;
  border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.chat-item .ltag { font-size: 11.5px; color: var(--brand); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.chat-main-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-main-head .title { font-weight: 800; }
.chat-main-head .sub { color: var(--muted); font-size: 12.5px; }
.chat-subject { display: flex; gap: 10px; align-items: center; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-subject img, .chat-subject .ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--line-2); flex: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 4px;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--brand) 9%, transparent) 1px, transparent 0);
  background-size: 22px 22px; }
.msg { max-width: min(78%, 560px); display: flex; flex-direction: column; align-self: flex-start; }
.msg.me { align-self: flex-end; }
.bubble { position: relative; background: var(--surface); padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow-sm);
  word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 15px; }
.msg.me .bubble { background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg .who { font-size: 12px; font-weight: 800; color: var(--brand); margin-bottom: 2px; }
.msg .meta { display: inline-flex; gap: 4px; align-items: center; float: right; margin: 6px 0 -2px 10px; font-size: 11px; opacity: .7; }
.msg .meta svg { width: 16px; height: 16px; }
.msg .meta .read { color: #7ee7ff; opacity: 1; }
.msg:not(.me) .meta .read { color: var(--good); }
.msg.system { align-self: center; max-width: 90%; }
.msg.system .bubble { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); font-size: 13px; text-align: center;
  border-radius: 12px; box-shadow: none; padding: 6px 12px; }
.msg .img { border-radius: 12px; overflow: hidden; margin: -2px -6px 4px; max-width: 320px; cursor: zoom-in; }
.msg .file { display: flex; gap: 10px; align-items: center; padding: 6px 4px; color: inherit; }
.msg .file .fi { width: 40px; height: 40px; border-radius: 10px; background: rgba(0, 0, 0, .08); display: grid; place-items: center; }
.msg.me .file .fi { background: rgba(255, 255, 255, .2); }
.msg .lcard-mini { display: flex; gap: 10px; background: rgba(0, 0, 0, .04); border-radius: 12px; padding: 8px; margin-bottom: 4px; color: inherit; }
.msg.me .lcard-mini { background: rgba(255, 255, 255, .14); }
.msg .lcard-mini img, .msg .lcard-mini .ph { width: 64px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--line-2); flex: none; }
.msg .reply { border-left: 3px solid var(--brand); padding: 2px 8px; margin-bottom: 4px; font-size: 13px; opacity: .85; border-radius: 4px;
  background: rgba(0, 0, 0, .04); }
.msg.me .reply { border-left-color: #fff; background: rgba(255, 255, 255, .14); }
.msg.deleted .bubble { font-style: italic; opacity: .7; }
.day-sep { align-self: center; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; padding: 4px 12px;
  border-radius: 10px; margin: 10px 0; box-shadow: var(--shadow-sm); }
.typing { color: var(--brand); font-size: 12.5px; font-weight: 700; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface);
  border-top: 1px solid var(--line); }
.composer textarea { flex: 1; border: 1.5px solid var(--line); border-radius: 20px; padding: 10px 16px; resize: none; max-height: 140px;
  min-height: 44px; outline: none; background: var(--surface-2); line-height: 1.4; }
.composer textarea:focus { border-color: var(--brand); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.composer .send svg { width: 20px; height: 20px; }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface); border-top: 1px solid var(--line); font-size: 13.5px; }
.reply-bar .q { flex: 1; border-left: 3px solid var(--brand); padding-left: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-info { border-left: 1px solid var(--line); overflow-y: auto; padding: 18px; display: none; }
.chat.with-info .chat-info { display: block; }
@media (max-width: 899px) {
  .chat.has-active .chat-list { display: none; }
  .chat:not(.has-active) .chat-main { display: none; }
  .chat.with-info .chat-info { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 70; background: var(--surface); }
}
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.task.done span { text-decoration: line-through; color: var(--muted); }
.ctx-menu { position: fixed; z-index: 160; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 180px; }
.ctx-menu button { display: flex; width: 100%; gap: 10px; align-items: center; border: 0; background: none; padding: 9px 12px; border-radius: 10px;
  font-weight: 600; text-align: left; }
.ctx-menu button:hover { background: var(--line-2); }
.ctx-menu button.danger { color: var(--danger); }

/* ── подача объявления ── */
.wizard { display: grid; gap: 24px; grid-template-columns: 1fr; padding-top: 24px; }
@media (min-width: 1024px) { .wizard { grid-template-columns: minmax(0, 1fr) 320px; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; scroll-margin-top: 90px; }
.step + .step { margin-top: 16px; }
.step-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.step-num { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50); color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.uploader { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; transition: all .2s;
  background: var(--surface-2); }
.uploader:hover, .uploader.drag { border-color: var(--brand); background: var(--brand-50); }
.uploader svg { width: 42px; height: 42px; color: var(--brand); margin: 0 auto 8px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--line-2); cursor: grab; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6);
  color: #fff; display: grid; place-items: center; }
.thumb .main-tag { position: absolute; left: 6px; bottom: 6px; }
.thumb.uploading::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .6) url() center no-repeat; }
.thumb.dragging { opacity: .4; }
.progress { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand-grad); transition: width .3s; }
.score-ring { width: 92px; height: 92px; }

/* ── прочее ── */
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.bold { font-weight: 800; }
.good { color: var(--good); }
.danger { color: var(--danger); }
.brand { color: var(--brand); }
.center { text-align: center; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skeleton { background: linear-gradient(90deg, var(--line-2), var(--line), var(--line-2)); background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--brand-100); border-top-color: var(--brand);
  animation: spin .8s linear infinite; margin: 24px auto; }
.kbd { font-size: 12px; background: var(--line-2); padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#grad); opacity: .35; }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.tooltip-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); padding: 6px 10px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700; transform: translate(-50%, -120%); white-space: nowrap; }

/* ── переключатель языка ── */
.lang-switch { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border-radius: 10px;
  font-weight: 700; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.lang-switch:hover { color: var(--brand); border-color: var(--brand); }
.footer-langs { display: inline-flex; align-items: center; gap: 14px; }
.footer-langs a, .footer-langs b { display: inline; }
