.worker-location {
 display: grid;
 gap: .8rem;
 grid-template-columns: minmax(0,1fr);
 grid-template-areas: "choice" "status" "surface" "legend" "time";
}
.worker-map-settings { display: contents; }
.worker-map-settings > label {
 grid-area: choice;
 display: grid;
 gap: .3rem;
 max-width: 34rem;
}
.worker-location-surface {
 grid-area: surface;
 position: relative;
 overflow: hidden;
 border: 1px solid #c5d1c8;
 border-radius: .65rem;
 background: #e9eee8;
}
.worker-map-round, .worker-map-state, [data-worker-map-details] { display: none; }
.worker-map-pin { pointer-events: none; fill: #17271f; }
.worker-map-pin text { fill: white; font: 650 11px/1 system-ui,sans-serif; }
.worker-shell[data-employee-view="map"] :is([data-project-pin],[data-project-boundary]) { pointer-events: visiblePainted; cursor: pointer; }
.worker-location :is([data-worker-map-point],[data-worker-map-accuracy]) { pointer-events: none; }
.worker-routes { display: none; }
.worker-shell[data-employee-view="map"] .worker-routes { display: block; margin-top: 1.25rem; }
.worker-routes h3 { margin: 0 0 .6rem; color: #173e32; }
.worker-routes ul { list-style: none; margin: 0; padding: 0; }
.worker-routes li { border-top: 1px solid #dce4db; }
.worker-routes li > :is(a,div) {
 display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
 gap: .15rem .75rem; min-height: 48px; padding: .65rem .25rem;
 color: #173e32; text-decoration: none;
}
.worker-routes strong,.worker-routes li span { grid-column: 1; overflow-wrap: anywhere; }
.worker-routes li span { color: #526757; font-size: .86rem; }
.worker-routes li b { grid-column: 2; grid-row: 1 / 3; font-size: .86rem; }
.worker-routes li a:hover strong { text-decoration: underline; }
.worker-routes li a:focus-visible { outline: 3px solid #b35d20; outline-offset: 1px; }
.worker-location [data-worker-map-surface] {
 display: block;
 width: 100%;
 height: clamp(15rem,32vh,23rem);
 touch-action: none;
 cursor: grab;
}
.worker-location [data-worker-map-surface]:active { cursor: grabbing; }
.worker-location .site-boundary {
 fill: #148058;
 fill-opacity: .22;
 stroke: #146444;
 stroke-width: 3;
}
.worker-location .other-boundary {
 fill: #52766b;
 fill-opacity: .12;
 stroke: #52766b;
 stroke-dasharray: 6 3;
 stroke-width: 2;
}
.worker-location [data-worker-map-point] { fill: #0b55a5; stroke: white; stroke-width: 3; }
.worker-location [data-worker-map-accuracy] { fill: #2768b6; fill-opacity: .16; stroke: #2768b6; }
.worker-location-tools {
 grid-area: surface;
 position: relative;
 z-index: 1;
 align-self: start;
 justify-self: start;
 display: flex;
 flex-wrap: wrap;
 gap: .3rem;
 margin: .5rem;
 pointer-events: none;
}
.worker-location-tools button.secondary {
 width: auto;
 min-height: 2.5rem;
 min-width: 2.5rem;
 padding: .35rem .55rem;
 border: 1px solid #c4d0c6;
 background: white;
 color: #173f32;
 pointer-events: auto;
}
.worker-location [hidden] { display: none; }
.worker-map-credit {
 position: absolute;
 right: 0;
 bottom: 0;
 padding: .1rem .3rem;
 font: 11px/1.45 sans-serif;
 background: white;
 color: #23443a;
}
.worker-map-credit a { color: inherit; }
.worker-location select { min-width: 0; max-width: 100%; margin: 0; }
.worker-location [data-worker-map-status] {
 grid-area: status;
 margin: 0;
 padding: .65rem .8rem;
 border-radius: .5rem;
 background: #edf1ec;
 color: #344e45;
 font-size: .92rem;
 line-height: 1.45;
}
.worker-location [data-result="inside"] { color: #15543c; background: #dfefe4; font-weight: 600; }
.worker-location [data-result="outside"], .worker-location [data-result="uncertain"] {
 color: #754218; background: #fff0db; font-weight: 600;
}
.worker-map-legend { grid-area: legend; display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: #40574d; font-size: .8rem; }
.worker-map-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.worker-map-legend span::before { content: ""; width: 16px; height: 10px; border: 2px solid #146444; background: #d8e9df; }
.worker-map-legend [data-point-key]::before { width: 12px; height: 12px; border-radius: 50%; background: #0b55a5; border: 3px solid #bdd4ef; }
.worker-location [data-worker-map-time] { grid-area: time; margin: 0; }

@media (max-width: 720px) {
 .worker-shell[data-employee-view="map"] { --worker-map-height: clamp(14rem,54dvh,34rem); }
 .worker-shell[data-employee-view="map"] .worker-routes { margin: 0; padding: 1rem; }
 .worker-location { position: relative; display: block; }
 .worker-location-surface { border: 0; border-radius: 0; }
 .worker-location [data-worker-map-surface] {
  height: var(--worker-map-height,clamp(13rem,41vh,31rem));
  height: var(--worker-map-height,clamp(13rem,41dvh,31rem));
 }
 .worker-location .site-boundary,
 .worker-location .other-boundary {
  fill: #313b35; fill-opacity: .14; stroke: #26372e; stroke-width: 1.7; stroke-dasharray: none;
 }
 .worker-location .other-boundary { fill-opacity: .07; stroke: #58655b; }
 .worker-location [data-worker-map-point] { fill: #008bf3; stroke: white; stroke-width: 3.5; filter: drop-shadow(0 1px 2px #28415770); }
 .worker-location [data-worker-map-accuracy] { fill: #1788dd; fill-opacity: .13; stroke: #84bae6; stroke-opacity: .55; }
 .worker-location .worker-map-round {
  position: absolute; z-index: 2; top: .65rem; display: grid; place-items: center;
  width: 44px; height: 44px; min-height: 44px; padding: 10px; color: #43564b;
  border-radius: 50%; border: 1px solid #d4dbd2; background: #fff; box-shadow: 0 1px 5px #17312525;
 }
 .worker-map-round svg { width: 23px; height: 23px; }
 .worker-map-settings-toggle { left: max(.65rem,env(safe-area-inset-left)); }
 .worker-map-recenter { right: max(.65rem,env(safe-area-inset-right)); }
 .worker-map-round[aria-expanded="true"] { color: #163e31; background: #f2f6ef; border-color: #769384; }
 .worker-map-settings { display: none; }
 .worker-location[data-settings-open="true"] .worker-map-settings {
  display: grid; position: absolute; z-index: 3; top: 3.75rem; left: max(.65rem,env(safe-area-inset-left));
  width: min(19rem,calc(100% - 1.3rem)); max-height: calc(100% - 4.4rem); overflow-y: auto;
  gap: .65rem; padding: .8rem; border: 1px solid #d3ddd2; border-radius: .8rem;
  background: #fff; box-shadow: 0 4px 18px #172c242b; overscroll-behavior: contain;
 }
 .worker-location .worker-map-settings > * { grid-area: auto; }
 .worker-map-settings [data-worker-map-project] { font-size: 16px; }
 .worker-map-settings .worker-location-tools { position: static; margin: 0; z-index: auto; }
 .worker-map-settings .worker-location-tools button { min-height: 44px; min-width: 44px; }
 .worker-map-settings .worker-location-tools [data-worker-map-action="point"] { display: none; }
 .worker-map-settings [data-worker-map-details]:not(:empty) { display: block; }
 .worker-location .worker-map-state {
  position: absolute; bottom: .5rem; left: max(.6rem,env(safe-area-inset-left));
  display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 8rem);
  border-radius: 1rem; padding: .25rem .5rem; background: #fffffff2; color: #354c3d;
  font-size: .7rem; font-weight: 650; line-height: 1.2; pointer-events: none;
 }
 .worker-map-state::before { content: ""; flex: 0 0 6px; height: 6px; border-radius: 50%; background: #87958b; }
 .worker-map-state[data-result="inside"]::before { background: #228652; }
 .worker-map-state:is([data-result="outside"],[data-result="ambiguous"],[data-result="edge"],[data-result="poor-accuracy"])::before { background: #aa631f; }
 .worker-map-credit { bottom: .3rem; right: max(.35rem,env(safe-area-inset-right)); background: #ffffffe8; border-radius: 3px; }
}
