/* Поиск объектов. Светло-жёлтый #F3E8BC по бирюзовому #035352,
   Oswald для заголовков и цен, Golos Text для текста, кнопки-«таблетки». */

:root {
  --bg: #035352;
  --paper: #0a5e5c;
  --ink: #f3e8bc;
  --ink-2: rgba(243, 232, 188, .82);
  --ink-3: rgba(243, 232, 188, .6);
  --line: rgba(243, 232, 188, .16);
  --line-2: rgba(243, 232, 188, .32);
  --accent: #f3e8bc;
  --on-accent: #035352;
  --chip: rgba(243, 232, 188, .1);
  --focus: var(--gold);
  --err: var(--bad);
  --hover: #fff6d6;
  --radius: 999px;
  --head: "Oswald", "Arial Narrow", sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ─── шапка ─────────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto; padding: 28px 16px 8px;
}
.brand {
  font: 600 28px/1 var(--head); letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
}
.brand span { font-weight: 500; margin: 0 1px; opacity: .7; }
.brand-sub { color: var(--ink-3); font-size: 14px; flex: 1 1 240px; }
.access-btn {
  border: 1px solid var(--ink); background: transparent;
  border-radius: var(--radius); padding: 6px 16px; font-size: 14px;
}
.access-btn.on { background: var(--ink); color: var(--on-accent); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 8px 16px 64px; }

/* ─── поиск ─────────────────────────────────────────────────────────────── */
.search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 14px; }
.search input[type=search] {
  flex: 1 1 320px; min-width: 0;
  background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 14px 22px; font-size: 17px;
}
.search input[type=search]::placeholder { color: var(--ink-3); }

.deal, .view {
  display: inline-flex; background: var(--chip); border-radius: var(--radius); padding: 3px;
}
.seg {
  border: 0; background: transparent; border-radius: var(--radius);
  padding: 9px 18px; font-weight: 500; color: var(--ink-2);
}
.seg.on { background: var(--ink); color: var(--on-accent); }
.view .seg { padding: 6px 14px; font-size: 14px; }

/* ─── фильтры ───────────────────────────────────────────────────────────── */
.filters { display: grid; gap: 10px; }
.row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { max-height: 132px; overflow-y: auto; padding: 2px; }
.chip {
  border: 1px solid var(--line-2); background: transparent; border-radius: var(--radius);
  padding: 6px 14px; font-size: 14px; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-accent); }
.chip .n { color: var(--ink-3); margin-left: 4px; font-size: 12px; }
.chip.on .n { color: rgba(3, 83, 82, .65); }
.chip.x::after { content: " ✕"; font-size: 11px; }

.range, .field { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range-label { color: var(--ink-3); font-size: 13px; margin-right: 2px; }
.range input, .field input, .field select, .bar select {
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 7px 14px; font-size: 14px; width: 92px;
}
.field select, .bar select { width: auto; padding-right: 10px; }
.field.wide { display: grid; gap: 6px; width: 100%; }
.field.wide input { width: min(100%, 360px); }

.more-btn, .reset {
  border: 0; background: transparent; padding: 6px 4px; font-size: 14px;
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px;
}
.more {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
}
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); }

/* ─── панель над результатами ───────────────────────────────────────────── */
.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 26px 0 6px; padding-bottom: 12px; border-bottom: 1px solid var(--ink);
}
.count { margin: 0; font: 500 18px/1.2 var(--head); letter-spacing: .02em; }
.bar-right { display: flex; gap: 10px; align-items: center; }

