/* Страница /map: карта на весь экран под шапкой (64px) */
.map-page { overflow: hidden; }
.map-wrap { position: relative; height: calc(100vh - 65px); height: calc(100dvh - 65px); }
#map { position: absolute; inset: 0; background: #dbd7c0; }
.leaflet-container { font-family: var(--f-body); }

.map-panel {
  position: absolute; z-index: 500; top: 12px; left: 12px; width: 236px; max-width: calc(100% - 24px);
  background: rgba(16, 16, 18, .9); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; color: var(--text); font-size: 13px; display: grid; gap: 10px;
}
.map-panel b { font-family: var(--f-head); letter-spacing: .06em; font-size: 15px; }
.map-goto { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.map-goto input { width: 100%; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font-family: var(--f-mono); }
.map-goto button { background: var(--red); color: #fff; border: 0; border-radius: var(--radius); padding: 6px 10px; cursor: pointer; }
.map-coords { color: var(--amber); }
.map-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; color: var(--muted); font-size: 12px; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.lg-res { background: rgb(210,158,105); } .lg-ret { background: rgb(184,205,84); } .lg-food { background: rgb(245,225,60); }
.lg-med { background: rgb(229,128,151); } .lg-com { background: rgb(139,117,235); } .lg-ind { background: rgb(56,54,53); }
.lg-zone { background: transparent; border: 2px solid var(--red); border-radius: 50%; }
.map-legend span:last-child { grid-column: 1 / -1; }

.town-label {
  background: rgba(16,16,18,.82); color: #ebe7e0; border: 0; box-shadow: none; border-radius: 3px;
  font-family: var(--f-head); font-size: 13px; letter-spacing: .06em; padding: 2px 7px; text-transform: uppercase;
}
.town-label::before { display: none; }
.zone-label { background: #e3402a; color: #fff; border: 0; font-size: 11px; padding: 1px 6px; }
.zone-label::before { display: none; }
.leaflet-popup-content { font-size: 13px; }

@media (max-width: 640px) {
  .map-panel { top: auto; bottom: 12px; width: auto; right: 12px; }
  .map-legend { display: none; }
}
