/* Витрина квартир. Телефон — основной экран; на широком экране каталог раскладывается в 2–3 колонки.
   Текст — системным шрифтом; заголовки — Jost (лицензия SIL OFL 1.1, текст в site/licenses/Jost-OFL.txt).
   Файлы Jost лежат на самом сайте: страница не обращается к чужим сайтам.
   Единственный яркий элемент — табличка района (как красные уличные таблички в Праге); остальное спокойное. */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/jost-cyrillic.732ac61fdb.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/jost-latin-ext.312ef2b80c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/jost-latin.7726a5cd6f.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --wash: #f2f4f8;
  --ink: #16203a;
  --muted: #5e6b85;
  --line: #e1e6ef;
  --accent: #2f4bdb;
  --accent-ink: #ffffff;
  --plate: #c22a26;
  --danger: #b3261e;
  --radius: 16px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Jost", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

body.has-cta { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

h1, h2, h3, p, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
h1, h2 { font-family: var(--font-head); font-weight: 600; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Шапка ---------- */

/* Шапка без названия и без отдельной полосы: на том же фоне, что и страница, справа только выбор языка */
.top-row { display: flex; align-items: center; justify-content: flex-end; min-height: 60px; }

.langs { display: flex; flex: none; padding: 3px; background: rgba(22, 32, 58, 0.06); border-radius: 999px; }
.langs a { min-width: 46px; padding: 7px 10px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; }
.langs a[aria-current] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 32, 58, 0.14); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 22px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--paper); color: var(--ink);
  font-weight: 650; font-size: 17px; text-decoration: none; cursor: pointer;
}
/* Основная кнопка тёмно-синяя, как заголовки (анкета приведена к единому стилю, решение владельца 2026-12-05).
   Яркой остаётся только «Хочу посмотреть»: у неё свой фон (.btn-glass). */