/* ─── карточки: 4 в ряд на компьютере, 2 на телефоне ───────────────────── */
.results {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; cursor: pointer; transition: border-color .15s, transform .15s;
}
.item:hover { border-color: var(--line-2); transform: translateY(-2px); }
.item:focus-visible { outline-offset: 2px; }
.item-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; }
.price { font: 600 26px/1.1 var(--head); letter-spacing: .01em; white-space: nowrap; }
.price-m2 { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.item-title { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.3; }
.item-place {
  color: var(--ink-2); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-desc {
  color: var(--ink-3); font-size: 13px; margin: 4px 0 0; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.item-meta { color: var(--ink-3); font-size: 12px; margin-top: auto; padding-top: 8px; }
.results .empty { grid-column: 1 / -1; }
.tag {
  display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1px 8px; margin-left: 6px;
  vertical-align: 2px; color: var(--ink-2); font-weight: 500;
}

.empty { padding: 48px 4px; text-align: center; color: var(--ink-3); }
.empty b { display: block; font: 500 22px var(--head); color: var(--ink); margin-bottom: 6px; }

.more-results { text-align: center; margin-top: 24px; }
.pill {
  border: 0; background: var(--ink); color: var(--on-accent); border-radius: var(--radius);
  padding: 12px 26px; font-weight: 500;
}
.pill:hover { background: var(--hover); }
.pill.light:hover { background: var(--chip); }
.pill.light { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.ghost { border: 0; background: transparent; padding: 12px 18px; color: var(--ink-2); }

/* ─── карта ─────────────────────────────────────────────────────────────── */
.map {
  height: clamp(360px, 68vh, 620px); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-2); margin-top: 14px; background: var(--chip);
}
.map-pop { font: 14px/1.4 var(--body); color: #12302f; }
.map-pop b { font: 600 17px var(--head); display: block; }
.map-pop button {
  margin-top: 6px; border: 0; background: #035352; color: #f3e8bc;
  border-radius: var(--radius); padding: 5px 12px; font-size: 13px;
}



/* ─── карточка объекта ──────────────────────────────────────────────────── */
dialog {
  border: 0; padding: 0; color: var(--ink); background: var(--paper);
  border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(0, 20, 20, .6); }
.detail { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
.detail .close {
  position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 1;
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--chip); font-size: 15px;
}
#detailBody { padding: 28px 28px 30px; }
.d-title { font: 600 26px/1.15 var(--head); margin: 0 40px 6px 0; letter-spacing: .01em; }
.d-place { color: var(--ink-2); margin: 0 0 18px; }
.d-price { font: 600 40px/1 var(--head); margin: 0; }
.d-price-m2 { color: var(--ink-3); margin: 4px 0 20px; }
.d-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0 0 22px; }
.d-facts div { background: var(--paper); padding: 10px 14px; }
.d-facts dt { color: var(--ink-3); font-size: 12px; }
.d-facts dd { margin: 0; font-weight: 600; }
.d-h { font: 500 15px var(--head); text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 8px; color: var(--ink-2); }
.d-desc { white-space: pre-line; margin: 0; }
.d-contact { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; }
.d-contact a { text-decoration: none; display: inline-block; }
.d-source {
  white-space: pre-wrap; background: var(--bg); border-radius: 14px; padding: 14px;
  font-size: 13px; color: var(--ink-2); margin: 0; max-height: 260px; overflow: auto;
}
.d-hist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.d-hist li { display: flex; gap: 10px; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.d-hist .who { color: var(--ink-3); }
.d-note { color: var(--ink-3); font-size: 13px; margin-top: 18px; }

/* ─── вход ──────────────────────────────────────────────────────────────── */
.small-dlg { width: min(400px, calc(100vw - 24px)); }
.small-dlg form { padding: 26px; }
.small-dlg h2 { font: 600 24px var(--head); margin: 0 0 6px; }
.small-dlg p { color: var(--ink-2); margin: 0 0 16px; font-size: 14px; }
.small-dlg input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 12px 18px; font-size: 16px;
}
.small-dlg .err { color: var(--err); margin: 8px 0 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ─── телефон ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { padding-top: 18px; }
  .brand { font-size: 24px; }
  .brand-sub { font-size: 13px; }
  .search input[type=search] { font-size: 16px; }
  .results { gap: 10px; }
  .item { padding: 12px; border-radius: 14px; }
  .price { font-size: 19px; }
  .price-m2 { font-size: 11px; }
  .item-title { font-size: 13px; }
  .item-place, .item-desc { font-size: 12px; }
  .item-desc { -webkit-line-clamp: 2; }
  .bar-right { width: 100%; justify-content: space-between; }
  #detailBody { padding: 22px 18px 24px; }
  .d-price { font-size: 32px; }
  .range input, .field input { width: 80px; }
}

/* ─── телефон по подписке, история, пояснение ───────────────────────────── */
.d-locked {
  margin: 22px 0 0; padding: 16px 18px; border: 1px dashed var(--line-2); border-radius: 16px;
  display: grid; gap: 8px; justify-items: start;
}
.d-locked-num { font: 600 22px var(--head); letter-spacing: .04em; }
.d-locked p { margin: 0; color: var(--ink-2); font-size: 14px; }
.d-hist-box { margin-top: 22px; border-top: 1px solid var(--line); }
.d-hist-box summary {
  cursor: pointer; padding: 12px 0; font: 500 15px var(--head); text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-2); list-style: none;
}
.d-hist-box summary::-webkit-details-marker { display: none; }
.d-hist-box summary::after { content: " ▾"; }
.d-hist-box[open] summary::after { content: " ▴"; }
.dlg-body { padding: 26px; }
.dlg-body h2 { font: 600 24px var(--head); margin: 0 0 12px; }
.steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: 14px; }
.steps b { color: var(--ink); }
.dlg-body .note { color: var(--ink-3); font-size: 13px; margin: 0; }

/* ─── кабинет, избранное, фото ──────────────────────────────────────────── */
.top-actions { display: flex; gap: 8px; margin-left: auto; }
.access-btn.ghost-btn { border-color: var(--line-2); }
.access-btn.on { background: var(--ink); color: var(--on-accent); }
.item { position: relative; }
.item.has-photo { padding-top: 0; overflow: hidden; }
.item-photo { margin: 0 -16px 10px; aspect-ratio: 4 / 3; background: var(--chip); }
.item-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(3, 83, 82, .72); color: var(--ink); font-size: 17px; line-height: 1;
}
.fav-btn.on { color: var(--bad); }
.fav-btn:hover { background: var(--bg); }
.d-fav { position: static; width: auto; height: auto; padding: 7px 14px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: transparent; font-size: 14px; margin-bottom: 12px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 0 40px 16px 0; scroll-snap-type: x mandatory; }
.gallery a { flex: 0 0 auto; scroll-snap-align: start; }
.gallery img { height: 220px; width: auto; max-width: 320px; object-fit: cover; border-radius: 12px; display: block; }
.link-btn { border: 0; background: none; color: var(--ink-2); text-decoration: underline; font: 14px var(--body); margin-left: 10px; }
.login-opts { display: grid; gap: 10px; margin: 6px 0 4px; }
.pill.wide { width: 100%; }
.or { text-align: center; color: var(--ink-3); font-size: 13px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 10px 16px; font-size: 15px;
}
.inline-form .pill { padding: 10px 16px; white-space: nowrap; }
.tg-wait { background: var(--chip); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.tg-wait a { color: var(--ink); }
.promo-box summary { cursor: pointer; color: var(--ink-3); font-size: 13px; padding: 4px 0; }
.promo-box .inline-form { margin-top: 8px; }
#cabinetBody > * + * { margin-top: 12px; }
#cabinetBody p { margin: 0; }
.cab-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cab-actions { flex-wrap: wrap; justify-content: space-between; }
.cab-actions a.ghost { text-decoration: none; }
.d-report { margin-top: 18px; }
.d-report summary { cursor: pointer; color: var(--ink-3); font-size: 13px; }
.report-form { display: grid; gap: 8px; margin-top: 10px; }
.report-form select, .report-form textarea {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; font: 14px var(--body);
}
.report-form .pill { justify-self: start; padding: 8px 18px; }
.foot { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-2); }
@media (max-width: 640px) {
  .item-photo { margin: 0 -12px 8px; }
  .fav-btn { width: 30px; height: 30px; font-size: 15px; top: 8px; right: 8px; }
  .gallery img { height: 170px; }
  .top-actions { width: 100%; }
  .top-actions .access-btn { flex: 1; }
}
.item:not(.has-photo) .item-price { padding-right: 36px; }
.small-dlg form.inline-form, .small-dlg form.report-form { padding: 0; }
a.access-btn { text-decoration: none; color: var(--ink); display: inline-block; }
.item-head { font: 500 15px/1.25 var(--head); letter-spacing: .03em; text-transform: uppercase; margin: 0 0 2px;
  color: var(--ink-2); padding-right: 36px; }
