:root {
  --bg: #f6f8fa; --panel: #fff; --text: #1c2733; --muted: #5b6b7b;
  --accent: #1867c0; --accent2: #48a9a6; --border: #e2e8ee;
}
* { box-sizing: border-box; }
html, body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--panel); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 52px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.site-header nav { margin-left: auto; display: flex; gap: 16px; }
.site-header nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.site-header nav a:hover { color: var(--accent); }
.update-info { font-size: 12px; color: var(--muted); padding-bottom: 6px; }

main { min-height: 60vh; }
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 26px; margin: 0 0 8px; }
.hero p.lead { font-size: 15px; color: var(--muted); max-width: 820px; margin: 0 0 6px; }
.stats { font-size: 14px; color: var(--muted); margin: 8px 0 14px; }
.stats b { color: var(--accent); }

.map-panel { position: relative; height: 68vh; min-height: 420px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
#map { height: 100%; }
.map-filters {
  position: absolute; z-index: 1000; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap;
  background: rgba(255,255,255,.94); padding: 8px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.2);
}
.map-filters select, .map-filters input[type=search] {
  font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px;
}
.map-filters label { font-size: 13px; display: flex; align-items: center; gap: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin: 14px 0 30px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.card > a { display: block; padding: 12px 14px; color: inherit; text-decoration: none; height: 100%; }
.card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(24,103,192,.12); }
.card h3 { margin: 6px 0 4px; font-size: 14px; line-height: 1.35; }
.card .addr { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.card .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.date { color: var(--muted); white-space: nowrap; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; margin-right: 5px; }
.badge.e { background: #ddf3f2; color: #0b6e6b; }
.badge.s { background: #e8e8ef; color: #4a4a63; }
.badge.cat { background: #fdeedd; color: #8f4f00; }

.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 12px 0 26px; }
.prov-grid a {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px;
}
.prov-grid a:hover { border-color: var(--accent); color: var(--accent); }
.prov-grid .cnt { background: #e2edfa; color: var(--accent); font-size: 12px; font-weight: 700; border-radius: 12px; padding: 2px 10px; }

h2 { font-size: 20px; margin: 26px 0 4px; }
.section-note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }

.faq { margin: 10px 0 34px; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 10px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; font-size: 14px; }
.faq p { font-size: 14px; color: var(--muted); }

.detail { display: flex; gap: 20px; margin: 18px 0 30px; flex-wrap: wrap; }
.detail .info { flex: 1 1 380px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; }
.detail .info table { border-spacing: 0; width: 100%; font-size: 14px; }
.detail .info td { padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--border); }
.detail .info td:first-child { color: var(--muted); width: 40%; padding-right: 12px; }
.detail .minimap { flex: 1 1 380px; min-height: 320px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.detail .minimap #map { min-height: 320px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; text-decoration: none; margin-top: 14px;
}
.btn:hover { background: #14549e; }
.warn { background: #fff8ec; border: 1px solid #f0dcb4; color: #8f4f00; font-size: 13px; padding: 8px 12px; border-radius: 8px; margin: 10px 0; }

.prose { max-width: 800px; padding: 10px 0 40px; }
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 18px; margin-top: 22px; }
.prose p, .prose li { font-size: 14.5px; line-height: 1.6; }

.ad-box { margin: 18px auto; text-align: center; }
.ad-box .adsbygoogle { min-height: 90px; }

.site-footer { background: #1f2a36; color: #b8c4d0; margin-top: 30px; }
.site-footer .wrap { padding: 22px 16px; }
.site-footer p { font-size: 12.5px; line-height: 1.6; max-width: 860px; }
.site-footer a { color: #cfe0f2; }
.site-footer nav { display: flex; gap: 18px; margin: 10px 0; flex-wrap: wrap; }
.site-footer nav a { font-size: 13px; font-weight: 600; text-decoration: none; }
.site-footer .copy { color: #7f8ea0; }

.breadcrumbs { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.breadcrumbs a { color: var(--muted); }

.leaflet-popup-content { font-size: 12.5px; }
.popup h3 { margin: 0 0 6px; font-size: 13px; }
.popup table { border-spacing: 0; }
.popup td { padding: 1px 0; }
.popup td:first-child { color: var(--muted); padding-right: 10px; }
.popup a { font-weight: 600; }
.popup .approx { color: #8f4f00; font-size: 11px; margin-top: 4px; }

@media (max-width: 700px) {
  .hero h1 { font-size: 20px; }
  .map-panel { height: 60vh; }
  .map-filters { position: static; margin: 8px; }
}
