/* The Live Map page's stylesheet, camaraderie.cc/motortown/map (owner:
   PUBLIC, W2-MAP; P1 map_public_design.md 2.4.5 and 4; map v2, the owner
   2026-10-26: map_v2 CONTRACT 2, "Header stays, map fills the rest", and
   the staff map's name tags; map v4, the owner 2026-10-29: map_v4 CONTRACT
   2, the staff map's blips, layer boxes and legend, the yellow ADMIN and
   the AFK tag; map v5, the owner 2026-10-29: map_v5 CONTRACT 2, the support
   requests panel, the RESPONDING tag and the compact driver list; map v6,
   the owner 2026-10-29: map_v6 CONTRACT 2, the restricted zones' ? buttons
   and info box). Served at /assets/public_map.<12 hex>.css
   after public.css and leaflet.css, on the Live Map only, under the CSP
   style-src 'self'.

   public.css's rules hold here too (test_public_map_js checks them): every
   colour is one of public.css's :root tokens (this file has no :root of its
   own; the one other custom property it reads is --pub-map-top, which
   public_map.js sets), no rounded corners (the one border-radius allowed is
   the 0 that undoes iOS Safari's rounded search box and buttons, DES-21), no
   drop shadow (inset lines only), no gradient, no mask, no url(), never
   @import, no vw length (the page never scrolls sideways). 44 px touch
   targets; the focus ring is public.css's; motion stops under reduced
   motion (public.css's rule, and public_map.js turns Leaflet's animations
   off); forced colours outline what fills draw.

   The full window (map v2 2.1): public_map.js adds pub-map-on to the app
   once the map can run and sets --pub-map-top to where the app starts on
   the page (measured, so a header that wraps never breaks it). With it the
   app fills the window below the site header and the Motortown tabs, edge
   to edge: on 900 px and wider the map's stage and the driver list side by
   side at exactly the window's height (100vh, then 100svh where the browser
   has it, minus --pub-map-top), the list a 340 px panel that scrolls inside
   itself; under 900 px the stage at the window's height (the map never
   under 320 px) and the list after it at its own height (no scroll box
   inside the page). Without pub-map-on (no script, or a map that cannot
   load) the app is a plain column in the page's container and the map box
   collapses to its note.

   Map v4: the map's foot is the pan and zoom buttons with the layers and
   key button after them in one flow (two rows on a phone), then the panel
   it opens: the layer boxes (each 44 px tall to the touch) and the legend,
   each blip as public_map.js draws it (every blip in --map-moving: moving
   filled, parked hollow, autopilot a bigger filled square with an A;
   selected in the accent crop square; a support request the dashed
   --warn-dot square; map v5, a responder's dashed --map-responding ring).

   Map v5: the side (.pub-map-side) is the right-hand panel on 900 px and
   wider (340 px, the window's height) and follows the map on phones: the
   support requests first (on wide screens at most 45% of the side, its list
   scrolling inside itself), then the driver list taking the rest. Each
   driver is one compact row: the name and its tags, then the place, the
   vehicle and the motion small, the Show button on the right across both
   lines (a 44 px target still).

   Classes (pages/livemap.py and static/public_map.js): pub-map-app,
   pub-map-on, pub-map-stage, pub-map-bar, pub-map-state (-live, -paused,
   -off, -stale, -unavailable), pub-map-count, pub-map-server, pub-map-frame,
   pub-map, pub-map-canvas, pub-map-note, pub-map-foot, pub-map-tools,
   pub-map-tool (-wide), pub-map-lead, pub-drivers (-head, -title, -count,
   -find, -label, -input, -empty), pub-driver-list, pub-drivers-paused,
   pub-driver (-name, -facts, -place, -vehicle, -state, -show, -picked),
   pub-map-tags, pub-map-tag (-admin, -reg, -pass, -afk, -case,
   -responding), pub-map-panel-toggle, pub-map-panel, pub-map-layers
   (-title), pub-map-layer, pub-map-legend, pub-map-more (-inner),
   pub-map-keys (-title), pub-map-key, pub-key (-moving, -parked,
   -autopilot, -picked, -support, -responding), pub-map-privacy (-ask,
   -scope); map v5: pub-map-side, pub-support (-head, -title, -open, -list,
   -item, -who, -age, -text, -meta, -place, -vehicle, -responders, -sep,
   -show, -empty); map v6: pub-zone-helps, pub-zone-help (-mark),
   pub-zone-box (-head, -title, -close, -name, -text, -sub, -resources,
   -none).

   Map v6: over the map (never inside Leaflet's own box, so a click on them
   never reaches the map) each restricted zone's ? button, placed by
   public_map.js in the map's own pixels (a 44 px target round a 24 px
   square in the restricted colours: --danger-dot's border and mark on
   --danger-bg), and the info box one opens: square, the surface colour, a
   --danger-dot top edge, top left in the map, never wider than the map
   less 24 px (a 500 px phone keeps its map in view beside it). */