.item.has-photo .item-head { padding-right: 0; }
.item:not(.has-photo) .item-price { padding-right: 0; }
.item-title { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.3; }
@media (max-width: 640px) { .item-head { font-size: 13px; padding-right: 30px; } .item-title { font-size: 12px; } }
.ya-link { color: var(--gold); font-weight: 600; text-decoration: none; }
.ya-link:hover { text-decoration: underline; }
.ya-sel { position: fixed; z-index: 2147483000; padding: 7px 12px; border-radius: 999px; background: var(--gold); color: #035352;
  font: 600 13px/1.2 system-ui, sans-serif; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: nowrap; }
.ya-sel[hidden] { display: none; }
.d-place .ya-link { margin-left: 6px; white-space: nowrap; font-size: .92em; }

/* дни в продаже, «срочно», график цены */
.item-meta .on-sale.long { color: var(--gold); }
.mark.hot { background: var(--bad); color: #4a120a; }
.d-sale { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.14); font-size: 15px; }
.d-sale.long { background: rgba(227, 203, 143,.14); }
.d-sale small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.d-chart { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.14); }
.d-chart summary { cursor: pointer; font-weight: 600; }
.d-chart-svg { display: block; width: 100%; height: 120px; margin: 8px 0 4px; }
.d-chart-svg path { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; }
.d-chart-svg circle { fill: #035352; stroke: var(--gold); stroke-width: 2; }
.d-chart-list { list-style: none; margin: 0; padding: 0; font-size: 14px; display: grid; gap: 2px; }
.d-chart-list li { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 4px 0; }

/* статусы по объекту (CRM агента) */
.d-crm { margin: 14px 0 6px; }
.d-crm-label { display: block; font-weight: 600; margin-bottom: 6px; }
.d-crm-label small { font-weight: 400; color: var(--ink-3); }
.d-crm .chip { font-size: 13px; }
.mark.crm { background: rgba(243,232,188,.16); color: var(--ink); }
.mark.crm-deal { background: var(--ok); color: var(--ok-ink); }
.mark.crm-refuse { background: rgba(226, 165, 150,.25); }
.crm-chips { margin-top: 10px; }
.crm-chips .chip b { font-weight: 600; opacity: .75; margin-left: 2px; }

/* проверенный агент, сравнение */
.mark.verified { background: var(--ok); color: var(--ok-ink); }
.item { position: relative; }
.cmp-btn { position: absolute; right: 12px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(0,0,0,.18); color: var(--ink); font-size: 16px; cursor: pointer; }
.cmp-btn.on, .cmp-btn-d.on { background: var(--gold); color: #035352; border-color: var(--gold); }
.cmp-bar { position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center;
  gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(10,94,92,.95); border: 1px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); white-space: nowrap; }
.cmp-bar[hidden] { display: none; }
.cmp-bar .pill { padding: 8px 16px; font-size: 14px; }
.cmp-bar .pill:disabled { opacity: .5; }
.cmp-bar .ghost { padding: 6px 10px; }
@media (max-width: 767px) { .cmp-bar { bottom: calc(var(--tabbar-h, 64px) + 12px); } }
.cmp-dlg { width: min(1040px, 96vw); max-width: 96vw; }
.cmp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cmp-head .close { position: static; }
.cmp-wrap { overflow-x: auto; margin: 8px -4px 0; }
.cmp-t { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
.cmp-t th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 7px 8px; white-space: nowrap; vertical-align: top; }
.cmp-t td { padding: 7px 8px; border-top: 1px solid var(--line); vertical-align: top; width: 30%; }
.cmp-t thead td { border-top: 0; position: relative; }
.cmp-t thead img, .cmp-nophoto { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 6px;
  background: rgba(0,0,0,.15); }
.cmp-nophoto { display: grid; place-items: center; } .cmp-nophoto svg { width: 40%; opacity: .5; }
.cmp-t td.best { color: var(--gold); font-weight: 600; }
.cmp-x { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; cursor: pointer; }

/* планер в окне объекта и на карточках избранного */
.d-plan { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.d-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.d-plan ul a { color: var(--gold); font-weight: 600; }
.d-plan ul span { color: var(--ink-2); margin-left: 6px; }
.plan-btn { position: absolute; right: 54px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; display: grid;
  place-items: center; border: 1px solid var(--line-2); background: rgba(0,0,0,.18); text-decoration: none; font-size: 15px; }
.cab-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cab-links .pill { font-size: 14px; padding: 8px 14px; }

/* подборки */
.d-plan-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; max-height: 45vh; overflow-y: auto; }
.pick-list label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.14); cursor: pointer; }
.pick-list input { accent-color: var(--gold); width: 18px; height: 18px; }
.pick-list span { display: flex; flex-direction: column; }
.pick-list small { color: var(--ink-3); }
#count .link-btn[href] { text-decoration: none; margin-left: 10px; }

