/* Reference lock: approved concept A; concept B is the map view of the same search. */
.rental-page {
  --bg: #fff; --surface: #fff; --surface-strong: #fff; --surface-soft: #f4f5f7;
  --ink: #172126; --muted: #52616b; --soft-text: #52616b;
  --line: #e0e4e9; --line-strong: #b5bdc9;
  --accent: #244de0; --accent-strong: #193bb5; --accent-soft: #eef2ff;
  --coral: #244de0; --coral-soft: #eef2ff;
  --shadow: 0 4px 8px #1721261a; --shadow-tight: 0 2px 6px #17212614;
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 400; background: #fff;
}
.rental-page button,.rental-page a,.rental-page input,.rental-page select { -webkit-tap-highlight-color: transparent; }
.rental-page :is(button,a,input,select,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rental-page button { cursor: pointer; }
.mobile-search-chrome,.mobile-search-content { display: contents; }
.mobile-search-bar,.mobile-search-done { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 16px; padding: 12px; background: #fff; z-index: 1100; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.rental-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
.site-header { display: flex; align-items: center; flex: 0 0 72px; gap: 40px; padding: 0 32px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--ink); text-decoration: none; font-size: 26px; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.wordmark-logo { display: block; width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.wordmark-name { color: var(--ink); }
.wordmark-name { color: var(--accent); }
.wordmark-name b { color: #b52e36; font-weight: inherit; }
.primary-nav { align-self: stretch; display: flex; align-items: stretch; gap: 28px; }
.primary-nav a,.primary-nav button { display: inline-flex; align-items: center; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 0; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.primary-nav .nav-current,.primary-nav .active { color: var(--accent); border-bottom-color: var(--accent); }
.primary-nav :is(a,button):hover { color: var(--ink); }
.primary-nav .nav-current.is-muted { color: var(--muted); border-bottom-color: transparent; }
.header-caption { margin-left: auto; font-size: 12px; color: var(--muted); }
.rental-page .filters { position: relative; flex: 0 0 auto; padding: 16px 32px; gap: 0; background: #fff; border-bottom: 1px solid var(--line); z-index: 900; }
.search-toolbar { display: flex; align-items: center; gap: 12px; }
.rental-page .search-field { display: flex; align-items: center; gap: 10px; padding: 0 12px; width: min(330px,28vw); min-width: 180px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: none; }
.rental-page .search-field input { min-width: 0; width: 100%; border: 0; padding: 0; background: transparent; font-size: 13px; color: var(--ink); outline-offset: 5px; }
.rental-page input::placeholder { color: var(--muted); opacity: 1; }
.ui-icon { display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; background: currentColor; mask-position: center; mask-repeat: no-repeat; mask-size: contain; }
.icon-search { mask-image: url('icons/search.svg'); }
.icon-map { mask-image: url('icons/map.svg'); }
.icon-grid { mask-image: url('icons/layout-grid.svg'); }
.icon-filters { mask-image: url('icons/adjustments-horizontal.svg'); }
.rental-page .segmented { display: flex; gap: 2px; border: 0; padding: 3px; background: #f3f5f7; border-radius: 6px; width: auto; }
.rental-page .segment { flex: 1 0 auto; min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--muted); border: 0; border-radius: 4px; background: transparent; box-shadow: none; }
.rental-page .segment.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #17212618; }
.rental-page .filters-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; background: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.rental-page .filters-toggle[aria-expanded=true] { color: var(--accent); border-color: var(--accent); }
.view-switch { display: flex; gap: 2px; margin-left: auto; padding: 3px; background: #f3f5f7; border-radius: 6px; }
.view-switch button { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.view-switch button.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px #17212618; }
.filter-shortcut { min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; background: #fff; color: var(--ink); font-size: 13px; }
.rental-page .filters-body { display: none; position: absolute; top: calc(100% + 8px); right: 32px; width: min(680px,calc(100vw - 64px)); padding: 24px; max-height: calc(100dvh - 180px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 4px 8px #17212614; transform: none; opacity: 1; }
.rental-page .filters-expanded .filters-body { display: block; }
.filter-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.filter-heading h2 { font-size: 18px; margin: 0; font-weight: 600; }
.text-button { border: 0; padding: 10px 0; min-height: 44px; color: var(--accent); background: transparent; font-weight: 500; }
.rental-page .filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.rental-page .filter-grid label { display: flex; flex-direction: column; gap: 8px; font-weight: 400; font-size: 12px; color: var(--muted); padding: 0; background: transparent; border: 0; border-radius: 0; }
.rental-page .filter-grid :is(input,select) { border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; width: 100%; min-width: 0; height: 44px; font-size: 14px; font-weight: 400; color: var(--ink); padding: 0 10px; }
.payment-settings { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.field-label { color: var(--muted); font-size: 12px; }
.rental-page .expat-filters { margin-top: 24px; padding-top: 16px; }
.rental-page .expat-filters summary { font-weight: 600; padding: 10px 0; }
.filter-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 20px; }
.filter-bottom a { color: var(--muted); font-size: 12px; }
.rental-page .active-filter-bar { margin-top: 12px; padding: 0; gap: 10px; align-items: center; }
.rental-page [hidden] { display: none !important; }
.rental-page .filter-token { font-size: 12px; font-weight: 400; min-height: 30px; padding: 5px 9px; border-radius: 4px; background: var(--accent-soft); border: 0; color: var(--accent-strong); }
.rental-page .reset-all { color: var(--muted); font-weight: 400; min-height: 32px; }
.rental-page .app-shell { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); flex: 1; height: auto; min-height: 0; overflow: hidden; padding: 0; }
.rental-page .sidebar { display: flex; flex-direction: column; height: auto; min-height: 0; border-right: 0; overflow: auto; background: #fff; }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px 20px 32px; }
.results-header h1 { font-size: 25px; font-weight: 650; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.results-header p { color: var(--muted); font-size: 12px; margin: 7px 0 0; }
.rental-page .sort-control { display: block; flex-shrink: 0; }
.rental-page .sort-control select { width: 145px; max-width: 100%; min-height: 40px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 400; border: 0; padding: 0 20px 0 4px; }
.rental-page .list-panel { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; gap: 26px 20px; padding: 0 28px 36px 32px; overflow: visible; }
.rental-page .listing-card { min-width: 0; align-self: start; margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; transform: none; content-visibility: visible; contain-intrinsic-size: none; }
.rental-page .listing-card:is(:hover,.active) { background: #fff; transform: none; box-shadow: none; }
.loading-card>div { aspect-ratio: 4/3; background: #f0f2f5; border-radius: 8px; }
.loading-card>span { display: block; width: 45%; height: 14px; margin-top: 12px; background: #f0f2f5; border-radius: 3px; }
.loading-card>span:last-child { width: 70%; height: 10px; margin-top: 9px; }
.rental-page .listing-card.active .thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
.rental-page .listing-card:has(.inline-detail) { grid-column: 1 / -1; }
.rental-page .listing-summary { display: block; position: relative; }
.rental-page .thumb { width: 100%; height: auto; aspect-ratio: 4/3; border-radius: 8px; background: #f0f2f5; }
.rental-page .thumb::after { content: 'Фотографии не загружены'; display: grid; place-items: center; inset: 0; font-size: 13px; font-weight: 400; color: var(--muted); }
.rental-page .thumb:has(img:not(.image-missing))::after,.rental-page .thumb:has(.thumb-note)::after,.rental-page .thumb:has(.photo-unavailable)::after { display: none; }
.rental-page .photo-unavailable { background: #f0f2f5; color: var(--muted); font-weight: 400; }
.rental-page .thumb-note { inset: 0; display: grid; place-items: center; font-weight: 400; color: var(--muted); }
.rental-page .listing-body { padding-top: 10px; }
.listing-price { font-size: 20px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.listing-price-line { display:flex; align-items:baseline; justify-content:space-between; gap:8px; min-width:0; }
.listing-number { flex-shrink:0; color:var(--muted); font-size:13px; font-weight:400; font-variant-numeric:tabular-nums; }
.reader-number { margin:4px 0 12px; color:var(--muted); font-size:14px; font-variant-numeric:tabular-nums; }
.listing-address { margin: 3px 0 0; font-size: 14px; font-weight: 400; line-height: 1.4; }
.listing-specs,.listing-origin,.listing-location { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.listing-specs { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.new-listing { color: var(--accent); }
.listing-origin { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rental-page .save-button { position: absolute; z-index: 2; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #ffffffed; color: var(--ink); font-size: 0; }
.save-button::before { content: ''; width: 23px; height: 23px; background: currentColor; mask: url('icons/heart.svg') center/contain no-repeat; }
.rental-page .save-button.active { color: var(--accent); background: #fff; }
.save-button.active::before { mask-image: url('icons/heart-filled.svg'); }
.rental-page .save-button:hover { color: var(--accent); }
.rental-page .listing-badges { margin: 10px 0 0; }
.rental-page .data-badge,.rental-page .fact { font-weight: 400; border-radius: 4px; padding: 3px 6px; }
.rental-page .facts { margin: 12px 0; }
.rental-page .price { color: var(--ink); font-weight: 650; }
.rental-page .empty-state { grid-column: 1 / -1; padding: 48px 20px; line-height: 1.6; border: 0; background: #f7f8fa; border-radius: 8px; font-weight: 400; }
.rental-page #listingNotice { margin: 0 32px 16px; }
.rental-page .map-panel { margin: 20px 24px 24px 0; border-radius: 8px; overflow: hidden; background: #f0f3f5; grid-row: auto; }
.rental-page .zoom-toolbar { top: 16px; left: auto; right: 16px; gap: 1px; }
.rental-page .icon-button { width: 40px; height: 40px; border: 0; border-radius: 5px; font-weight: 500; box-shadow: 0 2px 6px #1721261a; }
.rental-page .leaflet-control-zoom { display: none; }
.rental-page .leaflet-container { font-family: inherit; }
.rental-page .leaflet-tile-pane { filter: saturate(.22) contrast(.92) brightness(1.06); }
.rental-page .marker-price,.rental-page .marker-cluster { background: #fff; color: var(--ink); border: 0; box-shadow: 0 2px 5px #17212630; font-weight: 600; }
.rental-page .marker-price.selected,.rental-page .marker-price.active,.rental-page .marker-cluster.active { background: var(--accent); color: #fff; }
.rental-page .marker-cluster strong,.rental-page .marker-cluster span { color: var(--ink); }
.rental-page .detail-sheet { bottom: 16px; right: 16px; width: min(380px,calc(100% - 32px)); max-height: calc(100% - 32px); border: 0; border-radius: 8px; box-shadow: 0 3px 8px #17212630; }
.rental-page .detail-image { border-radius: 8px 8px 0 0; }
.rental-page .detail-gallery { background: #f4f5f7; }
.rental-page .detail-title { font-size: 18px; line-height: 1.4; font-weight: 600; }
.rental-page .action-link { font-weight: 500; border-radius: 5px; min-height: 44px; }
.rental-page .inline-detail { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.inline-detail-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.rental-page .inline-detail .detail-gallery { max-width: 650px; }
.rental-page .description { font-weight: 400; }
.rental-page .mobile-map-button { display: none; }
.map-unavailable { position: absolute; inset: 25% 16px auto; text-align: center; background: #fff; padding: 24px; border-radius: 8px; z-index: 600; line-height: 1.7; }
.rental-page.show-map .app-shell { grid-template-columns: minmax(360px,.8fr) minmax(0,1.65fr); }
.rental-page.show-map .list-panel { display: flex; flex-direction: column; gap: 0; padding-right: 24px; }
.rental-page.show-map .listing-card { width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rental-page.show-map .listing-card:first-child { padding-top: 0; }
.rental-page.show-map .listing-summary { display: grid; grid-template-columns: minmax(120px,40%) minmax(0,1fr); gap: 14px; }
.rental-page.show-map .thumb { aspect-ratio: 4/3; }
.rental-page.show-map .listing-body { padding: 0; }
.rental-page.show-map .listing-price { font-size: 18px; padding-right: 24px; }
.rental-page.show-map .save-button { width: 32px; height: 32px; top: auto; bottom: 8px; right: 8px; }
.rental-page.show-map .listing-badges { display: none; }
.rental-page.show-map .results-header { flex-direction: column; align-items: flex-start; gap: 8px; }
.rental-page.show-map .map-panel { margin-left: 0; }
@media(min-width:1600px) { .rental-page .app-shell { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); }.rental-page .list-panel { grid-template-columns: repeat(3,minmax(0,1fr)); }.rental-page.show-map .list-panel { display: flex; } }
@media(max-width:1100px) and (min-width:861px) { .header-caption { display: none; }.site-header { gap: 32px; }.search-toolbar { flex-wrap: wrap; }.rental-page .search-field { flex: 1; }.rental-page .app-shell { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }.results-header { flex-wrap: wrap; }.rental-page .list-panel { gap: 24px 16px; padding-left: 24px; padding-right: 20px; }.results-header { padding-left: 24px; }.listing-price { font-size: 18px; } }
@media(max-width:1350px) { .filter-shortcut { display: none; } }
@media(max-width:860px) {
  .site-header { flex-basis: 62px; padding: 0 16px; gap: 20px; justify-content: space-between; }
  .wordmark { font-size: 23px; }
  .primary-nav { gap: 18px; }
  .primary-nav a:not(.nav-current),.primary-nav .nav-current { display: none; }
  .primary-nav button { font-size: 13px; }
  .header-caption { display: none; }
  .rental-page .filters { padding: 10px 16px 12px; }
  .search-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .rental-page .search-field { width: 100%; min-width: 0; grid-column: 1 / -1; height: 44px; }
  .rental-page .city-selector { min-width: 0; overflow-x: auto; padding: 0; background: transparent; gap: 14px; border-radius: 0; }
  .rental-page .city-selector .segment { flex: 0 0 auto; padding: 0; min-height: 44px; background: transparent; border-radius: 0; border-bottom: 2px solid transparent; font-size: 12px; }
  .rental-page .city-selector .active { box-shadow: none; border-bottom-color: var(--accent); color: var(--accent); }
  .rental-page .filters-toggle { padding: 0 10px; font-size: 12px; gap: 6px; }
  .rental-page .filters-toggle .ui-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .view-switch { display: none; }
  .rental-page .filters-body,.rental-page .filters.filters-expanded .filters-body { top: calc(100% + 1px); right: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 210px); padding: 20px 16px; transform: none; opacity: 1; }
  .rental-page .filters.filters-collapsed .filters-body { display: none; }
  .rental-page .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rental-page .filter-grid label:last-child { grid-column: auto; }
  .rental-page .budget-fields label:last-child { grid-column: 1/-1; }
  .payment-settings { gap: 10px; }
  .field-label { flex-basis: 100%; }
  .rental-page .app-shell,.rental-page.show-map .app-shell { display: block; flex: 1; min-height: 0; height: auto; }
  .rental-page .sidebar,.rental-page.show-list .sidebar { display: flex; height: 100%; grid-row: auto; }
  .rental-page.show-map .sidebar { display: none; }
  .results-header { padding: 20px 16px 18px; gap: 8px; align-items: flex-start; }
  .results-header h1 { font-size: 22px; }
  .rental-page .sort-control select { width: 118px; font-size: 12px; min-height: 44px; }
  .rental-page .filter-token,.rental-page .reset-all,.rental-page .segment { min-height: 44px; }
  .rental-page .list-panel { grid-template-columns: 1fr; gap: 28px; padding: 0 16px calc(90px + env(safe-area-inset-bottom)); }
  .rental-page .thumb { aspect-ratio: 4/3; }
  .listing-price { font-size: 21px; }
  .listing-address { font-size: 15px; }
  .listing-specs,.listing-origin,.listing-location { font-size: 13px; }
  .rental-page .map-panel { display: none; margin: 0; border-radius: 0; height: 100%; }
  .rental-page.show-map .map-panel { display: block; }
  .rental-page .mobile-map-button { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; background: var(--ink); color: #fff; border: 0; border-radius: 24px; font-size: 14px; font-weight: 500; box-shadow: 0 3px 8px #17212625; z-index: 850; white-space: nowrap; }
  .rental-page .zoom-toolbar { top: auto; bottom: 24px; right: 16px; left: auto; }
  .rental-page .detail-sheet { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); right: 8px; width: calc(100% - 16px); max-height: 52dvh; border-radius: 12px; z-index: 700; }
  .rental-page .detail-sheet::before { content: ''; position: absolute; top: 7px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 2px; background: #fff; z-index: 3; box-shadow: 0 1px 3px #17212640; }
  .rental-page .detail-sheet .detail-gallery { flex-shrink: 1; min-height: 100px; max-height: 165px; overflow-y: auto; padding: 0; }
  .rental-page .detail-sheet .detail-image { aspect-ratio: 2.2; }
  .rental-page .detail-sheet .detail-thumbs { display: none; }
  .rental-page .detail-content { padding: 14px 16px 18px; }
  .rental-page .detail-actions { background: #fff; padding-bottom: 4px; }
  .rental-page .detail-head .price { font-size: 20px; }
  .rental-page .detail-close { width: 44px; height: 44px; }
  .rental-page .detail-close::before,.rental-page .detail-close::after { top: 21px; left: 13px; }
  .rental-page #listingNotice { margin: 0 16px 16px; }
}
@media(max-width:370px) { .rental-page .city-selector { gap: 10px; }.rental-page .city-selector .segment { font-size: 11px; }.rental-page .filters-toggle { font-size: 11px; padding: 0 8px; }.results-header { flex-wrap: wrap; }.results-header h1 { font-size: 21px; } }
@media(min-width:600px) and (max-width:860px) { .rental-page .list-panel { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; } }

/* Apartment reader: one predictable dialog for catalogue and map. */
#listingDialog { width: min(1120px,calc(100vw - 64px)); height: min(800px,calc(100dvh - 64px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 12px; background: #fff; color: var(--ink); overflow: hidden; }
#listingDialog::backdrop { background: #17212699; }
#listingDialog .detail-sheet { position: static; display: flex; flex-direction: column; width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; }
#listingDialog .detail-sheet::before { display: none; }
.reader-header { display: flex; justify-content: space-between; align-items: center; padding: 0 24px; height: 60px; flex-shrink: 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.reader-close { display: flex; align-items: center; gap: 12px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 13px; padding: 0 8px; }
.reader-close span { font-size: 26px; font-weight: 400; }
.reader-layout { display: grid; grid-template-columns: 55% 45%; flex: 1; min-height: 0; }
.reader-media { background: #f3f4f6; min-width: 0; min-height: 0; padding: 20px; }
.reader-gallery { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 16px; }
.reader-photo-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; overflow: hidden; }
.reader-image { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.reader-photo-enlarge { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.photo-expand-hint { position: absolute; left: 12px; bottom: 12px; padding: 7px 10px; background: #172126cc; color: #fff; border-radius: 4px; font-size: 13px; opacity: 0; }
.reader-photo-enlarge:hover .photo-expand-hint,.reader-photo-enlarge:focus-visible .photo-expand-hint { opacity: 1; }
.reader-photo-stage .photo-unavailable { display: grid; place-items: center; }
.photo-arrow { position: absolute; top: calc(50% - 24px); display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 30px; box-shadow: 0 2px 6px #17212625; }
.photo-prev { left: 8px; }.photo-next { right: 8px; }
.photo-counter { position: absolute; bottom: 12px; right: 12px; padding: 5px 10px; border-radius: 4px; background: #172126; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
#listingDialog .detail-thumbs { display: flex; overflow-x: auto; padding: 3px; flex-shrink: 0; gap: 8px; }
#listingDialog .thumb-button { flex-shrink: 0; width: 76px; height: 58px; border-radius: 5px; }
#listingDialog .detail-thumb { width: 72px; height: 54px; border-radius: 3px; }
.reader-info { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#listingDialog .detail-content { padding: 28px 28px 32px; overflow-y: auto; flex: 1; min-height: 0; }
.reader-price { font-size: 28px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
#listingDialogTitle { font-size: 21px; line-height: 1.4; font-weight: 600; margin: 10px 0 0; text-wrap: balance; }
.reader-date { color: var(--muted); font-size: 12px; margin: 16px 0 0; }
#listingDialogTitle + .reader-terms { margin-top: 20px; }
.reader-terms { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 24px; margin: 0 0 24px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reader-terms dt { font-size: 12px; color: var(--muted); }
.reader-terms dd { margin: 5px 0 0; font-size: 15px; font-weight: 500; }
.reader-location-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.reader-section-title { font-size: 16px; font-weight: 600; margin: 24px 0 12px; }
#listingDialog .description { padding: 0; margin: 0; line-height: 1.65; font-size: 14px; overflow-wrap: anywhere; }
.reader-extra { margin-top: 24px; }.reader-extra>summary { cursor: pointer; font-size: 13px; padding: 12px 0; }
.reader-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-top: 1px solid var(--line); padding: 16px 24px; background: #fff; }
.reader-actions>.action-link { flex: 1; white-space: nowrap; text-align: center; padding: 12px; }
.reader-actions>.text-button { font-size: 12px; padding: 6px 0; min-height: 32px; }
.reader-no-photo { display: grid; place-items: center; height: 100%; padding: 32px; color: var(--muted); text-align: center; line-height: 1.65; }
.rental-page .leaflet-tile-pane { filter: saturate(.5) contrast(.9) brightness(1.08); }
.rental-page .marker-price { width: 68px; background: #172126; color: #fff; border: 2px solid #fff; height: 32px; box-shadow: 0 2px 5px #17212640; }
.rental-page .marker-price.selected { background: #244de0; }
.rental-page .marker-cluster { background: #244de0; border: 2px solid #fff; width: 40px; min-width: 40px; height: 40px; padding: 0; border-radius: 50%; box-shadow: 0 2px 5px #17212640; }
.rental-page .marker-cluster strong { color: #fff; font-size: 14px; font-weight: 600; }
@media(max-width:860px) {
  #listingDialog { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
  .reader-header { padding: env(safe-area-inset-top) 16px 0; height: calc(56px + env(safe-area-inset-top)); font-size: 13px; }
  .reader-layout { display: block; overflow-y: auto; padding-bottom: calc(122px + env(safe-area-inset-bottom)); }
  .reader-media { padding: 12px; height: auto; }
  .reader-gallery { gap: 10px; }
  .reader-photo-stage { height: min(44dvh,420px); flex: none; }
  #listingDialog .detail-content { overflow: visible; padding: 24px 20px; }
  .reader-price { font-size: 27px; }
  .reader-actions { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px calc(8px + env(safe-area-inset-bottom)); gap: 0 20px; z-index: 3; }
  .reader-actions>.text-button { min-height: 40px; }
  .reader-actions>.action-link { flex-basis: calc(50% - 20px); }
  .reader-no-photo { min-height: 200px; padding: 24px; }
}

/* Full-size photographs: native modal above the apartment reader. */
#photoDialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #101418; color: #fff; overflow: hidden; }
#photoDialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
#photoDialog::backdrop { background: #101418; }
.photo-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 20px 12px; }
.photo-viewer-counter { font-size: 16px; font-variant-numeric: tabular-nums; }
.photo-viewer-toolbar>div { display: flex; gap: 12px; }
#photoDialog button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff55; border-radius: 50%; background: #101418dd; color: #fff; font-size: 28px; cursor: pointer; }
#photoDialog button:hover { background: #39434d; }
#photoDialog button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.photo-viewer-stage { min-height: 0; overflow: auto; padding: 0 64px calc(20px + env(safe-area-inset-bottom)); }
.viewer-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-viewer-stage.zoomed { padding: 0; }
.photo-viewer-stage.zoomed .viewer-image { width: 200%; height: 200%; max-width: none; }
#photoDialog :is(.viewer-prev,.viewer-next) { position: absolute; top: calc(50% - 22px); }
.viewer-prev { left: 16px; }.viewer-next { right: 16px; }
@media(max-width:860px) { .photo-viewer-stage { padding-left: 0; padding-right: 0; }.photo-viewer-toolbar { padding-left: 16px; padding-right: 16px; }.viewer-prev { left: 8px; }.viewer-next { right: 8px; }.photo-expand-hint { opacity: 1; font-size: 12px; } }

/* Stable selection and readable type. */
.rental-page .save-button { padding: 0; line-height: 1; }
.rental-page .save-button::before { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 24px; height: 24px; }
.rental-page.show-map .save-button { width: 40px; height: 40px; }
.rental-page.show-map .list-panel { gap: 10px; padding-left: 20px; padding-right: 20px; }
.rental-page.show-map .listing-card,.rental-page.show-map .listing-card:first-child { padding: 12px; border: 1px solid transparent; border-radius: 8px; }
.rental-page.show-map .listing-card.active { background: var(--accent-soft); border-color: var(--accent); }
.rental-page.show-map .listing-card.active .thumb { outline: none; }
.rental-page.show-map .listing-card:hover:not(.active) { background: #f5f6f8; }
.rental-page .listing-price { font-size: 23px; }
.rental-page.show-map .listing-price { font-size: 21px; padding-right: 0; }
.rental-page .listing-address { font-size: 17px; }
.rental-page :is(.listing-specs,.listing-origin,.listing-location) { font-size: 15px; line-height: 1.5; }
.rental-page :is(.search-field input,.segment,.filters-toggle,.filter-shortcut,.view-switch button) { font-size: 15px; }
.rental-page .primary-nav :is(a,button) { font-size: 16px; }
.rental-page .filter-grid label,.rental-page .field-label { font-size: 14px; }
.rental-page .filter-grid :is(input,select) { font-size: 16px; }
.rental-page .results-header p { font-size: 14px; }
.rental-page .sort-control select { width: 170px; font-size: 14px; }
.rental-page .filter-token { font-size: 14px; }
.rental-page .reader-price { font-size: 31px; }
.rental-page #listingDialogTitle { font-size: 24px; }
.rental-page #listingDialog .description { font-size: 17px; }
.rental-page :is(.reader-date,.reader-terms dt,.reader-location-note,.reader-extra>summary,.reader-actions>.text-button) { font-size: 15px; }
.rental-page .reader-terms dd { font-size: 18px; }
.rental-page .reader-section-title { font-size: 19px; }
.rental-page .reader-actions>.action-link { font-size: 16px; }
@media(max-width:860px) {
  .rental-page .city-selector { gap: 12px; }
  .rental-page .city-selector .segment { font-size: 14px; }
  .rental-page .filters-toggle { font-size: 14px; }
  .rental-page .sort-control select { width: 150px; }
  .rental-page .results-header { flex-wrap: wrap; }
  .rental-page .reader-actions { gap: 0 16px; }
  .rental-page .reader-actions>.action-link { font-size: 14px; }
}
@media(max-width:420px) {
  .rental-page .search-toolbar { grid-template-columns: 1fr; }
  .rental-page .city-selector { grid-column: 1; }
  .rental-page .filters-toggle { grid-column: 1; justify-self: start; }
  .rental-page .city-selector .segment { font-size: 15px; }
}

/* Reader controls use a single geometry and type style. */
.icon-close { mask-image: url('icons/x.svg'); }
.icon-heart { mask-image: url('icons/heart.svg'); }
.icon-share { mask-image: url('icons/share.svg'); }
.reader-tools { position: absolute; top: 36px; left: 36px; display: flex; gap: 8px; z-index: 4; }
#listingDialog .reader-icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 2px 5px #17212618; }
#listingDialog .reader-icon-button .ui-icon { width: 22px; height: 22px; }
#listingDialog .reader-icon-button:hover { background: #f3f5f7; }
#listingDialog .reader-icon-button[aria-pressed=true] { color: var(--accent); }
#listingDialog .reader-icon-button[aria-pressed=true] .icon-heart { mask-image: url('icons/heart-filled.svg'); }
#listingDialog .share-complete { color: var(--accent); }
.rental-page .marker-cluster.selected { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100px; min-width: 100px; height: 36px; border-radius: 18px; outline: 2px solid var(--accent); outline-offset: 2px; }
.rental-page .marker-cluster .marker-group-count { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--accent); font-size: 12px; font-weight: 600; }
.rental-page .marker-price.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.map-group-list { max-height: 260px; overflow: auto; min-width: 200px; }
.map-group-option { display: block; width: 100%; text-align: left; margin: 6px 0; padding: 12px; border: 1px solid transparent; border-radius: 6px; background: var(--surface-soft); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.map-group-option:hover { border-color: var(--line-strong); }
.map-group-option.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.map-location-note { font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 30ch; }
#listingDialog .reader-close { position: absolute; z-index: 4; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; gap: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); }
#listingDialog .reader-close .ui-icon { width: 22px; height: 22px; font-size: 0; }
#listingDialog .reader-close:hover { background: #f3f5f7; }
#listingDialog .reader-media { padding: 24px; background: #fff; border-right: 1px solid var(--line); }
#listingDialog .reader-gallery { justify-content: flex-start; }
#listingDialog .reader-photo-stage { flex: 0 1 auto; width: 100%; aspect-ratio: 4/3; max-height: calc(100% - 80px); border-radius: 8px; background: #f3f4f6; }
#listingDialog .reader-image { position: absolute; inset: 0; }
#listingDialog .detail-content { padding: 28px 28px 32px; }
#listingDialog .reader-price { padding-right: 40px; }
#listingDialog .reader-actions { display: flex; flex-direction: column; align-items: stretch; flex-shrink: 0; padding: 16px 24px; gap: 8px; }
.reader-main-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#listingDialog .reader-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; min-height: 48px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap; box-shadow: none; cursor: pointer; }
.reader-main-actions:has([data-reader-map][hidden]) { grid-template-columns: 1fr; }
#listingDialog .reader-button:hover { background: #f3f5f7; border-color: #8793a3; }
#listingDialog .reader-button-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
#listingDialog .reader-button-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
#listingDialog .reader-button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
@media(max-width:860px) {
  #listingDialog .reader-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
  .reader-tools { top: calc(20px + env(safe-area-inset-top)); left: 20px; gap: 8px; }
  #listingDialog .reader-media { padding: calc(12px + env(safe-area-inset-top)) 12px 12px; border-right: 0; }
  #listingDialog .reader-photo-stage { height: auto; max-height: min(44dvh,420px); aspect-ratio: 4/3; flex: none; }
  #listingDialog .detail-content { padding: 24px 20px; }
  #listingDialog .reader-price { padding-right: 0; }
  #listingDialog .reader-actions { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  #listingDialog .reader-layout { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

.reader-price-analysis { margin: 20px 0 0; padding: 20px 0; border-top: 1px solid var(--line); }
#listingDialog .reader-price-analysis h3 { margin: 0 0 10px; font-size: 16px; font-weight: 500; }
.reader-market-result { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.reader-market-result strong { font-weight: 600; }
.reader-market-result span { flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.reader-market-result[data-market-kind="below"] { color: #216247; }
.reader-market-result[data-market-kind="above"] { color: #925124; }
.reader-market-context,.reader-market-unit { margin: 6px 0; font-size: 15px; line-height: 1.5; }
.reader-market-method { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* Keep every route reachable on small screens as well. */
.social-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.social-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--muted); opacity: .6; }
.icon-telegram { mask-image: url('icons/telegram.svg'); }
.icon-instagram { mask-image: url('icons/instagram.svg'); }
.icon-panorama { mask-image: url('icons/panorama.svg'); }
.search-toolbar { flex-wrap: wrap; }
@media(min-width:861px) { .rental-page .search-field { flex: 1 1 180px; width: auto; max-width: 330px; } }
.price-range { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; height: 44px; flex: 0 0 252px; background: #fff; }
.price-range label { display: flex; gap: 6px; align-items: center; padding: 0 10px; flex: 1; min-width: 0; color: var(--muted); font-size: 14px; }
.price-range label + label { border-left: 1px solid var(--line); }
.rental-page .price-range input { width: 100%; min-width: 0; padding: 0; height: 40px; border: 0; border-radius: 0; background: transparent; font-size: 15px; color: var(--ink); appearance: textfield; }
.rental-page .price-range:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.rental-page .price-range input:focus { outline: none; box-shadow: none; }
.price-range input::-webkit-inner-spin-button,.price-range input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-currency { padding-right: 10px; white-space: nowrap; font-size: 12px; color: var(--muted); }
.rental-page .listing-body { display: grid; grid-template-rows: 30px 26px 23px 23px 28px; gap: 3px; }
.rental-page :is(.listing-address,.listing-specs,.listing-location,.listing-origin,.listing-badges) { margin: 0; overflow: hidden; }
.rental-page .listing-address,.rental-page .listing-location { white-space: nowrap; text-overflow: ellipsis; }
.rental-page .listing-origin { flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 8px; font-size: 14px; }
.rental-page .listing-location { font-size: 14px; }
.rental-page .listing-origin .market-badge { flex-shrink: 0; margin: 0; padding: 3px 6px; font-size: 11px; line-height: 1.4; }
.rental-page .listing-specs { white-space: nowrap; text-overflow: ellipsis; display: block; }
.rental-page.show-map .listing-body { grid-template-rows: 28px 25px 23px 23px 28px; }
.listing-pagination { grid-column: 1/-1; width: 100%; padding: 16px 0 12px; border-top: 1px solid var(--line); text-align: center; }
.listing-pagination p { margin: 0 0 12px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pagination-buttons { display: flex; gap: 6px; align-items: center; justify-content: center; }
.pagination-buttons button { display: grid; place-items: center; min-width: 40px; height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; }
.pagination-buttons button[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination-buttons button:disabled { color: #8b959e; cursor: default; background: #f7f8f9; }
.pagination-gap { width: 16px; color: var(--muted); }
.rental-map-popup .leaflet-popup-content { margin: 12px 20px 12px 12px; }
.rental-map-popup .map-group-list>p:first-child { margin: 0 0 8px; }
.rental-map-popup .map-group-option { margin: 0 0 6px; }
.rental-map-popup .map-group-option:last-child { margin-bottom: 0; }
.reader-panorama { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 20px; font-size: 16px; font-weight: 500; color: var(--accent); text-decoration: none; }
.reader-panorama:hover { text-decoration: underline; }
.reader-panorama-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
@media(max-width:860px) {
  .rental-page .price-range { flex: 1 1 100%; grid-column: 1/-1; order: 1; }
  .rental-page .search-field { order: 0; }
  .rental-page .city-selector { order: 2; }
  .rental-page .filters-toggle { order: 3; }
  .social-links { order: 1; }
  .primary-nav { order: 2; }
  .pagination-buttons { gap: 4px; }
  .pagination-buttons button { min-width: 36px; padding: 0 4px; }
  .pagination-gap { width: 10px; }
  .rental-page.show-map .listing-pagination { display: none; }
}
@media(max-width:860px) {
  .rental-page .site-header { flex: 0 0 auto; min-height: 100px; padding: 12px 16px 0; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
  .rental-page .primary-nav { flex: 0 0 100%; height: 44px; min-width: 0; justify-content: space-between; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .rental-page .primary-nav::-webkit-scrollbar { display: none; }
  .rental-page .primary-nav a,.rental-page .primary-nav .nav-current,.rental-page .primary-nav button { display: inline-flex; flex-shrink: 0; font-size: 13px; white-space: nowrap; }
}

/* Mobile search yields space to browsing; desktop keeps the existing toolbar. */
@media(max-width:860px) {
  .mobile-search-chrome { display: grid; grid-template-rows: 1fr; flex: 0 0 auto; min-height: 0; transition: grid-template-rows 220ms cubic-bezier(.22,1,.36,1); }
  .mobile-search-content { display: block; min-height: 0; overflow: hidden; }
  .mobile-search-collapsed .mobile-search-chrome { grid-template-rows: 0fr; }
  .mobile-search-collapsed .mobile-search-bar { display: block; flex: 0 0 auto; padding: 6px 12px; background: #fff; border-bottom: 1px solid var(--line); }
  .mobile-search-bar button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; text-align: left; }
  #mobileSearchSummary { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rental-page .sidebar { overflow-anchor: none; }
  .rental-page .site-header { min-height: 92px; padding-top: 8px; }
  .rental-page .search-toolbar { grid-template-columns: minmax(0,1fr) 44px; }
  .rental-page .search-field,.rental-page .price-range { grid-column: 1/-1; }
  .rental-page .city-selector { grid-column: 1; gap: 12px; order: 2; }
  .rental-page .city-selector .segment { font-size: 14px; }
  .rental-page .filters-toggle { grid-column: 2; order: 2; padding: 0; width: 44px; }
  .filters-toggle .filter-toggle-label { display: none; }
  .rental-page .filters-toggle .ui-icon { width: 20px; height: 20px; flex-basis: 20px; }
  #activeFilterBar:has(.active-filters > [data-remove-filter="city"]:only-child) { display: none; }
  .rental-page .results-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 16px; }
  .rental-page .results-header h1 { font-size: 20px; }
  .rental-page .sort-control select { width: 125px; font-size: 13px; }
  .rental-page .filters-body,.rental-page .filters.filters-expanded .filters-body { position: fixed; top: 12px; bottom: 12px; left: 8px; right: 8px; width: auto; max-height: none; z-index: 1000; overscroll-behavior: contain; }
  .rental-page.show-map:not(.mobile-search-collapsed) .mobile-search-done { display: block; min-height: 44px; width: 100%; margin-top: 8px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-weight: 500; }
}
@media(prefers-reduced-motion:reduce) { .mobile-search-chrome { transition: none; } }

.extra-search-fields { margin-top: 16px; }
.filter-count-hint { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.reader-analysis-compact { border-top: 1px solid var(--line); padding-top: 12px; }

a.social-icon { opacity: 1; min-width: 44px; min-height: 44px; text-decoration: none; }
a.social-icon:hover { color: var(--accent); }
