/* AlquilaPY — оформление. Тёплая бумага + терракота (кирпич ladrillo visto). Сначала телефон, потом широкий экран. */
:root {
  --bg: #f8f5f0;
  --surface: #fff;
  --ink: #1e1b18;
  --ink-2: #3d3833;
  --muted: #6f675e;
  --line: #e6dfd4;
  --line-2: #d6ccbe;
  --accent: #a8482a;
  --accent-2: #8f3b20;
  --accent-soft: #f7e8e0;
  --wa: #1d8a4c;
  --wa-2: #16743f;
  --ok: #1d7a46;
  --warn: #a76a10;
  --warn-soft: #fbf0dc;
  --danger: #b42318;
  --radius: 14px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(30, 27, 24, 0.06), 0 4px 14px rgba(30, 27, 24, 0.06);
  --shadow-l: 0 10px 40px rgba(30, 27, 24, 0.18);
  --head: 56px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 0.8em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.875rem; margin: 0.4em 0 0.8em; }
.hint.ok { color: var(--ok); }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.ic.big { width: 2rem; height: 2rem; }
.ic.huge { width: 3.5rem; height: 3.5rem; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 46px; padding: 0 1.1em; border-radius: 999px; border: 1.5px solid transparent; font-weight: 650; text-decoration: none !important; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-sm { min-height: 36px; padding: 0 0.9em; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-ghost.danger, .danger { color: var(--danger); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-2); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; }
.icon-btn:hover { background: var(--bg); }
.linkish { display: inline-flex; align-items: center; gap: 0.35em; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; font-style: normal; }
.badge.soft { background: var(--line-2); color: var(--ink); }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 1000; height: var(--head); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 0 16px; padding-top: env(safe-area-inset-top); background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none !important; min-width: 0; }
.logo-back { display: grid; place-items: center; margin-left: -6px; color: var(--muted); }
.logo-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); flex: none; }
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.logo-text b { color: var(--accent); font-weight: 800; }
.logo-text small { font-weight: 600; color: var(--muted); font-size: 0.8rem; margin-left: 4px; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-link { position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); font-weight: 700; font-size: 0.85rem; text-decoration: none !important; }
.top-link:hover, .top-link.on { background: var(--bg); }
.top-link .ic { width: 22px; height: 22px; }
.fav-link.on .ic, .fav-btn.on .ic { fill: var(--accent); stroke: var(--accent); }
.fav-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 0.68rem; line-height: 17px; text-align: center; }
.lang-pick { position: relative; }
.lang-menu { position: absolute; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-l); padding: 6px; min-width: 150px; }
.lang-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; }
.lang-menu button:hover { background: var(--bg); }
.lang-menu button[aria-current] { font-weight: 700; color: var(--accent); }
@media (max-width: 380px) { .top .btn-sm { padding: 0 0.7em; font-size: 0.82rem; } .logo { font-size: 1.05rem; } }

