/* Укриття Нововолинськ — стилі.
   Візуальна мова: спокійний білий, майже чорний текст, тонкі рамки, мінімум кольору.
   Колір лише там, де він несе зміст: тип точки на карті, статус. */

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f8;
  --bg-hover: #f1f1f3;
  --border: #e6e7ea;
  --border-strong: #d5d7dc;
  --text: #1c1d1f;
  --muted: #6b6f76;
  --primary: #1c1d1f;
  --primary-text: #ffffff;
  --me: #2463eb;
  --danger: #dc2626;
  --warn-bg: #fff7ed;
  --warn-border: #fed7aa;
  --warn-text: #9a3412;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 17, 19, .06), 0 1px 1px rgba(16, 17, 19, .03);
  --shadow-lg: 0 10px 30px -10px rgba(16, 17, 19, .25), 0 2px 6px rgba(16, 17, 19, .06);
  --font: "Inter", "InterVariable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --panel-w: 400px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --bg-subtle: #17181b;
    --bg-hover: #1e2023;
    --border: #26282c;
    --border-strong: #34373c;
    --text: #eeeff1;
    --muted: #9a9ea6;
    --primary: #f1f2f4;
    --primary-text: #0f1012;
    --me: #4b8bff;
    --warn-bg: #2a1a0d;
    --warn-border: #5a3413;
    --warn-text: #fdba74;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 15px/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Каркас ---------- */
.app { position: fixed; inset: 0; display: flex; }
.map-wrap { position: relative; flex: 1; min-width: 0; }
#map { position: absolute; inset: 0; background: var(--bg-subtle); }

.panel {
  width: var(--panel-w);
  flex: none;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 16px 16px calc(24px + var(--safe-b));
  z-index: 1000;
  position: relative;
}
.sheet-toggle { display: none; }
.map-wrap .picking, .picking .leaflet-interactive { cursor: crosshair; }

/* ---------- Шапка ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-text);
}
.logo-mark .i { width: 20px; height: 20px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-size: 16px; letter-spacing: -.01em; font-weight: 650; }
.logo-text small { font-size: 12.5px; color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px; font-weight: 550;
  cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow);
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary); opacity: .9; }
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; padding: 0 8px 0 4px; }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: grid; place-items: center;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font-weight: 550; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { text-decoration: underline; }
.link .i { width: 18px; height: 18px; }

.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Банери ---------- */
.mode-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--mode-bg, #eff6ff); color: var(--mode-text, #1e3a8a);
  border: 1px solid var(--mode-border, #bfdbfe);
  font-size: 14px;
}
.mode-banner .i { margin-top: 1px; }
.mode-banner button { margin-top: 8px; height: 32px; font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .mode-banner { --mode-bg: #0f1c38; --mode-text: #bcd3ff; --mode-border: #1e3a70; }
}
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin: 12px 0;
  border-radius: var(--radius);
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 13.5px; color: var(--muted);
}
.note .i { width: 18px; height: 18px; margin-top: 1px; }
.note-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }

/* ---------- Пошук і фільтри ---------- */
.search {
  position: relative; margin: 12px 0 10px;
}
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 12px 0 38px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; outline: none;
  box-shadow: var(--shadow);
}
.search input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex: none;
  transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--bg-hover); }
.chip .i { width: 16px; height: 16px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--primary-text); }
.chip .n { color: var(--muted); font-weight: 450; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .7; }

.filters { margin: 4px 0 8px; border: 1px solid var(--border); border-radius: var(--radius); }
.filters summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; font-size: 14px; font-weight: 500;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary .i { width: 18px; height: 18px; color: var(--muted); }
.filters summary .chev { margin-left: auto; transition: transform .2s; }
.filters[open] summary .chev { transform: rotate(180deg); }
.filters .chips { padding: 0 12px 10px; }
.filters #settlementChips { border-top: 1px solid var(--border); padding-top: 10px; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--primary); color: var(--primary-text);
  font-size: 12px; display: inline-grid; place-items: center;
}

