/* Shared safe bands keep independently published controls from intersecting. */
.leaflet-container .leaflet-bottom.leaflet-left.nemap-bottom-layout{bottom:var(--mf-bottom,var(--nemap-bottom-clearance,0px))!important}
[data-found-count-container]{bottom:var(--mf-count-bottom,8px)!important;left:8px!important}
.nemap-current-tools{border-top:1px solid #7d8c9b66;margin-top:12px;padding-top:8px}
.nemap-current-tools h3{font-size:13px;margin:0 0 8px}
.nemap-current-tool{display:flex;gap:10px;padding:5px 0;text-align:left}
.nemap-current-tool-icon{flex:0 0 22px;font-size:12px;font-weight:700;text-align:center}
.nemap-current-tool strong{font-size:13px;line-height:1.3}
.nemap-current-tool p{font-size:12px;line-height:1.45;margin:3px 0 0;opacity:.85}
@media(max-width:720px){
  .nemap-mobile-drawer-open .sidebar{position:relative!important}
  .nemap-mobile-drawer-open .map-area .leaflet-control-container,
  .nemap-mobile-drawer-open .map-area .cluster-mode-control,
  .nemap-mobile-drawer-open .map-area .leaflet-top,
  .nemap-mobile-drawer-open .analysis-guide-hint,
  .nemap-mobile-drawer-open #nemap-social-links,
  .nemap-mobile-drawer-open [data-theme-toggle],
  .nemap-mobile-drawer-open button[title="Довідковий Центр"],
  .nemap-mobile-drawer-open .developer-feedback-button,
  .nemap-mobile-drawer-open [data-found-count-container]{visibility:hidden;pointer-events:none}
  .nemap-mobile-drawer-open .sidebar .sidebar-header{padding-right:48px;box-sizing:border-box}
  .nemap-mobile-drawer-open .sidebar .sidebar-tab-button{padding:12px 5px!important;min-width:0;font-size:13px}
  .sidebar .nemap-ai-entry--sidebar{position:absolute;top:2px!important;right:2px;left:auto!important;width:44px;max-width:44px;height:44px;margin:0;padding:0;border:0;background:transparent;overflow:visible!important}
  .sidebar .nemap-ai-entry--sidebar .nemap-ai-launcher{width:44px;height:44px;min-height:44px;padding:0;justify-content:center}
  .nemap-ai-entry--sidebar .nemap-ai-launcher-label{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
  .nemap-ai-entry--sidebar .nemap-ai-launcher-symbol{font-size:24px}
  #nemap-production-risk-control{left:12px!important;right:auto!important;top:64px!important}
  #nemap-production-risk-control .cluster-mode-menu{left:12px!important;top:120px!important;right:auto!important;width:min(300px,calc(100vw - 24px));max-height:calc(100dvh - 136px);overflow-y:auto}
  .leaflet-container .leaflet-bottom.leaflet-left.nemap-bottom-layout{bottom:var(--mf-bottom,var(--nemap-bottom-clearance,0px))!important;max-width:calc(100% - 156px)}
  .map-area .leaflet-container .nemap-traffic-dock,.map-area .leaflet-container .traffic-road-legend,.map-area .leaflet-container .ne-source-control{max-width:100%;box-sizing:border-box}
  .traffic-road-legend{font-size:10px}
  .map-area .leaflet-container .traffic-road-legend{max-height:var(--mf-legend-height,none);overflow-y:auto;overscroll-behavior:contain}
  .traffic-road-scale{flex-wrap:wrap}
  .traffic-road-scale .traffic-road-band{min-width:30px;flex:1 1 30px;padding-inline:3px}
  .ne-source-toggle{max-width:100%;white-space:normal;min-height:44px}
  [data-found-count-container]{bottom:var(--mf-count-bottom,8px)!important;left:8px!important;max-width:calc(100vw - 112px)}
  .leaflet-bottom.leaflet-right .leaflet-control-attribution{max-width:100vw;font-size:10px;line-height:1.4;box-sizing:border-box}
  .leaflet-control-scale{margin-bottom:4px!important}
  #nemap-social-links{right:52px;bottom:calc(var(--mf-footer,20px) + 88px);flex-direction:row;gap:0}
  #nemap-social-links .ne-social-link{width:44px;height:44px}
  [data-theme-toggle]{right:8px!important;bottom:calc(var(--mf-footer,20px) + 88px)!important;width:44px!important;height:44px!important}
  button[title="Довідковий Центр"]{right:52px!important;bottom:calc(var(--mf-footer,20px) + 40px)!important;width:44px!important;height:44px!important}
  .developer-feedback-button{right:8px!important;bottom:calc(var(--mf-footer,20px) + 40px)!important;width:44px!important;height:44px!important}
  #mobile-filter-anchor{position:fixed!important;left:auto!important;top:auto!important;right:8px;bottom:calc(var(--mf-footer,20px) + 136px);margin:0!important;width:44px;max-height:max(80px,calc(100dvh - 480px));overflow-y:auto}
  #mobile-filter-anchor>.icon-button-group{width:44px;box-sizing:border-box}
  .map-help-overlay{left:8px!important;top:56px!important;width:calc(100vw - 16px)!important;max-width:400px!important;max-height:calc(100dvh - 72px)!important;box-sizing:border-box}
}

@media(orientation:landscape) and (max-height:500px){.analysis-guide-hint{display:flex;align-items:center;gap:8px;width:auto!important;max-width:calc(100vw - 16px);max-height:44px;padding:4px 34px 4px 8px;overflow:hidden}.analysis-guide-hint strong,.analysis-guide-hint p{display:none}.analysis-guide-hint .analysis-guide-hint-open{min-height:30px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analysis-guide-hint .analysis-guide-hint-close{top:4px;right:2px}}
@media(orientation:landscape) and (min-width:721px) and (max-height:500px){
  .leaflet-container .leaflet-bottom.leaflet-left.nemap-bottom-layout{bottom:var(--mf-bottom,var(--nemap-bottom-clearance,0px))!important}
  [data-found-count-container]{bottom:var(--mf-count-bottom,8px)!important;left:8px!important}
  .analysis-guide-hint{top:64px!important;bottom:auto!important;margin-left:180px;max-width:calc(100vw - 216px)}
}
