/* KKN Explorer v2.2.1: local, scoped Leaflet 1.9.x layout fallback.
 * Root cause addressed: Leaflet JS with missing/overridden Leaflet CSS causes
 * loose tiles, invisible SVG markers, and horizontal overflow.
 * No site-wide style resets. */
#kkn-impact-explorer-v2,
#kkn-impact-explorer-v2 .kie-shell,
#kkn-impact-explorer-v2 .kie-two,
#kkn-impact-explorer-v2 .kie-pane,
#kkn-impact-explorer-v2 #kie-map{box-sizing:border-box;}
#kkn-impact-explorer-v2,
#kkn-impact-explorer-v2 .kie-shell { min-width:0; width:100%; }
#kkn-impact-explorer-v2 .kie-shell { max-width:1300px; }
#kkn-impact-explorer-v2 .kimd-extra,
#kkn-impact-explorer-v2 .kie-two,
#kkn-impact-explorer-v2 .kie-pane { min-width:0; max-width:100%; }
#kkn-impact-explorer-v2 .kie-two {
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,0.9fr);
  gap:14px;
  width:100%;
}
#kkn-impact-explorer-v2 .kie-pane { overflow:hidden; }
#kkn-impact-explorer-v2 #kie-map {
  display:block; position:relative; width:100%; max-width:100%; min-width:0;
  height:380px; overflow:hidden; isolation:isolate; background:#dceaf0;
  touch-action:pan-x pan-y;
}
@media(max-width:950px) {
  #kkn-impact-explorer-v2 .kie-two{grid-template-columns:minmax(0,1fr);}
  #kkn-impact-explorer-v2 #kie-map{height:340px;}
}
@media(max-width:540px){
  #kkn-impact-explorer-v2 #kie-map{height:300px;}
}

/* Leaflet positioning and stacking — local fallback even if remote leaflet.css
   is unavailable. Leaflet sets transforms and most element dimensions inline. */
#kie-map.leaflet-container{position:relative;overflow:hidden;outline:0;background:#e9eff2;cursor:grab;}
#kie-map.leaflet-container.leaflet-drag-target,
#kie-map.leaflet-container.leaflet-grab{cursor:grab;}
#kie-map.leaflet-container.leaflet-dragging{cursor:grabbing;}
#kie-map .leaflet-pane,
#kie-map .leaflet-tile,
#kie-map .leaflet-marker-icon,
#kie-map .leaflet-marker-shadow,
#kie-map .leaflet-tile-container,
#kie-map .leaflet-layer,
#kie-map .leaflet-pane > svg,
#kie-map .leaflet-pane > canvas,
#kie-map .leaflet-zoom-box,
#kie-map .leaflet-image-layer,
#kie-map .leaflet-video-layer {
  position:absolute!important;left:0;top:0;
}
#kie-map .leaflet-pane{z-index:400;}
#kie-map .leaflet-tile-pane{z-index:200;}
#kie-map .leaflet-overlay-pane{z-index:400;}
#kie-map .leaflet-shadow-pane{z-index:500;}
#kie-map .leaflet-marker-pane{z-index:600;}
#kie-map .leaflet-tooltip-pane{z-index:650;}
#kie-map .leaflet-popup-pane{z-index:700;}
#kie-map .leaflet-map-pane canvas{z-index:100;}
#kie-map .leaflet-map-pane svg{z-index:200;}
#kie-map .leaflet-tile,
#kie-map .leaflet-marker-icon,
#kie-map .leaflet-marker-shadow{user-select:none;-webkit-user-select:none;-webkit-user-drag:none;}
#kie-map .leaflet-tile{width:256px;height:256px;max-width:none!important;max-height:none!important;border:0!important;visibility:inherit;}
#kie-map img.leaflet-tile,
#kie-map img.leaflet-marker-icon,
#kie-map img.leaflet-marker-shadow{max-width:none!important;max-height:none!important;}
#kie-map .leaflet-tile-container{pointer-events:none;}
#kie-map .leaflet-zoom-animated{transform-origin:0 0;}
#kie-map .leaflet-image-layer,
#kie-map .leaflet-tile{image-rendering:auto;}
#kie-map .leaflet-overlay-pane svg{overflow:hidden;}
#kie-map .leaflet-interactive{cursor:pointer;pointer-events:visiblePainted;}
#kie-map.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y;}
#kie-map .leaflet-control-container{font:12px/1.5 system-ui,sans-serif;}
#kie-map .leaflet-top,#kie-map .leaflet-bottom{position:absolute;z-index:1000;pointer-events:none;}
#kie-map .leaflet-top{top:0;}#kie-map .leaflet-bottom{bottom:0;}
#kie-map .leaflet-left{left:0;}#kie-map .leaflet-right{right:0;}
#kie-map .leaflet-control{position:relative;z-index:800;pointer-events:auto;float:left;clear:both;}
#kie-map .leaflet-right .leaflet-control{float:right;}
#kie-map .leaflet-top .leaflet-control{margin-top:10px;}
#kie-map .leaflet-bottom .leaflet-control{margin-bottom:10px;}
#kie-map .leaflet-left .leaflet-control{margin-left:10px;}
#kie-map .leaflet-right .leaflet-control{margin-right:10px;}
#kie-map .leaflet-control-zoom{box-shadow:0 1px 5px rgba(0,0,0,.35);border-radius:4px;overflow:hidden;}
#kie-map .leaflet-control-zoom a{display:block;width:30px;height:30px;line-height:30px;text-align:center;font-weight:bold;font-size:18px;background:white;color:#333;text-decoration:none;border-bottom:1px solid #ccc;}
#kie-map .leaflet-control-zoom a:last-child{border-bottom:0;}
#kie-map .leaflet-control-zoom a:hover{background:#f3f3f3;}
#kie-map .leaflet-control-attribution{background:rgba(255,255,255,.8);padding:0 5px;color:#333;font-size:10px;}
#kie-map .leaflet-control-attribution a{color:#2876a0;}
#kie-map .leaflet-popup{position:absolute;text-align:center;margin-bottom:20px;}
#kie-map .leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:10px;background:white;box-shadow:0 3px 12px rgba(0,0,0,.28);}
#kie-map .leaflet-popup-content{margin:13px 17px;line-height:1.45;min-width:120px;}
#kie-map .leaflet-popup-tip-container{position:absolute;left:50%;margin-left:-20px;width:40px;height:20px;overflow:hidden;pointer-events:none;}
#kie-map .leaflet-popup-tip{width:17px;height:17px;background:white;transform:translate(11px,-11px) rotate(45deg);box-shadow:0 3px 12px rgba(0,0,0,.18);}
#kie-map .leaflet-popup-close-button{position:absolute;top:0;right:0;border:0!important;text-decoration:none!important;color:#555!important;font-weight:bold;font-size:20px;padding:4px 9px;z-index:10;}
#kie-map .leaflet-tooltip{position:absolute;padding:6px 9px;background:white;border:1px solid #cbd5de;border-radius:5px;box-shadow:0 2px 4px rgba(0,0,0,.12);white-space:nowrap;}