/* ---------- Список ---------- */
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.list-head .muted { font-weight: 450; text-transform: none; letter-spacing: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 8px; margin: 0 -8px;
  border-radius: var(--radius);
  cursor: pointer;
}
.item:hover, .item:focus-visible { background: var(--bg-hover); outline: none; }
.item-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
}
.item-ico .i { width: 19px; height: 19px; }
.item-main { flex: 1; min-width: 0; }
.item-title { display: block; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-dist { text-align: right; flex: none; font-size: 13px; }
.item-dist b { display: block; font-size: 14px; font-weight: 600; }
.item.nearest .item-title::after {
  content: "поруч"; margin-left: 6px; padding: 1px 6px; border-radius: 6px;
  font-size: 11px; font-weight: 600; vertical-align: 1px;
  background: color-mix(in srgb, var(--me) 14%, transparent); color: var(--me);
}
.item.is-closed .item-ico { background: var(--bg-hover); color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }
.foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.foot p { margin: 0; }

/* ---------- Картка точки ---------- */
.detail-top { display: flex; justify-content: space-between; align-items: center; margin: -4px -4px 8px; }
.photos {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none;
}
.photos::-webkit-scrollbar { display: none; }
.photos img {
  height: 200px; width: 78%; aspect-ratio: 4 / 3; object-fit: cover; flex: none;
  border-radius: var(--radius); border: 1px solid var(--border);
  scroll-snap-align: start; background: var(--bg-subtle);
}
.photos img:only-child { max-width: 100%; width: 100%; }
.type-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 550; color: var(--c);
}
.type-tag .i { width: 16px; height: 16px; }
.detail h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.015em; margin: 6px 0 2px; font-weight: 650; }
.detail .sub { color: var(--muted); margin: 0 0 12px; }
.status {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 14px; margin-bottom: 12px;
}
.status .i { width: 18px; height: 18px; }
.status.closed { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
@media (prefers-color-scheme: dark) { .status.closed { background: #2a0f0f; border-color: #5b1a1a; color: #fca5a5; } }
.actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-bottom: 8px; }
.actions .btn-primary { height: 46px; }
.actions .btn:not(.btn-primary) { width: 46px; height: 46px; padding: 0; }
.alt-route { font-size: 13px; margin: 0 0 14px; }
.alt-route a { color: var(--muted); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 14px 0; }
.fact { background: var(--bg); padding: 10px 12px; }
.fact dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.fact dd { margin: 0; font-weight: 550; font-size: 14px; }
.fact.wide { grid-column: 1 / -1; }
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; }
.amenities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.amenities li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.amenities .i { width: 18px; height: 18px; color: var(--muted); }
.amenities li.no { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.desc { white-space: pre-line; font-size: 14px; }
.source { font-size: 12.5px; color: var(--muted); margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }

.prose h2 { font-size: 22px; margin: 4px 0 8px; letter-spacing: -.015em; }
.prose h3 { font-size: 15px; margin: 18px 0 4px; }
.prose p { margin: 0 0 8px; color: var(--muted); }

/* ---------- Заглушка фото ---------- */
.photo-empty {
  height: 200px; margin: 0 0 14px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg-subtle);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 16px; color: var(--muted); font-size: 13.5px;
}
.photo-empty > .i { width: 28px; height: 28px; }
.photo-empty strong { color: var(--text); font-size: 15px; }
.photo-empty .btn { margin-top: 6px; height: 36px; }

/* ---------- Відгуки ---------- */
.votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 8px; }
.votes-q { grid-column: 1 / -1; font-size: 13.5px; font-weight: 550; }
.vote {
  display: inline-flex; align-items: center; gap: 6px;
  justify-content: center;
  height: 42px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  font-size: 14px; font-weight: 550; box-shadow: var(--shadow);
}
.vote:hover { background: var(--bg-hover); }
.vote .i { width: 18px; height: 18px; }
.vote b { font-weight: 650; }
.vote b:empty { display: none; }
.vote.on { background: #dcfce7; border-color: #86efac; color: #166534; }
.vote.bad.on { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
@media (prefers-color-scheme: dark) {
  .vote.on { background: #0f2a1a; border-color: #1f5c37; color: #86efac; }
  .vote.bad.on { background: #2a0f0f; border-color: #5b1a1a; color: #fca5a5; }
}
.vote-reasons { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.vote-reasons .crit, .warn-text { color: #b91c1c; }
.warn-text .i { width: 14px; height: 14px; margin: -2px 3px 0 0; }
.why { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 0 0 10px; background: var(--bg-subtle); }
.why-q { margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.why-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chip.crit { color: #b91c1c; }
.chip.crit[aria-pressed="true"] { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.why .btn-block { margin-top: 8px; height: 46px; }
.vote-sum { margin: 0 0 4px; font-size: 13.5px; }
.status.alert-soft { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.help-box { display: flex; gap: 12px; margin: 18px 0 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); }
.help-box > .i { width: 22px; height: 22px; color: var(--muted); margin-top: 1px; }
.help-box div { display: grid; gap: 4px; font-size: 14px; }
.help-box span { color: var(--muted); }
.help-box .btn { justify-self: start; margin-top: 6px; height: 38px; }
@media (prefers-color-scheme: dark) {
  .chip.crit { color: #fca5a5; }
  .chip.crit[aria-pressed="true"] { background: #2a0f0f; border-color: #5b1a1a; color: #fca5a5; }
  .status.alert-soft { background: #2a0f0f; border-color: #5b1a1a; color: #fca5a5; }
}

/* ---------- Вікно скарги ---------- */
.dialog {
  width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px);
  border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(10, 10, 12, .45); }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.dialog h2 { font-size: 19px; margin: 0 0 2px; letter-spacing: -.01em; }
.dialog .label { font-weight: 600; font-size: 14px; margin: 8px 0 6px; }
.field { display: grid; gap: 4px; font-size: 13.5px; font-weight: 550; margin: 12px 0 0; }
.field textarea, .field input {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text);
  width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); outline: none;
}
.field textarea:focus, .field input:focus { border-color: var(--border-strong); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 8px; }

/* ---------- Карта ---------- */
.map-controls { position: absolute; right: 12px; top: calc(12px + var(--safe-t)); z-index: 900; display: grid; gap: 8px; }
.fab {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  cursor: pointer; color: var(--text);
}
.fab.active { color: var(--me); }
.fab .i { width: 22px; height: 22px; }

.leaflet-container { font: inherit; background: var(--bg-subtle); }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--bg) 80%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-control-zoom { border: 1px solid var(--border) !important; box-shadow: var(--shadow) !important; border-radius: var(--radius) !important; overflow: hidden; }
.leaflet-control-zoom a { background: var(--bg) !important; color: var(--text) !important; border-color: var(--border) !important; }

/* Маркери: кружок кольору типу з білою іконкою. На дрібному масштабі — просто крапки. */
.mk { background: none; border: 0; }
.mk-in {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c); color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform .15s;
}
.mk-in .i { width: 16px; height: 16px; }
.mk.closed .mk-in { background: #8b8f97; }
.mk.alert .mk-in { box-shadow: 0 0 0 3px #dc2626, 0 1px 3px rgba(0,0,0,.35); }
.mk.dim { opacity: .35; }
.mk.sel .mk-in { transform: scale(1.35); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 2px 6px rgba(0,0,0,.35); }
.z-low .mk-in { width: 12px; height: 12px; border-width: 1.5px; }
.z-low .mk-in .i { display: none; }
.z-low .mk.sel .mk-in { width: 30px; height: 30px; }
.z-low .mk.sel .mk-in .i { display: block; }

.me-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--me); border: 3px solid #fff;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--me) 50%, transparent), 0 1px 4px rgba(0,0,0,.35);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--me) 45%, transparent), 0 1px 4px rgba(0,0,0,.35); }
  70% { box-shadow: 0 0 0 14px transparent, 0 1px 4px rgba(0,0,0,.35); }
  100% { box-shadow: 0 0 0 0 transparent, 0 1px 4px rgba(0,0,0,.35); }
}
@media (prefers-reduced-motion: reduce) { .me-dot { animation: none; } }

.toast {
  position: absolute; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%);
  z-index: 1100; max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--primary); color: var(--primary-text);
  font-size: 14px; box-shadow: var(--shadow-lg);
}

/* ---------- Телефон: карта на весь екран + нижня шторка ---------- */
@media (max-width: 820px) {
  .panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: calc(100% - 56px - var(--safe-t));
    border-right: 0; border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px -12px rgba(0,0,0,.25);
    padding-top: 6px;
    transform: translateY(calc(100% - var(--peek, 250px)));
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    overflow-y: hidden;
  }
  .panel.state-half { transform: translateY(45%); }
  .panel.state-full { transform: translateY(0); overflow-y: auto; }
  .panel.state-half { overflow-y: auto; }
  /* Велика кнопка «Показати список / Показати карту» — зрозуміла без жестів */
  .sheet-toggle {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: calc(100% + 32px); margin: -6px -16px 10px; height: 44px;
    border: 0; border-bottom: 1px solid var(--border); border-radius: 18px 18px 0 0;
    background: var(--bg-subtle); color: var(--text);
    font-size: 15px; font-weight: 600; cursor: pointer;
    position: sticky; top: -6px; z-index: 2;
  }
  .sheet-toggle:active { background: var(--bg-hover); }
  .sheet-toggle .st-chev { width: 20px; height: 20px; transform: rotate(180deg); transition: transform .2s; }
  .sheet-toggle[aria-expanded="true"] .st-chev { transform: rotate(0deg); }
  .brand { margin-bottom: 10px; }
  .map-wrap { position: fixed; inset: 0; }
  .leaflet-control-zoom { display: none; }
  .photos img, .photo-empty { height: 180px; }
  .dialog { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + var(--safe-b)); }
  .leaflet-bottom { bottom: var(--peek, 250px); }
}

/* ---------- Фото: стрілки і перегляд на весь екран ---------- */
.photos-wrap { position: relative; margin: 0 -16px 14px; }
.photos-wrap .photos { margin: 0; }
.photo { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); scroll-snap-align: start; width: 78%; }
.photo:only-child { width: 100%; }
.photos .photo img { width: 100%; max-width: none; display: block; }
.ph-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--text);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-lg);
}
.ph-prev { left: 22px; }
.ph-next { right: 22px; }
.ph-count { position: absolute; left: 24px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 550; }
@media (hover: none) { .ph-nav { display: none; } } /* на телефоні гортають пальцем */

