/* Compact map/service presentation; loaded after the existing responsive theme. */
.service-private{--service:var(--accent)}.service-shared{--service:#803ab2}.service-school{--service:#116bce}.service-delivery{--service:#b95100}
.service-symbol{color:var(--service);display:inline-flex;align-items:center;gap:4px;flex-shrink:0}.service-symbol svg{width:32px;height:30px;display:block;filter:none!important}.service-symbol b{font:800 12px/1.3 system-ui}
#map .fleet-marker{width:62px!important;height:44px!important;display:grid;place-items:center}
#map .compact-marker{position:relative;display:flex;align-items:center;justify-content:center;gap:3px;width:60px;height:34px;background:var(--surface,#fff);border:2px solid var(--service);border-radius:18px;color:var(--service);box-shadow:0 2px 5px #0002;pointer-events:none}
#map .compact-marker svg{width:30px;height:28px;filter:none}#map .compact-marker b{font:800 12px system-ui}#map .compact-marker:after{content:'';position:absolute;bottom:-6px;left:24px;width:8px;height:8px;border-right:2px solid var(--service);border-bottom:2px solid var(--service);background:inherit;transform:rotate(45deg)}
#map .fleet-selected .compact-marker,#map .fleet-booked .compact-marker{background:var(--brand-lime);color:#283200;box-shadow:0 0 0 3px #fff,0 3px 8px #0004}#map .fleet-marker:before,#map .fleet-marker:after,#map .fleet-selected-check{display:none!important}
#map .fleet-busy .compact-marker{opacity:.7;border-style:dashed}#map .compact-marker .marker-state{font-size:10px;position:absolute;right:-3px;top:-5px;background:var(--surface,#fff);border:1px solid currentColor;border-radius:6px;padding:0 2px}#map .fleet-last-known .compact-marker{border-style:dashed}
.compact-map-tabs{display:flex;gap:6px;padding:8px 12px;overflow-x:auto;flex-shrink:0}.compact-map-tabs button{flex:1;white-space:nowrap;min-height:44px;padding:7px 12px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:22px;font-size:.8rem}.compact-map-tabs button[aria-pressed=true]{background:var(--brand-lime);color:var(--brand-lime-ink);border-color:var(--brand-lime);font-weight:700}
.compact-services{padding:10px 12px 14px}.compact-service-hint{font-size:.75rem;color:var(--muted);margin:0 0 10px;line-height:1.8}.compact-service-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.compact-service-card{display:flex;align-items:center;gap:9px;text-align:left;padding:10px;border:1px solid var(--line);border-radius:12px;min-width:0;min-height:80px;background:var(--surface);color:var(--text)}.compact-service-card>span:last-child{min-width:0}.compact-service-card strong{display:block;font-size:.8rem;line-height:1.8;overflow-wrap:anywhere}.compact-service-card small{display:block;font-size:.7rem;color:var(--muted)}.compact-service-card.selected{background:#eff5c5;border-color:#778400;color:var(--brand-lime-ink)}.compact-service-card.selected small{color:#455000}
body.compact-app.sequence-layout #journey-panel .fare-list{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;overflow:visible;padding:0;scroll-snap-type:none}
body.compact-app.sequence-layout #journey-panel .fare-card{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto auto;align-content:start;gap:6px;min-width:0!important;width:100%!important;min-height:0!important;height:auto!important;padding:12px!important;border-radius:12px;flex:none!important;text-align:left;overflow-wrap:anywhere}
body.compact-app.sequence-layout #journey-panel .fare-art{height:auto!important;min-height:0!important;margin:0!important}body.compact-app.sequence-layout #journey-panel .fare-art .service-symbol svg{width:32px!important;height:30px!important}body.compact-app.sequence-layout #journey-panel .fare-name strong{font-size:.85rem}body.compact-app.sequence-layout #journey-panel .fare-name small{font-size:.7rem;margin:2px 0;line-height:1.8}body.compact-app.sequence-layout #journey-panel .fare-amount{text-align:left;margin:0!important;padding:0!important}body.compact-app.sequence-layout #journey-panel .fare-amount b{font-size:.95rem}body.compact-app.sequence-layout #journey-panel .fare-amount small{font-size:.68rem}body.compact-app.sequence-layout #journey-panel .radio-dot{display:none}
#map-panel.expanded .compact-services,body:not([data-step=locations]) .compact-services{display:none}.compact-app #map-my-location{width:44px;height:44px;padding:10px}.compact-app #map-my-location span{display:none}.compact-app #map-home{font-size:0;width:44px;height:44px;padding:8px}.compact-app #map-home:before{content:'⌂';font:24px system-ui}.compact-app .map-head{padding:8px 12px}.compact-app #map .leaflet-tile-pane{filter:saturate(.55)}:root[data-theme=night] .compact-app #map .leaflet-tile-pane{filter:brightness(.76) saturate(.4)}
@media(max-width:760px){.compact-service-grid,body.compact-app.sequence-layout #journey-panel .fare-list{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-service-card{padding:9px;gap:7px}.compact-service-card .service-symbol{flex-direction:column;gap:0}.compact-map-tabs button{padding:7px 9px}.compact-service-card strong{font-size:.78rem}}
#map .compact-fleet-cluster{display:grid;place-items:center;background:transparent;border:0}#map .compact-fleet-cluster>span{display:flex;align-items:center;justify-content:center;gap:5px;width:48px;height:34px;border:2px solid var(--accent);border-radius:18px;background:var(--surface,#fff);color:var(--text);box-shadow:0 0 0 3px #d9eb0860;font:16px system-ui}#map .compact-fleet-cluster b{font-size:15px}.compact-fleet-cluster:focus-visible{outline:3px solid var(--focus)}
.cluster-driver{display:block;width:100%;min-height:44px;padding:8px;text-align:left;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);margin:5px 0}
@media(max-width:480px){.compact-map-tabs{flex-wrap:wrap;overflow:visible;gap:5px}.compact-map-tabs button{flex:1 0 28%;min-height:40px;font-size:.73rem;padding:5px 7px}}
/* Use the same original artwork in service cards, map markers and fare choices. */
.original-vehicle-icon{position:relative;display:inline-grid;place-items:center;width:40px;height:54px;flex-shrink:0}.original-vehicle-icon img.vehicle-plan-art{display:block;position:static;object-fit:contain;width:38px!important;height:52px!important;filter:none!important}.original-service-mark{position:absolute;right:-2px;top:1px;border:1px solid white;border-radius:8px;background:#803ab2;color:#fff;font:800 10px/14px system-ui;min-width:14px;text-align:center;padding:0 2px}.original-service-mark.comfort{background:#9b7800}.original-service-mark svg{width:12px!important;height:12px!important;display:block}.service-symbol{gap:5px}.compact-service-card{min-height:90px}.compact-service-card .service-symbol{flex-direction:row}
#map .compact-marker{height:48px;border-radius:15px;width:62px}#map .original-vehicle-icon{width:33px;height:44px}#map .original-vehicle-icon img.vehicle-plan-art{width:31px!important;height:42px!important;filter:none!important}#map .compact-marker:after{left:24px}#map .fleet-marker{height:54px!important}#map .original-service-mark{font-size:9px;line-height:12px;min-width:12px;top:0;right:-2px}
body.compact-app.sequence-layout #journey-panel .fare-art .original-vehicle-icon img{width:38px!important;height:52px!important}.fare-art .service-symbol{align-items:center}
@media(max-width:480px){.compact-service-card{padding:8px;gap:5px}.compact-service-card .service-symbol{flex-direction:column;gap:1px}.compact-service-card .original-vehicle-icon{height:45px;width:32px}.compact-service-card .original-vehicle-icon img.vehicle-plan-art{width:30px!important;height:43px!important}}
body.compact-app.sequence-layout #journey-panel .fare-art .original-service-mark svg{width:12px!important;height:12px!important}
/* One-row selector with a modal, scrollable service sheet. */
.compact-services{padding:8px 12px}.compact-selected-service{display:flex;align-items:center;gap:10px;min-height:64px;padding:5px 10px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text)}.compact-selected-label{flex:1;min-width:0}.compact-selected-label strong{display:block;font-size:.85rem;line-height:1.8}.compact-selected-label small{display:block;font-size:.7rem;color:var(--muted)}.compact-selected-service button{min-height:44px;border:1px solid #94a400;border-radius:10px;background:var(--surface);color:var(--text);padding:6px 12px;font-weight:700;flex-shrink:0}
dialog.compact-service-chooser{position:fixed;inset:auto 0 0;margin:0 auto;width:min(960px,100%);max-width:100%;max-height:85dvh;padding:0;border:1px solid var(--line);border-bottom:0;border-radius:22px 22px 0 0;background:var(--surface,#fff);color:var(--text);box-sizing:border-box;overflow:hidden;box-shadow:0 -10px 50px #0002}
dialog.compact-service-chooser[open]{display:flex;flex-direction:column}
dialog.compact-service-chooser::backdrop{background:#17200066}
.compact-chooser-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px 0;flex-shrink:0}.compact-chooser-head h2{font-size:1.1rem;line-height:1.8;margin:0}.compact-chooser-head button{width:44px;height:44px;border:0;border-radius:50%;background:var(--surface);color:var(--text);font:28px system-ui}.compact-service-chooser .compact-map-tabs{padding:10px 16px;flex-wrap:nowrap;overflow-x:auto}.compact-service-chooser .compact-map-tabs button{flex:1 0 auto;min-height:44px}
.compact-chooser-scroll{overflow-y:auto;overscroll-behavior:contain;padding:0 16px 8px;min-height:0}.compact-service-chooser .compact-service-card{min-height:76px;padding:6px 8px;gap:7px}.compact-service-chooser .compact-service-card.selected{background:var(--brand-lime);border-color:var(--brand-lime)}.compact-service-chooser .compact-service-card .service-symbol{flex-direction:row}.compact-chooser-hint{margin:0;padding:10px 16px max(12px,env(safe-area-inset-bottom));text-align:center;font-size:.75rem;color:var(--muted);border-top:1px solid var(--line);flex-shrink:0}
.compact-service-chooser button:focus-visible,.compact-selected-service button:focus-visible{outline:3px solid var(--focus,#7a8900);outline-offset:2px}
@media(max-width:760px){dialog.compact-service-chooser{max-height:82dvh}.compact-chooser-head{padding:12px 12px 0}.compact-chooser-scroll{padding:0 10px 8px}.compact-service-chooser .compact-map-tabs{padding:8px 10px;gap:5px}.compact-service-chooser .compact-map-tabs button{font-size:.72rem;padding:6px 10px}.compact-service-chooser .compact-service-card{min-height:80px;gap:5px}.compact-service-chooser .compact-service-card .service-symbol{flex-direction:column;gap:0}.compact-selected-service{gap:7px;padding:5px 8px}.compact-selected-service .original-vehicle-icon{width:30px;height:44px}.compact-selected-service .original-vehicle-icon img.vehicle-plan-art{width:29px!important;height:42px!important}.compact-selected-service button{padding:6px 9px}.compact-selected-label strong{font-size:.78rem}}
/* Small original vehicle artwork; transparent 44px touch area, no card or pin. */
#map .fleet-marker{width:44px!important;height:44px!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;display:block;overflow:visible}
#map .unboxed-vehicle{position:absolute;left:7px;top:5px;width:22px;height:34px;display:grid;place-items:center;pointer-events:none}
#map .unboxed-vehicle img.vehicle-plan-art{width:22px!important;height:34px!important;object-fit:contain;filter:drop-shadow(0 1px 1px #fff) drop-shadow(0 1px 1px #0005)!important;max-width:none}
#map .map-mini-badges{position:absolute;left:30px;top:8px;display:flex;flex-direction:column;gap:3px;align-items:center;pointer-events:none}
.map-mini{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:12px;height:12px;border:1px solid #fff;border-radius:50%;background:#198844;color:white;font:800 10px/1 system-ui;font-style:normal;flex-shrink:0}
.map-mini svg{display:block;width:8px!important;height:8px!important;fill:currentColor;filter:none!important}
.map-mini.available{width:9px;height:9px;background:#198844}.map-mini.busy{background:#c37a00}.map-mini.shared{background:#803ab2;width:15px;border-radius:6px}.map-mini.shared svg{width:11px!important}.map-mini.full{background:#cc263a}.map-mini.uncertain{background:#fff;color:#946000;border-color:#946000}.map-mini.booked{background:#637400}.map-mini.comfort{background:#987400}
#map .fleet-busy .unboxed-vehicle{opacity:1;filter:none}
#map .fleet-selected .unboxed-vehicle,#map .fleet-booked .unboxed-vehicle{filter:drop-shadow(0 0 3px var(--brand-lime))}
.map-status-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;padding:5px 10px;color:var(--muted);font-size:.65rem;line-height:1.8;background:var(--surface)}
.map-status-legend>span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
#map-panel.expanded .map-status-legend{flex-shrink:0}
/* Anchor badges to visible artwork corners, not transparent image padding. */
#map .map-mini-badges{inset:0;display:block}
#map .map-mini-badges>.map-mini{position:absolute;left:calc(var(--vehicle-right) + 1px);top:calc(var(--vehicle-bottom) - 5px);width:10px;height:10px;font-size:8px}
#map .map-mini-badges>.map-mini.available{width:8px;height:8px;top:calc(var(--vehicle-bottom) - 4px)}
#map .map-mini-badges>.map-mini.shared,#map .map-mini-badges>.map-mini.comfort{left:auto;right:calc(44px - var(--vehicle-left) + 1px)}
#map .map-mini-badges>.map-mini.shared{width:12px}
#map .map-mini-badges>.map-mini svg{width:7px!important;height:7px!important}
#map .map-mini-badges>.map-mini.shared svg{width:9px!important}
/* Smooth the shortest heading turn without rotating labels or status badges. */
#map .unboxed-vehicle{transform-origin:50% 50%;transition:transform .55s ease-out}
@media(prefers-reduced-motion:reduce){#map .unboxed-vehicle{transition:none}}