/* ------------------------------------------------------------------
   The app: a plain column in the page's container until the map runs */
.pub-map-app {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
}
.pub-map-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}

/* The bar on the map's top edge: the state line, how many drivers and the
   game server's state (a one-cell live strip, DES-18); it wraps on phones */
.pub-map-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  min-height: 44px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

/* The state line: the map's polite live region, always words */
.pub-map-state {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.pub-map-state::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  background: var(--text-subtle);
}
.pub-map-state-live { color: var(--text); }
.pub-map-state-live::before { background: var(--status-ok); }
.pub-map-state-paused::before { background: var(--map-parked); }

.pub-map-count {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The server's state: public.css's live cell made one line of the bar, at
   its end */
.pub-map-server { display: flex; min-width: 0; margin-left: auto; }
.pub-map-server .pub-strip { flex: 1 1 auto; border: 0; background: none; }
.pub-map-server .pub-cell {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  padding: 0;
  background: none;
}
.pub-map-server .pub-cell-value { margin-top: 0; font-size: 14px; }
.pub-map-server .pub-cell-note { margin-top: 0; }

/* ------------------------------------------------------------------
   The map's frame: the map, and the note for when it does not run (the
   map box itself only shows with pub-map-on) */
.pub-map-frame {
  position: relative;
  display: flex;
  flex-direction: column;
}
.pub-map { display: none; }
.pub-map.leaflet-container {
  background: var(--surface-deep);
  font: inherit;
}
.pub-map.leaflet-container:focus-visible { outline-offset: -2px; }
/* The real map tiles, dimmed to sit on the navy (DESIGN 9f). */
.pub-map .leaflet-tile-pane { filter: brightness(0.55) saturate(0.6); }
.pub-map-canvas { pointer-events: none; }

.pub-map-note {
  margin: 0;
  padding: 10px 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 15px;
}

/* Map v6: the restricted zones' ? buttons and their info box (the header
   comment) */
.pub-zone-helps {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 0;
  height: 0;
}
.pub-zone-help {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}
.pub-zone-help-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--danger-dot);
  background: var(--danger-bg);
  color: var(--danger-dot);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.pub-zone-help:hover .pub-zone-help-mark,