/* ---------- поиск: вкладки и фильтры ---------- */
.search-bar { position: sticky; top: var(--head); z-index: 900; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 650; font-size: 0.92rem; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bar-row { display: flex; gap: 8px; }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select { appearance: none; -webkit-appearance: none; width: 100%; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f675e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; padding: 0 36px 0 14px; height: 44px; font-weight: 600; }
.city-wrap { flex: 1; min-width: 0; }
.city-wrap .ic { position: absolute; left: 13px; color: var(--accent); pointer-events: none; }
.city-wrap select { padding-left: 38px; }
.filters-btn { min-height: 44px; flex: none; }
.filters-btn .badge { margin-left: 2px; }
.sort-wrap select { height: 36px; border: 0; background-color: transparent; padding-left: 4px; color: var(--muted); font-size: 0.9rem; }

/* ---------- результаты + карта ---------- */
.results { padding: 12px 12px 90px; }
.res-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.count { font-weight: 700; }
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
body.busy .cards { opacity: 0.55; transition: opacity 0.2s; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
.more { display: flex; margin: 20px auto 0; }
.map-pane { display: none; }
.map { width: 100%; height: 100%; background: #e9e4da; }
.search-here { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; background: var(--ink); color: #fff; box-shadow: var(--shadow-l); }
.view-toggle { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 950; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-l); }
.view-toggle span { display: inline-flex; align-items: center; gap: 8px; }
.view-toggle .vt-list { display: none; }
body.show-map .view-toggle .vt-map { display: none; }
body.show-map .view-toggle .vt-list { display: inline-flex; }
body.show-map .results { display: none; }
body.show-map .map-pane { display: block; position: fixed; left: 0; right: 0; bottom: 0; top: calc(var(--head) + var(--bar-h, 108px)); z-index: 10; }
@media (min-width: 960px) {
  .view-toggle { display: none; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 42%); }
  .results { padding: 16px 20px 40px; }
  .map-pane { display: block; position: sticky; top: calc(var(--head) + var(--bar-h, 108px)); height: calc(100vh - var(--head) - var(--bar-h, 108px)); border-left: 1px solid var(--line); }
  body.show-map .results { display: block; }
  body.show-map .map-pane { position: sticky; }
  .search-bar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
  .search-bar .tabs { margin: 0; padding: 0; }
  .search-bar .bar-row { flex: 1; max-width: 520px; margin-left: auto; }
}

/* ---------- карточка ---------- */
.card { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-link { display: block; color: inherit; text-decoration: none !important; }
.card-ph { position: relative; aspect-ratio: 4 / 3; background: #ece6dc; }
.card-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.card-strip::-webkit-scrollbar { display: none; }
.card-strip img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.noph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; color: var(--muted); font-size: 0.85rem; }
.noph.big { aspect-ratio: 4 / 3; background: #ece6dc; }
.dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); }
.dots i.on { background: #fff; }
.card-body { padding: 12px 14px 14px; }
.price { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.price small, .big-price small, .cb-price small, .my-price small { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.card-title { font-size: 0.98rem; font-weight: 600; margin: 2px 0 6px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-specs, .specs { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 0.9rem; }
.card-specs span, .specs span { display: inline-flex; align-items: center; gap: 5px; }
.card-specs .ic, .specs .ic { color: var(--muted); }
.card-place { color: var(--muted); font-size: 0.9rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 0.75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; }
.upd { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
.fav-btn { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); color: var(--ink); }
.fav-btn .ic { width: 20px; height: 20px; }
.fav-btn.big { top: 14px; right: 14px; width: 44px; height: 44px; }
.owner-box { margin: 28px 0 8px; padding: 22px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.owner-box h2 { font-size: 1.2rem; }
.owner-box p { color: #d8d1c7; }

/* ---------- маркеры карты ---------- */
.pp { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; background: var(--surface); color: var(--ink); font-weight: 800; font-size: 0.8rem; padding: 4px 9px; border-radius: 999px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12); border: 1.5px solid var(--surface); }
.pp:hover { background: var(--ink); color: #fff; border-color: var(--ink); z-index: 1000; }
.pp.short { border-color: var(--accent); }
.cl { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 0.9rem; border: 3px solid rgba(255, 255, 255, 0.9); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.pin-big { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.leaflet-popup-content-wrapper { border-radius: 12px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; }
.pop { display: flex; gap: 10px; color: var(--ink); text-decoration: none !important; padding: 8px; }
.pop img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; flex: none; }
.pop div { display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; line-height: 1.3; min-width: 0; }
.pop b { font-size: 1rem; }
.pop small { color: var(--muted); font-weight: 600; }
.leaflet-container { font: inherit; }

/* ---------- окна-«шторки» ---------- */
dialog.sheet { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100%; margin: auto auto 0; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(20, 17, 14, 0.45); }
.sheet-in { display: flex; flex-direction: column; max-height: 92dvh; background: var(--surface); border-radius: 18px 18px 0 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 8px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-body { overflow-y: auto; padding: 12px 18px 18px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.sheet-foot.wrap { flex-wrap: wrap; }
.sheet-foot.wrap .btn { flex: 1 1 auto; }
@media (min-width: 700px) {
  dialog.sheet { width: 560px; margin: auto; }
  dialog.sheet.wide { width: min(860px, 94vw); }
  .sheet-in { border-radius: 18px; max-height: 88vh; }
  .sheet-foot .btn { flex: 0 0 auto; }
}
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }

/* ---------- поля ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 0.86rem; font-weight: 650; color: var(--ink-2); }
.field > span em { font-style: normal; font-weight: 500; color: var(--muted); }
input[type="text"], input[type="search"], input[type="tel"], input[type="password"], input[type="email"], input[type="date"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); outline: none; transition: border-color 0.15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:disabled { background: var(--bg); color: var(--muted); }
.form-err { color: var(--danger); font-weight: 600; margin: 0; }
.row2, .row3, .row4 { display: grid; gap: 10px; }
.row2 { grid-template-columns: 1fr; }
.row3 { grid-template-columns: 1fr 1fr; }
.row3 .seg { grid-column: 1 / -1; }
.row4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr auto; } .row3 .seg { grid-column: auto; } .row4 { grid-template-columns: repeat(5, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-h { flex: 0 0 100%; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 4px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
button.chip { padding: 0; border: 0; background: none; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 13px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 0.92rem; font-weight: 550; cursor: pointer; text-align: left; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); font-weight: 700; }
.chip input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.chips.static { list-style: none; padding: 0; margin: 0 0 1em; }
.chips.static li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; }
.seg.wide { display: flex; }
.seg.wide label { flex: 1; }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; width: 100%; min-height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 650; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.seg input:focus-visible + span { outline: 2.5px solid var(--accent); }
.toggles { display: flex; flex-direction: column; gap: 6px; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 550; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); transition: background 0.15s; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.radios { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

/* ---------- страница объявления ---------- */
.listing { max-width: 1180px; margin: 0 auto; padding-bottom: 96px; }
.gallery { position: relative; background: #ece6dc; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: 0 0 100%; padding: 0; border: 0; background: none; scroll-snap-align: start; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 17, 14, 0.7); color: #fff; font-size: 0.82rem; font-weight: 700; }
.gal-nav { display: none; }
@media (min-width: 760px) {
  .listing { padding: 20px 20px 40px; }
  .gallery { border-radius: var(--radius); overflow: hidden; }
  .gal-track { gap: 6px; }
  .gal-item { flex-basis: 62%; aspect-ratio: auto; height: 440px; }
  .gallery.single .gal-item { flex-basis: 100%; }
  .gal-nav { display: grid; place-items: center; position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow); }
  .gal-nav.prev { left: 12px; }
  .gal-nav.next { right: 12px; }
  .gal-nav.next .ic { transform: rotate(180deg); }
}
.listing-grid { padding: 16px; }
@media (min-width: 900px) { .listing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 24px 0 0; align-items: start; } }
.kicker { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 6px; }
.listing h1 { font-size: 1.45rem; margin-bottom: 6px; }
@media (min-width: 760px) { .listing h1 { font-size: 1.9rem; } }
.place { display: flex; gap: 6px; color: var(--ink-2); margin-bottom: 12px; }
.place .ic { color: var(--accent); margin-top: 3px; }
.big-price { font-size: 1.8rem; font-weight: 850; letter-spacing: -0.02em; }
.sub-price { color: var(--muted); font-size: 0.92rem; }
.listing .specs { margin: 12px 0; font-size: 1rem; gap: 8px 18px; }
.meta { color: var(--muted); font-size: 0.85rem; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.listing h2 { margin-top: 26px; }
.desc { white-space: normal; color: var(--ink-2); overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 18px 0 0; }
.facts > div { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }
.lmap { position: relative; height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.lmap.small { height: 220px; margin: 12px 0; }
.map-open { position: absolute; z-index: 500; right: 8px; bottom: 22px; padding: 5px 10px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 0.82rem; font-weight: 700; }
.safety { margin-top: 22px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--warn-soft); color: #6b4609; font-size: 0.92rem; }
.actions-row { display: flex; gap: 20px; flex-wrap: wrap; }
.actions-row .linkish { color: var(--muted); font-weight: 600; }
.contact-box { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08); }
.cb-top { display: none; }
.cb-buttons { display: flex; gap: 8px; }
.cb-buttons .btn { flex: 1; padding: 0 0.6em; }
.cb-phone { padding: 0 4px 8px; font-weight: 700; font-size: 1.05rem; order: -1; }
.contact-box { display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .contact-box { position: sticky; top: calc(var(--head) + 20px); padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .cb-top { display: block; margin-bottom: 14px; }
  .cb-price { font-size: 1.5rem; font-weight: 850; }
  .cb-name { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 4px; }
  .cb-buttons { flex-direction: column; }
  .cb-phone { order: 0; padding: 12px 0 0; }
}
.similar { padding: 24px 16px 0; }
@media (min-width: 760px) { .similar { padding: 36px 0 0; } .cards-row { grid-template-columns: repeat(3, 1fr); } }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: #0f0d0b; display: flex; align-items: center; }
.lb-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-item { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: start; }
.lb-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 2; color: #fff; background: rgba(255, 255, 255, 0.12); }
.lb-count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; }

/* ---------- подвал, пустые страницы, правила ---------- */
.foot { padding: 28px 16px 20px; color: var(--muted); font-size: 0.88rem; text-align: center; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--ink-2); }
.foot .copy { font-size: 0.8rem; }
.demo-note { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--warn-soft); color: #6b4609; font-weight: 700; }
.page-listing .foot { padding-bottom: 100px; }
@media (min-width: 900px) { .page-listing .foot { padding-bottom: 20px; } }
.empty-page { max-width: 520px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.empty-ic { color: var(--accent); margin-bottom: 12px; display: grid; place-items: center; }
.prose { max-width: 720px; margin: 0 auto; padding: 24px 18px; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.5em; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 4000; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow-l); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- кабинет ---------- */
.account { max-width: 860px; margin: 0 auto; padding: 18px 14px 40px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel.narrow { max-width: 480px; margin: 0 auto; }
.auth { display: grid; gap: 20px; }
@media (min-width: 800px) { .auth { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding-top: 30px; } .auth-pitch h1 { font-size: 2.2rem; } }
.auth-tabs { margin-bottom: 16px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 6px 0 6px 32px; font-size: 1.02rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8482a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 14px; }
.acc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.acc-head h1 { margin-bottom: 2px; }
.acc-head p { margin: 0; }
.acc-links { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.big-add { min-height: 54px; font-size: 1.05rem; }
.acc-h2 { margin: 26px 0 12px; }
.my-list { display: flex; flex-direction: column; gap: 12px; }
.my-card { display: flex; gap: 12px; padding: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.my-ph { flex: none; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #ece6dc; display: grid; place-items: center; color: var(--muted); }
.my-ph img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .my-ph { width: 150px; height: 112px; } }
.my-body { flex: 1; min-width: 0; }
.my-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.85rem; }
.my-body h3 { margin: 6px 0 2px; font-size: 1rem; }
.my-price { font-weight: 800; }
.my-hint { font-size: 0.88rem; color: var(--ink-2); margin: 6px 0 0; }
.st-rejected .my-hint, .st-expired .my-hint, .st-blocked .my-hint { color: var(--danger); }
.my-stats { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); margin: 4px 0 0; }
.my-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge-st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.st-active .badge-st, .badge-st.st-active { background: #e4f3ea; color: var(--ok); border-color: #bfe2cc; }
.st-pending .badge-st, .badge-st.st-pending { background: var(--warn-soft); color: var(--warn); border-color: #f0d9ab; }
.st-rejected .badge-st, .st-blocked .badge-st, .badge-st.st-rejected, .badge-st.st-blocked, .st-expired .badge-st, .badge-st.st-expired { background: #fbe9e7; color: var(--danger); border-color: #f2c6c0; }
.editor { display: flex; flex-direction: column; gap: 14px; padding-bottom: 90px; }
.ed-head { display: flex; justify-content: space-between; align-items: center; }
.ed-sec { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ed-sec h2 { margin: 0; }
.notice { padding: 12px 14px; border-radius: var(--radius-s); margin: 0; }
.notice.warn { background: #fbe9e7; color: var(--danger); font-weight: 600; }
.deal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.deal-row .lbl { font-weight: 650; font-size: 0.9rem; }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-map { height: 300px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.price-row { display: flex; align-items: flex-end; gap: 10px; }
.price-row .grow { flex: 1; }
.cur-seg { margin-bottom: 2px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 600px) { .ph-grid { grid-template-columns: repeat(5, 1fr); } }
.ph-grid:empty { display: none; }
.ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #ece6dc; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-cover { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; }
.ph-del, .ph-star { position: absolute; top: 5px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20, 17, 14, 0.65); color: #fff; }
.ph-del { right: 5px; }
.ph-star { left: 5px; font-size: 0.9rem; }
.add-ph { align-self: flex-start; cursor: pointer; }
.problems { padding: 14px 16px; border-radius: var(--radius); background: #fbe9e7; color: var(--danger); }
.problems ul { margin: 6px 0 0; padding-left: 20px; }
.ed-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08); }
.ed-bar .grow { flex: 1; }
@media (min-width: 860px) { .ed-bar { position: sticky; bottom: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 8px; } }
details summary { cursor: pointer; font-weight: 650; color: var(--accent); padding: 6px 0; }
details[open] { display: flex; flex-direction: column; gap: 10px; }

/* ---------- админка ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 14px 12px 40px; }
.admin-tabs { margin: 0 0 14px; padding: 0 0 6px; }
.admin-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.a-list { display: flex; flex-direction: column; gap: 8px; }
.a-row { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
button.a-row:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.a-row.closed { opacity: 0.6; }
.a-ph { flex: none; width: 72px; height: 56px; border-radius: 8px; overflow: hidden; background: #ece6dc; display: grid; place-items: center; color: var(--muted); }
.a-ph img { width: 100%; height: 100%; object-fit: cover; }
.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
.a-main b { font-size: 0.98rem; }
.a-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
@media (max-width: 600px) { .a-row.static { flex-wrap: wrap; } .a-row.static .a-side { flex-direction: row; flex-wrap: wrap; width: 100%; align-items: center; } }
.a-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.a-filter select, .a-filter input[type="search"] { width: auto; flex: 1 1 200px; }
.a-filter input[name="rate"] { width: 110px; display: inline-block; min-height: 38px; }
.a-photos { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.a-photos img { height: 120px; width: auto; border-radius: 8px; }
.a-desc { padding: 12px; background: var(--bg); border-radius: var(--radius-s); font-size: 0.95rem; }
.a-reports { padding-left: 18px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 1.6rem; font-weight: 850; }
.tile span { color: var(--muted); font-size: 0.88rem; }
.bars { list-style: none; padding: 0; margin: 0 0 20px; max-width: 560px; }
.bars li { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px; align-items: center; padding: 4px 0; }
.bars i { display: block; height: 10px; width: var(--w); border-radius: 5px; background: var(--accent); }
.bars b { text-align: right; }

/* ---------- переписка ---------- */
.msg-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--wa); color: #fff; font-size: 0.68rem; line-height: 17px; text-align: center; }
.hint.small { font-size: 0.8rem; }
.cb-promise, .chat-promise { display: flex; gap: 8px; align-items: flex-start; font-size: 0.88rem; color: var(--ink-2); background: var(--accent-soft); border-radius: var(--radius-s); padding: 10px 12px; margin: 12px 0 0; }
.cb-promise .ic, .chat-promise .ic { color: var(--accent); margin-top: 2px; }
.chat-promise { margin: 0 0 12px; }
.cb-own { margin: 0 0 8px; font-weight: 700; text-align: center; flex: 1 1 100%; }
.contact-box .cb-buttons { flex-wrap: wrap; }
.tr-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin: -4px 0 8px; }
.tr-note .ic { color: var(--accent); }
.quick { margin-bottom: 12px; }
.quick .chip span { font-size: 0.85rem; min-height: 34px; }
.chat-app { max-width: 1180px; margin: 0 auto; }
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--head)); }
.chat-list { overflow-y: auto; padding: 14px 12px 30px; min-width: 0; }
.chat-view { display: none; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
body.in-chat .chat-list { display: none; }
body.in-chat .chat-view { display: flex; }
@media (min-width: 900px) {
  .chat-layout { grid-template-columns: 360px minmax(0, 1fr); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .chat-view { display: flex; border-left: 1px solid var(--line); }
  body.in-chat .chat-list { display: block; }
  .cv-back { display: none !important; }
}
.chat-h1 { font-size: 1.35rem; margin: 4px 4px 12px; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--line-2); }
.notify-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.notify-card b { display: flex; align-items: center; gap: 6px; }
.notify-card p { font-size: 0.88rem; color: var(--muted); margin: 4px 0 8px; }
.notify-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ok-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 650; color: var(--ok); background: #e4f3ea; border-radius: 999px; padding: 6px 10px; }
.chat-items { display: flex; flex-direction: column; gap: 2px; }
.chat-item { display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.chat-item:hover, .chat-item.on { background: var(--surface); }
.chat-item.on { box-shadow: inset 3px 0 0 var(--accent); }
.ci-ph { flex: none; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #ece6dc; display: grid; place-items: center; color: var(--muted); }
.ci-ph img { width: 100%; height: 100%; object-fit: cover; }
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-top { display: flex; align-items: baseline; gap: 6px; }
.ci-top small { color: var(--muted); font-size: 0.75rem; }
.ci-top time { margin-left: auto; font-size: 0.75rem; color: var(--muted); }
.ci-title, .ci-prev { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-title { color: var(--ink-2); }
.ci-prev { color: var(--muted); }
.chat-item.unread .ci-prev { color: var(--ink); font-weight: 650; }
.chat-item .badge { background: var(--wa); }
.cv-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cv-listing { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.cv-listing .ci-ph { width: 42px; height: 42px; }
.cv-listing > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cv-listing small { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-body { flex: 1; overflow-y: auto; padding: 12px 12px 16px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.cv-note { display: flex; gap: 6px; align-items: flex-start; align-self: center; max-width: 520px; font-size: 0.8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.cv-note .ic { color: var(--accent); flex: none; margin-top: 1px; }
.cv-note.warn { background: var(--warn-soft); border-color: #f0d9ab; color: #6b4609; margin-bottom: 8px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { position: relative; max-width: min(80%, 520px); padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: var(--surface); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); overflow-wrap: anywhere; }
.msg.mine .bubble { background: #f3dfd4; border-radius: 16px 16px 4px 16px; }
.bubble time { display: block; text-align: right; font-size: 0.7rem; color: var(--muted); margin-top: 2px; }
.morig { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: 0.9rem; }
.tr-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 0.75rem; }
.tr-btn .ic { width: 0.95em; height: 0.95em; }
.ev { display: flex; justify-content: center; margin: 6px 0; }
.ev-card { max-width: 440px; width: 100%; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 6px; }
.ev-card p { margin: 0 0 6px; font-weight: 600; }
.ev-card time { display: block; font-size: 0.7rem; color: var(--muted); }
.ev-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.ev-confirmed .ev-card { border-color: #bfe2cc; background: #f1faf4; }
.ev-deal.ev-confirmed .ev-card { border-color: var(--ok); }
.ev-cancelled .ev-card, .ev-denied .ev-card { opacity: 0.75; }
.cv-compose { display: flex; align-items: flex-end; gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.cv-compose textarea { flex: 1; min-height: 42px; max-height: 140px; resize: none; border-radius: 22px; padding: 10px 14px; line-height: 1.35; }
.cv-compose .send { background: var(--accent); color: #fff; }
.cv-compose .send:hover { background: var(--accent-2); }
.act-list { display: flex; flex-direction: column; gap: 10px; }
.act-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.act-row .grow { flex: 1 1 200px; }
.act-row .field > span { display: flex; align-items: center; gap: 6px; }
.page-messages .foot { display: none; }
.a-chat { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.a-msg { padding: 8px 12px; border-radius: 10px; background: var(--bg); max-width: 85%; }
.a-msg.renter { align-self: flex-end; background: #f3dfd4; }
.a-ru { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line-2); color: var(--ink-2); font-size: 0.92rem; }
.a-ev { align-self: center; font-size: 0.88rem; color: var(--ink-2); }
.pad { padding: 20px; }
/* узкие экраны: когда в шапке есть значок «Сообщения», прячем надпись логотипа, оставляем знак */
@media (max-width: 430px) {
  .top .logo-text { display: none; }
  .top-nav { gap: 2px; }
}
.ci-top b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-top small, .ci-top time { flex: none; }
@media (max-width: 899px) {
  .contact-box .cb-buttons { flex-wrap: nowrap; }
  .contact-box .cb-buttons .btn { flex: 1 1 auto; min-width: 0; }
  .contact-box .cb-buttons .btn span { overflow: hidden; text-overflow: ellipsis; }
  #visitBtn { flex: 0 0 auto; padding: 0 16px; }
  #visitBtn span { display: none; }
  .contact-box:has(.cb-own) .cb-buttons { flex-wrap: wrap; }
}
/* валюта посетителя */
.cur-mark { margin-left: 4px; font-weight: 600; color: var(--muted); }
.lang-menu { max-height: 70vh; overflow-y: auto; min-width: 190px; }
.menu-h { display: block; padding: 8px 12px 2px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.price-approx { font-size: 0.85rem; font-weight: 650; color: var(--muted); margin-top: -2px; }
.sub-price.approx { color: var(--ink-2); font-weight: 650; }
.pop em { font-style: normal; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.lang-btn { display: inline-flex; align-items: center; white-space: nowrap; padding: 0 8px; }
