:root {
  color-scheme: light;
  --navy: #111d2e;
  --navy-2: #1a2a40;
  --coral: #ff6b4a;
  --coral-dark: #e95031;
  --cream: #f4f2ed;
  --paper: #fff;
  --ink: #132034;
  --muted: #687386;
  --line: #dfe3e8;
  --mint: #d9f4e7;
  --green: #137654;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky; top: 0; z-index: 20; height: 72px; padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(244, 242, 237, .9); border-bottom: 1px solid rgba(17, 29, 46, .1);
  backdrop-filter: blur(18px);
}
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 850; letter-spacing: -.04em; }
.logo span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--coral); font-weight: 900; }
.city-label { display: flex; align-items: center; gap: 9px; color: var(--navy); font-size: 14px; font-weight: 700; }
.city-label span { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255,107,74,.13); }

.catalog-shell, .detail-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 80px; }
.catalog-intro { min-height: 285px; padding: 54px 0 42px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.kicker { margin: 0 0 9px; color: var(--coral-dark); font-size: 12px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 750px; color: var(--navy); font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.06em; }
.intro-copy { max-width: 360px; margin: 0 0 5px; color: var(--muted); font-size: 18px; line-height: 1.55; }

.search-panel { position: relative; z-index: 2; margin-bottom: 64px; padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px; background: var(--navy); border-radius: 22px; box-shadow: 0 22px 50px rgba(17,29,46,.18); }
.search-input { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 17px; background: white; border-radius: 13px; }
.search-input input { min-width: 0; width: 100%; height: 54px; border: 0; outline: 0; color: var(--ink); font-size: 16px; background: transparent; }
.search-icon { width: 16px; height: 16px; flex: none; border: 2px solid var(--navy); border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -6px; bottom: -3px; background: var(--navy); transform: rotate(45deg); border-radius: 2px; }
.search-button, .phone-button { border: 0; border-radius: 13px; color: white; background: var(--coral); font-weight: 800; transition: transform .18s ease, background .18s ease; }
.search-button { min-width: 132px; padding: 0 24px; }
.search-button:hover, .phone-button:hover { background: var(--coral-dark); transform: translateY(-1px); }
.quick-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: 12px; background: rgba(255,255,255,.13); }
.quick-filters label { min-width: 0; display: grid; gap: 3px; padding: 10px 14px; background: var(--navy-2); }
.quick-filters span { color: #aeb9c8; font-size: 11px; font-weight: 700; }
.quick-filters select, .quick-filters input { width: 100%; padding: 0; border: 0; outline: 0; color: white; background: transparent; font-size: 14px; font-weight: 700; }
.quick-filters option { color: var(--ink); background: white; }
.quick-filters input::placeholder { color: white; opacity: 1; }

.results-head { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.results-head h2 { margin: 0; color: var(--navy); font-size: 34px; letter-spacing: -.045em; }
.results-head > span { color: var(--muted); font-size: 14px; }
.listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-card { overflow: hidden; background: var(--paper); border-radius: 18px; box-shadow: 0 1px 0 rgba(17,29,46,.08); transition: transform .2s ease, box-shadow .2s ease; }
.home-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(17,29,46,.11); }
.home-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #dce2e4; }
.home-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.home-card:hover .home-photo img { transform: scale(1.025); }
.photo-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.owner-tag, .age-tag { position: absolute; top: 12px; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; backdrop-filter: blur(10px); }
.owner-tag { left: 12px; color: var(--green); background: rgba(226,250,239,.92); }
.owner-tag.is-review { color: #684600; background: rgba(255,240,189,.94); }
.age-tag { right: 12px; color: white; background: rgba(17,29,46,.76); }
.home-copy { padding: 17px 18px 19px; }
.home-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-price strong { color: var(--navy); font-size: 24px; letter-spacing: -.04em; }
.price-rating { color: var(--green); font-size: 11px; font-weight: 800; }
.price-rating.is-high { color: #b54728; }
.home-copy h3 { margin: 11px 0 7px; font-size: 17px; line-height: 1.3; letter-spacing: -.02em; }
.home-address { min-height: 42px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.home-facts { margin-top: 15px; display: flex; gap: 8px; color: var(--navy); font-size: 13px; font-weight: 750; }
.home-facts span { padding-right: 8px; border-right: 1px solid var(--line); }
.home-facts span:last-child { border: 0; }
.load-more { display: block; margin: 30px auto 0; padding: 13px 24px; border: 1px solid var(--navy); border-radius: 12px; color: var(--navy); background: transparent; font-weight: 800; }
.empty-results, .error-state { grid-column: 1 / -1; padding: 70px 20px; text-align: center; background: white; border-radius: 18px; }
.empty-results h3, .error-state h3 { margin: 0 0 8px; font-size: 24px; }
.empty-results p, .error-state p { margin: 0; color: var(--muted); }

.skeleton-card { overflow: hidden; border-radius: 18px; background: white; }
.skeleton-card div { aspect-ratio: 4 / 3; background: #e1e4e4; }
.skeleton-card span { display: block; height: 18px; margin: 18px; border-radius: 8px; background: #e7e9e8; }
.skeleton-card span:last-child { width: 62%; margin-top: -8px; }
.skeleton-card div, .skeleton-card span { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .48; } }

.detail-nav { position: relative; }
.back-link { font-size: 14px; font-weight: 750; }
.detail-shell { padding-top: 28px; }
.detail-loading { padding: 100px 20px; text-align: center; color: var(--muted); }
.detail-gallery { overflow: hidden; border-radius: 22px; background: #dce2e4; }
.gallery-stage { position: relative; outline: 0; }
.gallery-stage:focus-visible { box-shadow: inset 0 0 0 4px var(--coral); }
.gallery-viewport { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pan-y pinch-zoom; }
.gallery-viewport::-webkit-scrollbar { display: none; }
.gallery-track { display: flex; }
.gallery-slide { min-width: 100%; height: min(64vw, 560px); scroll-snap-align: start; scroll-snap-stop: always; background: #dce2e4; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.gallery-arrow { position: absolute; top: 50%; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--navy); background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(17,29,46,.18); font-size: 35px; line-height: 1; transform: translateY(-50%); transition: background .18s ease, transform .18s ease; }
.gallery-arrow:hover { background: white; transform: translateY(-50%) scale(1.05); }
.gallery-prev { left: 18px; }
.gallery-next { right: 18px; }
.gallery-counter { position: absolute; right: 18px; bottom: 17px; padding: 7px 11px; border-radius: 999px; color: white; background: rgba(17,29,46,.76); font-size: 13px; font-weight: 700; backdrop-filter: blur(8px); }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px; background: white; scrollbar-width: thin; }
.gallery-thumb { width: 96px; min-width: 96px; height: 68px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #dce2e4; opacity: .67; transition: border-color .18s ease, opacity .18s ease; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb.is-active { opacity: 1; }
.gallery-thumb.is-active { border-color: var(--coral); }
.detail-gallery .gallery-empty { min-height: 360px; display: grid; place-items: center; color: var(--muted); }
.detail-layout { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 20px; align-items: start; }
.detail-main, .contact-card { background: white; border-radius: 20px; }
.detail-main { padding: 30px; }
.detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.detail-heading h1 { max-width: 700px; font-size: clamp(30px, 4vw, 48px); line-height: 1.06; }
.detail-price { flex: none; color: var(--navy); font-size: 34px; font-weight: 900; letter-spacing: -.045em; }
.detail-location { margin: 16px 0 0; color: var(--muted); font-size: 16px; }
.detail-facts { margin: 28px 0; display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.detail-facts div { padding: 16px; border-right: 1px solid var(--line); }
.detail-facts div:last-child { border: 0; }
.detail-facts span { display: block; color: var(--muted); font-size: 12px; }
.detail-facts strong { display: block; margin-top: 5px; font-size: 17px; }
.detail-description { padding-top: 24px; border-top: 1px solid var(--line); }
.detail-description h2 { margin: 0 0 14px; font-size: 22px; }
.detail-description p { margin: 0; white-space: pre-line; color: #3e4a5c; font-size: 16px; line-height: 1.75; }
.contact-card { position: sticky; top: 92px; padding: 24px; }
.contact-card .owner-line { display: flex; justify-content: space-between; gap: 12px; }
.contact-card .owner-tag { position: static; height: max-content; }
.contact-card h2 { margin: 8px 0 3px; font-size: 23px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 14px; }
.phone-button { width: 100%; min-height: 54px; margin-top: 22px; padding: 12px 18px; font-size: 16px; }
.phone-list { margin: 18px 0 0; display: grid; gap: 8px; }
.phone-list[hidden] { display: none; }
.phone-list a { padding: 12px; text-align: center; border-radius: 12px; color: var(--navy); background: #eef1f4; font-size: 18px; font-weight: 850; }
.phone-list .messenger-button { color: white; font-size: 16px; }
.phone-list .whatsapp-button { background: #168b52; }
.phone-list .telegram-button { background: #247fba; }
.phone-list .messenger-button:hover { filter: brightness(.94); }
.freshness { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 900px) {
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-filters { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .contact-card { position: static; }
}

@media (max-width: 640px) {
  .site-header { height: 62px; padding: 0 16px; }
  .catalog-shell, .detail-shell { width: min(100% - 28px, 1240px); padding-bottom: 56px; }
  .catalog-intro { min-height: 0; padding: 35px 0 27px; display: block; }
  h1 { font-size: 43px; }
  .intro-copy { margin-top: 19px; font-size: 16px; }
  .search-panel { margin-bottom: 45px; grid-template-columns: 1fr; padding: 9px; border-radius: 17px; }
  .search-input input { height: 50px; }
  .search-button { min-height: 50px; }
  .quick-filters { grid-template-columns: 1fr 1fr; }
  .quick-filters label { padding: 10px 11px; }
  .results-head h2 { font-size: 29px; }
  .listing-grid { grid-template-columns: 1fr; }
  .home-card { border-radius: 16px; }
  .detail-nav .logo { display: inline-flex; }
  .detail-gallery { border-radius: 16px; }
  .gallery-slide { height: 72vw; min-height: 280px; max-height: 430px; }
  .gallery-arrow { display: none; }
  .gallery-counter { right: 12px; bottom: 12px; }
  .gallery-thumbs { padding: 8px; }
  .gallery-thumb { width: 74px; min-width: 74px; height: 54px; }
  .detail-main, .contact-card { padding: 20px; border-radius: 16px; }
  .detail-heading { display: block; }
  .detail-heading h1 { font-size: 32px; }
  .detail-price { margin-top: 16px; font-size: 30px; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .detail-facts div:nth-child(2) { border-right: 0; }
  .detail-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .contact-card { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Warm editorial palette, shared by the catalog and listing pages. */
:root { --cream: #f7f7f2; --navy: #203f38; --navy-2: #2c4a43; --ink: #243f39; --muted: #748078; --coral: #d7f16d; --coral-dark: #526d31; --line: #dfe4da; --green: #355c3e; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #61823e; outline-offset: 4px; }
.site-header { position: relative; height: 84px; background: var(--cream); backdrop-filter: none; }
.logo { font-size: 25px; letter-spacing: -.06em; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.logo span { background: var(--navy); color: var(--coral); border-radius: 50% 50% 10px 10px; }
.header-link { margin-left: auto; margin-right: 40px; font-size: 13px; font-weight: 650; }
.header-link span { margin-left: 14px; }
.city-label { padding: 10px 15px; border: 1px solid var(--line); border-radius: 24px; font-size: 12px; }
.city-label span { background: #6b8a50; box-shadow: none; width: 6px; height: 6px; }
.catalog-intro { position: relative; min-height: 410px; padding: 48px 0 42px; align-items: center; gap: 24px; }
.intro-main { position: relative; z-index: 1; }
.kicker { font-size: 10px; letter-spacing: .16em; font-weight: 750; }
.catalog-intro .kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.live-dot { width: 6px; height: 6px; background: #6b8a50; border-radius: 50%; }
h1 { font-size: clamp(42px, 5.3vw, 67px); line-height: 1.07; letter-spacing: -.055em; font-weight: 600; }
h1 em { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.055em; }
.intro-copy { font-size: 15px; line-height: 1.65; max-width: 440px; margin: 22px 0 0; }
.intro-notes { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 25px; font-size: 11px; font-weight: 650; }
.intro-notes span::before { content: '✓'; margin-right: 7px; color: #608044; }
.city-art { position: relative; width: 380px; height: 310px; flex: none; overflow: hidden; border-radius: 160px 160px 20px 20px; background: #e9eddf; }
.art-sun { position: absolute; width: 90px; height: 90px; background: #d7eaa6; border-radius: 50%; top: 30px; right: 49px; }
.art-orbit { position: absolute; width: 340px; height: 340px; border: 1px solid #d2d9c8; border-radius: 50%; top: 20px; left: 20px; }
.art-building { position: absolute; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 24px; transform: skewY(-5deg); }
.art-building i { border-radius: 18px 18px 0 0; background: #42634e; box-shadow: inset 3px 0 #294e3e; }
.building-back { left: 48px; top: 96px; width: 142px; height: 176px; background: #bdcba7; gap: 12px; padding: 20px; }
.building-front { left: 166px; top: 116px; width: 174px; height: 195px; background: #d3ab87; border-right: 14px solid #b58f6e; }
.building-front b { grid-column: 2; height: 48px; background: #385b47; border-radius: 20px 20px 0 0; }
.art-caption { position: absolute; left: 21px; bottom: 22px; padding: 14px 18px; background: #fffffff0; border-radius: 12px; color: #64715d; font-size: 10px; box-shadow: 0 8px 20px #203f3810; }
.art-caption span { display: block; margin-bottom: 4px; color: var(--navy); font-size: 19px; }
.art-coordinate { position: absolute; top: 55px; left: 52px; font-size: 9px; letter-spacing: .05em; color: #728067; }
.search-panel { margin-bottom: 42px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 18px; gap: 12px; box-shadow: 0 8px 30px #203f3806; }
.search-input { background: #f5f6f1; border: 1px solid #e8ebe2; border-radius: 10px; }
.search-input input { height: 50px; font-size: 14px; }
.search-button { min-width: 186px; color: var(--navy); border-radius: 10px; font-size: 13px; }
.search-button span { margin-left: 18px; }
.search-button:hover, .phone-button:hover { color: white; }
.quick-filters { background: transparent; overflow: visible; gap: 0; padding: 4px 0; }
.quick-filters label { background: white; gap: 7px; border-right: 1px solid var(--line); padding: 4px 16px; }
.quick-filters label:last-child { border: 0; }
.quick-filters span { color: var(--muted); font-size: 10px; }
.quick-filters select, .quick-filters input { color: var(--navy); font-size: 13px; font-weight: 550; min-height: 24px; }
.quick-filters input::placeholder { color: var(--navy); }
.filter-toggle { display: none; }
.results-head { scroll-margin-top: 24px; margin-bottom: 24px; align-items: center; }
.results-head h2 { font-size: 30px; font-weight: 550; }
.results-head > span { font-size: 12px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 30px; }
.listing-grid { gap: 28px 22px; }
.home-card { border: 1px solid #e1e5db; border-radius: 15px; box-shadow: none; }
.home-photo { aspect-ratio: 1.48; }
.owner-tag, .age-tag { font-size: 10px; padding: 6px 9px; backdrop-filter: none; }
.owner-tag { background: #f8fbf0f5; color: #345438; }
.age-tag { background: #203f38c9; }
.home-copy { padding: 18px; }
.home-price strong { font-size: 26px; font-weight: 650; }
.price-period { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 5px; }
.price-rating { font-size: 9px; background: #f0f5e6; padding: 5px 7px; border-radius: 5px; }
.price-rating.is-high { background: #faf0e7; }
.home-copy h3 { font-size: 15px; font-weight: 600; margin-top: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-address { font-size: 12px; min-height: 35px; }
.home-facts { border-top: 1px solid #edf0e7; padding-top: 14px; margin-top: 14px; font-size: 12px; font-weight: 500; }
.load-more { background: white; border-color: var(--line); min-height: 48px; font-size: 13px; }
.load-more:disabled { opacity: .55; cursor: wait; }
.phone-button { color: var(--navy); }
.site-footer { max-width: 1240px; margin: 0 auto; border-top: 1px solid var(--line); padding: 28px 0; display: flex; align-items: center; gap: 30px; }
.site-footer p, .site-footer > span { color: var(--muted); font-size: 12px; }
.site-footer > span { margin-left: auto; }
.logo .footer-dot { background: none; color: #688747; width: auto; height: auto; margin-left: -8px; }
@media (max-width: 1000px) {
  .city-art { width: 310px; }
  .site-footer { margin: 0 24px; }
}
@media (max-width: 760px) {
  .city-art { display: none; }
  .catalog-intro { min-height: 0; padding: 36px 0; }
}
@media (max-width: 640px) {
  .site-header { height: 66px; }
  .logo { font-size: 23px; }
  .logo-mark { width: 36px; height: 36px; }
  .detail-nav .logo { font-size: 20px; gap: 6px; }
  .detail-nav .back-link { font-size: 12px; }
  .header-link { display: none; }
  .catalog-shell, .detail-shell { width: calc(100% - 32px); }
  .catalog-intro { padding: 31px 0 27px; }
  .catalog-intro .kicker { margin-bottom: 17px; font-size: 9px; }
  h1 { font-size: clamp(36px, 10.3vw, 56px); }
  .intro-copy { font-size: 13px; margin-top: 17px; }
  .intro-notes { margin-top: 18px; font-size: 10px; gap: 18px; }
  .search-panel { gap: 9px; padding: 10px; margin-bottom: 30px; }
  .search-input input { font-size: 16px; height: 48px; }
  .search-button { min-height: 46px; }
  .filter-toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px 4px; border: 0; color: var(--navy); background: white; font-size: 12px; }
  .quick-filters { display: none; gap: 16px 0; padding: 10px 0; }
  .search-panel.filters-open .quick-filters { display: grid; }
  .quick-filters label { padding: 0 8px; }
  .quick-filters label:nth-child(2) { border-right: 0; }
  .quick-filters select, .quick-filters input { font-size: 16px; min-height: 34px; }
  .results-head { gap: 10px; margin-bottom: 18px; }
  .results-head .kicker { font-size: 8px; letter-spacing: .1em; }
  .results-head h2 { font-size: 25px; }
  .results-head > span { font-size: 10px; padding: 7px 9px; white-space: nowrap; }
  .listing-grid { gap: 18px; }
  .home-photo { aspect-ratio: 1.4; }
  .home-copy { padding: 16px; }
  .home-copy h3 { font-size: 16px; }
  .home-address { min-height: 0; font-size: 13px; }
  .site-footer { flex-wrap: wrap; gap: 12px 20px; margin: 0 16px; }
  .site-footer > span { width: 100%; margin: 0; font-size: 10px; }
  .site-footer p { font-size: 11px; }
  .detail-heading h1 { font-size: 29px; }
  .contact-card .owner-line { flex-wrap: wrap; }
}
