#map-layers-button[aria-expanded=true]{background:var(--green);color:var(--white);border-color:var(--green)}
#map-layers-button.has-overlays:not([aria-expanded=true]) .icon{fill:var(--green-soft)}
.map-layer-panel{
  position:absolute;z-index:5;top:calc(100% + 8px);right:0;width:min(365px,calc(100vw - 24px));
  display:flex;flex-direction:column;max-height:calc(100dvh - 185px);overflow:hidden;
  border:1px solid var(--line);border-radius:14px;background:var(--white);color:var(--green);pointer-events:auto;
}
.map-layer-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:14px 10px 12px 16px}
.map-layer-header h2{margin:0;font-size:27px;line-height:1.05}
.map-layer-header p{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
.map-layer-header .icon-button{flex:none;width:44px;height:44px}
.map-layer-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 15px 6px;scrollbar-width:thin}
.map-layer-scroll section+section{margin-top:12px}
.map-layer-scroll h3{margin:0;padding:7px 0 6px;border-bottom:1px solid var(--line);font-size:12px;font-weight:650}
.map-layer-list{padding:0;margin:0;list-style:none}
.map-layer-row{display:flex;align-items:center;min-height:44px;position:relative;border-bottom:1px solid var(--line)}
.map-layer-row:last-child{border-bottom:0}
.map-layer-row.is-drop-target::after{content:'';position:absolute;left:2px;right:2px;bottom:0;border-bottom:2px solid var(--green);pointer-events:none}
.map-layer-toggle{flex:1;align-self:stretch;min-width:0;display:flex;align-items:center;gap:8px;padding:4px 2px;font-size:13px;line-height:1.35;cursor:pointer}
.map-layer-toggle input{width:17px;height:17px;flex:none;margin:0 1px;accent-color:var(--green)}
.map-layer-swatch{width:14px;border-top:2px solid var(--overlay-color);flex:none}
.map-layer-row[data-overlay=counties] .map-layer-swatch,.map-layer-row[data-overlay=grid] .map-layer-swatch{border-top-style:dashed}
.map-layer-name{min-width:0;font-weight:580}
.map-layer-note{display:block;margin-top:1px;color:var(--muted);font-size:11px;font-weight:400}
.map-layer-order{display:flex;align-items:center;flex:none}
.map-layer-grip{display:grid;place-items:center;width:22px;height:38px;cursor:grab;color:var(--muted)}
.map-layer-grip:active{cursor:grabbing}
.map-layer-grip .icon{width:16px;height:16px}
.map-layer-move,.map-layer-retry{min-width:34px;min-height:44px;border:0;padding:0 5px;background:none;color:var(--green)}
.map-layer-move:not(:disabled):hover,.map-layer-retry:hover{background:var(--green-soft)}
.map-layer-move:disabled{opacity:.35;cursor:default}
.map-layer-move .icon{display:block;width:16px;margin:auto}
.map-layer-move:last-child .icon{transform:rotate(180deg)}
.map-layer-retry{font-size:12px;text-decoration:underline;text-underline-offset:2px}
.map-layer-sources{margin:0;border-top:1px solid var(--line);padding:10px 15px;color:var(--muted);font-size:11px;line-height:1.4}
.map-layer-sources a{text-underline-offset:2px}
.map-layer-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.map-layer-grid-label{width:max-content!important;height:auto!important;padding:1px 3px;border-radius:2px;background:var(--white);color:#3b5962;font:500 10px/1.3 var(--sans);white-space:nowrap}
@media (pointer:coarse){
  .map-layer-grip{display:none}
  .map-layer-move{min-width:44px}
}
@media(max-width:700px),(max-width:1000px) and (max-height:500px) and (pointer:coarse){
  .map-layer-panel{top:0;right:calc(100% + 8px);width:min(340px,calc(100vw - 76px));max-height:calc(100dvh - var(--phone-header-height,90px) - 24px)}
  .map-layer-header{padding:11px 6px 8px 12px}
  .map-layer-header h2{font-size:24px}
  .map-layer-header p{font-size:11px}
  .map-layer-scroll{padding-right:8px;padding-left:11px}
  .map-layer-toggle{gap:5px}
  .map-layer-swatch{width:11px}
  .map-layer-sources{padding:8px 11px}
}