/* покупатели под объект */
.d-buyers { margin: 12px 0; padding: 10px 12px; border-radius: 14px; background: rgba(167, 209, 182,.1); border: 1px solid rgba(167, 209, 182,.35); }
.d-buyers summary { cursor: pointer; font-weight: 600; }
.d-buyers ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.d-buyers li { padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.14); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.d-buyers li p { width: 100%; margin: 0; white-space: pre-wrap; font-size: 14px; }
.d-buyers .pill { font-size: 13px; padding: 5px 12px; }

/* приведи коллегу */
.cab-ref { margin: 12px 0; padding: 12px 14px; border-radius: 16px; background: rgba(227, 203, 143,.12); border: 1px solid rgba(227, 203, 143,.4); }
.cab-ref-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cab-ref-row input { flex: 1 1 180px; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.cab-ref-row .pill { font-size: 14px; padding: 8px 14px; }

/* избранное: без кнопок поиска; кнопки 📅/⚖ не закрывают строку «в продаже…» */
body.fav-mode .bar-tools, body.fav-mode .bar-right, body.fav-mode #savedRow, body.fav-mode #refreshBtn, body.fav-mode #hitNote { display: none !important; }
.item-foot { display: flex; align-items: flex-end; gap: 6px; margin-top: auto; }
.item-foot .item-meta { flex: 1; min-width: 0; }
.item-foot .cmp-btn, .item-foot .plan-btn { position: static; flex: none; width: 32px; height: 32px; font-size: 14px; }

/* ═══ окно объекта v2: главное сверху, остальное — раскрывающимися строками ═══ */
#detailBody { padding: 0 0 26px; }
.dv { padding: 0 26px; }
.dv-gal { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 4px; margin: 0 0 4px;
  border-radius: 22px 22px 0 0; scrollbar-width: none; }
.dv-gal::-webkit-scrollbar { display: none; }
.dv-gal a { flex: 0 0 auto; scroll-snap-align: start; }
.dv-gal img { height: 280px; width: auto; max-width: 420px; object-fit: cover; display: block; border-radius: 6px;
  animation: riseIn .5s var(--ease) both; }
.dv-gal a:first-child img { border-top-left-radius: 22px; }
.dv-gal.one img { width: 100%; max-width: none; }
.dv-gal.one a { flex: 1; }
.dv-head { padding-top: 18px; }
.dv-head .marks { margin: 0 0 8px; }
.dv-title { font: 600 28px/1.12 var(--head); margin: 0 60px 4px 0; letter-spacing: .01em; }
.dv-subt { color: var(--ink-2); margin: 0 0 12px; font-size: 15px; }
.dv-subt .ya-link { margin-left: 6px; white-space: nowrap; font-size: 14px; }
.dv-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.dv-price b { font: 600 38px/1 var(--head); }
.dv-price span { color: var(--ink-3); font-size: 14px; }
.dv-tag { padding: 3px 10px; border-radius: 999px; font: 600 12px var(--body) !important; }
.dv-tag.good { background: var(--ok); color: var(--ok-ink) !important; }
.dv-tag.high { background: rgba(226, 165, 150, .22); color: var(--bad) !important; }
.dv-acts { display: flex; gap: 8px; margin: 18px -2px 4px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.dv-acts::-webkit-scrollbar { display: none; }
.dv-act { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 84px; padding: 10px 8px 8px;
  border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .12); color: var(--ink); text-decoration: none;
  font: 500 12px var(--body); cursor: pointer; transition: background .2s, transform .2s var(--spring), border-color .2s; }
.dv-act i { font-style: normal; font-size: 19px; line-height: 1; }
.dv-act:hover { background: var(--chip); transform: translateY(-2px); }
.dv-act:active { transform: scale(.96); }
.dv-act.on { border-color: var(--gold); background: rgba(227, 203, 143, .16); }
.dv .d-contact { margin: 14px 0 0; }
.dv .d-contact .pill { flex: 1 1 160px; text-align: center; }
.dv .d-locked { margin-top: 14px; }
.dv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0; margin: 18px 0 0; border-radius: 16px;
  overflow: hidden; border: 1px solid var(--line); }
