/* DwellBell — токени з дизайн-системи дошок (dwellbell-boards, light theme):
   ink #000300 · paper #F8F8F2 · orange #F15623 · шрифт Gilroy. Шрифт не тягнемо з CDN (CSP / Zero-Trust):
   якщо Gilroy встановлено чи підключено локально в static/, він підхопиться, інакше — системний гротеск. */
:root {
  --ink: #000300;
  --ink2: #52514e;
  --paper: #F8F8F2;
  --panel: #ffffff;
  --panel2: #F2F1EA;
  --line: #E2E0D6;
  --line2: #CFCCBE;
  --muted: #86847c;
  --orange: #F15623;
  --orange-hover: #d9481a;
  --orange-soft: #FDEAE2;
  --green: #1a7f4b;
  --green-soft: #E4F2EA;
  --red: #C0392B;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 3, 0, .04), 0 8px 24px rgba(0, 3, 0, .06);
  --shadow-lg: 0 24px 60px rgba(0, 3, 0, .22);
  --font: "Gilroy", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
h1, h2 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
h1 { font-size: 1.7rem; margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
code { font-size: .85em; background: var(--panel2); padding: .05rem .3rem; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; margin: 0; }
.spacer { flex: 1; }
.eyebrow { margin: 0 0 .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.ico { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Wordmark: DwellBell + помаранчева крапка */
.wordmark { display: inline-flex; align-items: baseline; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; color: var(--ink); }
.wordmark span { color: inherit; }
.wordmark i { width: .36em; height: .36em; margin-left: .12em; border-radius: 50%; background: var(--orange); display: inline-block; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .6rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  font: 700 .95rem/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-hover); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { min-height: 34px; padding: .35rem .85rem; font-size: .82rem; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--orange); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
button.link:hover { text-decoration: underline; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.badge.bosu { background: var(--ink); color: var(--paper); }
.badge.partner { background: var(--panel2); color: var(--ink2); border: 1px solid var(--line2); }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.off { background: var(--panel2); color: var(--muted); }
.badge.hot { background: var(--orange-soft); color: var(--orange-hover); }
.alert { background: var(--orange-soft); color: #7a2a0c; padding: .65rem .9rem; border-radius: var(--radius-sm); }

/* Аватар менеджера */
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: 1.1rem; letter-spacing: .02em;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--orange);
}
.avatar.sm { width: 36px; height: 36px; font-size: .78rem; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--orange); }

/* ================= Адмінка ================= */
.admin-top {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .7rem 1.5rem; background: var(--ink); color: var(--paper);
}
.admin-top a { color: var(--paper); text-decoration: none; }
.admin-top .brand { display: flex; align-items: baseline; gap: .75rem; }
.admin-top .wordmark { color: var(--paper); }
.brand-sub { font-size: .82rem; color: #a5a29a; font-weight: 600; }
.admin-top nav { display: flex; gap: .25rem; }
.admin-top nav a { padding: .45rem .85rem; border-radius: 999px; color: #b9bbb8; font-weight: 600; font-size: .92rem; }
.admin-top nav a:hover { color: var(--paper); }
.admin-top nav a.on { background: var(--orange); color: #fff; }
.admin-top .sync { margin-left: auto; font-size: .8rem; color: #b9bbb8; }
.admin-top .who { color: var(--paper); font-weight: 700; }
.admin-top .dev-tag { padding: .05rem .4rem; border-radius: 6px; background: var(--orange); color: #fff; font-size: .7rem; font-weight: 700; }
.admin { max-width: 1180px; margin: 0 auto; padding: 1.5rem 16px 6rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; margin-bottom: 1rem; box-shadow: var(--shadow); }

/* Пошук і фільтри на сторінці + кнопка «Фільтри», що згортає блок */
.filters { display: flex; flex-direction: column; gap: 1rem; }
.search-bar { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; }
.search-bar label { flex: 1 1 160px; }
.search-bar label.narrow { flex: 0 1 110px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 46px; padding: 0 .9rem 0 1rem; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 .92rem var(--font); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.filter-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.filter-btn .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.filter-btn.collapsed .chev { transform: rotate(-90deg); }
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.filter-btn .count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800;
}
.filters-panel { display: flex; flex-direction: column; gap: 1rem; }
.filters-panel[hidden] { display: none; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; align-items: end; }
.filter-group { padding-top: .9rem; border-top: 1px solid var(--line); min-width: 0; }
.filter-group legend { font-size: .95rem; font-weight: 800; color: var(--ink); padding: 0; }
.filter-group legend .muted { font-weight: 500; font-size: .82rem; }
.filter-group > legend + .filter-row, .filter-group > legend + .chips-wrap { margin-top: .6rem; }
.filter-group .muted.small { margin: .5rem 0 0; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-actions { display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .25rem; }

/* Чіпи активних фільтрів — видно лише коли блок згорнутий */
.active-filters { display: none; flex-wrap: wrap; align-items: center; gap: .35rem; }
.filters-panel[hidden] + .active-filters { display: flex; }
.active-pill {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .4rem .25rem .7rem; border-radius: 999px;
  background: var(--panel2); color: var(--ink); text-decoration: none; font-size: .8rem; font-weight: 600;
}
.active-pill span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); font-size: .95rem; line-height: 1; }
.active-pill:hover span { background: var(--ink); color: var(--paper); }
.clear-all { margin-left: .25rem; font-size: .8rem; font-weight: 700; color: var(--ink); }

.badge.plain { background: var(--panel2); color: var(--ink2); }
.result-badges { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .2rem; }
.result-badges:empty { display: none; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--ink2); }
input, select, textarea {
  font: 500 1rem var(--font); padding: .55rem .8rem; border: 1px solid var(--line2); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); min-height: 46px;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 0; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .82rem; font-weight: 600; color: var(--ink2); margin-bottom: .35rem; }
.chip { flex-direction: row; align-items: center; gap: .35rem; padding: .35rem .8rem; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink); cursor: pointer; font-weight: 600; background: var(--panel); }
.chip input { min-height: 0; accent-color: var(--orange); }
.chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.results-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .85rem; }
.results-head h1, .results-head h2 { margin: 0; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .55rem; }
.result {
  display: flex; flex-direction: row; align-items: center; gap: .8rem; padding: .6rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--panel); font-weight: 400;
}
.result:hover { border-color: var(--line2); }
.result.static { cursor: default; margin-bottom: .5rem; }
.result.hot { border-color: var(--orange); background: #FFF8F4; }
.result:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); background: #FFF8F4; }
.result input[type=checkbox] { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--orange); }
.result .thumb { width: 84px; height: 60px; object-fit: cover; border-radius: 9px; flex: none; background: var(--panel2); }
.result-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.result-main strong { font-size: .95rem; font-weight: 700; }
.guest-box { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .75rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.lang label { flex-direction: row; align-items: center; gap: .4rem; color: var(--ink); display: inline-flex; margin-right: 1rem; }
.lang input { min-height: 0; accent-color: var(--orange); }
.sticky-bar {
  position: sticky; bottom: 0; margin: 1rem -1.35rem -1.35rem; padding: .8rem 1.35rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
}
.linkbox { display: flex; gap: .5rem; flex-wrap: wrap; margin: .85rem 0; }
.linkbox input { flex: 1 1 320px; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; background: var(--panel2); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0; }
.facts-grid { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 1rem 0 0; font-size: .92rem; }
.facts-grid dt { color: var(--muted); }
.facts-grid dd { margin: 0; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.timeline li { padding: .5rem 0 .5rem .9rem; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.timeline time { display: block; color: var(--muted); font-size: .78rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.tile { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; display: flex; flex-direction: column; gap: .25rem; background: var(--paper); }
.tile-label { color: var(--ink2); font-size: .82rem; font-weight: 600; }
.tile-value { font-weight: 800; font-size: 1.8rem; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-goal { font-size: .75rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th { text-align: left; color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
table.list td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:hover td { background: #F6F5EF; }
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; }
  .admin-top .sync { margin-left: 0; }
}

/* ================= Сторінка гостя (mobile-first) ================= */
.guest-body { background: var(--paper); padding-bottom: 92px; }
.g-top {
  position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .65rem 16px; background: rgba(248,248,242,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.g-top-right { display: flex; align-items: center; gap: .5rem; }
.g-lang { display: flex; gap: .15rem; padding: 3px; border-radius: 999px; background: var(--panel2); }
.g-lang:empty { display: none; }
.g-lang a { min-width: 40px; min-height: 32px; display: grid; place-items: center; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .78rem; color: var(--ink2); }
.g-lang a.on { background: var(--ink); color: var(--paper); }
.g-contact {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem .9rem; border-radius: 999px;
  border: 0; background: var(--orange); color: #fff; font: 700 .85rem var(--font); cursor: pointer;
}
.g-contact .ico { width: 18px; height: 18px; }
.g-contact:hover { background: var(--orange-hover); }

.guest { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.guest.narrow { max-width: 560px; }
.hero { padding: 1.75rem 0 1.1rem; }
.hero.center { text-align: center; padding-top: 3.5rem; }
.hero h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); margin-bottom: .6rem; }
.hero .intro { font-size: 1.05rem; color: var(--ink2); margin: 0 0 1rem; max-width: 60ch; }
.hero.center .intro { margin-inline: auto; }
.hero-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.hero-meta p { margin: 0; flex: 1 1 240px; }
.mgr-pill {
  display: inline-flex; align-items: center; gap: .65rem; padding: .35rem 1rem .35rem .45rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line2); cursor: pointer; font: 700 .92rem var(--font); color: var(--ink); text-align: left;
}
.mgr-pill:hover { border-color: var(--ink); }
.mgr-pill small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); }
.safety {
  display: flex; gap: .6rem; align-items: flex-start; margin: 0; padding: .75rem .9rem; border-radius: var(--radius-sm);
  font-size: .86rem; background: var(--panel); border: 1px solid var(--line); color: var(--ink2);
}
.safety .ico { color: var(--green); margin-top: 1px; }

.map-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.1rem; overflow: hidden; }
.map-box summary { padding: .8rem 1rem; font-weight: 800; cursor: pointer; min-height: 44px; }
.map-box p { padding: 0 1rem .8rem; margin: .5rem 0 0; }
#map { height: 260px; background: var(--panel2); position: relative; z-index: 0; }
.stay-line { display: flex; align-items: center; gap: .45rem; margin: -.2rem 0 .9rem; font-size: 1.05rem; }
.stay-line svg { width: 20px; height: 20px; color: var(--orange); flex: none; }
.map-pin {
  display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 14px; white-space: nowrap; cursor: pointer;
  background: var(--ink); color: #fff; font: 800 12px/1 var(--font); border: 2px solid var(--orange); box-shadow: 0 2px 6px rgba(0,3,0,.35);
}

.map-list { display: grid; gap: .25rem; min-width: 180px; max-height: 220px; overflow-y: auto; }
.map-list button { all: unset; cursor: pointer; padding: .25rem .1rem; font: 600 13px/1.3 var(--font); }
.map-list button:hover { color: var(--orange); }
.map-list b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: .4rem; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.photo-tile { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-tile figcaption { display: flex; align-items: center; gap: .4rem; padding: .45rem .55rem; }
.photo-tile figcaption form { margin-left: auto; }
.photo-tile.is-hidden img { opacity: .3; filter: grayscale(1); }
.photo-no { font-weight: 700; color: var(--muted, #666); }
.photos-link { font-size: .8rem; font-weight: 600; color: var(--orange); text-decoration: none; margin-left: .3rem; }
.photos-link:hover { text-decoration: underline; }
.lang-switch { display: flex; gap: 2px; margin-left: .6rem; }
.lang-switch button { all: unset; cursor: pointer; padding: .25rem .5rem; border-radius: 999px; font: 700 12px/1 var(--font); color: inherit; opacity: .6; }
.lang-switch button.on { background: var(--ink); color: #fff; opacity: 1; }

.cards { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); scroll-margin-top: 72px; transition: box-shadow .15s, border-color .15s;
}
.card.picked { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange), var(--shadow); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 16 / 10; background: var(--panel2); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.pin-no {
  position: absolute; top: .75rem; left: .75rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem; border: 2px solid var(--orange);
}
.photo-count { position: absolute; top: .75rem; right: .75rem; padding: .25rem .65rem; border-radius: 999px; background: rgba(0,3,0,.6); color: #fff; font-size: .74rem; font-weight: 600; }
.card-body { padding: 1.1rem; display: flex; flex-direction: column; gap: .65rem; }
.card-body h2 { margin: 0; font-size: 1.15rem; }
.loc { margin: 0; color: var(--muted); font-size: .9rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.gmaps {
  display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line2);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .8rem; white-space: nowrap;
}
.gmaps:hover { border-color: var(--ink); }
.gmaps .ico { width: 15px; height: 15px; color: var(--orange); }
.perks { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; }
.perks li { padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--green-soft); color: var(--green); }
.facts { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.facts li { padding: .3rem .75rem; background: var(--panel2); border-radius: 999px; font-size: .86rem; }
.facts li strong { font-weight: 800; }
.dist { list-style: none; padding: 0; margin: 0; font-size: .9rem; border-top: 1px solid var(--line); }
.dist li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); color: var(--ink2); }
.dist li a { color: var(--ink2); text-decoration: none; border-bottom: 1px dashed var(--line2); }
.dist li a:hover { color: var(--ink); border-bottom-color: var(--orange); }
.dist li span:last-child { font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price { display: flex; flex-direction: column; gap: .1rem; margin: 0; }
.price-total { font-size: 1rem; }
.price-total strong { font-size: 1.35rem; font-weight: 800; }
.price-detail { font-size: .84rem; color: var(--ink2); }
.amen h3 { margin: 0 0 .35rem; font-size: .9rem; font-weight: 700; }
.amen ul { columns: 2; padding-left: 1.1rem; margin: 0; font-size: .88rem; color: var(--ink2); }
.admin-price { font-weight: 700; white-space: nowrap; }
.listing-row.is-hidden { opacity: .55; }
.search-bar .grow { flex: 2 1 260px; }
.search-bar .opt { font-weight: 400; color: var(--muted, #777); font-size: .8em; }
.price-edit { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; font-size: .8rem; color: var(--muted); }
.price-edit input { width: 110px; padding: .3rem .5rem; font-weight: 700; }
.prices-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: .7rem 0 0; background: linear-gradient(transparent, var(--panel, #fff) 35%); }
.client-suggest { display: grid; gap: .3rem; margin: .6rem 0; }
.client-suggest[hidden] { display: none; }
.client-suggest button { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; text-align: left;
  background: #FFF8F4; border: 1px solid var(--orange); border-radius: 10px; font: inherit; cursor: pointer; }
.client-suggest small { color: var(--muted); }
.settings-form { display: grid; gap: .5rem; max-width: 420px; }
.settings-form .btn { justify-self: start; margin-top: .4rem; }
.notice { padding: .65rem .9rem; border-radius: 12px; background: #EEF8EE; border: 1px solid #BFE3BF; font-weight: 600; }
.notice a { margin-left: .4rem; color: var(--orange); }
.sticky-bar .btn.ghost { margin-left: auto; }
.quick-search { position: sticky; top: 0; z-index: 500; display: flex; align-items: center; gap: .6rem;
  margin: 0 0 .9rem; padding: .55rem .85rem; background: var(--panel, #fff); border: 1.5px solid var(--ink);
  border-radius: 999px; box-shadow: 0 4px 14px rgba(0,3,0,.08); }
.quick-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,86,35,.18); }
.quick-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.quick-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; padding: .25rem 0; box-shadow: none; }
.quick-search span { white-space: nowrap; }
.sel-row[hidden] { display: none; }
.pick-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.pick-layout .results { grid-template-columns: 1fr; }
.map-col { order: -1; }   /* на вузькому екрані карта над списком, а не після 128 рядків */
.map-col #admin-map { height: 340px; border-radius: 14px; border: 1px solid var(--line); }
@media (min-width: 1000px) {
  .pick-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .map-col { position: sticky; top: 1rem; order: 0; }
  .map-col #admin-map { height: calc(100vh - 9rem); min-height: 420px; }
}
.result[hidden] { display: none; }
.result.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--orange); } to { box-shadow: none; } }
.map-pin.sel { background: var(--orange); border-color: var(--ink); }
.map-pin.hot { transform: scale(1.25); box-shadow: 0 0 0 3px rgba(241,86,35,.45), 0 2px 6px rgba(0,3,0,.35); }
.map-pin.dot { min-width: 18px; height: 18px; padding: 0; }
.map-list label { display: flex; gap: .4rem; align-items: center; padding: .2rem 0; font: 600 13px/1.3 var(--font); cursor: pointer; }
.map-list small { display: block; font-weight: 400; color: var(--muted, #777); }
.listings-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0 1rem; }
.listings-tools input[type=search] { flex: 1 1 240px; }
.pick {
  flex-direction: row; align-items: center; justify-content: center; gap: .6rem; margin-top: .25rem;
  min-height: 50px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink);
  font-weight: 800; font-size: 1rem; cursor: pointer; user-select: none; transition: background .15s, color .15s, border-color .15s;
}
.pick input { width: 20px; height: 20px; min-height: 0; accent-color: var(--orange); }
.card.picked .pick { background: var(--orange); border-color: var(--orange); color: #fff; }
.card.picked .pick input { accent-color: var(--ink); }

.thanks { margin: 1.5rem 0; padding: 1.4rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
.thanks h2 { color: var(--paper); }
.thanks p { color: #b9bbb8; }
.thanks .btn.dark { background: var(--orange); color: #fff; }
.g-foot { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--muted); font-size: .82rem; padding: 2.5rem 16px; }

.g-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; align-items: center; gap: .75rem;
  padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,3,0,.07);
}
.g-bar #g-count { flex: 1; font-size: .9rem; font-weight: 700; }
.bar-contact { border: 0; background: none; padding: 4px; border-radius: 50%; cursor: pointer; }

/* ================= Вікно «Зв'язатися з менеджером» ================= */
.sheet {
  border: 0; padding: 1.4rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); width: 100%; max-width: 100%;
  margin: auto 0 0; border-radius: 24px 24px 0 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg);
  max-height: 92vh; overflow-y: auto;
}
.sheet[open] { animation: sheet-up .22s ease-out; }
.sheet::backdrop { background: rgba(0,3,0,.55); backdrop-filter: blur(3px); }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: var(--line2); margin: -.6rem auto 1rem; }
.sheet-close {
  position: absolute; top: .9rem; right: .9rem; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--panel2); color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.sheet-close:hover { background: var(--line); }
.mgr { display: flex; align-items: center; gap: 1rem; padding-right: 2.5rem; }
.mgr h2 { margin: 0; font-size: 1.35rem; }
.mgr .eyebrow { margin-bottom: .15rem; }
.sheet .lead { color: var(--ink2); margin: 1rem 0; font-size: .95rem; }
.channels { display: grid; gap: .55rem; }
.channel {
  display: grid; grid-template-columns: 44px 1fr; column-gap: .8rem; align-items: center;
  min-height: 62px; padding: .6rem .9rem .6rem .6rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 800; transition: border-color .15s, transform .1s;
}
.channel:hover { border-color: var(--ink); }
.channel:active { transform: scale(.99); }
.channel .ico { grid-row: span 2; width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--panel2); color: var(--ink); }
.channel small { grid-column: 2; font-weight: 500; font-size: .8rem; color: var(--muted); }
.channel.wa { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.channel.wa .ico { background: var(--orange); color: #fff; }
.channel.wa:hover { border-color: var(--orange); }
.callback { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.callback .label { margin: 0 0 .55rem; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip-btn {
  min-height: 40px; padding: .4rem .95rem; border-radius: 999px; border: 1.5px solid var(--line2); background: var(--panel);
  font: 700 .86rem var(--font); color: var(--ink); cursor: pointer;
}
.chip-btn:hover { border-color: var(--ink); }
.chip-btn.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-btn:disabled { cursor: default; }
.callback-done { margin: .7rem 0 0; padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); font-weight: 600; font-size: .9rem; }
.contact-safety { display: flex; gap: .5rem; align-items: flex-start; margin: 1.1rem 0 0; font-size: .8rem; color: var(--muted); }
.contact-safety .ico { width: 16px; height: 16px; color: var(--green); margin-top: 2px; }
.contact-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.contact-card .channels { margin-top: 1.1rem; }

/* Телефон: стрічка як в Instagram — одна картка на всю ширину за одною, фото 4:5 гортаються вбік */
@media (max-width: 719px) {
  .cards { gap: 1.4rem; margin: 0 -16px; }
  .card { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .card.picked { box-shadow: inset 0 0 0 2px var(--orange); }
  .gallery { aspect-ratio: 4 / 5; }
  .card-body { padding: .9rem 16px 1.1rem; }
}
.price-asof { font-size: .78rem; color: var(--muted); }
.price-date { display: flex; align-items: center; gap: .45rem; margin: -.4rem 0 .9rem; font-size: .9rem; color: var(--ink2); }
.price-date svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
@media (min-width: 720px) {
  #map { height: 340px; }
  .sheet { width: 440px; margin: auto; border-radius: 24px; padding-bottom: 1.4rem; }
  .sheet-handle { display: none; }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1040px) {
  .g-bar { justify-content: center; }
  .g-bar #g-count { flex: 0 1 auto; }
}
@media (max-width: 380px) {
  .g-contact span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Фільтри гостя всередині добірки */
.g-filters { margin: 0 0 1rem; }
.g-filters-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.g-filters .filter-btn { min-height: 42px; }
.g-sort { flex-direction: row; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink2); }
.g-sort select { min-height: 42px; padding: .35rem 2rem .35rem .8rem; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.g-shown { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--ink2); }
.g-filters-panel {
  margin-top: .75rem; padding: 1rem; display: flex; flex-direction: column; gap: .85rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.g-filters-panel[hidden] { display: none; }
.g-filters-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.g-filters-row select { border-radius: var(--radius-sm); }
.g-filters .chip { background: var(--panel); }
.g-filters-panel .link-btn { align-self: flex-start; }
.g-empty { margin: .75rem 0 0; padding: 1rem; border-radius: var(--radius); background: var(--panel); border: 1px dashed var(--line2); color: var(--ink2); }
.g-empty[hidden] { display: none; }
.link-btn { background: none; border: 0; padding: .3rem 0; font: 700 .9rem var(--font); color: var(--ink); text-decoration: underline; cursor: pointer; }
.card[hidden] { display: none; }
@media (max-width: 520px) { .g-shown { margin-left: 0; width: 100%; } }
.filter-btn .count[hidden] { display: none; }
.chip-n { margin-left: .15rem; padding: 0 .4rem; border-radius: 999px; background: var(--panel2); color: var(--ink2); font-size: .72rem; font-weight: 700; }
.btn-clear-top, #gf-clear-top { min-height: 34px; } #gf-clear-top[hidden] { display: none; } .g-filters-panel .btn.small { align-self: flex-start; }
.g-filters-row { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.internal-name { margin-left: .35rem; font-size: .75rem; font-weight: 600; color: var(--muted); font-family: ui-monospace, Consolas, monospace; } .result-main .badge.off { margin-left: .3rem; }