.pub-zone-help[aria-expanded="true"] .pub-zone-help-mark {
  background: var(--danger-dot);
  color: var(--bg);
}
.pub-zone-box {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 320px;
  max-width: calc(100% - 24px);
  padding: 6px 14px 14px;
  border: 1px solid var(--danger-line);
  border-top: 3px solid var(--danger-dot);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.pub-zone-box:focus { outline: none; }
.pub-zone-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pub-zone-box-title {
  color: var(--danger-text);
  font-stretch: 112%;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pub-zone-box-close {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.pub-zone-box-close:hover { border-color: var(--accent); }
.pub-zone-box-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pub-zone-box-text { margin-top: 6px; }
.pub-zone-box-text a { color: var(--link); text-underline-offset: 3px; }
.pub-zone-box-text a:hover { color: var(--link-hover); }
.pub-zone-box-sub {
  margin-top: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-zone-box-resources {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text);
}
.pub-zone-box-none { margin-top: 2px; }

/* Under the map (shown with the map only): the pan and zoom buttons, then
   the layers and key button, in one flow that wraps (the group stays
   inline so the panel button can share its last row), then the panel */
.pub-map-foot {
  display: none;
  padding: 4px 12px 8px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-sunk);
}
.pub-map-on .pub-map-foot { display: block; }
.pub-map-tools { display: inline; }
.pub-map-tool,
.pub-map-panel-toggle {
  margin: 4px 4px 0 0;
  vertical-align: middle;
}
.pub-map-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.pub-map-tool:hover { border-color: var(--accent); }
.pub-map-tool-wide {
  padding: 0 14px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Map v4: the layers and key button and its panel */
.pub-map-panel-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.pub-map-panel-toggle:hover,
.pub-map-panel-toggle[aria-expanded="true"] { border-color: var(--accent); }
.pub-map-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.pub-map-layers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.pub-map-layers-title {
  float: left;
  margin: 0 6px 0 0;
  padding: 0;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-map-layer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text-nav);
  font-size: 14px;
  cursor: pointer;
}
.pub-map-layer input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.pub-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}
.pub-map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

/* ------------------------------------------------------------------
   Map v5: the side, then the support requests panel above the driver list
   (the staff map's Support requests panel): its title and how many are
   open, one item per request (who asked and how long ago with the Show on
   map button on the right, what they wrote, then the place, the vehicle and
   how many respond), or its one empty line */
.pub-map-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.pub-support {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-support-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 16px 8px;
}
.pub-support-title {
  margin: 0;
  font-stretch: 112%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pub-support-open {
  color: var(--warn-text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-support-list {
  position: relative;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pub-support-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "who show" "text text" "meta meta";
  align-items: center;
  column-gap: 10px;
  padding: 6px 10px 10px 16px;
  border-bottom: 1px solid var(--row-line);
  box-shadow: inset 2px 0 0 var(--warn-dot);
}
.pub-support-who {
  grid-area: who;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.pub-support-age {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pub-support-text {
  grid-area: text;
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.pub-support-meta {
  grid-area: meta;
  margin-top: 4px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.pub-support-place { color: var(--text-muted); }
.pub-support-vehicle,
.pub-support-responders,
.pub-support-sep { color: var(--text-subtle); }
.pub-support-show {
  grid-area: show;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.pub-support-show:hover { border-color: var(--accent); }
.pub-support-empty {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
}

/* ------------------------------------------------------------------
   The driver list: the map's text alternative, the lead of the map's
   source under its title */
.pub-drivers {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-drivers:focus { outline: none; }
.pub-drivers-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 16px 8px;
}
.pub-drivers-title {
  margin: 0;
  font-stretch: 112%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pub-drivers-count {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-map-lead {
  padding: 0 16px 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.pub-drivers-find { padding: 4px 16px 12px; }
.pub-drivers-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-nav);
  font-size: 14px;
  font-weight: 600;
}
.pub-drivers-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--surface-sunk);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.pub-drivers-input::placeholder { color: var(--placeholder); }

/* position: relative keeps the rows' screen-reader words (public.css's
   pub-sr, absolutely placed) inside the list's own scroll box, so a long
   list never adds empty page below the footer */
.pub-driver-list {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
/* Map v5: one compact row per driver, about half the old height: the name
   and its tags on the first line, the place, the vehicle and the motion
   small on the second, the Show button on the right across both lines */
.pub-driver {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name show" "facts show";
  align-items: center;
  column-gap: 10px;
  padding: 5px 10px 5px 16px;
  border-bottom: 1px solid var(--row-line);
}
.pub-driver-picked { box-shadow: inset 2px 0 0 var(--accent); background: var(--row-selected); }
.pub-driver-name {
  grid-area: name;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.pub-driver-facts {
  display: flex;
  grid-area: facts;
  flex-wrap: wrap;
  gap: 0 10px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.pub-driver-place { color: var(--text-muted); }
.pub-driver-vehicle {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
/* Moving, Parked or Paused in words (DES-7: never the dot's colour alone) */
.pub-driver-state {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.pub-driver-show {
  grid-area: show;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.pub-driver-show:hover { border-color: var(--accent); }
.pub-drivers-paused .pub-driver-name,
.pub-drivers-paused .pub-driver-facts { color: var(--text-subtle); }
.pub-drivers-empty {
  padding: 16px;
  color: var(--text-muted);
  font-size: 15px;
}

/* The name tags (map v2 2.2): the staff map's ADMIN, REG and PASS in Night
   Drive's status-tag style (public.css's tokens): square, a 1 px border, a
   square dot, the word in mono capitals; map v4: ADMIN in the yellow
   --tag-admin-* tokens, PASS info, REG ok, AFK quiet with its time in small
   letters; map v5: RESPONDING in the light green --tag-responding-* tokens
   (clearly not REG's green); every tag quiet while the map is paused
   (greyed by colour, as the names are, DES-19). The word is the signal,
   never the colour alone.
   In a row they follow the name, a space before each. */
.pub-map-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid var(--muted-line);
  background: var(--muted-bg);
  color: var(--muted-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}
.pub-map-tag::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: var(--muted-dot);
}
.pub-map-tag-admin {
  border-color: var(--tag-admin-line);
  background: var(--tag-admin-bg);
  color: var(--tag-admin-text);
}
.pub-map-tag-admin::before { background: var(--tag-admin-dot); }
.pub-map-tag-pass {
  border-color: var(--info-line);
  background: var(--info-bg);
  color: var(--info-text);
}
.pub-map-tag-pass::before { background: var(--info-dot); }
.pub-map-tag-afk { color: var(--muted-text); }
.pub-map-tag-case { text-transform: none; }
.pub-map-tag-reg {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}
.pub-map-tag-reg::before { background: var(--ok-dot); }
.pub-map-tag-responding {
  border-color: var(--tag-responding-line);
  background: var(--tag-responding-bg);
  color: var(--tag-responding-text);
}
.pub-map-tag-responding::before { background: var(--tag-responding-dot); }
.pub-drivers-paused .pub-map-tag {
  border-color: var(--muted-line);
  background: var(--muted-bg);
  color: var(--muted-text);
}
.pub-drivers-paused .pub-map-tag::before { background: var(--muted-dot); }
.pub-map-tags { margin-left: 4px; }

/* ------------------------------------------------------------------
   Under the app (scroll down): the name tags' key, then the hiding wording
   at body-copy size (DES-20), side by side where they fit */
.pub-map-more { padding-top: 40px; }
.pub-map-more-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 48px;
}
.pub-map-keys { flex: 1 1 320px; min-width: 0; }
.pub-map-keys-title {
  margin: 0 0 12px;
  font-stretch: 112%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pub-map-key {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 15px;
}
.pub-map-key li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}
/* The blips in the legend as public_map.js draws them (map v4: all in
   --map-moving, told apart by shape, DES-7): moving filled, parked hollow,
   autopilot a 12 px filled square with the A in the page colour; selected
   inside the accent crop square; a support request the dashed amber
   square; map v5, a responder the dashed light green ring round a small
   pink square (the staff map's swatch) */
.pub-key { flex: 0 0 auto; width: 10px; height: 10px; }
.pub-key-moving { background: var(--map-moving); }
.pub-key-parked { border: 2px solid var(--map-moving); }
.pub-key-autopilot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: var(--map-moving);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
}
.pub-key-picked { width: 14px; height: 14px; border: 1.5px solid var(--map-selected); }
.pub-key-support { width: 16px; height: 16px; border: 2px dashed var(--warn-dot); }
.pub-key-responding {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 2px dashed var(--map-responding);
}
.pub-key-responding::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--map-moving);
}

.pub-map-privacy {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 52em;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 15px;
}
.pub-map-privacy-ask { color: var(--text); font-weight: 600; }
.pub-map-privacy-scope { margin-top: 6px; }

/* ------------------------------------------------------------------
   The full window (the header comment), under 900 px first: edge to edge,
   the stage at the window's height below where the app starts, the map
   never under 320 px, a tiles note under the map rather than over it
   (DES-20), the side after the stage at its own height (map v5: the
   support requests, then the list) */
.pub-map-app.pub-map-on { gap: 0; max-width: none; padding: 0; }
.pub-map-on .pub-map-stage {
  min-height: calc(100vh - var(--pub-map-top, 0px));
  min-height: calc(100svh - var(--pub-map-top, 0px));
  border-width: 0;
}
.pub-map-on .pub-map-frame { flex: 1 1 auto; min-height: 320px; }
.pub-map-on .pub-map {
  display: block;
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}
.pub-map-on .pub-map-note { border-top: 1px solid var(--line-control); }
.pub-map-on .pub-map-side { gap: 0; }
.pub-map-on .pub-support { border-width: 1px 0 0; }
.pub-map-on .pub-drivers { border-width: 1px 0 0; }

/* 900 px and wider: the stage and the side by side at exactly the
   window's height; map v5: the side the support requests (at most 45% of
   it, scrolling inside themselves) over the list, which scrolls inside
   itself, its find box on top; the tiles note sits over the map's foot
   edge */
@media (min-width: 900px) {
  .pub-map-app.pub-map-on {
    flex-direction: row;
    height: calc(100vh - var(--pub-map-top, 0px));
    height: calc(100svh - var(--pub-map-top, 0px));
    min-height: 440px;
  }
  .pub-map-on .pub-map-stage { flex: 1 1 auto; min-height: 0; }
  .pub-map-on .pub-map-frame { min-height: 0; }
  .pub-map-on .pub-map-note {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    border: 1px solid var(--line-control);
  }
  .pub-map-on .pub-map-side {
    flex: 0 0 340px;
    min-height: 0;
    border-left: 1px solid var(--line);
  }
  /* the support box never shrinks (2026-11-22: shrinking in proportion to
     the content, 39 drivers squeezed it to its title and "1 open"); its own
     list scrolls once it reaches 45%. The driver list takes the rest (basis
     0, so its length never takes room from the requests). */
  .pub-map-on .pub-support {
    flex: 0 0 auto;
    min-height: 0;
    max-height: 45%;
    border-width: 0 0 1px;
  }
  .pub-map-on .pub-support-list { overflow-y: auto; }
  .pub-map-on .pub-drivers { flex: 1 1 0; min-height: 0; border-width: 0; }
  .pub-map-on .pub-driver-list { overflow-y: auto; }
  /* nobody on the road: the empty line right under the lead, not at the
     panel's foot */
  .pub-map-on .pub-driver-list:empty { flex: 0 0 auto; }
}

/* Phones, 640 px and under: the live words keep to one line of the bar at
   375 px and wider, so the map keeps its room */
@media (max-width: 640px) {
  .pub-map-state { font-size: 12px; letter-spacing: 0.02em; }
}

/* ------------------------------------------------------------------
   Reduced motion: nothing glides or animates (public_map.js snaps the dots
   and turns Leaflet's animations off; this stops any CSS transition). */
@media (prefers-reduced-motion: reduce) {
  .pub-map .leaflet-zoom-anim .leaflet-zoom-animated,
  .pub-map .leaflet-pan-anim .leaflet-tile { transition: none; }
}

/* ------------------------------------------------------------------
   Forced colours: the key squares, the state square and the tags' dots are
   fills, so they get outlines; the tags their border; the picked row its
   line. */
@media (forced-colors: active) {
  .pub-key, .pub-map-state::before, .pub-map-tag::before {
    forced-color-adjust: none;
    outline: 1px solid CanvasText;
  }
  .pub-map-tag { border-color: CanvasText; }
  .pub-map-tool, .pub-map-panel-toggle, .pub-driver-show, .pub-support-show,
  .pub-zone-help-mark, .pub-zone-box-close {
    border-color: ButtonText;
  }
  .pub-driver-picked { outline: 2px solid Highlight; outline-offset: -2px; }
}
