/* TERRA Real Estate — сайт агенції (Артем 30.11): білий — основа, чорний — другий, золото — третій, лише як акцент. */
:root {
  --white: #ffffff;
  --black: #141414;
  --gray: #5f5f5f;       /* другорядний текст */
  --soft: #f4f4f2;       /* світлі підкладки */
  --line: #e7e7e4;
  --gold: #b8914b;       /* лише кнопки дії й дрібні акценти */
  --gold-dark: #94723a;
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 50px -24px rgba(20, 20, 20, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--white); color: var(--black); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1, h2 { font-family: var(--display); font-weight: 600; }
h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--gray); }
.hp { position: absolute; left: -9999px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--black); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; background: transparent; color: var(--black); transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn.big { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn.sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn.gold { background: var(--gold); color: #fff; }
.btn.gold:hover { background: var(--gold-dark); }
.btn.black { background: var(--black); color: #fff; }
.btn.black:hover { background: #000; }
.btn.line { border-color: var(--black); }
.btn.line:hover { background: var(--black); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.round { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.round:hover { border-color: var(--black); }

/* значки месенджерів */
.msgr { display: inline-flex; gap: 6px; }
.mi { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; border: 1.5px solid var(--line); background: #fff; color: var(--black); }
.mi:hover { border-color: var(--black); }
.mi svg { width: 20px; height: 20px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topin { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo img { height: 38px; width: auto; display: block; } @media (max-width: 640px) { .logo img { height: 32px; } }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--gray); }
.nav a:hover { color: var(--black); }
.topact { display: flex; align-items: center; gap: 10px; }

/* ---------- перший екран: велике фото з пошуком ---------- */
.hero { padding: 20px 0 0; }
.heroimg { position: relative; height: clamp(420px, 62vh, 640px); border-radius: var(--r-xl); overflow: hidden; background: var(--black) center / cover no-repeat;
  display: flex; align-items: flex-end; }
.heroimg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .66) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .05) 75%), linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .45) 100%); }
.heroimg.nophoto { background: var(--black); }
.herotext { position: relative; z-index: 1; color: #fff; padding: clamp(24px, 4vw, 56px); padding-bottom: clamp(80px, 9vw, 110px); max-width: 900px; text-shadow: 0 1px 24px rgba(0, 0, 0, .25); }
.herotext h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1.03; letter-spacing: -0.03em; }
.herotext p { margin: 18px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255, 255, 255, .86); max-width: 48ch; }
.search { position: relative; z-index: 2; margin: -52px clamp(12px, 3vw, 40px) 0; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; gap: 14px; align-items: end; padding: 16px; }
.dealtabs { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; align-self: center; }
.dealtabs button { border: 0; background: transparent; border-radius: 999px; padding: 0 18px; min-height: 44px; font: 600 15px var(--body); color: var(--gray); cursor: pointer; }
.dealtabs button[aria-selected="true"] { background: var(--black); color: #fff; }
.sf { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--gray); min-width: 0; }
.sf select { min-height: 48px; width: 100%; border-radius: var(--r-md); border: 1.5px solid var(--line); background: #fff; padding: 0 12px; font: 500 16px var(--body); color: var(--black); }
.sf.inline { flex-direction: row; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.sf.inline select { min-height: 42px; width: auto; border-radius: 999px; }

/* ---------- каталог ---------- */
.catalog { padding: clamp(56px, 7vw, 96px) 0; }
.cathead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.catside { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 500; font-size: 15px; background: #fff; }
.pill input:checked + span { background: var(--black); border-color: var(--black); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.count { color: var(--gray); margin: 10px 0 28px; font-size: 15px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 24px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.shots { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); }
.track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track a { flex: 0 0 100%; scroll-snap-align: start; }
.track img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.dots i.on { background: #fff; }
.shots .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92);
  font-size: 22px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.shots .prev { left: 10px; } .shots .next { right: 10px; }
.card:hover .arrow, .arrow:focus-visible { opacity: 1; }
.badge { position: absolute; left: 12px; top: 12px; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.cbody { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.price { font: 600 24px/1.1 var(--display); letter-spacing: -0.02em; }
.price small { font: 500 15px var(--body); color: var(--gray); letter-spacing: 0; }
.uah { font-size: 14px; color: var(--gray); }
.ttl { font-weight: 600; font-size: 17px; line-height: 1.35; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--gray); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag { font-size: 13px; font-weight: 500; border-radius: 999px; padding: 4px 11px; background: var(--soft); color: var(--black); }
.empty { grid-column: 1 / -1; border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: clamp(32px, 5vw, 64px); text-align: center; }
.empty h3 { font-size: 22px; margin-bottom: 10px; }
.empty p { color: var(--gray); margin: 0 auto 24px; max-width: 46ch; }

/* ---------- власникам ---------- */
.owner { background: var(--black); color: #fff; padding: clamp(64px, 8vw, 110px) 0; }
.owner .lead { color: rgba(255, 255, 255, .72); font-size: 18px; max-width: 44ch; margin: 18px 0 0; }
.ownergrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.steps { list-style: none; counter-reset: s; margin: 40px 0 0; padding: 0; display: grid; gap: 24px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; }
.steps li::before { content: counter(s); grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font: 600 17px var(--display); }
.steps b { font-size: 18px; font-weight: 600; }
.steps span { color: rgba(255, 255, 255, .72); }
.panel { background: #fff; color: var(--black); border-radius: var(--r-xl); padding: clamp(24px, 3vw, 36px); }

/* ---------- форми ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form h3 { margin-bottom: 2px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--gray); }
.form input, .form textarea { font: 400 16px var(--body); color: var(--black); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; background: #fff; }
.form input:focus, .form textarea:focus { border-color: var(--black); outline: none; }
.form textarea { resize: vertical; }
.msg { margin: 0; min-height: 1.4em; font-size: 15px; }
.msg.ok { color: #1f7a4d; font-weight: 600; }
.msg.bad { color: #b3261e; font-weight: 600; }

/* ---------- відгуки ---------- */
.reviews { padding: clamp(64px, 8vw, 110px) 0; background: var(--soft); }
.revhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.revnav { display: flex; gap: 8px; }
.revs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.revs::-webkit-scrollbar { display: none; }
.rev { scroll-snap-align: start; background: #fff; border-radius: var(--r-lg); padding: 30px 28px 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.rev p { margin: 0; font-size: 17px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.rev.open p { -webkit-line-clamp: unset; }
.rev .more { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--gold-dark); font: 600 15px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rev footer { display: flex; align-items: center; gap: 12px; }
.ava { width: 42px; height: 42px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }
.rev footer b { display: block; font-weight: 600; }
.rev footer span { font-size: 14px; color: var(--gray); }

/* ---------- футер ---------- */
.foot { background: var(--black); color: rgba(255, 255, 255, .72); padding: 64px 0 72px; }
.footgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.foot p { max-width: 38ch; margin: 18px 0 0; }
.contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contacts .phone { font: 600 clamp(26px, 3vw, 36px)/1.1 var(--display); color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.contacts .msgr .mi { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.contacts .msgr .mi:hover { border-color: #fff; }
.contacts .chan { color: #fff; }
.contacts .addr { color: #fff; text-decoration: none; font-size: 17px; } .contacts .addr:hover { text-decoration: underline; }

/* ---------- діалоги ---------- */
dialog { border: 0; padding: 0; border-radius: var(--r-xl); background: #fff; color: var(--black); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: rgba(10, 10, 10, .62); }
.x { position: absolute; right: 14px; top: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); font-size: 24px; line-height: 1; cursor: pointer; }
.leaddlg { width: min(480px, 100% - 24px); }
.leaddlg .form { padding: 32px 28px 26px; }
.leaddlg h3 { padding-right: 44px; }
.leaddlg .muted { margin: 0 0 4px; font-size: 15px; }
.objdlg { width: min(1120px, 100% - 24px); }
/* галерея: фото повністю, а поля — розмитою копією того ж фото, без чорних смуг */
.gal { position: relative; aspect-ratio: 16 / 10; max-height: 64vh; width: 100%; overflow: hidden; background: var(--black); }
.gal .blur { position: absolute; inset: -30px; background: center / cover no-repeat; filter: blur(28px) brightness(.8); }
.gal .big { position: relative; width: 100%; height: 100%; object-fit: contain; }
.gal .nav2 { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); font-size: 26px; cursor: pointer; }
.gal .prev { left: 14px; } .gal .next { right: 14px; }
.gal .cnt { position: absolute; left: 14px; bottom: 14px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; border-radius: 999px; padding: 5px 11px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thumbs img { width: 88px; height: 64px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: .55; flex: none; }
.thumbs img.on { opacity: 1; outline: 2px solid var(--black); }
.obody { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding: 28px; }
.ohead { padding: 28px 28px 0; }
.ohead h2 { font-size: clamp(22px, 2.4vw, 30px); max-width: 30ch; }
.agent .ava { color: #fff; font-size: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin: 0 0 24px; }
.kv div { background: var(--soft); border-radius: var(--r-md); padding: 12px 14px; }
.kv dt { font-size: 13px; color: var(--gray); } .kv dd { margin: 2px 0 0; font-weight: 600; }
.desc { white-space: pre-line; max-width: 68ch; }
.oside { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 14px; border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.oside .price { font-size: 30px; }
.agent { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.agent b { display: block; }
.agent span { font-size: 14px; color: var(--gray); }
.oside .code { font-size: 14px; color: var(--gray); }

/* ---------- «скоро відкриємось» ---------- */
.soon { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; background: #fff; color: var(--gray); font: 500 18px var(--body); }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .topact { margin-left: auto; }
  .search { grid-template-columns: 1fr 1fr; }
  .dealtabs { grid-column: 1 / -1; justify-self: start; }
  #searchBtn { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .revs { grid-auto-columns: calc((100% - 24px) / 2); }
  .ownergrid, .obody { grid-template-columns: 1fr; }
  .oside { position: static; order: -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topact .msgr { display: none; }
  .hero { padding-top: 12px; }
  .heroimg { height: 420px; border-radius: var(--r-lg); }
  .herotext h1 { font-size: 31px; }
  .search { grid-template-columns: 1fr; margin: -40px 8px 0; }
  .grid { grid-template-columns: 1fr; }
  .revs { grid-auto-columns: 88%; }
  .footgrid { grid-template-columns: 1fr; }
  .gal { aspect-ratio: 4 / 3; }
  .obody { padding: 20px 18px; gap: 22px; }
  .ohead { padding: 22px 18px 0; }
  .gal .nav2 { width: 40px; height: 40px; font-size: 22px; }
  .shots .arrow { display: none; }
}

/* ===================== v4 (30.11): свої випадні списки, карта, обране, підбір, канал, нижня панель на телефоні ===================== */
/* --- випадний список замість стандартного --- */
.fs { position: relative; }
.fs select { position: absolute; opacity: 0; pointer-events: none; inset: 0; }
.fs-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: #fff; font: 500 16px var(--body); color: var(--black); cursor: pointer; text-align: left; }
.fs-btn:hover { border-color: #c9c9c4; }
.fs-btn[aria-expanded="true"] { border-color: var(--black); }
.fs-btn svg { width: 16px; height: 16px; flex: none; transition: transform .15s; }
.fs-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.fs-list { position: absolute; z-index: 30; left: 0; top: calc(100% + 8px); min-width: 100%; max-height: 320px; overflow: auto; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: var(--r-md); box-shadow: 0 20px 50px -18px rgba(20, 20, 20, .35), 0 0 0 1px var(--line); }
.fs-list[hidden] { display: none; }
.fs-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.fs-list li:hover, .fs-list li.act { background: var(--soft); }
.fs-list li[aria-selected="true"] { color: var(--black); font-weight: 600; }
.fs-list li[aria-selected="true"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.sf.inline .fs-btn { min-height: 42px; border-radius: 999px; padding: 0 16px; font-size: 15px; }
.sf.inline .fs-list { right: 0; left: auto; }

/* --- перемикач список / карта, обране --- */
.cathead { align-items: flex-end; }
.cathead .count { margin: 6px 0 0; }
.grid, .mapwrap { margin-top: 28px; }
.viewtabs { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; }
.viewtabs button { border: 0; background: transparent; border-radius: 999px; padding: 0 16px; min-height: 36px; font: 600 14px var(--body); color: var(--gray); cursor: pointer; }
.viewtabs button[aria-selected="true"] { background: #fff; color: var(--black); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.fav { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); display: grid; place-items: center; cursor: pointer; }
.fav svg { width: 20px; height: 20px; fill: none; stroke: var(--black); stroke-width: 1.8; }
.fav[aria-pressed="true"] svg { fill: var(--gold); stroke: var(--gold); }
#map { height: min(70vh, 620px); border-radius: var(--r-xl); overflow: hidden; background: var(--soft); }
.mapnote { color: var(--gray); font-size: 14px; margin: 10px 0 0; }
.mpin { background: var(--black); color: #fff; border-radius: 999px; padding: 5px 10px; font: 600 13px var(--body); white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transform: translate(-50%, -50%); display: inline-block; }
.mpin:hover { background: var(--gold); }
.leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 240px !important; font: 400 14px/1.4 var(--body); }
.mpop img { width: 100%; height: 140px; object-fit: cover; }
.mpop div { padding: 10px 12px 12px; }
.mpop b { display: block; font: 600 17px var(--display); }
.mpop a { color: var(--black); font-weight: 600; }

/* --- підбір під запит --- */
.request { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.reqgrid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.request .lead { color: var(--gray); font-size: 18px; margin: 16px 0 0; max-width: 40ch; }
.reqform { background: var(--soft); border-radius: var(--r-xl); padding: clamp(22px, 3vw, 32px); }
.chips { display: flex; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* --- Telegram-канал --- */
.channel { padding: 0 0 clamp(56px, 7vw, 96px); background: var(--soft); }
.chcard { display: flex; align-items: center; gap: 22px; padding: 22px 26px; background: var(--black); color: #fff; border-radius: var(--r-xl); text-decoration: none; }
.chcard img { width: 88px; height: 88px; border-radius: 50%; flex: none; }
.chtext { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.chtext b { font: 600 22px var(--display); }
.chtext span { color: rgba(255, 255, 255, .72); }
.chcard:hover .btn.gold { background: var(--gold-dark); }

/* --- нижня панель на телефоні --- */
.mbar { display: none; }
@media (max-width: 640px) {
  .mbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .mbar .msgr { gap: 6px; }
  body { padding-bottom: 76px; }
  .reqgrid, .row2 { grid-template-columns: 1fr; }
  .chcard { flex-wrap: wrap; padding: 20px; }
  .chcard img { width: 64px; height: 64px; }
  .chcard .btn { width: 100%; }
  .catside { width: 100%; }
}
@media (max-width: 1080px) { .reqgrid { grid-template-columns: 1fr; } }
.form .pill { display: inline-block; font-size: inherit; color: inherit; }
.reqform .chips { margin-bottom: 2px; }
[hidden] { display: none !important; }
.fs-list li { font-size: 16px; color: var(--black); }
.sf.inline .fs-list li { font-size: 15px; }

/* ===================== v5 (30.11) ===================== */
/* перший екран: слайди з плавною зміною й повільним наближенням */
.heroimg { background: var(--black); }
.heroimg .slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity 1.6s ease, transform 8s ease-out; }
.heroimg .slide.on { opacity: 1; transform: scale(1); }
.herotext h1 { font-size: clamp(32px, 4.4vw, 58px); max-width: 17ch; }
/* валюта бюджету */
.budget { display: inline-flex; align-items: center; gap: 8px; }
.curtabs { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; }
.curtabs button { border: 0; background: transparent; border-radius: 999px; min-width: 40px; min-height: 36px; font: 600 14px var(--body); color: var(--gray); cursor: pointer; }
.curtabs button[aria-pressed="true"] { background: var(--black); color: #fff; }
/* поділитися */
.share { display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.share > span { font-size: 14px; color: var(--gray); margin-right: auto; }
button.mi { cursor: pointer; padding: 0; }
.mi.done { border-color: var(--gold); color: var(--gold); }
/* схожі оголошення */
.similar { padding: 8px 28px 32px; border-top: 1px solid var(--line); }
.similar h3 { font: 600 22px var(--display); margin: 24px 0 18px; }
.simgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.simgrid .price { font-size: 20px; }
@media (max-width: 900px) { .simgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .simgrid { grid-template-columns: 1fr; } .similar { padding: 4px 18px 24px; } }
/* карта в стилі сайту: чорно-біла підкладка, мітки чорні, наведена — золота */
.leaflet-tile-pane { filter: grayscale(1) contrast(1.08) brightness(1.04); }
.leaflet-control-zoom a { color: var(--black) !important; }
.leaflet-container { font-family: var(--body); background: #eee; }
.leaflet-container a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
/* канал — одразу під оголошеннями (Артем 30.11: «вище, щоб бачили») */
.channel { background: #fff; padding: 0 0 clamp(48px, 6vw, 80px); }
.herotg { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid rgba(255, 255, 255, .25); }
.herotg:hover { background: rgba(255, 255, 255, .24); }
.herotg-i { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--black); display: grid; place-items: center; }
.herotg-i svg { width: 16px; height: 16px; }

/* відкритий список пошуку — над картками (сердечка не перекривають) */
.search { z-index: 6; }
.mi svg { width: 19px; height: 19px; }

/* «Розташування» в картці оголошення */
.loc { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.loc h3 { font: 600 22px var(--display); margin: 0 0 14px; }
.loc h4 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.omap { height: 280px; border-radius: var(--r-lg); overflow: hidden; background: var(--soft); }
.stops, .near { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stops li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; background: var(--soft); border-radius: var(--r-md); }
.sn { display: flex; flex-direction: column; } .sn span { font-size: 14px; color: var(--gray); }
.routes { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.rt { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rt i { font-style: normal; font-size: 13px; color: var(--gray); margin-right: 2px; }
.rt em { font-style: normal; font-weight: 600; font-size: 13px; min-width: 28px; text-align: center; padding: 3px 7px; border-radius: 8px; background: var(--black); color: #fff; }
.near li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.near li:last-child { border-bottom: 0; }
.near b { display: block; font-weight: 600; } .near li span span { font-size: 14px; color: var(--gray); }
.ni { font-size: 18px; text-align: center; }
.nd { font-size: 14px; color: var(--gray); white-space: nowrap; }

/* нижня панель на телефоні з'являється плавно, коли пошук уже не видно */
@media (max-width: 640px) {
  .mbar { transform: translateY(110%); transition: transform .25s ease; }
  .mbar.show { transform: none; }
}
/* плитки характеристик: довгі назви («Шевченківський», «Індивідуальне») не обрізаються */
.kv { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
.kv dd, .kv dt { overflow-wrap: anywhere; hyphens: auto; }
.kv dd { font-size: 16px; line-height: 1.35; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr 1fr; } }
