.gp-map-open { overflow: hidden; }
.gp-map-overlay {
  --gp-ink: #102033; --gp-muted: #526170; --gp-paper: #fff; --gp-line: #d8dfe5;
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh;
  max-height: none; margin: 0; padding: 0; border: 0; color: var(--gp-ink); background: var(--gp-paper);
  z-index: 10000; overflow: hidden; font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.gp-map-overlay[open] { display: grid; grid-template-rows: auto minmax(140px, 1fr) auto; }
.gp-map-overlay::backdrop { background: #10203399; }
.gp-map-overlay *, .gp-map-overlay *::before, .gp-map-overlay *::after { box-sizing: border-box; }
.gp-map-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--gp-line);
}
.gp-map-header h2 { margin: 0; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.gp-map-stage { position: relative; min-height: 0; background: #dce4e7; isolation: isolate; }
.gp-map-canvas { position: absolute; inset: 0; }
.gp-map-controls {
  position: absolute; right: max(12px, env(safe-area-inset-right)); top: 12px;
  display: grid; gap: 8px; z-index: 3;
}
.gp-map-button {
  min-height: 48px; min-width: 48px; padding: 10px 14px; border: 1px solid var(--gp-line);
  border-radius: 12px; background: var(--gp-paper); color: var(--gp-ink); font: inherit;
  font-size: 14px; font-weight: 650; cursor: pointer; touch-action: manipulation;
}
.gp-map-button:disabled { opacity: .55; cursor: default; }
.gp-map-button:focus-visible { outline: 3px solid #2167a5; outline-offset: 2px; }
.gp-map-button[aria-pressed="true"] { background: #deedf9; border-color: #2167a5; color: #134f80; }
.gp-map-controls .gp-map-button { font-size: 26px; line-height: 1; box-shadow: 0 2px 10px #10203322; }
.gp-map-sheet {
  max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  padding: 12px max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  border-top: 1px solid var(--gp-line);
}
.gp-map-sheet p { margin: 0 0 8px; overflow-wrap: anywhere; }
.gp-map-status { font-size: 13px; color: var(--gp-muted); }
.gp-map-status:empty, .gp-map-sheet p:empty { display: none; }
.gp-map-hint { font-size: 12px; line-height: 1.45; color: var(--gp-muted); }
.gp-map-summary { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.gp-map-maneuver { font-size: 17px; font-weight: 650; }
.gp-map-selection { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.gp-map-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gp-map-actions .gp-map-button { flex: 1 1 140px; }
.gp-map-actions .gp-map-primary { flex-basis: 100%; background: #eebc3e; color: #102033; border-color: #ba8d1c; }
.gp-map-crosshair {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%);
  border: 2px solid #102033; border-radius: 50%; outline: 2px solid white; pointer-events: none; z-index: 2;
}
.gp-map-crosshair::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #102033; top: 7px; left: 7px; }
.gp-map-marker {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 3px solid white; border-radius: 50%; background: #b47c0d; color: white;
  box-shadow: 0 2px 7px #10203366; font: 750 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.gp-map-marker[data-kind="driver"] { background: #28735c; }
.gp-map-marker[data-kind="passenger"] { background: #7544a5; }
.gp-map-marker[data-kind="own"] { background: #2167a5; }
.gp-map-marker[data-kind="pick"] { background: #eebc3e; color: #102033; }
.gp-map-marker[data-stale="true"] { background: #737d86; border-style: dashed; }
.gp-map-overlay [hidden] { display: none !important; }
.gp-map-overlay .maplibregl-ctrl-attrib-button { min-width: 48px; min-height: 48px; background-position: center; }
.gp-map-overlay .maplibregl-ctrl-attrib a { display: inline-block; min-height: 24px; padding: 4px 2px; }
@media (min-width: 900px) {
  .gp-map-overlay[open] { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); }
  .gp-map-header { grid-column: 1 / -1; }
  .gp-map-sheet { max-height: none; border-top: 0; border-left: 1px solid var(--gp-line); }
}
@media (max-height: 500px) and (max-width: 899px) {
  .gp-map-overlay[open] { grid-template-columns: minmax(0, 1fr) min(44%, 340px); grid-template-rows: auto minmax(0, 1fr); }
  .gp-map-header { grid-column: 1 / -1; }
  .gp-map-sheet { max-height: none; }
}
.gp-map-overlay[data-theme="dark"] { --gp-ink: #edf3f8; --gp-muted: #b7c5d0; --gp-paper: #142435; --gp-line: #3f5364; color-scheme: dark; }
.gp-map-overlay[data-theme="dark"] .gp-map-button[aria-pressed="true"] { color: #edf3f8; background: #235075; }
@media (prefers-reduced-motion: reduce) { .gp-map-overlay * { scroll-behavior: auto; } }