.dv-facts div { padding: 9px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.dv-facts dt { color: var(--ink-3); font-size: 12px; }
.dv-facts dd { margin: 0; font-weight: 600; font-size: 15px; }
.dv-desc { margin: 16px 0 0; position: relative; }
.dv-desc p { white-space: pre-line; margin: 0; color: var(--ink-2); line-height: 1.55; }
.dv-desc.clamp p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.dv-desc-more { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--gold); font: 600 14px var(--body); cursor: pointer; }
.dv-desc:not(.clamp) .dv-desc-more, .dv-desc.clamp .dv-desc-more { display: inline-block; }
.dv-accs { margin: 20px 0 0; border-top: 1px solid var(--line); }
.dv-acc, .dv-acc-btn { border-bottom: 1px solid var(--line); }
.dv-acc summary, .dv-acc-btn { display: flex; align-items: center; gap: 12px; padding: 13px 2px; cursor: pointer; list-style: none;
  font: 500 15px var(--body); color: var(--ink); transition: color .2s; }
.dv-acc-btn { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.dv-acc summary::-webkit-details-marker { display: none; }
.dv-acc summary::after { content: ""; width: 8px; height: 8px; margin-left: 6px; border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease); }
.dv-acc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.dv-acc summary:hover, .dv-acc-btn:hover { color: var(--gold); }
.dv-acc-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(243, 232, 188, .08);
  font-size: 15px; }
