/* Dubai 3D. Цвет по правилу 60/30/10: светлые поверхности, тёмно-синий текст и выбор, синий — главные действия.
   Отступы по сетке 4/8 px, мягкие тени с оттенком текста, на телефоне зона касания не меньше 44 px (видимая кнопка меньше —
   зону расширяет ::after). Шрифт — 4 размера (12, 14, 16, 20 px) и 2 начертания (400, 700). */
:root {
  --blue: #0468ff; --blue-d: #0353cc; --ink: #0f1b33; --ink2: rgba(15, 27, 51, .62); --ink3: rgba(15, 27, 51, .42);
  --line: rgba(15, 27, 51, .1); --bg: #f2f4f8; --card: #fff; --soft: rgba(4, 104, 255, .08); --soft2: rgba(4, 104, 255, .16);
  --green: #12a150; --red: #e5484d; --gold: #c58a10; --pf: #ea3b5a; --by: #28b16d;
  --r: 16px; --sh-s: 0 1px 2px rgba(15, 27, 51, .06), 0 2px 10px rgba(15, 27, 51, .06);
  --sh: 0 10px 30px rgba(15, 27, 51, .14), 0 2px 8px rgba(15, 27, 51, .06);
  --sh-l: 0 24px 64px rgba(15, 27, 51, .26), 0 4px 16px rgba(15, 27, 51, .08);
  --glass: rgba(255, 255, 255, .95); --ai: linear-gradient(135deg, #6c5cff 0%, #0468ff 50%, #1fbfff 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --top: 56px; --panel: 440px; --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #c9c3b8; font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
b, strong { font-weight: 700; }   /* не «bolder»: внутри жирного текста вышло бы 900 */
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input[type=range] { accent-color: var(--blue); }
svg { flex: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#pins, #pins * { touch-action: none; }   /* жест карты можно начать и на ценнике (touch.js): браузер не забирает палец под прокрутку */

/* загрузка */
#load { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 50; min-width: 240px; padding: 24px 24px 16px; border-radius: 20px;
  background: rgba(255, 255, 255, .9); box-shadow: var(--sh-l); text-align: center; font-weight: 400; color: var(--ink2); }
#load::before { content: 'BD'; display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), #3fb1ff);
  color: #fff; font-weight: 700; font-size: 20px; letter-spacing: -.5px; box-shadow: 0 10px 24px rgba(4, 104, 255, .35); }
#load:empty { display: none; }
#load b { display: block; height: 4px; margin-top: 12px; border-radius: 3px; background: rgba(15, 27, 51, .08); overflow: hidden; }
#load i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--blue), #3fb1ff); transition: width .15s linear; }
body.loaded #load { display: none; }
#pins { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }

/* шапка (компьютер) */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: rgba(255, 255, 255, .94); box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(15, 27, 51, .06); }
.burger { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink2); display: grid; place-items: center; }
.burger:hover { border-color: var(--blue); color: var(--blue); }
.burger.on { background: var(--bg); color: var(--ink); }
.logo { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.mark { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: linear-gradient(135deg, var(--blue), #3fb1ff); color: #fff; font-weight: 700; letter-spacing: -.5px;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(4, 104, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .25); }
.logo b { display: block; font-size: 14px; line-height: 1.2; }
.logo i { display: block; font-style: normal; color: var(--ink2); font-size: 12px; }
@media (max-width: 1720px) { .logo > span:last-child { display: none; } }   /* на обычном мониторе фильтры в шапке важнее подписи: знак BD остаётся */
.deals { display: flex; background: rgba(15, 27, 51, .06); border-radius: 12px; padding: 4px; flex: none; }
.deals button { position: relative; border: 0; background: none; padding: 4px 12px; border-radius: 8px; font-weight: 700; color: var(--ink2); transition: background .2s, color .2s, box-shadow .2s; }
.deals button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 27, 51, .1), 0 2px 8px rgba(15, 27, 51, .08); }
.filters { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 2px; background: rgba(15, 27, 51, .06); border-radius: 12px; padding: 4px; flex: none; }
.chips button { border: 0; background: none; border-radius: 8px; padding: 4px 10px; font-weight: 400; color: var(--ink2); transition: background .2s, color .2s; }
.chips button.on { background: var(--ink); color: #fff; font-weight: 700; }
.range { display: flex; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 8px; height: 36px; flex: none; transition: border-color .2s, box-shadow .2s; }
.range:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--soft2); }
.range span { color: var(--ink2); font-size: 12px; margin-right: 6px; white-space: nowrap; }
.range input { width: 80px; border: 0; outline: none; padding: 4px 6px; background: none; font-variant-numeric: tabular-nums; }
.range input + input { border-left: 1px solid var(--line); }
.range em { font-style: normal; color: var(--ink2); font-size: 12px; margin-left: 4px; }
.more, .sort { border: 1px solid var(--line); background: #fff; border-radius: 12px; height: 36px; padding: 0 12px; flex: none; font-weight: 400; }
.more { display: inline-flex; align-items: center; gap: 6px; }
.more.on { border-color: rgba(4, 104, 255, .35); color: var(--blue); background: var(--soft); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.right { display: flex; gap: 8px; flex: none; }
.favbtn, .cur { border: 1px solid var(--line); background: #fff; border-radius: 12px; height: 36px; min-width: 36px; padding: 0 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.favbtn { color: #e2465a; }
.favbtn.on { background: #fff0f2; border-color: #f3a6b3; }
.pop { position: absolute; top: calc(var(--top) + 8px); right: 16px; width: 520px; max-height: calc(100vh - var(--top) - 24px); overflow-y: auto; z-index: 30;
  background: #fff; border-radius: 20px; box-shadow: var(--sh-l); padding: 16px; display: grid; gap: 16px; }
.reset { justify-self: start; border: 0; background: none; color: var(--blue); padding: 4px 0; font-weight: 700; }

/* фильтры: разделы, варианты, переключатели (во всплывающем окне компьютера и в шторке телефона) */
.fsec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fsh { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.fsh > span { font-size: 12px; font-weight: 700; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; }
.fsh .seg { flex-wrap: nowrap; gap: 4px; }
.fsh .seg button { padding: 2px 8px; font-size: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 400; transition: background .2s, color .2s, border-color .2s, transform .12s; }
.seg button:active { transform: scale(.97); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.sws { display: grid; gap: 4px; }
.sw { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.sw span { flex: 1; font-weight: 400; }
.sw small { display: block; font-size: 12px; font-weight: 400; color: var(--ink2); }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { position: relative; width: 48px; height: 28px; border-radius: 14px; background: rgba(15, 27, 51, .14); transition: background .2s; flex: none; }
.sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 27, 51, .3); transition: transform .25s var(--ease); }
.sw input:checked + i { background: var(--blue); }
.sw input:checked + i::after { transform: translateX(20px); }
.sw input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.q { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; background: #fff; }
.q:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--soft2); }
.bchips { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 8px; }
.bchips button { height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-weight: 700; font-size: 16px; transition: background .2s, color .2s, transform .12s; }
.bchips button:active { transform: scale(.96); }
.bchips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fnote { margin: 0; font-size: 12px; color: var(--ink2); }
.bsb .range { width: 100%; height: 44px; border-radius: 12px; }
.bsb .range input { flex: 1; min-width: 0; width: 0; font-size: 16px; }   /* ширина 0: поле не распирает шторку на узком экране */

/* панель со списком (компьютер) */
.panel { position: absolute; left: 0; top: var(--top); bottom: 0; width: var(--panel); z-index: 12; background: var(--bg); display: flex; flex-direction: column;
  box-shadow: 1px 0 0 var(--line), 8px 0 24px rgba(15, 27, 51, .08); }
@media (min-width: 861px) { .panel.hide { display: none; } }
.sgrab .handle { display: none; }
.phead { padding: 12px 16px 8px; display: flex; align-items: center; gap: 8px; }
.cnt { flex: 1; min-width: 0; font-size: 16px; line-height: 1.3; }
.cnt small { display: block; color: var(--ink2); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vlist { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px; scrollbar-width: thin; }
.vrow { position: absolute; left: 0; right: 0; padding: 0 0 8px; }
.card { position: relative; display: flex; gap: 12px; height: 100%; background: var(--card); border-radius: var(--r); padding: 8px; cursor: pointer;
  box-shadow: var(--sh-s); transition: box-shadow .2s, transform .2s var(--ease); }
.card:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.card:active { transform: scale(.99); }
.card .ph { position: relative; width: 136px; flex: none; border-radius: 12px; overflow: hidden; background: #e6eaf1; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink3); font-size: 12px; background: #e8ecf2; }
.card .info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.card .price { padding-right: 36px; line-height: 1.25; }   /* место под сердце в углу карточки */
.price { font-size: 16px; font-weight: 700; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
.price small { font-size: 12px; font-weight: 400; color: var(--ink2); margin-left: 2px; }
.spec { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* дом и дата — одной строкой внизу карточки: дом сокращается, дата видна всегда */
.card .sub { margin-top: auto; display: flex; gap: 8px; font-size: 12px; color: var(--ink2); }
.bld { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { margin-left: auto; flex: none; color: var(--ink3); white-space: nowrap; }
.src { padding: 0 6px; border-radius: 6px; color: #fff; font-weight: 700; line-height: 18px; }
.src.s0 { background: var(--pf); }
.src.s1 { background: var(--by); }
.fav { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: var(--ink2); box-shadow: 0 2px 8px rgba(15, 27, 51, .12); transition: color .2s, transform .12s; }
.fav:active { transform: scale(.9); }
.fav.on, .fav:hover { color: var(--red); }
.fav.on svg, .gb.on svg, .favbig.on svg { animation: pop .45s var(--ease); }
@keyframes pop { 30% { transform: scale(1.35); } 60% { transform: scale(.9); } }
.empty { padding: 24px 16px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--ink2); }
.empty .eico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--soft); color: var(--blue); margin-bottom: 4px; }
.empty b { color: var(--ink); font-size: 16px; }
.eact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.btn2 { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 700; }
.btn2.ai { border: 0; color: #fff; background: var(--ai); box-shadow: 0 6px 18px rgba(4, 104, 255, .3); }

/* здание */
.bhead { position: relative; background: #fff; margin: 8px 12px; border-radius: var(--r); padding: 12px; box-shadow: var(--sh-s); }
/* шапка здания не вытесняет список: длинная (Dorra Bay, вид из окна, сделки DLD) листается сама */
.panel .bhead { flex: none; max-height: 55%; overflow-y: auto; overscroll-behavior: contain; }
.bhead h2 { margin: 0 44px 8px 0; font-size: 20px; line-height: 1.2; letter-spacing: -.2px; }
.x { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(15, 27, 51, .06); color: var(--ink2); }
.x:hover { background: rgba(15, 27, 51, .1); color: var(--ink); }
/* ссылка на здание (links.js): кнопка рядом с крестиком; метка точки по ссылке ?ll= */
.x.lnk { right: 52px; }
.bhead .x.lnk ~ h2 { margin-right: 88px; }
.pin.lpin { z-index: 7; cursor: pointer; }
.pin.lpin i { font-style: normal; margin-left: 2px; padding: 0 2px; opacity: .8; cursor: pointer; }
.pin.lpin i:hover { opacity: 1; }
.bhead h2 + .bsum { margin: -6px 0 8px; color: var(--ink2); }
.wbtn { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 14px;
  font-weight: 700; transition: border-color .2s, transform .12s; }
.wbtn:hover { border-color: var(--blue); }
.wbtn:active { transform: scale(.98); }
.window { padding: 4px 0 0; }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrow > b { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wrow label { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--ink2); font-size: 12px; }
.wrow input { flex: 1; min-width: 0; width: auto; max-width: 130px; }
.wrow em { font-style: normal; font-weight: 700; color: var(--ink); width: 24px; font-variant-numeric: tabular-nums; }
.dirs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.dirs button { height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 12px; font-weight: 700; padding: 0; transition: background .2s, color .2s; }
.dirs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dirs .exit { grid-column: 1 / -1; color: var(--red); border-color: rgba(229, 72, 77, .3); background: #fff6f6; }

/* ценники на карте */
.pin { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12px; font-weight: 700;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(15, 27, 51, .2), 0 6px 16px rgba(15, 27, 51, .12); pointer-events: auto; cursor: pointer; will-change: transform; font-variant-numeric: tabular-nums; }
.pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; }
.pin b { background: var(--blue); color: #fff; border-radius: 999px; padding: 1px 7px; min-width: 22px; text-align: center; }
.pin.hov { background: #fff7e8; }
.pin.hov::after { border-top-color: #fff7e8; }
.pin.sel { background: #ff8a1f; color: #fff; box-shadow: 0 4px 14px rgba(255, 120, 20, .45); }
.pin.sel::after { border-top-color: #ff8a1f; }
.pin.sel b { background: #fff; color: #ff8a1f; }
/* VIP-квартира на карте: золотая плашка с короной у балкона 1508 */
.pin.vip { gap: 4px; padding: 4px 8px 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: #4a3200;
  background: linear-gradient(135deg, #ffe7a3, #e9ae2e); box-shadow: 0 3px 12px rgba(120, 80, 0, .45), 0 0 0 2px rgba(255, 255, 255, .9); }
.pin.vip::after { border-top-color: #eeb43a; }
.pin.vip svg { width: 18px; height: 15px; fill: #7a4f00; flex: none; }
.pin.vip:hover, .pin.vip.sel { background: linear-gradient(135deg, #fff1c6, #f3bd45); }
.pin.vip:hover::after, .pin.vip.sel::after { border-top-color: #f5c24f; }
.tip { position: fixed; z-index: 20; pointer-events: none !important; background: rgba(15, 27, 51, .9); color: #fff; padding: 8px 12px; border-radius: 12px; font-size: 12px; display: grid; box-shadow: var(--sh); }
.tip span { opacity: .8; }

/* кнопки карты (компьютер) */
.mapctl { position: absolute; right: 16px; bottom: 92px; z-index: 11; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; transition: opacity .25s; }
.mgrp { display: flex; flex-direction: column; background: var(--glass); border-radius: 14px; box-shadow: var(--sh); overflow: hidden; }
.mgrp button { width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; font-size: 20px; font-weight: 400; line-height: 1; color: var(--ink); }
.mgrp button + button { border-top: 1px solid var(--line); }
.mgrp button:hover { background: rgba(15, 27, 51, .05); }
.mgrp button:active { background: rgba(15, 27, 51, .1); }
.mgrp svg { display: block; }
.mgrp .mq { font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.mgrp .mq.on { background: var(--ink); color: #fff; }
.mvip { color: var(--gold) !important; }
.mvip i { width: 20px; height: 17px; display: block; }
.mvip svg { width: 100%; height: 100%; fill: currentColor; }
.mpop { position: absolute; right: 48px; bottom: 0; z-index: 15; width: 260px; background: #fff; border-radius: 16px; box-shadow: var(--sh-l); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mpop > b { font-size: 14px; margin: 0 4px; }
.mpop em { font-style: normal; color: var(--ink2); font-size: 12px; margin: 0 4px; }
.qlist { display: grid; gap: 8px; }
.qopt { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; transition: border-color .2s; }
.qopt:hover { border-color: rgba(15, 27, 51, .25); }
.qopt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.qopt span { display: block; font-weight: 700; }
.qopt small { display: block; color: var(--ink2); font-size: 12px; }
body.walking .mapctl { display: none; }

/* время суток: полоса (компьютер) и плитки в шторке (телефон) */
.timebar { position: absolute; right: 16px; bottom: 28px; z-index: 11; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 16px;
  background: var(--glass); box-shadow: var(--sh); }
.timebar > button { border: 0; background: none; border-radius: 12px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink2); transition: background .2s, color .2s; }
.timebar > button:hover { color: var(--ink); }
.timebar > button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-s); }
.tslide { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.tslide input { width: 140px; }
.tslide b { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.timectl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.timectl > button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 4px; display: grid; justify-items: center; gap: 4px; font-weight: 700; transition: background .2s, color .2s, transform .12s; }
.timectl > button:active { transform: scale(.96); }
.timectl > button small { font-size: 12px; font-weight: 400; color: var(--ink2); }
.timectl > button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.timectl > button.on small { color: rgba(255, 255, 255, .72); }
.timectl .tslide { grid-column: 1 / -1; padding: 4px 0 0; }
.timectl .tslide input { flex: 1; width: auto; }
.timectl .tslide b { font-size: 16px; }
.credits { position: absolute; right: 16px; bottom: 4px; font-size: 12px; color: rgba(15, 27, 51, .72); background: rgba(255, 255, 255, .6); padding: 1px 6px; border-radius: 6px; pointer-events: none !important; }

/* уведомление (избранное) */
.toast { position: absolute; left: 50%; bottom: 96px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: rgba(15, 27, 51, .92); color: #fff; font-weight: 700; white-space: nowrap; box-shadow: var(--sh);
  pointer-events: none !important; animation: toast 2.3s var(--ease) both; }
.toast svg { color: #ff6b81; }
/* подсказка первого захода (ui.jsx useFtue): у низа карты, сама гаснет за 8 с; на телефоне — над шторкой (bottom из разметки) */
.ftue { position: absolute; left: 50%; bottom: 28px; z-index: 13; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); padding: 8px 16px 8px 12px;
  border-radius: 16px; background: rgba(15, 27, 51, .88); color: #fff; font-weight: 700; box-shadow: var(--sh); pointer-events: none !important; animation: ftue 8s var(--ease) both; }
.ftue span { display: grid; }
.ftue small { font-size: 12px; font-weight: 400; opacity: .72; }
@keyframes ftue { 0% { opacity: 0; transform: translate(-50%, 8px); } 5%, 92% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
@media (min-width: 861px) { .panel.open ~ .ftue { left: calc(50% + var(--panel) / 2); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.96); } 10%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

/* шторки снизу (телефон); на широком экране — окно посередине */
.bsm { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 16, 32, .42); animation: fade .2s ease both; }
.bs { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - 40px - var(--st)); display: flex; flex-direction: column; background: #fff; border-radius: 24px 24px 0 0;
  box-shadow: var(--sh-l); animation: up .34s var(--ease) both; transition: transform .28s var(--ease); }
.bsh { position: relative; flex: none; display: flex; align-items: center; gap: 8px; padding: 20px 12px 8px 16px; touch-action: none; cursor: grab; }
.bsh > b { flex: 1; font-size: 20px; letter-spacing: -.2px; }
.bsx { position: relative; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 27, 51, .06); color: var(--ink2); }
.bsreset { border: 0; background: none; color: var(--blue); font-weight: 700; padding: 8px; }
.bsb { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; scroll-padding-top: 8px; }
.bsf { flex: none; padding: 8px 16px calc(8px + var(--sb)); border-top: 1px solid var(--line); background: #fff; }
.handle { position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(15, 27, 51, .18); }
.cta { width: 100%; height: 48px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(4, 104, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .12s, filter .2s; }
.cta:active { transform: scale(.98); filter: brightness(.95); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 861px) {
  .bsm { align-items: center; }
  .bs { border-radius: 24px; max-height: min(760px, calc(100% - 64px)); }
  .bsh { cursor: default; }
  .bsh .handle { display: none; }
}

/* карточка объявления */
.modal { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(10, 16, 32, .55); animation: fade .2s ease both; }
.sheet { position: relative; width: min(1180px, 100%); height: min(820px, 100%); background: #fff; border-radius: 24px; overflow: hidden; display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); box-shadow: 0 24px 72px rgba(0, 0, 0, .35); }
.sheet > .x { z-index: 2; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.sheet.apisheet { grid-template-columns: minmax(0, 1fr); max-width: 640px; height: auto; max-height: 100%; }
.apisheet .body { overflow-y: auto; }
.apirows { display: grid; gap: 4px; margin: 8px 0; }
.apirows div { display: grid; grid-template-columns: 200px 1fr; gap: 8px; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.apirows code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--blue-d); word-break: break-all; }
.apirows span { color: var(--ink2); }
.apicode { background: #0f1626; color: #d7e3ff; border-radius: 12px; padding: 12px; font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre; }
.lbar, .lcta { display: none; }
.gal { position: relative; background: #0f1626; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.gal .main { width: 100%; height: 100%; flex: 1 1 0; min-height: 0; object-fit: contain; background: #0f1626; }
.noph.big { flex: 1; min-height: 360px; background: #1a2336; color: rgba(255, 255, 255, .5); }
.gal .nav { position: absolute; top: 42%; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.gal .nav.l { left: 12px; }
.gal .nav.r { right: 12px; }
.gal .nav.r svg { transform: scaleX(-1); }
.pk { position: absolute; left: 12px; top: 12px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: #0f1626; flex: none; scrollbar-width: thin; }
.thumbs img { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; opacity: .55; cursor: pointer; flex: none; transition: opacity .2s; }
.thumbs img.on { opacity: 1; outline: 2px solid var(--blue); }
.body { padding: 20px; overflow-y: auto; min-width: 0; min-height: 0; }
.pr { margin: 0 44px 2px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pr .price { font-size: 20px; }
.favbig { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(229, 72, 77, .4); color: var(--red); background: #fff; border-radius: 12px; padding: 6px 12px; font-weight: 700; }
.favbig.on { background: var(--red); border-color: var(--red); color: #fff; }
.h1 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.addr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--ink2); margin: 4px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--soft); color: var(--blue); border-radius: 999px; padding: 4px 12px; font-weight: 700; }
.chip:hover { background: var(--soft2); }
.link { border: 0; background: none; color: var(--blue); padding: 0; font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 12px; }
.fact { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.fact span { color: var(--ink2); }
.fact b { text-align: right; }
.ltabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ltabs::-webkit-scrollbar { display: none; }
.ltabs button { flex: none; border: 0; background: none; padding: 10px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 700; color: var(--ink2); transition: color .2s, border-color .2s; }
.ltabs button.on { color: var(--ink); border-bottom-color: var(--blue); }
.keys { color: var(--ink2); margin: 0 0 8px; }
.big { display: grid; gap: 4px; padding: 12px; margin: 0 0 12px; background: var(--bg); border-radius: 12px; color: var(--ink2); }
.big b { font-size: 20px; line-height: 1.2; letter-spacing: -.2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.big small { font-size: 12px; line-height: 1.4; }
.ltab .aitags { margin: 0 0 12px; }
.ltab h3 { font-size: 16px; margin: 0 0 8px; }
.ltab .amen { margin-top: 0; }
.desc { white-space: pre-line; max-height: 9.5em; overflow: hidden; color: rgba(15, 27, 51, .82); line-height: 1.55; }
.desc.full { max-height: none; }
.amen { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 0; }
.amen span { background: var(--bg); border-radius: 8px; padding: 4px 10px; font-size: 12px; }
.agent { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.agent > div:first-child { display: grid; }
.agent span { color: var(--ink2); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; text-decoration: none; border-radius: 12px; padding: 10px 16px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); transition: filter .2s, transform .12s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn.wa { background: #25d366; }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid rgba(4, 104, 255, .35); box-shadow: none; }
.same { margin-top: 16px; }
.same h3 { font-size: 16px; margin: 0 0 8px; }
.srow { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; }
.srow:hover { background: var(--bg); }
.srow em { margin-left: auto; color: var(--ink2); font-style: normal; font-size: 12px; }
.tour { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; margin: 0 0 12px; border: 1px solid rgba(4, 104, 255, .25); background: var(--soft); border-radius: 12px; padding: 8px 12px; color: var(--ink); }
.tour b { background: var(--blue); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.tour:hover { border-color: var(--blue); }

/* ИИ-агент */
.aibtn { position: absolute; right: 68px; bottom: 92px; z-index: 14; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 22px; padding: 10px 16px 10px 12px;
  background: var(--ai); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(4, 104, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .15s, filter .2s; }
.aibtn:hover { filter: brightness(1.06); }
.aibtn:active { transform: scale(.97); }
.aichat { position: absolute; right: 68px; bottom: 84px; z-index: 30; width: 408px; height: min(680px, calc(100% - var(--top) - 100px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; box-shadow: var(--sh-l); overflow: hidden; animation: chat .3s var(--ease) both; }
@keyframes chat { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.aihead { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 12px; border-bottom: 1px solid var(--line); }
.aimark { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--ai); box-shadow: 0 4px 14px rgba(4, 104, 255, .35); }
.aihead > div { flex: 1; min-width: 0; line-height: 1.25; }
.aihead b { display: block; font-size: 16px; }
.aihead small { display: block; color: var(--ink2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aihead small i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 0 3px rgba(18, 161, 80, .15); }
.aihead small i.off { background: #e89a12; box-shadow: 0 0 0 3px rgba(232, 154, 18, .15); }
.aihead button { flex: none; border: 0; background: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink2); }
.aihead button:hover { background: var(--bg); color: var(--ink); }
.aihead button:disabled { opacity: .4; cursor: default; }
.aibody { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.aibody > * { flex: none; }
.aiwelcome p { margin: 0 0 12px; color: var(--ink2); line-height: 1.5; }
.aiwelcome p b { color: var(--ink); }
.aihint { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; line-height: 1.35; transition: border-color .2s, background .2s; }
.aihint:hover { border-color: rgba(4, 104, 255, .4); background: #f7faff; }
.aimsg { max-width: 94%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.aimsg.u { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.aimsg.b { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 6px; }
.aimsg.e { align-self: flex-start; background: #fdecef; color: #c4314b; }
.ainote { font-size: 12px; line-height: 1.4; color: #7a5200; background: #fff4d9; border-radius: 12px; padding: 8px 12px; }
.aiwait { align-self: flex-start; display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 12px; padding: 4px 2px; }
.aiwait span { display: flex; gap: 4px; }
.aiwait i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: aidot 1.2s infinite; }
.aiwait i:nth-child(2) { animation-delay: .15s; }
.aiwait i:nth-child(3) { animation-delay: .3s; }
@keyframes aidot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.aistep { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--ink2); margin-top: 2px; }
.aistep svg { margin-top: 1px; color: var(--blue); }
.aifound { font-size: 12px; color: var(--ink2); }
.aifound b { color: var(--ink); }
.aiact { align-self: flex-start; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--blue-d); background: var(--soft); border-radius: 10px; padding: 6px 10px; }
.aiact.bad { color: #c4314b; background: #fdecef; }
.airow { display: flex; gap: 10px; align-items: stretch; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 8px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.airow:hover, .airow:focus-visible { border-color: rgba(4, 104, 255, .45); box-shadow: var(--sh-s); outline: none; }
.airow img, .aiph { width: 80px; height: 64px; flex: none; object-fit: cover; border-radius: 10px; background: var(--bg); }
.airow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.airow b { font-size: 14px; font-variant-numeric: tabular-nums; }
.airow b small { font-weight: 400; color: var(--ink2); font-size: 12px; }
.airow span { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aitags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.aitags em { font-style: normal; font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--bg); color: var(--ink2); line-height: 20px; }
.aitags em.g { background: #e7f6ee; color: #12794a; }
.aitags em.w { background: #fff1d6; color: #8a5a00; }
.aimap { align-self: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink2); display: grid; place-items: center; }
.aimap:hover { background: var(--soft); color: var(--blue); }
.aicmp { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; scrollbar-width: thin; }
.aicmp table { border-collapse: collapse; width: 100%; font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.aicmp th, .aicmp td { padding: 6px 8px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.aicmp thead th { border-top: 0; background: var(--bg); min-width: 88px; cursor: pointer; }
.aicmp thead th:first-child { min-width: 0; cursor: default; }
.aicmp thead th:hover { color: var(--blue); }
.aicmp thead th small { display: block; font-weight: 400; color: var(--ink2); }
.aicmp tbody th { font-weight: 400; color: var(--ink2); }
.aicmp td.best { color: #12794a; font-weight: 700; background: #f1faf5; }
.aichips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.aichips button { border: 1px solid rgba(4, 104, 255, .22); background: #f7faff; color: var(--blue-d); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; text-align: left; transition: background .2s; }
.aichips button:hover { background: #e8f1ff; }
.aiform { display: flex; gap: 8px; padding: 12px 12px 8px; border-top: 1px solid var(--line); }
.aiform input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; outline: none; background: var(--bg); transition: border-color .2s, box-shadow .2s, background .2s; }
.aiform input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--soft2); }
.aiform button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--ai); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(4, 104, 255, .3); }
.aiform button:disabled { opacity: .35; cursor: default; box-shadow: none; }
.aifoot { padding: 0 12px 10px; font-size: 12px; line-height: 1.35; color: var(--ink3); }
.aifoot b { color: var(--ink); }

/* 3D-квартира в панели Dorra Bay */
.aptcard { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.atitle { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.atitle span { background: var(--ai); color: #fff; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 700; line-height: 20px; }
/* VIP: золотая рамка и значок */
.aptcard.vip { border: 1.5px solid #e0b33a; border-radius: 16px; padding: 12px; background: linear-gradient(180deg, #fff9e8, #fff 42%); }
.atitle .vipb { font-style: normal; background: linear-gradient(135deg, #f6d365, #d99a18); color: #4a3200; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .4px; line-height: 20px; }
.atitle .vipb i { display: inline-block; width: 13px; height: 11px; margin-right: 4px; vertical-align: -1px; }
.atitle .vipb svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.aptcard .agent { margin-top: 12px; padding-top: 12px; }
.asub { color: var(--ink2); font-size: 12px; margin-top: 2px; }
.aspec { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.aspec span { background: var(--bg); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.aphotos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scroll-snap-type: x mandatory; }
.aphotos a { scroll-snap-align: start; flex: none; }
.aphotos img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; display: block; background: var(--bg); }
.aenter { width: 100%; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px; background: var(--blue); color: #fff; font-weight: 700;
  box-shadow: 0 6px 16px rgba(4, 104, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .22); transition: filter .2s, transform .12s; }
.aenter:hover { filter: brightness(1.06); }
.aenter:active { transform: scale(.98); }
.aenter.atop { margin: 0 0 8px; font-size: 16px; padding: 12px; }
.aenter:disabled { opacity: .75; cursor: progress; }
.amore { margin-top: 8px; font-size: 12px; color: var(--ink2); }
.amore summary { cursor: pointer; font-weight: 700; color: var(--ink2); width: max-content; }
.anote { margin-top: 8px; font-size: 12px; color: var(--ink2); line-height: 1.4; }
.anote.small { font-size: 12px; }
.anote a { color: var(--blue); }

/* прогулка по квартире */
body.walking .top, body.walking .panel, body.walking #pins, body.walking .credits, body.walking .tip { display: none !important; }
#ui > .walkhud { position: absolute; inset: 0; pointer-events: none; }   /* иначе «#ui > *» делает слой прогулки ловушкой для мыши поверх сцены */
#ui > .walkhud > * { pointer-events: auto; }
#ui > .walkhud > .wtop, #ui > .walkhud > .whint { pointer-events: none; }
.wtop { position: absolute; left: 16px; right: 16px; top: 16px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.wtop > * { pointer-events: auto; }
.wtitle { display: flex; gap: 10px; align-items: baseline; padding: 8px 14px; border-radius: 14px; background: var(--glass); box-shadow: var(--sh); }
.wtitle b { font-size: 16px; }
.wtitle span { color: var(--ink2); }
.wexit { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 14px; padding: 10px 14px; background: var(--glass);
  color: var(--red); font-weight: 700; box-shadow: var(--sh); }
.whint { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); background: rgba(15, 27, 51, .78); color: #fff;
  border-radius: 14px; padding: 10px 16px; pointer-events: none; max-width: calc(100% - 700px); text-align: center; text-wrap: balance; }   /* между мини-планом слева и краем: длинная подсказка переносится, а не уходит под план */
.wmap { position: absolute; left: 16px; bottom: 28px; padding: 6px; border-radius: 16px; background: var(--glass); box-shadow: var(--sh); }
.wbtns { display: flex; gap: 4px; flex-wrap: wrap; }
.wmapbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--ink2); transition: background .2s, color .2s; }
.wmapbtn:hover { color: var(--ink); background: rgba(15, 27, 51, .05); }
.wmapbtn.on { background: var(--ink); color: #fff; }
.plansvg { display: block; width: 300px; height: auto; margin-top: 6px; }
.plansvg .pr { fill: #f3efe6; stroke: #cfc6b4; stroke-width: .03; cursor: pointer; }
.plansvg .pr.bal { fill: #e9f1f5; }
.plansvg .pr:hover { fill: #e6eefc; }
.plansvg .pr.cur { fill: #dbe7ff; }
.plansvg .pw { fill: #2b3448; }
.plansvg .pt { font-size: .38px; fill: #5a6a85; text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-weight: 600; }
.plansvg .pp { fill: var(--blue); stroke: #fff; stroke-width: .06; }
.plansvg .pd { fill: rgba(4, 104, 255, .35); }
.plansvg .pg { fill: none; stroke: #2d6bff; stroke-width: .03; opacity: .55; pointer-events: none; }
.plansvg .pf { fill: rgba(90, 106, 133, .16); stroke: rgba(90, 106, 133, .48); stroke-width: .025; pointer-events: none; }
/* два маленьких джойстика прогулки: слева — шаг, справа — взгляд; зона касания шире видимого круга (::before) */
.joy { position: absolute; bottom: calc(20px + var(--sb, 0px)); width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .6);
  box-shadow: 0 4px 16px rgba(15, 27, 51, .2); touch-action: none; transition: background .15s, border-color .15s; }
.joy::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; }
.joy.l { left: calc(16px + env(safe-area-inset-left, 0px)); }
.joy.r { right: calc(16px + env(safe-area-inset-right, 0px)); }
.joy.on { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .9); }
.joy i { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 8px rgba(15, 27, 51, .28); }
.joy em { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(15, 27, 51, .78); color: #fff;
  font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; animation: joytip .3s ease both; }
@keyframes joytip { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.wmapbtn.busy { opacity: .7; }
body.walking #c { cursor: grab; }
body.walking #c:active { cursor: grabbing; }
.walkhud, .walkhud * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* прогулка на сенсорном экране: джойстики по углам внизу, компактная строка сверху, кнопки и план — справа под ней */
.walkhud.touch .wtop { left: calc(8px + env(safe-area-inset-left, 0px)); right: calc(8px + env(safe-area-inset-right, 0px)); top: calc(8px + var(--st, 0px)); gap: 8px; }
.walkhud.touch .wtitle { flex-direction: row; align-items: baseline; gap: 8px; padding: 6px 12px; border-radius: 12px; min-width: 0; }
.walkhud.touch .wtitle b { font-size: 14px; white-space: nowrap; }
.walkhud.touch .wtitle span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walkhud.touch .wexit { flex: none; width: 44px; height: 36px; padding: 0; justify-content: center; border-radius: 12px; }
.walkhud.touch .wmap { left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); top: calc(52px + var(--st, 0px)); bottom: auto; padding: 4px; border-radius: 14px; }
.walkhud.touch .wbtns { display: grid; grid-template-columns: repeat(4, 44px); gap: 2px; }
.walkhud.touch .wmapbtn { flex-direction: column; justify-content: center; gap: 1px; height: 44px; padding: 0; border-radius: 10px; font-size: 10px; }
.walkhud.touch .plansvg { width: 182px; }

/* ——— телефон ——— */
@media (max-width: 860px) {
  :root { --top: calc(88px + var(--st)); }

  /* шапка: плавающая карточка, сделка и избранное сверху, чипы фильтров ниже; во время разговора с агентом уезжает вверх */
  /* размытие фона — только здесь: над живой 3D-сценой каждый такой слой пересчитывается каждый кадр */
  .top.m { left: 8px; right: 8px; top: calc(8px + var(--st)); height: auto; display: block; padding: 4px; border-radius: 20px; background: rgba(255, 255, 255, .84);
    -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    box-shadow: var(--sh); transition: transform .32s var(--ease), opacity .32s; }
  body.aion .top.m { transform: translateY(calc(-100% - 16px - var(--st))); opacity: 0; pointer-events: none; }
  .trow { display: flex; align-items: center; gap: 4px; }
  .trow .mark { width: 36px; height: 36px; border-radius: 16px; font-size: 14px; }
  .trow .deals { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr 1.25fr; height: 36px; padding: 2px; border-radius: 16px; }
  .trow .deals button { padding: 0 4px; font-size: 14px; white-space: nowrap; border-radius: 14px; }
  .trow .favbtn { position: relative; width: 36px; height: 36px; min-width: 0; padding: 0; border-radius: 16px; border: 0; background: rgba(15, 27, 51, .06); }
  .trow .favbtn.on { background: #ffe3e8; }
  .trow .favbtn .badge { position: absolute; right: -4px; top: -4px; background: var(--red); box-shadow: 0 0 0 2px #fff; }
  .qchips { display: flex; gap: 8px; margin: 4px -4px 0; padding: 0 4px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .qchips::-webkit-scrollbar { display: none; }
  .qchips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }   /* край намекает, что чипы листаются */
  .qc { position: relative; flex: none; height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
    font-weight: 400; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .12s; }
  .qc:active { transform: scale(.96); }
  .qc.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
  .qc.on .badge { background: #fff; color: var(--ink); }
  /* зона касания 44 px у кнопок, которые видом меньше (сделка, чипы, кнопки шторок и карточек) */
  .trow .deals button::after, .qc::after, .sx::after, .bsx::after, .fav::after, .seg button::after, .mb::after {
    content: ''; position: absolute; inset: -4px; }
  .fav::after { inset: -6px; }

  /* шторка результатов: выглядывает шапка, тянется наполовину и во весь экран */
  .panel { left: 0; right: 0; width: auto; top: calc(var(--top) + 8px); bottom: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(15, 27, 51, .18);
    transform: translateY(var(--sy, 100%)); transition: transform .36s var(--ease); will-change: transform; }
  .panel.drag { transition: none; }
  .sgrab { position: relative; flex: none; padding-top: 12px; touch-action: none; cursor: grab; }
  .sgrab .handle { display: block; }
  .phead { padding: 4px 12px 8px 16px; min-height: 44px; }
  .cnt { font-size: 16px; }
  .cnt b { font-weight: 700; }
  .sx { position: relative; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 27, 51, .06); color: var(--ink2); }
  .aipill { flex: none; height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px 0 12px; border: 0; border-radius: 20px; background: var(--ai); color: #fff; font-weight: 700;
    box-shadow: 0 8px 22px rgba(76, 92, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .12s; }
  .aipill:active { transform: scale(.96); }
  /* карточка в шторке — строка: фото слева, цена главная; в половине шторки видно 3 карточки, во весь экран — 6 */
  .vlist { padding: 0 12px calc(12px + var(--sb)); }
  .card { gap: 12px; }
  .card:hover { transform: none; }
  .card .ph { width: 104px; }
  .panel .bhead { max-height: 58%; margin: 0 12px 8px; }
  .panel .vlist { min-height: 22%; }
  .dirs button { height: 40px; }

  /* кнопки карты: колонка справа под шапкой */
  .mapctl.m { right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(var(--top) + 16px); bottom: auto; gap: 8px; }
  body.aion .mapctl { opacity: 0; pointer-events: none; }
  .mb { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--glass);
    box-shadow: var(--sh); transition: transform .12s; }
  .mb:active { transform: scale(.92); }
  .mb.mtime { width: auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 12px 0 8px; border-radius: 20px; font-variant-numeric: tabular-nums; }

  .toast { bottom: auto; top: calc(var(--top) + 16px); max-width: calc(100% - 32px); }

  /* карточка объявления: на весь экран, галерея листается пальцем, связь — внизу */
  .modal { padding: 0; place-items: stretch; }
  .sheet { display: block; width: 100%; height: 100%; border-radius: 0; overflow-y: auto; overscroll-behavior: contain; animation: up .34s var(--ease) both; }
  .sheet > .x { display: none; }
  .sheet.apisheet > .x, .sheet.cmpsheet > .x { display: grid; }
  .lbar { position: sticky; top: 0; z-index: 3; height: 0; display: flex; justify-content: space-between; padding: 0 12px; overflow: visible; }
  .gb { position: relative; z-index: 1; margin-top: calc(8px + var(--st)); width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
    background: rgba(255, 255, 255, .9); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
  .gb.on { color: var(--red); }
  .lbar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(60px + var(--st)); background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(15, 27, 51, .08); opacity: 0; transition: opacity .2s; pointer-events: none; }
  .ltitle { position: absolute; left: 64px; right: 64px; top: calc(8px + var(--st)); line-height: 44px; text-align: center; font-size: 16px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s; }
  .ltitle small { font-weight: 400; color: var(--ink2); }
  .lbar.solid::before, .lbar.solid .ltitle { opacity: 1; }
  .lbar.solid .gb { background: none; box-shadow: none; }
  .gal { display: block; background: #0f1626; }
  .gstrip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .gstrip::-webkit-scrollbar { display: none; }
  .gstrip img { flex: none; width: 100%; height: calc(60vw + var(--st)); max-height: 44vh; object-fit: cover; scroll-snap-align: center; background: #1a2336; }
  .gal .pk { left: auto; right: 12px; top: auto; bottom: 24px; }
  .noph.big { min-height: 260px; }
  .body { position: relative; margin-top: -16px; padding: 16px; border-radius: 20px 20px 0 0; background: #fff; overflow: visible; }
  .pr { margin: 0 0 2px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .fact { padding: 8px 0; }
  .agent .acts .btn.ghost { width: 100%; }
  .lcta { position: sticky; bottom: 0; z-index: 3; display: flex; gap: 8px; padding: 8px 16px calc(8px + var(--sb)); background: rgba(255, 255, 255, .94);
    box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(15, 27, 51, .08); }
  .lcta .btn { flex: 1; height: 48px; border-radius: 12px; font-size: 16px; }

  /* окно агента — шторка снизу; карта над ней видна, туда летит камера */
  .aichat { left: 0; right: 0; bottom: 0; width: auto; max-height: calc(100% - 56px - var(--st)); border-radius: 24px 24px 0 0; z-index: 40; padding-bottom: var(--sb);
    animation: up .34s var(--ease) both; transition: transform .28s var(--ease); }
  .aihead { padding-top: 20px; touch-action: none; }
  .aihead .handle { top: 8px; }
  .aiform input { font-size: 16px; }   /* iOS не увеличивает страницу при вводе */

  /* прогулка */
  .wtop { left: 8px; right: 8px; top: calc(8px + var(--st)); }
  .wtitle { gap: 8px; padding: 6px 12px; }
  .wexit { padding: 8px 12px; }
  .whint { white-space: normal; width: 86%; max-width: none; bottom: 132px; }
  .wmap { left: 8px; bottom: 132px; }
  .plansvg { width: 220px; }
  .walkhud.touch .plansvg { width: 182px; }

  .credits { display: none; }
  .pin { font-size: 12px; padding: 4px 8px; }
  .pin b { display: none; }   /* на телефоне у ценника только цена */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* доверие: сделки DLD, лицензия агента, сравнение избранного (viewer/src/trust.jsx) */
.dld { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 8px; }
.dldh { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 0; text-align: left; color: var(--ink); }
.dldh span { color: var(--ink2); flex: 1; }
.dldh svg { transform: rotate(-90deg); color: var(--ink3); transition: transform .2s var(--ease); }
.dldh[aria-expanded=true] svg { transform: rotate(90deg); }
div.dldh { flex-wrap: wrap; }
.dld .facts { margin: 0; grid-template-columns: 1fr; }
.dldm { display: flex; align-items: flex-end; gap: 4px; height: 64px; padding-bottom: 16px; }
.dldm i { position: relative; flex: 1; min-width: 6px; border-radius: 4px 4px 0 0; background: var(--soft2); }
.dldm i:hover { background: var(--blue); }
.dldm em { position: absolute; left: 0; right: 0; top: 100%; font-style: normal; font-size: 12px; color: var(--ink3); text-align: center; }
.dldt { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.dldt th { text-align: left; font-weight: 400; color: var(--ink2); padding: 4px 6px 4px 0; }
.dldt td { border-top: 1px solid var(--line); padding: 5px 6px 5px 0; vertical-align: top; }
.dldt td:nth-child(n+3), .dldt th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.dldt em { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: #fff1d6; color: #8a5a00; }
.dldvs { margin: 0 0 16px; display: grid; gap: 4px; }
.dldvs b.up { color: var(--red); }
.dldvs b.dn { color: var(--green); }
.lic { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; background: var(--bg); color: var(--ink2); }
.lic svg { flex: none; margin-top: 1px; }
.lic span { display: grid; gap: 2px; }
.lic b { color: var(--ink); }
.lic small { font-size: 12px; }
.lic.ok { background: #e7f6ee; } .lic.ok svg { color: var(--green); }
.lic.bad { background: #fdecec; } .lic.bad svg, .lic.bad b { color: #b42318; }
.favcmp { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 12px 0; height: 40px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-weight: 700; color: var(--blue); }
.favcmp:hover { border-color: var(--blue); }
.sheet.cmpsheet { display: block; max-width: 760px; height: auto; max-height: 100%; overflow-y: auto; padding: 20px; }
.cmpsheet h2 { margin: 0 44px 12px 0; font-size: 20px; }
.cmpsheet .fnote { margin-top: 12px; }
/* этап 2: отчёт у окна (viewer/src/winreport.jsx), блок «Инвестору» и ипотека (invest.jsx) */
.wrep { margin-top: 8px; display: grid; gap: 8px; }
.wscore { display: flex; align-items: baseline; gap: 8px; }
.wscore b { font-size: 20px; line-height: 1; letter-spacing: -.5px; }
.wscore span { color: var(--ink2); }
.wbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg); }
.wbar i { display: block; height: 100%; }
.wleg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink2); }
.wleg span { display: inline-flex; align-items: center; gap: 4px; }
.wleg i { width: 10px; height: 10px; border-radius: 3px; }
.wfore { display: grid; gap: 4px; }
.wline { margin: 0; font-size: 12px; line-height: 1.4; }
.fnote.warn { color: #8a5a00; }
.invest { margin: 0 0 16px; }
.invest h3 { font-size: 16px; margin: 0 0 8px; }
.invest .facts { margin-bottom: 8px; }
.loanwho { margin-bottom: 12px; }