.btn-primary { border-color: var(--ink); background: var(--ink); color: #ffffff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Табличка района ---------- */

.plate {
  display: inline-flex; flex-direction: column; align-self: flex-start;
  padding: 7px 12px 6px;
  background: var(--plate); color: #fff;
  border-radius: 4px; outline: 1.5px solid rgba(255, 255, 255, 0.92); outline-offset: -4px;
  font-weight: 700; font-size: 15px; line-height: 1.15; letter-spacing: 0.01em;
}
.plate small { font-size: 12px; font-weight: 600; opacity: 0.94; }

/* ---------- Каталог ---------- */

.catalog { padding-top: 4px; padding-bottom: 40px; }
.catalog-head { text-align: center; }
.catalog-title { max-width: 15em; margin: 0 auto; font-family: var(--font-head); font-size: clamp(31px, 8.4vw, 52px); line-height: 1.08; letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; }
.lead { max-width: 30em; margin: 12px auto 0; font-family: var(--font-head); font-size: clamp(18px, 4.6vw, 21px); line-height: 1.35; color: var(--muted); text-wrap: balance; }

/* Фильтры. На широком экране — одна строка поиска; на телефоне — кнопка «Фильтры», выбор открывается листом снизу
   (скрипт переносит ту же форму в лист и обратно). Без скрипта фильтры не работают, и каталог показывается целиком. */
.filter-toggle {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 24px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  box-shadow: 0 8px 24px rgba(22, 32, 58, 0.07); font-weight: 600; cursor: pointer;
}
.filter-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.filters-slot { display: none; }

.seg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.seg > span { font-size: 13px; font-weight: 600; color: var(--muted); }

.filters-slot .bar {
  display: flex; align-items: stretch; padding: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  box-shadow: 0 10px 30px rgba(22, 32, 58, 0.08);
}
.filters-slot .bar .seg { position: relative; flex: 1 1 0; justify-content: center; gap: 1px; padding: 9px 24px; border-radius: 999px; cursor: pointer; }
.filters-slot .bar .seg + .seg::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.filters-slot .seg select { min-height: 28px; padding: 0 22px 0 0; border: 0; border-radius: 0; background-color: transparent; background-position: right center; font-weight: 500; text-overflow: ellipsis; cursor: pointer; }
.filters-slot .seg select:focus-visible { outline: none; }
.filters-slot .seg:has(select:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }
.filters-slot .seg-sort { flex-direction: row; align-items: center; gap: 8px; width: fit-content; margin: 16px 0 0 auto; padding: 0 4px; border-radius: 8px; }
.filters-slot .seg-sort select { width: auto; }

.filter-sheet-body { padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
.filter-sheet h2 { padding-right: 48px; font-size: 23px; line-height: 1.2; }
.filter-sheet .filters { margin-top: 18px; }
.filter-sheet .bar { display: grid; gap: 14px; }
.filter-sheet .seg-sort { margin-top: 14px; }
/* Кнопка листа — тёмно-синяя, как заголовки, а не яркая синяя (решение владельца 2026-12-04) */
.filter-done { width: 100%; margin-top: 22px; border-color: var(--ink); background: var(--ink); color: #ffffff; font-weight: 600; }
.filter-done:hover { border-color: #2a3654; background: #2a3654; }

.filter-sheet .seg select, .field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background-color: var(--paper); font-size: 16px;
}
.seg select, .field select {
  width: 100%; font-size: 16px;
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235e6b85' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.seg select.is-set { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Ползунок «Всего в месяц»: два бегунка на одной дорожке, «от» и «до» (решения владельца 2026-12-04 и 2026-12-05).
   Над ним подпись: «Любая сумма», «от 20 000 Kč», «до 30 000 Kč» или «20 000 – 30 000 Kč». Левый бегунок слева и правый
   справа — «Любая сумма». Закрашенный отрезок между бегунками задаёт скрипт (--lo и --hi от 0 до 1).
   Вид (решение владельца 2026-12-05, «сделай красиво»): тонкая серая дорожка, бегунки — тёмно-синие точки с белым ободком и мягкой тенью.
   Пока сумма любая, дорожка не закрашена; выбранный отрезок — тёмно-синий, как заголовки, без яркого синего. */
.seg-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 10px; }
.seg-head > span:first-child { white-space: nowrap; }
.seg-value { color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dual { --thumb: 20px; --track: 3px; --lo: 0; --hi: 1; }
.dual-in { position: relative; height: 28px; }
.dual-in::before, .dual-in::after {
  content: ""; position: absolute; top: 50%; height: var(--track); margin-top: calc(var(--track) / -2);
  border-radius: 999px; pointer-events: none;
}
.dual-in::before { left: calc(var(--thumb) / 2); right: calc(var(--thumb) / 2); background: #d9dfea; }
.dual-in::after {
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--lo));
  right: calc(var(--thumb) / 2 + (100% - var(--thumb)) * (1 - var(--hi)));
  background: var(--ink); opacity: 0;
}
.seg-range:has(input.is-set) .dual-in::after { opacity: 1; }
/* Оба ползунка лежат друг на друге; нажимаются только сами бегунки */
.dual input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  background: transparent; appearance: none; -webkit-appearance: none; pointer-events: none;
}
.dual input.on-top { z-index: 1; }
.dual input:focus-visible { outline: none; }
.dual:has(input:disabled) { opacity: 0.45; }
.dual input::-webkit-slider-runnable-track { height: var(--track); background: transparent; }
.dual input::-moz-range-track { height: var(--track); background: transparent; }
.dual input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab; box-sizing: border-box;
  width: var(--thumb); height: var(--thumb); margin-top: calc((var(--track) - var(--thumb)) / 2);
  border: 3px solid var(--paper); border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 1px rgba(22, 32, 58, 0.1), 0 2px 6px rgba(22, 32, 58, 0.28);
}
.dual input::-moz-range-thumb {
  pointer-events: auto; cursor: grab; box-sizing: border-box;
  width: var(--thumb); height: var(--thumb);
  border: 3px solid var(--paper); border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 1px rgba(22, 32, 58, 0.1), 0 2px 6px rgba(22, 32, 58, 0.28);
}
/* Взятый бегунок чуть крупнее, вокруг мягкий ореол */
.dual input:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(22, 32, 58, 0.1), 0 0 0 1px rgba(22, 32, 58, 0.1), 0 2px 6px rgba(22, 32, 58, 0.28); }
.dual input:active::-moz-range-thumb { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(22, 32, 58, 0.1), 0 0 0 1px rgba(22, 32, 58, 0.1), 0 2px 6px rgba(22, 32, 58, 0.28); }
.dual input:disabled::-webkit-slider-thumb { cursor: default; }
.dual input:disabled::-moz-range-thumb { cursor: default; }
.dual input:active::-webkit-slider-thumb { cursor: grabbing; }
.dual input:active::-moz-range-thumb { cursor: grabbing; }
.dual input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(22, 32, 58, 0.28); }
.dual input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(22, 32, 58, 0.28); }
.seg-range:has(input.is-set) .seg-value { color: var(--accent); }
/* В строке поиска ползунку чуть больше места: подпись «20 000 – 30 000 Kč» длиннее, чем у списков */
.filters-slot .bar .seg-range { flex-grow: 1.35; cursor: default; }
/* В листе на телефоне — в рамке, как остальные поля, бегунки крупнее под палец */
.filter-sheet .dual { --thumb: 26px; height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background-color: var(--paper); }
.filter-sheet .dual-in { height: 100%; }
.filter-note { margin-top: 12px; font-size: 15px; color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr; gap: 28px 20px; margin-top: 24px; }

