:root {
  --ink: #17231f;
  --muted: #6a7771;
  --paper: #f4f1e9;
  --panel: rgba(250, 248, 242, 0.95);
  --accent: #d7653e;
  --line: #266b63;
  --border: rgba(23, 35, 31, 0.14);
  --font-heading: "Montserrat", Arial, sans-serif;
  --font-body: "Source Sans 3", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* clip (não só hidden): impede que o foco num controle role a página e desloque o mapa para fora da tela. */
html, body { height: 100%; overflow: hidden; overflow: clip; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
}

.eyebrow, .section-label {
  margin: 0 0 7px;
  color: var(--accent);
  font: 700 11px/1.2 var(--font-body);
  letter-spacing: 0.12em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: var(--font-heading); font-size: clamp(25px, 4vw, 38px); font-weight: 800; letter-spacing: -0.01em; }
h2 { margin-bottom: 0; font-family: var(--font-heading); font-size: 22px; font-weight: 700; letter-spacing: -0.005em; }

.map-shell { position: relative; height: 100vh; min-height: 430px; overflow: hidden; overflow: clip; }
#map { height: 100%; width: 100%; background: #dbe5df; }

.property-search { position: absolute; z-index: 1000; top: 24px; left: 50%; display: flex; width: min(560px, calc(100% - 48px)); transform: translateX(-50%); background: #fffefa; border: 1px solid rgba(23, 35, 31, 0.22); box-shadow: 0 6px 18px rgba(23, 35, 31, 0.18); }
.property-search select { height: 44px; padding: 0 7px 0 12px; color: var(--line); background: #eef0f1; border: 0; border-right: 1px solid var(--border); outline: 0; cursor: pointer; font: 11px var(--font-body); }
.property-search input { min-width: 0; flex: 1; height: 44px; padding: 0 14px; color: var(--ink); background: transparent; border: 0; outline: 0; font: 13px var(--font-body); }
.property-search input::placeholder { color: var(--muted); }
.property-search > button { width: 46px; height: 44px; display: grid; place-items: center; color: #fff; background: var(--line); border: 0; cursor: pointer; }
.property-search > button:hover { background: var(--accent); }
.property-search > button svg { width: 19px; height: 19px; }
.property-search-results { position: absolute; z-index: 1001; top: calc(100% + 6px); left: 0; right: 0; display: grid; max-height: 360px; overflow-x: hidden; overflow-y: auto; background: #fffefa; border: 1px solid rgba(23, 35, 31, 0.22); box-shadow: 0 8px 22px rgba(23, 35, 31, 0.2); }
.property-search-results[hidden] { display: none; }
.property-search-results .search-result { display: grid; gap: 5px; width: 100%; min-height: 58px; padding: 10px 15px; color: var(--ink); text-align: left; white-space: normal; background: #fffefa; border: 0; border-bottom: 1px solid rgba(23, 35, 31, 0.12); cursor: pointer; }
.search-result:last-child { border-bottom: 0; }
.property-search-results .search-result:hover, .property-search-results .search-result:focus { color: var(--ink); background: #e8efec; outline: 0; }
.search-result strong { color: var(--ink); overflow-wrap: anywhere; font: 600 13px/1.35 var(--font-body); }
.search-result small { color: #596760; font: 11px/1.3 var(--font-body); }
.search-more { width: 100%; min-height: 42px; padding: 10px 15px; color: var(--line); background: #eef4f1; border: 0; border-top: 1px solid var(--border); cursor: pointer; font: 600 12px var(--font-body); }
.search-more:hover, .search-more:focus { color: #fff; background: var(--line); outline: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.startup-message {
  position: absolute;
  z-index: 600;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
  width: min(390px, calc(100% - 48px));
  padding: 16px 18px;
  color: #4d2b20;
  background: #fff5e8;
  border-left: 4px solid var(--accent);
  box-shadow: 0 8px 22px rgba(23, 35, 31, 0.16);
  font: 13px/1.45 var(--font-body);
}

.startup-message[hidden] { display: none; }

.startup-message strong { font-family: var(--font-heading); font-weight: 700; font-size: 17px; }

.layer-panel {
  position: absolute;
  z-index: 500;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  width: 400px;
  background: var(--panel);
  border-right: 1px solid rgba(23, 35, 31, 0.16);
  box-shadow: 8px 0 28px rgba(23, 35, 31, 0.12);
  backdrop-filter: blur(8px);
  transition: width 180ms ease;
}

.sidebar-rail { width: 58px; flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; background: #eef0f1; border-right: 1px solid var(--border); }
.sidebar-brand { width: 100%; height: 72px; display: grid; place-items: center; padding: 7px 5px; background: #fffefa; border-bottom: 1px solid var(--border); }
.sidebar-brand img { display: block; width: 45px; height: 58px; object-fit: contain; }
.rail-button { width: 100%; height: 58px; display: grid; place-items: center; color: var(--line); background: transparent; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 24px; }
.rail-button.is-active, .rail-button:hover { color: #fff; background: var(--line); }
.rail-button svg { width: 21px; height: 21px; stroke-width: 1.8; }
.sidebar-content { width: 342px; padding: 24px; overflow: hidden; display: flex; flex-direction: column; }
.side-panel { flex: 1 1 auto; min-height: 0; margin-right: -10px; padding-right: 10px; overflow-y: auto; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.layers-toggle { position: absolute; top: 43px; right: -17px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--line); border: 2px solid var(--paper); border-radius: 50%; cursor: pointer; font: 28px/1 var(--font-body); }
.layers-toggle:hover { background: var(--accent); }
.layer-panel.is-collapsed { width: 58px; }
.layer-panel.is-collapsed .sidebar-content { width: 0; padding: 0; }
.layer-panel.is-collapsed .layers-toggle { right: -17px; }
.layer-intro { margin: 16px 0 12px; color: var(--muted); font: 11px/1.4 var(--font-body); }
.layer-item { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.layer-item + .layer-item { margin-top: 16px; }
.layer-item input { position: absolute; opacity: 0; pointer-events: none; }
.layer-check { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--line); }
.layer-check::after { content: ""; width: 7px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.layer-check-property { background: #9a9a9a; border-color: #9a9a9a; }
.layer-check-contour { background: #a67c52; border-color: #a67c52; }
.layer-check-vielas { background: repeating-linear-gradient(45deg, #e0201b 0 1.5px, #fff 1.5px 5px); border-color: #e0201b; }
.layer-check-limit { background: var(--line); border-color: var(--line); }
.layer-item input:not(:checked) + .layer-check,
.zoning-group-label input:not(:checked) + .layer-check { background: transparent; border-color: var(--border); }
.layer-item input:not(:checked) + .layer-check::after,
.zoning-group-label input:not(:checked) + .layer-check::after { display: none; }
.layer-name small { display: block; margin-top: 3px; color: var(--muted); font: 10px var(--font-body); }
.layer-group { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.zoning-group-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 10px; border-bottom: 1px solid var(--border); }
.zoning-group-label { position: relative; min-width: 0; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.zoning-group-label input { position: absolute; opacity: 0; pointer-events: none; }
.zoning-group-label .layer-name { font-weight: 600; }
.layer-group-toggle { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: transparent; border: 0; cursor: pointer; }
.layer-group-toggle:hover { color: var(--line); background: #e8efec; }
.layer-group-toggle svg { width: 16px; height: 16px; transition: transform 160ms ease; }
.layer-group-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.zone-attribute-legend { margin: 2px 0 10px; padding: 8px; color: var(--muted); background: rgba(238, 240, 241, 0.72); font: 10px/1.4 var(--font-body); }
.zone-attribute-legend p { margin: 0 0 5px; font-weight: 700; }
.zone-attribute-legend[hidden] { display: none; }
.zone-attribute-legend div { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--ink); }
.legend-swatch { width: 18px; height: 7px; display: inline-block; border: 1px solid rgba(23, 35, 31, 0.5); }
.legend-zde1 { background: #dca8e6; } .legend-zde15 { background: #c85bd2; }
.legend-zde2 { background: #a647ad; } .legend-zde25 { background: #7d3b85; }
.legend-zrrm1 { background: #65d2df; } .legend-zrrm2 { background: #6095d1; }
.legend-zeis { background: #65d2df; border: 1px dashed #3f7e4d; }
.layer-group-items { max-height: 310px; overflow-y: auto; padding-right: 5px; }
.layer-group-items[hidden] { display: none; }
.zoning-item { gap: 8px; margin-top: 11px !important; font-size: 13px; }
.layer-check-zoning { background: var(--line); border-color: var(--line); }
.zoning-parent { margin-top: 9px !important; font-weight: 600; }
.zoning-children { margin-left: 18px; padding-left: 9px; border-left: 1px solid var(--border); }
.zoning-child { font-size: 12px; }
.zoning-item .layer-check { width: 14px; height: 14px; flex: 0 0 14px; background: var(--zoning-color, transparent); border-color: var(--zoning-color, var(--border)); }
.zoning-item .layer-check::after { width: 6px; height: 3px; }
.zoning-swatch-zc1 { --zoning-color: #4d8748; } .zoning-swatch-zc15 { --zoning-color: #e3df3d; }
.zoning-swatch-zc2 { --zoning-color: #f39a3d; } .zoning-swatch-zc3 { --zoning-color: #ff5a3c; }
.zoning-swatch-zc4 { --zoning-color: #e45b52; } .zoning-swatch-zde { --zoning-color: #dca8e6; }
.zoning-swatch-zeis { --zoning-color: #65d2df; } .zoning-swatch-zrrm { --zoning-color: #65d2df; }
.zoning-swatch-zm { --zoning-color: #efb7c8; } .zoning-swatch-zr1 { --zoning-color: #ffffbd; }
.zoning-item input:not(:checked) + .layer-check { background: var(--zoning-color); border-color: var(--zoning-color); opacity: 0.55; }

.map-tools { position: absolute; z-index: 500; top: 24px; right: 24px; display: grid; gap: 12px; width: 52px; }
.control-group { display: grid; gap: 5px; padding: 6px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 5px 16px rgba(23, 35, 31, 0.12); }
.control-label { padding: 3px 0 4px; color: var(--muted); text-align: center; font: 9px var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; }
.map-tool { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: transparent; border: 1px solid transparent; cursor: pointer; }
.map-tool:hover, .map-tool.is-active { color: #fff; background: var(--line); border-color: var(--line); }
.tool-icon { width: 20px; height: 20px; stroke-width: 1.8; }
a.map-tool { text-decoration: none; }

.about-dialog {
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px 24px 18px;
  color: var(--ink);
  background: #fffefa;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23, 35, 31, 0.25);
  font: 15px/1.5 var(--font-body);
}
.about-dialog::backdrop { background: rgba(23, 35, 31, 0.35); }
.about-dialog h2 { margin: 0; font: 800 24px/1.2 var(--font-heading); }
.about-sub { margin: 2px 0 14px; color: var(--muted); }
.about-notice { margin: 0 0 16px; padding: 10px 12px; font-size: 14px; background: #fff5e8; border-left: 3px solid #e0a53a; }
.about-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0 0 16px; }
.about-list dt { color: var(--muted); font-size: 13px; line-height: 1.6; }
.about-list dd { margin: 0; }
.about-list a { color: var(--line); }
.about-privacy { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.about-copy { margin: 0; padding-top: 12px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); }
.about-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px;
  color: var(--muted); font-size: 24px; line-height: 1;
  background: none; border: 0; cursor: pointer;
}
.about-close:hover { color: var(--ink); }
@media (max-width: 420px) {
  .about-list { grid-template-columns: 1fr; gap: 0; }
  .about-list dd { margin-bottom: 8px; }
}
.tool-clear { color: var(--muted); border-top: 1px solid var(--border); }
.tool-status {
  position: absolute;
  z-index: 500;
  left: 420px;
  bottom: 24px;
  width: max-content;
  max-width: min(420px, calc(100% - 440px));
  padding: 8px 14px;
  color: var(--ink);
  background: rgba(250, 248, 242, 0.32);
  backdrop-filter: blur(2px);
  border: 1px solid var(--border);
  box-shadow: 0 3px 10px rgba(23, 35, 31, 0.1);
  font: 12px/1.45 var(--font-body);
  transition: left 180ms ease;
}

.layer-panel.is-collapsed ~ .tool-status { left: 78px; max-width: min(420px, calc(100% - 98px)); }

.leaflet-control-layers, .leaflet-control-zoom, .leaflet-control-scale-line {
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 3px 10px rgba(23, 35, 31, 0.1) !important;
}
.leaflet-control-layers { background: var(--panel); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); border-radius: 0; }
.leaflet-popup-content {
  font: 13px/1.5 var(--font-body);
  white-space: nowrap;
  overflow: auto;
  padding-bottom: 4px;
  resize: both;
  min-width: 180px;
  min-height: 32px;
  max-width: 80vw;
  max-height: 70vh;
}

.stacked-popup { display: grid; gap: 8px; width: 260px; white-space: normal; }
.stacked-popup > strong { font: 700 13px/1.3 var(--font-heading); }
.stacked-list { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; overflow-x: hidden; white-space: normal; }
.stacked-item { display: grid; gap: 2px; width: 100%; padding: 6px 8px; color: var(--ink); text-align: left; white-space: normal; overflow-wrap: break-word; background: #f4f1e9; border: 1px solid var(--border); cursor: pointer; font: 12px/1.3 var(--font-body); }
.stacked-item:hover, .stacked-item:focus { background: #e8efec; outline: 0; }
.stacked-item small { display: block; color: var(--muted); font-size: 11px; white-space: normal; overflow-wrap: break-word; }

.strategic-heading { margin: 14px 0 2px; font: 700 12px/1.3 var(--font-body); }
.strategic-item { gap: 8px; font-size: 12.5px; }
.layer-item.strategic-item { margin-top: 10px; }
.strategic-item .layer-check { width: 14px; height: 14px; flex: 0 0 14px; }
.strategic-item .layer-check::after { width: 6px; height: 3px; }
.strategic-swatch { width: 22px; height: 13px; flex: 0 0 22px; }
.strategic-swatch.is-line { height: 0; }
.strategic-swatch.is-point { width: 10px; height: 10px; flex: 0 0 10px; margin: 0 6px; border-radius: 50%; }

.zoning-group-title { font-weight: 600; font-size: 15px; }

.viability { display: grid; gap: 8px; }
.viability-empty { margin: 0; padding: 10px 12px; color: var(--muted); background: rgba(238, 240, 241, 0.72); border-left: 3px solid var(--line); font: 12px/1.45 var(--font-body); }
.viability-card { padding: 10px 12px; background: #fffefa; border: 1px solid var(--border); border-left: 3px solid var(--accent); }
.viability-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: var(--accent); font: 700 10px/1.2 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; }
.viability-clear { width: 22px; height: 22px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font: 18px/1 var(--font-body); }
.viability-clear:hover { color: #fff; background: var(--line); }
.viability-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font: 12px/1.35 var(--font-body); }
.viability-card dt { color: var(--muted); }
.viability-card dd { margin: 0; overflow-wrap: anywhere; }
.viability-note { margin: 6px 0 0; color: var(--muted); font: italic 10.5px/1.35 var(--font-body); }
.viability-label { margin-top: 4px; color: var(--muted); font: 600 11px/1.2 var(--font-body); }
.viability-select { width: 100%; height: 34px; padding: 0 8px; color: var(--ink); background: #fffefa; border: 1px solid var(--border); font: 12px var(--font-body); }
.viability-mode { display: flex; margin-top: 4px; border: 1px solid var(--line); }
.viability-mode label { position: relative; flex: 1; cursor: pointer; }
.viability-mode input { position: absolute; opacity: 0; pointer-events: none; }
.viability-mode span { display: block; padding: 6px 0; color: var(--line); text-align: center; font: 600 12px var(--font-body); }
.viability-mode input:checked + span { color: #fff; background: var(--line); }
.viability-mode input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.viability-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 36px; padding: 4px 6px; background: #fffefa; border: 1px solid var(--border); cursor: text; }
.viability-tags:focus-within { border-color: var(--line); }
.viability-tags input { flex: 1 1 120px; min-width: 0; height: 26px; padding: 0 4px; color: var(--ink); background: transparent; border: 0; outline: 0; font: 12px var(--font-body); }
.viability-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; color: #fff; background: var(--line); font: 600 11px/1.4 var(--font-body); }
.viability-tag button { padding: 0 3px; color: #fff; background: transparent; border: 0; cursor: pointer; font: 14px/1 var(--font-body); }
.viability-count { margin: 2px 0 0; color: var(--muted); font: 11px/1.4 var(--font-body); }
.viability-count:empty { display: none; }
.viability-results { display: grid; gap: 6px; }
.viability-item { padding: 8px 10px; background: #fffefa; border: 1px solid var(--border); }
.viability-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viability-item-head strong { font: 700 12px/1.3 var(--font-heading); }
.viability-item p { margin: 4px 0 3px; font: 12.5px/1.35 var(--font-body); }
.viability-item small { display: block; color: var(--muted); font: 11px/1.35 var(--font-body); }
.viability-badge { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; font: 700 10px/1.4 var(--font-body); text-transform: uppercase; letter-spacing: 0.03em; }
.viability-badge.is-ok { color: #065f46; background: #d1fae5; }
.viability-badge.is-no { color: #991b1b; background: #fee2e2; }
.viability-badge.is-analysis { color: #92400e; background: #fef3c7; }
.viability-map-btn { margin-top: 7px; padding: 4px 9px; color: #1f7a45; background: transparent; border: 1px solid #1f7a45; cursor: pointer; font: 600 11px var(--font-body); }
.viability-map-btn:hover, .viability-map-btn.is-active { color: #fff; background: #1f7a45; }
.viability-map-note { display: block; margin-top: 6px; color: #92400e; font: italic 10.5px/1.35 var(--font-body); }
.viability-map-banner { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; color: #14532d; background: #e3f5ea; border-left: 3px solid #1f7a45; font: 11.5px/1.4 var(--font-body); }
.viability-map-banner[hidden] { display: none; }
.viability-map-banner div { flex: 1; overflow-wrap: anywhere; }
.viability-map-banner small { display: block; margin-top: 3px; color: #3f6b50; font-size: 10.5px; }
.viability-map-banner button { width: 22px; height: 22px; flex: 0 0 auto; color: #14532d; background: transparent; border: 0; cursor: pointer; font: 18px/1 var(--font-body); }
.viability-map-banner button:hover { color: #fff; background: #1f7a45; }
.viability-disclaimer { margin: 4px 0 0; padding: 8px 10px; color: #6b4a1e; background: #fff5e8; border-left: 3px solid #e0a53a; font: 10.5px/1.45 var(--font-body); }
.viability-disclaimer[hidden] { display: none; }
.viability-print { display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; margin-top: 4px; color: #fff; background: var(--line); border: 0; cursor: pointer; font: 600 12px var(--font-body); }
.viability-print:hover:not(:disabled) { background: var(--accent); }
.viability-print:disabled { color: var(--muted); background: #e3e5e4; cursor: not-allowed; }
.viability-print svg { width: 16px; height: 16px; }
.popup-actions { display: flex; gap: 12px; margin-top: 10px; }
/* Botão do croqui: só o ícone, no canto superior direito, ao lado do × do Leaflet. */
.popup-croqui {
  position: absolute; top: 5px; right: 28px;
  display: grid; place-items: center;
  width: 24px; height: 24px; padding: 0;
  color: var(--muted); background: none; border: 0; cursor: pointer;
}
.popup-croqui:hover { color: var(--line); }
.popup-croqui + strong { display: inline-block; padding-right: 34px; }
.popup-action { padding: 5px 10px; color: #fff; background: var(--line); border: 1px solid var(--line); cursor: pointer; font: 600 12px var(--font-body); }
.popup-action:hover { background: var(--accent); border-color: var(--accent); }
.popup-action.is-active { color: var(--line); background: transparent; }
.popup-action.is-active:hover { color: #fff; background: var(--line); }
.popup-parameters { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); white-space: normal; }
.popup-parameters-zone + .popup-parameters-zone { margin-top: 10px; }
.popup-parameters-note { margin: 0 0 8px; color: var(--muted); font: italic 11px/1.35 var(--font-body); }

.luos-table-wrap { max-width: 100%; margin-top: 6px; overflow-x: auto; white-space: normal; }
.luos-table { border-collapse: collapse; white-space: nowrap; }
.luos-table caption { padding-bottom: 4px; color: var(--muted); text-align: left; font: 600 10px/1.3 var(--font-body); text-transform: uppercase; letter-spacing: 0.03em; }
.luos-table th, .luos-table td { padding: 3px 6px; border: 1px solid var(--border); font-size: 11px; }
.luos-table th { color: var(--muted); background: #f4f1e9; font-weight: 600; text-align: left; }
.luos-notes { display: grid; gap: 2px; margin: 4px 0 0; padding-left: 14px; max-width: 100%; color: var(--muted); white-space: normal; font-size: 10.5px; line-height: 1.4; }
.luos-notes li { overflow-wrap: break-word; }

.contour-label {
  display: inline-block;
  padding: 0 4px;
  color: #6b4a28;
  white-space: nowrap;
  background: rgba(250, 248, 242, 0.85);
  border: 1px solid #a67c52;
  border-radius: 2px;
  font: 700 10px/1.5 var(--font-body);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.feature-label {
  display: inline-block;
  padding: 0 4px;
  color: #17607a;
  white-space: nowrap;
  background: rgba(250, 248, 242, 0.85);
  border: 1px solid #4a90a4;
  border-radius: 2px;
  font: 700 10px/1.5 var(--font-body);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Rótulo fixo de pontos (escolas): texto com halo, sem a caixa padrão do tooltip do Leaflet. */
.leaflet-tooltip.point-label {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
  font: 700 11px/1.2 var(--font-body);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff;
}
.leaflet-tooltip.point-label::before { display: none; }
/* Com a cidade inteira na tela, os nomes se amontoam: só aparecem a partir do zoom de bairro. */
.hide-point-labels .leaflet-tooltip.point-label { display: none; }

.health-popup { width: 260px; max-width: 70vw; white-space: normal; line-height: 1.4; }
.health-popup strong { display: block; }
.health-popup small { display: block; margin-bottom: 6px; color: var(--muted, #666); }
.health-popup div { margin-top: 3px; }
.health-route { display: inline-block; margin-top: 8px; font-weight: 600; }

.strategic-label { pointer-events: none; }
.strategic-label span {
  display: inline-block;
  padding: 0 4px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid;
  border-radius: 2px;
  font: 700 10px/1.5 var(--font-body);
  transform: translate(-50%, -50%);
}
/* Pontos (AED): rótulo ao lado do círculo, não por cima dele. */
.strategic-label.is-point span { transform: translate(9px, -50%); }

@media (max-width: 640px) {
  .map-shell { height: 100vh; }
  .property-search { top: 10px; left: 66px; right: 10px; width: auto; transform: none; }
  .property-search-results { left: 0; right: 0; }
  .layer-panel { width: min(320px, calc(100% - 58px)); bottom: 0; }
  .sidebar-content { width: auto; flex: 1 1 auto; padding: 16px; }
  .map-tools { top: 66px; right: 10px; }
  .tool-status,
  .layer-panel.is-collapsed ~ .tool-status { left: 10px; right: 10px; bottom: 10px; width: auto; max-width: none; }
  .startup-message { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .panel-heading { padding-bottom: 13px; }
  .panel-section { padding-top: 13px; }
  .layer-group-items { max-height: 44vh; }
}