.dv-acc-t { flex: 1; }
.dv-acc-h { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.dv-acc.good .dv-acc-h { color: var(--ok); font-weight: 600; }
.dv-acc-b { padding: 2px 2px 16px 44px; animation: riseIn .3s var(--ease) both; }
.dv-acc-b > :first-child { margin-top: 0; }
.dv-line { margin: 0 0 8px; }
.dv-line small { display: block; color: var(--ink-3); font-size: 12px; }
.dv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dv-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.dv-list li p { width: 100%; margin: 0; white-space: pre-wrap; font-size: 14px; color: var(--ink-2); }
.dv-list small { color: var(--ink-3); font-size: 13px; }
.dv-list a { color: var(--gold); }
.dv-list .pill { font-size: 13px; padding: 4px 12px; }
.dv-hist li { justify-content: space-between; font-size: 14px; }
.dv-more { display: inline-block; margin-top: 10px; color: var(--gold); font-size: 14px; }
.dv-sub-h { margin: 12px 0 6px; color: var(--ink-3); font-size: 13px; }
.dv-crm { margin: 0 0 10px; }
.dv-crm .chip { font-size: 13px; }
.dv .d-note-text { width: 100%; }
.dv-admin { display: flex; flex-wrap: wrap; gap: 6px; }
.dv-admin .chip.danger { color: var(--bad); border-color: rgba(226, 165, 150, .4); }
.dv-acc.admin .dv-acc-ic { background: rgba(227, 203, 143, .14); }
.dv .d-report summary { color: var(--ink-3); }
.dv-foot { color: var(--ink-3); font-size: 12px; margin: 16px 0 0; }
.item.leaving { transition: opacity .3s, transform .3s; opacity: 0; transform: scale(.94); }
@media (max-width: 640px) {
  .dv { padding: 0 16px; }
  .dv-gal img { height: 230px; max-width: 86vw; }
  .dv-title { font-size: 24px; margin-right: 0; }
  .dv-price b { font-size: 32px; }
  .dv-act { min-width: 76px; }
  .dv-acc-b { padding-left: 2px; }
}
.dv .d-report { margin-top: 0; }

/* ═══ кабинет v2 ═══ */
#cabinetBody > * + * { margin-top: 14px; }
.cab-head { display: flex; gap: 14px; align-items: center; }
.cab-ava { width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 26px var(--head);
  color: var(--on-accent); background: linear-gradient(135deg, var(--gold), #f3e8bc); box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  animation: popIn .5s var(--spring) both; }
.cab-who { min-width: 0; }
.cab-who h2 { margin: 0; font: 600 22px/1.2 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-who .note { margin: 2px 0 6px; }
.cab-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 12px var(--body); }
.cab-badge.admin { background: rgba(227, 203, 143, .2); color: var(--gold); }
.cab-badge.ok { background: var(--ok); color: var(--ok-ink); }
.cab-badge.off { background: rgba(226, 165, 150, .2); color: var(--bad); }
.cab-bar { height: 6px; border-radius: 3px; background: rgba(243, 232, 188, .12); overflow: hidden; }
.cab-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--ok), var(--gold));
  animation: growX .9s var(--ease) both; transform-origin: left; }
