.field-map { margin-top: 24px; }
.field-map, .field-map *, .field-map *::before, .field-map *::after { box-sizing: border-box; }
.field-map > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field-map > summary::after { content: '+'; font-size: 1.3rem; }
.field-map[open] > summary::after { content: '−'; }
.map-count { color: var(--muted); font-size: .85rem; font-weight: 400; margin-left: auto; }
.map-body { padding-bottom: 14px; }
.map-body p { margin: 8px 0 12px; }
.map-intro, .map-help, .map-message { font-size: .88rem; color: var(--muted); }
.map-message:empty { display: none; }
.map-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.map-body select { font: inherit; font-size: .9rem; padding: 10px 8px; width: 100%; min-height: 44px; min-width: 0;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.map-body label { min-width: 0; }
.map-body select:focus-visible, .map-body a:focus-visible { outline: 3px solid var(--wait); outline-offset: 2px; }
.map-canvas { height: 370px; border: 1px solid var(--line); border-radius: 10px; isolation: isolate; background: #E8EEEB; }
.map-canvas[hidden], .map-body [hidden] { display: none !important; }
.map-canvas .leaflet-control a { color: var(--ink); }
.map-canvas .leaflet-control-zoom a { min-width: 40px; height: 40px; line-height: 40px; }
.map-canvas .leaflet-control-attribution { font-size: 10px; }
.map-canvas .leaflet-control-attribution a { color: #20528B; }
.capture-pin { background: transparent; border: 0; }
.capture-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid white; background: var(--pin-color); color: white; font: 700 14px/1 system-ui, sans-serif;
  box-shadow: 0 2px 7px #14231d55; }
.capture-pin.is-selected span { outline: 3px solid #14231D; outline-offset: 2px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0; padding: 0; list-style: none; font-size: .8rem; }
.map-legend li { display: flex; align-items: center; gap: 5px; }
.map-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pin-color); }
.map-fit { min-height: 44px; padding: 8px 12px; font-size: .9rem; margin-top: 8px; }
.map-selection { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.map-selection h3 { margin: 0 0 6px; font-size: 1rem; overflow-wrap: anywhere; }
.map-selection p { margin: 4px 0 8px; font-size: .9rem; }
.map-selection .map-status { font-weight: 700; color: var(--pin-color); }
.map-selection .map-actions { display: grid; gap: 8px; margin-top: 10px; }
.map-selection button, .map-link { display: block; min-height: 44px; padding: 10px 12px; font-size: .9rem;
  font-weight: 700; text-decoration: none; text-align: center; border: 1px solid var(--ink); border-radius: 8px; color: var(--ink); background: white; }
.map-link.primary { background: var(--go); border-color: var(--go); color: white; }
.map-route { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.map-route h3 { font-size: 1rem; margin: 0 0 6px; }
.map-empty { padding: 20px 12px; text-align: center; background: var(--bg); border-radius: 8px; }
@media (min-width: 680px) { .map-canvas { height: 410px; } }
@media (max-width: 370px) { .map-controls { grid-template-columns: 1fr; } }

.live-gps { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); min-width: 0; }
.live-gps, .live-gps *, .live-gps *::before, .live-gps *::after { box-sizing: border-box; }
.live-gps [hidden] { display: none !important; }
.live-gps-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-gps-heading h2 { font-size: 1rem; margin: 0; }
.live-gps-badge { border-radius: 20px; background: #E8EEEB; color: var(--muted); font-size: .78rem; padding: 4px 8px; font-weight: 700; white-space: nowrap; }
.live-gps-badge[data-phase="tracking"] { background: #E1EEFB; color: #185FA2; }
.live-gps-badge[data-phase="locked"] { background: #DCEFE7; color: var(--go); }
.live-gps-badge[data-phase="error"] { background: #F6DEDB; color: var(--bad); }
.live-gps .map-help, .live-gps-reading { margin: 8px 0; font-size: .82rem; }
.live-gps .live-gps-canvas { height: 290px; }
.live-gps-reading { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.live-gps-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-gps-controls button { width: auto; min-height: 44px; padding: 8px 10px; font-size: .82rem; }
.live-gps-controls .map-help { flex: 1; }