.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(8, 8, 10, .94); }
.lightbox::backdrop { background: rgba(8, 8, 10, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; }
.lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.26); }
.lb-btn .i { width: 24px; height: 24px; }
.lb-close { top: calc(12px + var(--safe-t)); right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; bottom: calc(16px + var(--safe-b)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 550; }

/* На «звичайній» карті маркери трохи виразніші — навколо багато іконок */
.style-standard .mk-in { box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 2px 5px rgba(0,0,0,.45); }

/* ---------- Банери сайту ---------- */
.site-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 12px;
  border-radius: var(--radius); border: 1px solid; font-size: 14px; line-height: 1.4;
}
.site-banner a { font-weight: 600; white-space: nowrap; }
.b-emoji { font-size: 18px; line-height: 1.15; flex: none; }
.b-text { flex: 1; }
.b-close { flex: none; width: 28px; height: 28px; margin: -4px -6px -4px 0; border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.b-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.b-close .i { width: 16px; height: 16px; }
.b-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.b-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.b-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.b-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.b-welcome { background: var(--bg-subtle); border-color: var(--border); color: var(--text); margin: 12px 0 0; }
@media (prefers-color-scheme: dark) {
  .b-info { background: #0f1c38; border-color: #1e3a70; color: #bcd3ff; }
  .b-warn { background: #2a2108; border-color: #5c4712; color: #fcd34d; }
  .b-danger { background: #2a0f0f; border-color: #5b1a1a; color: #fca5a5; }
  .b-success { background: #0f2a1a; border-color: #1f5c37; color: #86efac; }
}

/* ---------- Кнопка «Поради» і поради ---------- */
.brand-actions { display: flex; align-items: center; gap: 4px; }
.tips-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  font-size: 14px; font-weight: 550; color: var(--text);
}
.tips-btn:hover { background: var(--bg-hover); }
.tips-btn .i { width: 18px; height: 18px; color: #e11d48; }
.tips { display: grid; gap: 8px; margin-top: 12px; }
.tip { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.tip summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 600; font-size: 15px; color: var(--text); }
.tip summary::-webkit-details-marker { display: none; }
.tip summary .chev { margin-left: auto; width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.tip[open] summary .chev { transform: rotate(180deg); }
.tip-emoji { font-size: 20px; width: 26px; text-align: center; }
.tip-body { padding: 0 14px 12px 50px; font-size: 14.5px; }
.prose .tip-body p { color: var(--text); margin: 0 0 8px; }
.tip-body ul { margin: 0 0 8px; padding-left: 18px; }
.tip-body li { margin-bottom: 4px; }
.tip-body a[href^="tel:"] { font-weight: 650; white-space: nowrap; }

/* ---------- Контакти ---------- */
.contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.contacts a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.contacts a:hover { background: var(--bg-hover); }
.contacts .i { width: 16px; height: 16px; color: var(--muted); }
.logo { min-width: 0; }
.logo-text { min-width: 0; }
.logo-text strong, .logo-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) {
  .tips-btn { padding: 0 10px; }
  .brand-actions .btn-icon { width: 32px; }
}
@media (max-width: 330px) { .tips-btn span { display: none; } }