.cab-left { margin: 4px 0 0 !important; color: var(--ink-3); font-size: 12px; }
.cab-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cab-tile2 { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 82px; padding: 10px 6px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .12);
  color: var(--ink); text-decoration: none; font: 500 12.5px var(--body); cursor: pointer;
  transition: transform .22s var(--spring), background .2s, border-color .2s; animation: riseIn .45s var(--ease) both; }
.cab-grid > :nth-child(2) { animation-delay: 30ms; } .cab-grid > :nth-child(3) { animation-delay: 60ms; }
.cab-grid > :nth-child(4) { animation-delay: 90ms; } .cab-grid > :nth-child(5) { animation-delay: 120ms; }
.cab-grid > :nth-child(6) { animation-delay: 150ms; } .cab-grid > :nth-child(7) { animation-delay: 180ms; }
.cab-grid > :nth-child(8) { animation-delay: 210ms; }
.cab-tile2 i { font-style: normal; font-size: 22px; line-height: 1; }
.cab-tile2 b { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold);
  color: #035352; font: 700 11px/18px var(--body); }
.cab-tile2:hover { transform: translateY(-3px); background: var(--chip); border-color: var(--line-2); }
.cab-tile2:active { transform: scale(.96); }
.cab-pay { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(227, 203, 143, .16), rgba(243, 232, 188, .05)); border: 1px solid rgba(227, 203, 143, .35); }
.cab-pay div { display: grid; gap: 2px; }
.cab-pay span { color: var(--ink-3); font-size: 13px; }
.cab-accs { border-top: 1px solid var(--line); }
.cab-accs .dv-acc-b { padding-left: 2px; }
.cab-ref { margin: 0; padding: 0; background: none; border: 0; }
.cab-foot { display: flex; justify-content: space-between; align-items: center; }
.cab-foot .ghost { color: var(--ink-3); }
.cab-admin { padding: 12px; }
.cab-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 520px) { .cab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cab-admin .cab-tile { padding: 8px 10px; }
.cab-admin .cab-tile b { font-size: 19px; }
.cab-admin .cab-tile span { font-size: 11px; }
@media (max-width: 520px) { .cab-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } }
