.map-controls-left {
    position: absolute;
    z-index: 760;
    top: 14px;
    left: 14px;
    display: grid;
    gap: 9px;
    width: 178px;
}

.map-basemap-select { position: relative; z-index: 30; }

.map-basemap-current,
.map-basemap-menu,
.map-zoom-control {
    border: 1px solid rgba(16,59,45,.15);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 32px rgba(16,59,45,.16);
    backdrop-filter: blur(12px);
}

.map-basemap-current {
    width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px; color: #103b2d; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.map-control-chevron { font-size: 18px; line-height: 1; transition: transform .16s ease; }
.map-basemap-current[aria-expanded="true"] .map-control-chevron { transform: rotate(180deg); }
.map-basemap-menu { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; overflow: hidden; padding: 5px; z-index: 40; }
.map-basemap-menu button {
    width: 100%; display: block; overflow: hidden; padding: 9px 10px; border: 0; border-radius: 10px;
    background: transparent; color: #17231b; font-size: 12px; font-weight: 700; line-height: 1.25;
    text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.map-basemap-menu button:hover,
.map-basemap-menu button.is-active { background: rgba(169,186,143,.22); }
.map-basemap-menu button:disabled { color: #9ca3af; cursor: not-allowed; }
.map-basemap-menu button[hidden] { display: none; }

.map-zoom-control { position: relative; z-index: 1; width: 43px; overflow: hidden; }
.map-zoom-control button {
    width: 43px; height: 39px; display: grid; place-items: center; border: 0; background: transparent;
    color: #103b2d; font: 700 22px/1 Arial, sans-serif; cursor: pointer;
}
.map-zoom-control button + button { border-top: 1px solid rgba(16,59,45,.12); }
.map-zoom-control button:hover { background: rgba(169,186,143,.22); }

.map-hover-card {
    position: absolute; z-index: 790; width: min(320px, calc(100% - 20px)); display: grid; gap: 7px;
    padding: 13px 14px; border: 1px solid rgba(255,255,255,.86); border-radius: 15px;
    background: rgba(255,255,255,.96); box-shadow: 0 14px 38px rgba(16,59,45,.2); backdrop-filter: blur(12px);
    pointer-events: none; color: #17231b;
}
.map-hover-card[hidden] { display: none; }
.map-hover-card.is-mobile-interactive { pointer-events: auto; cursor: pointer; }
.map-hover-card.is-mobile-interactive.has-mobile-link::after { content: "Нажмите, чтобы открыть карточку"; margin-top: 2px; color: #68736b; font-size: 10px; }
.map-info-close {
    position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center;
    padding: 0; border: 0; border-radius: 50%; background: rgba(16,59,45,.08); color: #103b2d; cursor: pointer; touch-action: manipulation;
}
.map-info-close:active { background: rgba(16,59,45,.16); }
.map-info-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (hover: none), (pointer: coarse) { .map-hover-card { padding-right: 48px; } }
.map-info-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.map-info-type { color: #525b55; font-size: 12px; font-weight: 800; }
.map-info-title { color: #103b2d; font-size: 16px; line-height: 1.25; }
.map-info-cadastral { color: #657068; font-size: 12px; font-variant-numeric: tabular-nums; }
.map-info-detail { display: flex; align-items: center; gap: 8px; min-width: 0; color: #17231b; font-size: 13px; }
.map-info-detail strong { min-width: 0; color: #17231b; font-size: 13px; font-weight: 800; }
.map-info-icon { width: 17px; height: 17px; flex: 0 0 17px; color: #657068; }
.map-info-icon svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.map-legend {
    position: absolute; z-index: 740; right: 14px; bottom: 28px; display: grid; gap: 6px; padding: 10px 12px;
    border: 1px solid rgba(16,59,45,.08); border-radius: 14px; background: rgba(255,255,255,.92);
    box-shadow: 0 12px 32px rgba(16,59,45,.16); backdrop-filter: blur(10px); font-size: 12px; font-weight: 700;
}
.map-legend span { display: flex; align-items: center; gap: 7px; }
.map-legend i { width: 12px; height: 12px; border: 1px solid #111; border-radius: 3px; }
.map-legend .available { background: #99CC33; }
.map-legend .reserved { background: #FFCC33; }
.map-legend .sold { background: #FF3333; }
.map-legend .other { background: #9933FF; }
.map-provider-badge { position: absolute; z-index: 730; left: 10px; bottom: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.9); color: #111; font-size: 11px; font-weight: 800; text-decoration: none; }
.map-provider-badge[hidden] { display: none; }
.map-plot-popup { display: grid; gap: 5px; min-width: 220px; }
.map-plot-popup strong { color: #103b2d; font-size: 15px; }
.map-plot-popup small { color: #657068; }
.map-popup-link { display: inline-flex; width: fit-content; margin-top: 5px; color: #1f553f; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

body.public-map-view { overflow-x: hidden; background: #e8ece5; }
.public-map-view .public-map-topbar { z-index: 1300; width: auto; min-width: 0; justify-content: center; padding: 10px 20px 10px 13px; }
.public-map-view .public-container { width: 100%; min-height: 100vh; padding: 104px 10px 10px; }
.land-map-page { width: 100%; }
.land-map-shell { position: relative; width: 100%; overflow: hidden; border: 1px solid rgba(16,59,45,.14); border-radius: 24px; background: #d9dfd4; box-shadow: 0 24px 64px rgba(16,59,45,.14); }
.land-leaflet-map { width: 100%; height: calc(100vh - 230px); min-height: 560px; }

/* Leaflet can paint the tile pane itself; blank-basemap state must win over that external surface. */
.land-leaflet-map.is-blank-basemap,
.land-leaflet-map.is-blank-basemap .leaflet-tile-pane { background: #fff !important; }
.land-svg-overlay { pointer-events: none; }
.land-svg-overlay svg { overflow: visible; }
.land-map-shell .leaflet-control-attribution { max-width: calc(100% - 190px); background: rgba(255,255,255,.72); font-size: 9px; }
.land-map-empty { max-width: 720px; margin: 140px auto 0; padding: 28px; border-radius: 24px; background: rgba(255,255,255,.85); text-align: center; }

.land-svg-overlay .zf-map-plot > polygon,
.land-svg-overlay .zf-map-plot > .zf-rounded-polygon,
.land-svg-overlay .zf-map-plot > path.zf-rounded-polygon {
    fill: #99CC33; fill-opacity: var(--zf-map-fill-opacity, .72); stroke: #111; stroke-width: 1; stroke-opacity: 1;
    stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; cursor: pointer;
    transition: filter .16s ease, fill-opacity .16s ease;
}
.land-svg-overlay .zf-map-plot.status-available > polygon,
.land-svg-overlay .zf-map-plot.status-available > .zf-rounded-polygon { fill: #99CC33; }
.land-svg-overlay .zf-map-plot.status-sold > polygon,
.land-svg-overlay .zf-map-plot.status-sold > .zf-rounded-polygon { fill: #FF3333; }
.land-svg-overlay .zf-map-plot.status-missing > polygon,
.land-svg-overlay .zf-map-plot.status-missing > .zf-rounded-polygon { fill: #E52B2B; }
.land-svg-overlay .zf-map-plot.status-reserved > polygon,
.land-svg-overlay .zf-map-plot.status-reserved > .zf-rounded-polygon { fill: #FFCC33; }
.land-svg-overlay .zf-map-plot.status-other > polygon,
.land-svg-overlay .zf-map-plot.status-other > .zf-rounded-polygon { fill: #9933FF; }
.land-svg-overlay .zf-map-plot:hover > polygon,
.land-svg-overlay .zf-map-plot:hover > .zf-rounded-polygon,
.land-svg-overlay .zf-map-plot.is-hover > polygon,
.land-svg-overlay .zf-map-plot.is-hover > .zf-rounded-polygon { fill-opacity: var(--zf-map-hover-opacity, 1); }
.land-svg-overlay .zf-plot-number { pointer-events: none; font-family: Arial, sans-serif; font-size: 11px; font-weight: 400; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke-width: 1.5px; stroke-linejoin: round; }
.land-svg-overlay.zf-label-black .zf-plot-number,
.land-svg-overlay[data-label-color="black"] .zf-plot-number { fill: #111; stroke: rgba(255,255,255,.72); }
.land-svg-overlay.zf-label-white .zf-plot-number,
.land-svg-overlay[data-label-color="white"] .zf-plot-number { fill: #fff; stroke: rgba(0,0,0,.64); }

@media (max-width: 780px) {
    .public-map-view .public-map-topbar { top: 10px; min-height: 54px; padding: 8px 14px 8px 10px; }
    .public-map-view .public-map-topbar .public-brand img { width: 48px; height: 25px; }
    .public-map-view .public-map-topbar .public-brand span { font-size: 15px; }
    .public-map-view .public-container { padding: 78px 6px 6px; }
    .land-map-intro { margin-bottom: 10px; padding: 0 10px; }
    .land-map-intro h1 { font-size: 27px; }
    .land-map-intro p { font-size: 13px; }
    .land-map-shell { border-radius: 18px; }
    .land-leaflet-map { height: calc(100vh - 185px); min-height: 500px; }
    .map-controls-left { top: 8px; left: 8px; width: 156px; }
    .map-hover-card { width: min(310px, calc(100% - 16px)); }
    .map-legend { right: 8px; bottom: 24px; }
}

.yandex-map-brand{position:absolute;right:10px;bottom:26px;z-index:650;display:inline-flex;align-items:center;min-height:24px;padding:4px 8px;border-radius:6px;background:rgba(255,255,255,.94);box-shadow:0 1px 4px rgba(0,0,0,.16);color:#111;font:700 11px/1 Arial,sans-serif;text-decoration:none}
.yandex-map-brand[hidden]{display:none}
.map-provider-error{position:absolute;left:50%;top:92px;z-index:900;transform:translateX(-50%);max-width:min(520px,calc(100% - 24px));padding:10px 14px;border:1px solid #fecaca;border-radius:12px;background:rgba(254,242,242,.97);box-shadow:0 10px 30px rgba(0,0,0,.14);color:#991b1b;font:700 12px/1.4 Manrope,Arial,sans-serif;text-align:center}
.map-provider-error[hidden]{display:none}
.land-svg-overlay,
.land-svg-overlay svg,
.land-svg-overlay .zf-transform-root,
.land-svg-overlay .zf-transform-root > * { pointer-events: none; }
.land-svg-overlay .zf-map-plot { pointer-events: none; cursor: default; }
.land-svg-overlay .zf-map-plot > polygon,
.land-svg-overlay .zf-map-plot > path,
.land-svg-overlay .zf-map-plot > polyline,
.land-svg-overlay .zf-layer-drag-surface { pointer-events: visiblePainted; cursor: pointer; }

/* Imported SVG and Leaflet number markers may carry presentation attributes/inline styles. */
.land-svg-overlay .zf-plot-number,
.land-svg-overlay.zf-label-black .zf-plot-number,
.land-svg-overlay[data-label-color="black"] .zf-plot-number,
.land-svg-overlay.zf-label-white .zf-plot-number,
.land-svg-overlay[data-label-color="white"] .zf-plot-number { stroke: none !important; paint-order: normal !important; text-shadow: none !important; }
.zf-map-number-marker { pointer-events: none !important; background: transparent !important; border: 0 !important; }
.zf-map-number-marker span { display: block; width: 34px; margin: 0 auto; overflow: visible; text-align: center; font: 400 11px/18px Arial, sans-serif; white-space: nowrap; transform: none !important; }
.zf-map-number-marker.zf-label-black span { color: #111; }
.zf-map-number-marker.zf-label-white span { color: #fff; }