.tile-link { position: relative; isolation: isolate; display: block; color: inherit; text-decoration: none; }
/* Подложка карточки: видна, когда на квартиру наведена мышь или выбрана клавишей Tab. Выходит за края на 10 px,
   поэтому соседние карточки не сдвигаются. */
.tile-link::before {
  content: ""; position: absolute; inset: -10px -10px -14px; z-index: -1;
  border-radius: 24px; background: var(--paper);
  box-shadow: 0 14px 36px rgba(22, 32, 58, 0.12), 0 2px 6px rgba(22, 32, 58, 0.06);
  opacity: 0; pointer-events: none;
}
.tile-link:focus-visible { outline-offset: 12px; border-radius: 24px; }
.tile-link:focus-visible::before { opacity: 1; }
.tile-photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: #dfe4ee; }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-nophoto { display: grid; place-items: center; height: 100%; padding: 16px; color: var(--muted); font-size: 15px; text-align: center; }
.tile-count { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(22, 32, 58, 0.78); color: #fff; font-size: 13px; font-weight: 600; }
.tile-body { position: relative; display: flex; flex-direction: column; padding: 0 4px; }
.tile-body .plate { margin-top: -18px; margin-left: 8px; box-shadow: 0 2px 6px rgba(22, 32, 58, 0.22); }
.tile-price { margin-top: 10px; font-size: 16px; color: var(--muted); }
.tile-price strong { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-price .tile-ask { font-size: 21px; }
.tile-total { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile-title { margin-top: 4px; font-size: 17px; font-weight: 600; }

.empty { margin-top: 28px; padding: 28px 20px; border-radius: var(--radius); background: var(--paper); }
.empty h2 { font-size: 21px; line-height: 1.25; }
.empty p { margin-top: 8px; color: var(--muted); }
.empty .btn { margin-top: 18px; }
.more-row { margin-top: 28px; text-align: center; }
.more-row .btn { width: 100%; max-width: 360px; }

/* ---------- Страница квартиры ---------- */

.listing { padding-top: 12px; padding-bottom: 32px; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.back::before { content: ""; width: 9px; height: 9px; margin-right: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

.gallery { position: relative; margin: 4px -16px 0; background: #dfe4ee; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery-track::-webkit-scrollbar { display: none; }
/* Фото не участвует в расчёте высоты: вертикальный кадр не растягивает всю галерею */
.shot { position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: center; aspect-ratio: 4 / 3; background: #10182c; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.shot.is-broken { display: none; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(22, 32, 58, 0.78); color: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gallery-nav { display: none; position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.94); box-shadow: 0 2px 8px rgba(22, 32, 58, 0.25); cursor: pointer; }
.gallery-nav::before { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); }
.gallery-prev { left: 14px; }
.gallery-prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.gallery-next { right: 14px; }
.gallery-next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.gallery-empty { display: grid; place-items: center; aspect-ratio: 16 / 9; color: var(--muted); }

.listing-head { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.listing-head h1 { font-size: clamp(26px, 6.6vw, 36px); line-height: 1.12; letter-spacing: -0.01em; }

.money { display: grid; gap: 14px; margin-top: 20px; }
.ledger { padding: 18px 18px 16px; border-radius: var(--radius); background: var(--paper); }
.ledger h2 { font-size: 19px; line-height: 1.25; }
.ledger dl { margin-top: 10px; }
.ledger-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ledger-row dt { color: var(--muted); }
.ledger-row dd { flex: none; max-width: 60%; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ledger-soft dd { font-weight: 400; color: var(--muted); }
.ledger-total { border-bottom: 0; padding-top: 12px; }
.ledger-total dt { color: var(--ink); font-weight: 700; }
.ledger-total dd { font-size: 23px; font-weight: 750; letter-spacing: -0.01em; }
.ledger-note { margin-top: 6px; font-size: 14px; color: var(--muted); }

.block { margin-top: 30px; }
.block > h2 { font-size: 21px; line-height: 1.25; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 14px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips li { padding: 6px 13px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 15px; }
.features { margin-top: 12px; columns: 2 220px; column-gap: 28px; }
.features li { position: relative; padding: 4px 0 4px 18px; break-inside: avoid; }
.features li::before { content: ""; position: absolute; left: 2px; top: 0.82em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.prose { max-width: 42em; }
.prose h3 { margin-top: 18px; font-size: 17px; }
.prose p { margin-top: 10px; white-space: pre-line; overflow-wrap: anywhere; }

/* Нижняя панель: цена и главная кнопка под большим пальцем */
.cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(10px); }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cta-price { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.cta-price strong { font-size: 21px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cta-price span { font-size: 13px; color: var(--muted); }
.cta .btn { flex: 1 1 auto; max-width: 320px; }

/* «Хочу посмотреть» — сочная полупрозрачная кнопка-стекло с бликом, чтобы притягивала взгляд (решение владельца
   2026-12-04): светлый блик сверху, глубина снизу, цветная тень; по кнопке время от времени пробегает отблеск
   (только если в системе не выбрано «меньше движения»). */
.btn-glass {
  position: relative; isolation: isolate; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.08) 48%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(120deg, rgba(58, 108, 255, 0.95) 0%, rgba(38, 80, 238, 0.93) 50%, rgba(28, 56, 206, 0.96) 100%);
  color: #ffffff; text-shadow: 0 1px 2px rgba(16, 28, 110, 0.35);
  box-shadow:
    0 10px 26px rgba(47, 75, 219, 0.4), 0 2px 5px rgba(47, 75, 219, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -3px 9px rgba(18, 30, 140, 0.3);
  -webkit-backdrop-filter: blur(8px) saturate(1.8); backdrop-filter: blur(8px) saturate(1.8);
}
.btn-glass::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -50%; z-index: -1; width: 40%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0; pointer-events: none;
}
.btn-glass:active { transform: translateY(1px); }
@keyframes glass-shine {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  28% { transform: translateX(420%); opacity: 0; }
  100% { transform: translateX(420%); opacity: 0; }
}

/* ---------- Анкета ---------- */

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(16, 24, 44, 0.55); }

.sheet { width: 100%; max-width: 560px; max-height: 94dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--paper); overflow: auto; overscroll-behavior: contain; }
.sheet-close, .viewer-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--wash); cursor: pointer; }
.sheet-close::before, .sheet-close::after, .viewer-close::before, .viewer-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; background: var(--ink); border-radius: 2px; }
.sheet-close::before, .viewer-close::before { transform: rotate(45deg); }
.sheet-close::after, .viewer-close::after { transform: rotate(-45deg); }

.request, .success { padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
.request h2, .success h2 { padding-right: 48px; font-size: 23px; line-height: 1.2; letter-spacing: -0.01em; }
.sheet-sub { margin-top: 4px; font-weight: 600; }
.sheet-lead { margin-top: 6px; color: var(--muted); }
.success p { margin-top: 8px; color: var(--muted); }
.success .btn { width: 100%; margin-top: 22px; }

.channels { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.channels legend { width: 100%; padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.channel { position: relative; }
.channel input { position: absolute; opacity: 0; inset: 0; }
.channel span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; }
.channel input:checked + span { border-color: var(--ink); background: var(--ink); color: #ffffff; }
.channel input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-top: 16px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--muted); }
.field small { font-weight: 400; }
.field textarea { min-height: 96px; padding: 12px 14px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a94a8; }
/* Поле в фокусе: тёмная рамка и мягкий ореол вместо яркой синей обводки */
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 32, 58, 0.1);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
/* Пустая дата приглушена, как подсказки в других полях; значок календаря спокойный */
.field input[type="date"] { min-width: 0; }
.field input[type="date"].is-empty { color: #8a94a8; }
.field input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.55; cursor: pointer; }
.field input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 0.85; }
/* Два поля в строку под общей подписью: «с» и «по», «взрослых» и «детей» */
.pair { margin-top: 16px; }
.pair legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pair-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair-cols > div { min-width: 0; }
.pair .field { margin-top: 0; }
.field-sub > span { font-size: 13px; font-weight: 500; }
.field-error { margin-top: 6px; font-size: 14px; color: var(--danger); }


.consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; font-size: 15px; cursor: pointer; }
.consent input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ink); }
.turnstile:not(:empty) { margin-top: 16px; }
.form-error { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #fdeceb; color: #7a1712; font-size: 15px; }
.form-error .link { display: inline-block; margin-top: 8px; }
.sheet-actions { position: sticky; bottom: 0; margin: 18px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.sheet-actions .btn { width: 100%; }

/* ---------- Просмотр фото на весь экран ---------- */

.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #0b1020; }
.viewer-close { background: rgba(255, 255, 255, 0.92); }
.viewer-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track figure { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; }
.viewer-track img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Политика, 404, подвал ---------- */

.policy { padding-top: 12px; padding-bottom: 40px; }
.policy h1 { font-size: clamp(25px, 6.4vw, 34px); line-height: 1.15; letter-spacing: -0.02em; }
.policy h2 { margin-top: 26px; font-size: 19px; }
.policy-date { color: var(--muted); }
.policy-draft { padding: 12px 14px; border-radius: 12px; background: #fff4d6; color: #5c4300; }

.notfound { padding-top: 40px; padding-bottom: 48px; }
.notfound section + section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.notfound h1 { font-size: clamp(25px, 6.4vw, 34px); line-height: 1.15; letter-spacing: -0.02em; }
.notfound p { margin-top: 10px; color: var(--muted); }
.notfound .btn { margin-top: 8px; }

.foot { margin-top: 24px; padding: 28px 0 32px; background: var(--paper); border-top: 1px solid var(--line); }
.foot-title { font-size: 19px; }
.foot-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Широкий экран ---------- */

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .money { grid-template-columns: 1fr 1fr; align-items: start; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .sheet { margin: auto; border-radius: 22px; }
}

@media (min-width: 720px) {
  .filter-toggle { display: none; }
  .filters-slot { display: block; max-width: 860px; margin: 30px auto 0; }
}

@media (min-width: 960px) {
  .wrap { padding: 0 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .gallery { margin: 4px 0 0; border-radius: var(--radius); overflow: hidden; }
  .shot { aspect-ratio: 16 / 10; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

@media (hover: hover) and (pointer: fine) {
  .filters-slot .bar .seg:hover { background: var(--wash); }
  .filters-slot .bar .seg:hover::before, .filters-slot .bar .seg:hover + .seg::before { opacity: 0; }
  .gallery-nav { display: block; }
  .tile-link:hover::before { opacity: 1; }
  .tile-link:hover .tile-photo img { transform: scale(1.04); }
  .btn-glass:hover { filter: brightness(1.07) saturate(1.1); }
  .btn-primary:not(.btn-glass):hover { border-color: #2a3654; background: #2a3654; }
  .dual input:not(:disabled):not(:active):hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(22, 32, 58, 0.08), 0 0 0 1px rgba(22, 32, 58, 0.1), 0 2px 6px rgba(22, 32, 58, 0.28); }
  .dual input:not(:disabled):not(:active):hover::-moz-range-thumb { box-shadow: 0 0 0 6px rgba(22, 32, 58, 0.08), 0 0 0 1px rgba(22, 32, 58, 0.1), 0 2px 6px rgba(22, 32, 58, 0.28); }
}

@media (prefers-reduced-motion: no-preference) {
  .gallery-track, .viewer-track { scroll-behavior: smooth; }
  .tile-link::before { transition: opacity 0.18s ease; }
  .tile-photo img { transition: transform 0.4s ease; }
  .btn-glass { transition: filter 0.18s ease; }
  .dual-in::after { transition: opacity 0.2s ease; }
  .dual input::-webkit-slider-thumb { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .dual input::-moz-range-thumb { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .btn-glass::after { animation: glass-shine 5s ease-in-out 1s infinite; }
}

/* ---------- Выпадающие списки на компьютере ----------
   Обычный список Windows не оформляется. Где браузер это умеет (Chrome и Edge с 2025 года), список фильтров и анкеты
   открывается полупрозрачной скруглённой карточкой с галочкой у выбранного, как на телефоне. Остальные браузеры
   показывают свой обычный список. На телефоне и планшете (палец вместо мыши) остаётся родной список системы. */
@supports (appearance: base-select) {
  @media (hover: hover) and (pointer: fine) {
    .seg select, .field select, .seg select::picker(select), .field select::picker(select) { appearance: base-select; }
    .seg select::picker-icon, .field select::picker-icon { display: none; }
    .seg select, .field select { display: flex; align-items: center; }
    .filters-slot .bar .seg:has(select:open) { background: var(--wash); }
    .filters-slot .bar .seg:has(select:open)::before, .filters-slot .bar .seg:has(select:open) + .seg::before { opacity: 0; }

    .seg select::picker(select), .field select::picker(select) {
      min-width: 240px;
      min-width: max(anchor-size(width), 240px);
      /* Не выше свободного места до края окна (список встаёт под полем или, если места нет, над ним) */
      max-height: min(540px, 75vh);
      max-height: min(540px, calc(100% - 24px));
      margin: 10px 0;
      padding: 6px;
      border: 1px solid rgba(22, 32, 58, 0.1);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.8);
      -webkit-backdrop-filter: blur(20px) saturate(1.7);
      backdrop-filter: blur(20px) saturate(1.7);
      box-shadow: 0 20px 48px rgba(22, 32, 58, 0.2), 0 2px 8px rgba(22, 32, 58, 0.08);
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-width: thin;
      scrollbar-color: rgba(22, 32, 58, 0.22) transparent;
    }
    .filters-slot .seg select::picker(select) { margin-top: 20px; }

    .seg option, .field option {
      display: flex; align-items: center; gap: 10px;
      min-height: 38px; padding: 7px 16px 7px 12px; border-radius: 12px;
      background: transparent; color: var(--ink); font-size: 16px; font-weight: 400; white-space: nowrap; cursor: pointer;
    }
    .seg option::checkmark, .field option::checkmark { width: 16px; color: var(--accent); font-weight: 700; }
    .seg option:checked, .field option:checked { font-weight: 600; }
    .seg option:hover, .field option:hover, .seg option:focus-visible, .field option:focus-visible { background: rgba(47, 75, 219, 0.09); outline: none; }
    .seg option:checked:hover, .field option:checked:hover { background: rgba(47, 75, 219, 0.12); }
  }
  @media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .seg select::picker(select), .field select::picker(select) { transition: opacity 0.14s ease, translate 0.14s ease; }
    @starting-style {
      .seg select:open::picker(select), .field select:open::picker(select) { opacity: 0; translate: 0 -6px; }
    }
  }
}
