/* Language remains reachable above every screen and sheet. */
.shared-sheet .owner-password-toggle{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;font-size:15px}
.shared-sheet .owner-password-toggle input{width:20px;height:20px;min-height:20px;margin:0;flex:0 0 20px;accent-color:#214c3c}
#ownerPasswordSheet .menu-footnote{font-size:13px;color:#52665b;margin:10px 0 16px}
#ownerPasswordSheet input:not([type=checkbox]){padding:10px 12px;border:1px solid #b8c8bf;border-radius:8px}
.shared{--lang-height:calc(48px + env(safe-area-inset-top));--shared-top:calc(var(--lang-height) + 8px);background:#f3f6f7}
#languageTabs{position:fixed;top:0;left:0;right:0;z-index:10000;display:flex;justify-content:center;gap:5px;padding:calc(5px + env(safe-area-inset-top)) 8px 5px;background:#fff;border-bottom:1px solid #c9d6d1;box-shadow:0 2px 8px #1232}
#languageTabs button{min-height:38px;min-width:95px;border:1px solid transparent;background:#f1f4f2;border-radius:8px;font-size:15px;font-weight:600;padding:6px 13px;color:#263d34}
#languageTabs button[aria-pressed=true]{background:#214c3c;color:#fff;border-color:#214c3c}
.shared .demo-header{top:var(--shared-top);min-height:64px;padding:10px 14px;gap:10px}
.shared .demo-brand strong{font-size:18px}.shared .demo-brand>span{font-size:13px}.shared .demo-vehicle{width:23px;height:23px}
.shared .demo-banner{top:calc(var(--shared-top) + 78px);font-size:11px;max-width:calc(100vw - 32px)}
.shared .demo-basemap-toggle{top:calc(var(--shared-top) + 115px)}
.shared .demo-status-stack{top:calc(var(--shared-top) + 165px);max-width:calc(100vw - 100px);font-size:12px}
.shared .demo-status{font-size:12px}.shared .map-controls{bottom:calc(20px + env(safe-area-inset-bottom));gap:8px}.shared .map-controls button{touch-action:manipulation}
.shared .demo-locate{min-width:65px;min-height:68px;border:2px solid transparent}.shared .demo-locate[aria-pressed=true]{color:#176ba9;border-color:#2379c7;background:#f3faff}.shared .demo-locate.location-active svg{animation:locationPulse 2.5s ease-in-out infinite}
@keyframes locationPulse{0%,100%{opacity:1}50%{opacity:.4}}@media(prefers-reduced-motion:reduce){.shared .demo-locate.location-active svg{animation:none}}
.shared .recenter{max-width:85px;font-size:12px;min-height:40px;padding:5px 8px;border-radius:10px;background:#fff;border:1px solid #c9d6d1;color:#214c3c}
.shared-cover{position:fixed;inset:var(--lang-height) 0 0;z-index:1500;display:flex;align-items:center;justify-content:center;background:#f1f4ee;overflow:auto;padding:16px}
.shared-card{width:min(450px,100%);max-height:100%;overflow:auto;padding:24px;border:1px solid #d5ddd6;border-radius:20px;background:#fff;box-shadow:0 10px 35px #1324}.shared-card h1{font-size:24px}.shared-card p{line-height:1.5;color:#4c6056}.shared-card input,.shared-sheet input,.shared-sheet textarea,.shared-sheet select{width:100%;box-sizing:border-box;font-size:16px;min-height:44px;margin:5px 0 14px}.shared-card label,.shared-sheet label{display:block}.shared-card small,.shared-sheet small{color:#607467}.shared .safety-copy{font-size:12px}
.shared .driver-choice{display:flex;align-items:center;justify-content:center;gap:12px;min-height:70px;font-size:20px}#driverIcon svg{height:42px;width:42px}.shared button.full{margin:6px 0 10px;min-height:44px}
#modalShade{position:fixed;inset:var(--lang-height) 0 0;background:#1237;z-index:1700}
.shared-sheet{position:fixed;z-index:1800;top:calc(var(--lang-height) + 12px);left:50%;transform:translateX(-50%);width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - var(--lang-height) - 24px - env(safe-area-inset-bottom));overflow:auto;padding:24px;box-sizing:border-box;background:#fff;border:1px solid #c9d6d1;border-radius:18px;box-shadow:0 15px 60px #0005;overscroll-behavior:contain}
.shared-sheet h2{padding-right:25px;font-size:23px}.shared-sheet p{line-height:1.5}.shared-sheet .close-button{position:absolute;right:12px;top:12px}.shared .danger{background:#b7282e;color:white;border:0;border-radius:10px}.shared .people-row{padding:15px 0;border-top:1px solid #d6e0da}.shared .people-row strong,.shared .people-row small{display:block}.shared .pin-row{display:block;text-align:left;width:100%;padding:12px;border:1px solid #ccd9d1;border-radius:8px;background:#f6f8f5;margin-bottom:8px}
.shared .demo-legend{max-width:calc(100vw - 125px);bottom:24px;padding:10px;font-size:12px}.shared .demo-legend small{font-size:10px;max-width:200px;line-height:1.3}.shared .demo-legend .legend-mixer{width:24px;height:24px}.shared .demo-legend .legend-warning{font-size:19px}
.shared .owner-workspace{top:var(--shared-top);max-height:calc(100dvh - var(--shared-top) - 20px)}.shared #ownerFastApproach{display:none}.shared .owner-draft-badge{display:none}.shared .demo-local-only{font-size:12px;padding:8px;background:#fff3cd}.shared .toast{z-index:2000;bottom:calc(25px + env(safe-area-inset-bottom));max-width:calc(100vw - 30px)}
.shared.gate-locked .demo-header,.shared.gate-locked .demo-banner,.shared.gate-locked .demo-basemap-toggle,.shared.gate-locked .demo-status-stack,.shared.gate-locked .map-controls,.shared.gate-locked .demo-legend{display:none}
.shared .leaflet-control-attribution{font-size:9px}.shared [hidden]{display:none!important}
@media(max-width:700px){.shared .owner-workspace{top:auto;bottom:0;max-height:48dvh}.shared.owner-open .map-controls{bottom:calc(48dvh + 12px)}.shared.owner-open .demo-status-stack{display:none}.shared-sheet{padding:20px}.shared .demo-logo{width:30px}.shared .demo-header{left:12px;right:12px}}
@media(max-height:560px){.shared .demo-status-stack{display:none}.shared .demo-legend{display:none}.shared .map-controls{flex-direction:row;align-items:end;bottom:15px}.shared .control-group{display:flex}.shared-cover{align-items:flex-start}}

.shared #ownerCustomColor{display:none}

.shared #pinPicking{display:flex;align-items:center;gap:8px}.shared #pinPicking button{flex-shrink:0}
#drivingWarning{z-index:1500}

/* Personal destinations are separate from the map owner's shared marks. */
.shared .demo-brand{min-width:0;flex:1}.shared .demo-brand strong{white-space:nowrap}.shared #destinationSearch{flex:0 0 40px;width:40px;min-height:44px;background:transparent;border:0;box-shadow:none}.shared #demoMenuButton{flex-shrink:0}
.destination-dock{position:fixed;z-index:900;bottom:calc(23px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 24px));display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:2px;align-items:center;padding:4px;background:#fffffff5;border:1px solid #c9d6d1;border-radius:14px;box-shadow:0 3px 12px #102c2030}
.destination-dock button{min-width:0;min-height:46px;padding:3px;border:0;border-radius:9px;background:transparent;color:#234d3c;touch-action:manipulation}.destination-dock button:disabled{opacity:.35}.destination-dock #destinationPrevious,.destination-dock #destinationNext{font-size:31px;font-weight:400}.destination-dock #destinationKeep{font-size:24px;color:#71877b}.destination-dock #destinationKeep[aria-pressed=true]{background:#e0effb;color:#0966a7}
#destinationCurrent{text-align:left;line-height:1.25}#destinationName{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:600}#destinationSource{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:#5c7066}
.shared.has-destinations .map-controls{bottom:calc(96px + env(safe-area-inset-bottom))}.shared.has-destinations .demo-legend{bottom:calc(99px + env(safe-area-inset-bottom))}.shared.has-destinations .toast{bottom:calc(100px + env(safe-area-inset-bottom))}
.shared.gate-locked .destination-dock,.shared.gate-locked .destination-picking,.shared.owner-open .destination-dock,.shared.owner-open #destinationSearch{display:none}
.destination-sheet h3{font-size:14px;color:#52665c;margin:18px 0 7px}.destination-input{display:flex;gap:8px;align-items:start}.shared .destination-input input{margin:5px 0;min-width:0;flex:1}.destination-input button{margin-top:5px;min-height:44px;padding:8px 14px}
.destination-results{display:grid;gap:5px}.destination-results button{display:block;width:100%;padding:10px 12px;text-align:left;min-height:46px;border:1px solid #d9e1dd;border-radius:9px;background:#f5f8f6;font-weight:400;font-size:15px;line-height:1.35;overflow-wrap:anywhere;color:#173c2d}.destination-results small{display:block;margin-top:3px;font-size:12px}.shared .destination-fine{font-size:12px;color:#5c7066;line-height:1.45}.shared #destinationDrop{border:1px solid #a5bfb0;background:#edf5ef;color:#214c3c;border-radius:9px;font-size:15px;margin-top:12px}
.destination-picking{position:fixed;z-index:1000;left:16px;right:16px;top:calc(var(--shared-top) + 115px);max-width:480px;padding:10px 12px;border:1px solid #89b9dd;background:#eff8ff;color:#214459;border-radius:10px;display:flex;align-items:center;gap:12px;font-size:14px;box-shadow:0 3px 12px #102c2030}.destination-picking button{margin-left:auto;min-height:44px;border:0;border-radius:8px;padding:8px 12px;background:#fff;color:#214459}.personal-picking .demo-basemap-toggle,.personal-picking .demo-status-stack{visibility:hidden}
.personal-pin{display:grid;place-items:center}.personal-pin-dot{width:13px;height:13px;background:#146fac;border:3px solid #fff;border-radius:50%;box-shadow:0 1px 4px #0007}
@media(max-width:370px){.shared .demo-header{gap:6px;padding:10px}.shared .demo-brand strong{font-size:16px}.shared .demo-brand>span{font-size:11px}.shared .demo-vehicle{width:18px;height:18px}.shared #demoMenuButton{width:36px;min-width:36px}.shared #destinationSearch{flex-basis:36px;width:36px}}
@media(max-width:700px){.shared.owner-open.has-destinations .map-controls{bottom:calc(48dvh + 12px)}}
@media(max-height:560px){.shared.has-destinations .map-controls{bottom:91px}.destination-dock{left:12px;transform:none;width:min(440px,calc(100vw - 24px))}}

/* Compact map identity and an owner library; driver screens keep only the name. */
.shared .demo-brand .current-map-button{display:block;width:100%;min-height:28px;padding:2px 0;text-align:left;border:0;background:transparent;color:#214c3c;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shared .demo-brand .current-map-button:disabled{opacity:1;color:#52665b;cursor:default}
.shared .driver-map-caption{display:block;font-size:12px;color:#52665b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shared .demo-header{min-height:82px}
.shared .demo-banner{top:calc(var(--shared-top) + 94px)}
.shared .demo-basemap-toggle{top:calc(var(--shared-top) + 131px)}
.shared .demo-status-stack{top:calc(var(--shared-top) + 181px)}
.shared .destination-picking{top:calc(var(--shared-top) + 131px)}
.shared-sheet .menu-footnote{font-size:13px;color:#52665b;line-height:1.45}
.map-library-card{border:1px solid #cbd9d0;border-radius:12px;padding:16px;margin:14px 0;background:#f8faf7}
.map-library-card h3{margin:0 0 6px;font-size:19px;color:#173c2d}
.map-library-card p{font-size:13px;color:#52665b;margin:6px 0 12px}
.map-library-card .map-library-state{color:#214c3c;font-weight:600}
.map-library-actions{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:8px}
.map-library-actions button{min-height:44px;min-width:0;padding:8px;font-size:14px;border-radius:8px}
.shared .demo-header .demo-brand>span{font-size:11px}

/* Keep the most-used control visible without competing with the map. */
.shared .demo-header{gap:7px;width:min(640px,calc(100vw - 44px))}
.shared .demo-brand strong{letter-spacing:.25px}
.shared .markup-list{flex:0 1 140px;width:140px;min-width:70px;max-width:180px;min-height:42px;margin:0;padding:6px 22px 6px 8px;border:1px solid #ccd9d1;border-radius:8px;background:#f2f6f3;color:#214c3c;font-size:12px;text-overflow:ellipsis}
.shared .demo-banner{font-size:11px;font-weight:500;line-height:1.35;letter-spacing:0;padding:6px 9px;max-width:min(440px,calc(100vw - 32px));background:#fffdf4ed;border-color:#d8d6c1;color:#3b403a}
.shared .demo-basemap-toggle{top:calc(var(--shared-top) + 142px)}
.shared .demo-status-stack{top:calc(var(--shared-top) + 194px);max-width:calc(100vw - 120px)}
.shared #demoLocate{position:fixed;z-index:820;right:14px;top:calc(var(--shared-top) + 142px);width:80px;min-height:64px;padding:6px 5px;border:2px solid #387cad;border-radius:13px;background:#fff;color:#195c8e;font-size:12px;font-weight:600;box-shadow:0 3px 10px #17344b33}
.shared #demoLocate svg{width:27px;height:27px}
.shared #demoLocate[aria-pressed=true]{background:#e5f3ff;border-color:#176eae;color:#125586;box-shadow:0 0 0 3px #fff9,0 3px 10px #17344b33}
.shared #demoGpsStatus{position:fixed;z-index:780;top:auto;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;right:auto;transform:translateX(-50%);max-width:calc(100vw - 32px);width:max-content;padding:3px 7px;border-radius:6px;font-size:10px;line-height:1.3;color:#3c5c70;background:#fffefae8;pointer-events:none;text-align:center}
.shared .demo-legend{bottom:calc(54px + env(safe-area-inset-bottom));padding:7px 9px}
.shared .map-controls{bottom:calc(54px + env(safe-area-inset-bottom))}
.shared.has-destinations #demoGpsStatus{bottom:calc(84px + env(safe-area-inset-bottom))}
.shared.has-destinations .demo-legend,.shared.has-destinations .map-controls{bottom:calc(112px + env(safe-area-inset-bottom))}
.shared .map-marker-glyph{display:block;width:24px;height:24px;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff);transform-origin:center}
.shared .map-marker-glyph.is-selected{transform:scale(1.25);filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #8ed0ff)}
.shared .map-marker-glyph svg{width:24px;height:24px}
.shared .demo-pin-dot.is-selected{width:14px;height:14px;box-shadow:0 0 0 3px #1685c655}
.shared .owner-icon-palette h3{font-size:13px;margin:12px 0 7px}
.shared #ownerIconPalette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.shared #ownerIconPalette button{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:66px;padding:6px 3px;border:1px solid #cbd8d0;border-radius:8px;background:#f7faf7;font-size:10px;font-weight:400;color:#244c3c;line-height:1.2}
.shared #ownerIconPalette svg{width:28px;height:28px;display:block}
.shared #ownerMarkerColorRow{margin:10px 0}
.shared #ownerMarkerColor{display:block;width:84px;height:44px;padding:3px;border:1px solid #b9cbbf;border-radius:8px;background:#fff;cursor:pointer}
.shared #ownerMarkerColorRow small{display:block;margin:4px 0;font-size:11px}
.shared.owner-open #markupList{display:none}
.shared.gate-locked #demoLocate,.shared.gate-locked #demoGpsStatus{display:none}
@media(min-width:701px){.shared.owner-open #demoLocate{right:430px}.shared.owner-open #demoGpsStatus{left:calc((100vw - 410px)/2)}}
@media(max-width:700px){
 .shared .demo-header{left:12px;right:12px;width:auto;padding:10px;gap:5px}
 .shared .demo-logo{width:25px;height:30px}
 .shared .demo-brand strong{font-size:16px}
 .shared .demo-brand .current-map-button,.shared .driver-map-caption{font-size:11px}
 .shared .markup-list{width:78px;min-width:70px;flex:0 1 90px;padding-left:5px;font-size:11px}
 .shared #destinationSearch{flex-basis:30px;width:30px}
 .shared #demoMenuButton{width:30px;min-width:30px}
 .shared .demo-header .demo-vehicle{display:none}
 .shared.owner-open #demoGpsStatus{display:none}
}
@media(max-width:350px){.shared .demo-logo{display:none}.shared .demo-header{gap:3px}.shared .demo-brand strong{font-size:15px}.shared .markup-list{flex-basis:72px}}
@media(max-height:560px){.shared #demoLocate{top:calc(var(--shared-top) + 94px);min-height:52px}.shared .demo-banner{max-width:calc(100vw - 125px)}.shared .demo-basemap-toggle{top:calc(var(--shared-top) + 128px)}.shared #demoGpsStatus{font-size:9px}}
.shared .markup-list{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#214c3c 50%),linear-gradient(135deg,#214c3c 50%,transparent 50%);background-position:calc(100% - 12px) 19px,calc(100% - 8px) 19px;background-size:4px 4px;background-repeat:no-repeat}
@media(max-width:350px){.shared .markup-list{width:82px;min-width:82px;flex-basis:82px}}

/* A single baseline keeps the map controls just above the selected POI. */
.shared{--map-floor:calc(23px + env(safe-area-inset-bottom));--map-tools-floor:var(--map-floor)}
.shared.has-destinations{--map-tools-floor:calc(var(--map-floor) + 64px)}
#languageTabs{background:#59666f;border-bottom-color:#45525b}
#languageTabs button[aria-pressed=true]{border-color:#b7d3c5}
.shared .map-bottom-controls{position:fixed;z-index:820;left:12px;right:14px;bottom:var(--map-tools-floor);display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;gap:7px;align-items:end;pointer-events:none}
.shared .map-bottom-controls .demo-legend,.shared .map-bottom-controls .map-controls,.shared .map-bottom-controls #demoGpsStatus{position:static;inset:auto;transform:none;max-width:100%;margin:0}
.shared .map-bottom-controls .demo-legend{grid-column:1;grid-row:1;padding:7px 8px;pointer-events:none}
.shared .map-bottom-controls #demoGpsStatus{grid-column:2;grid-row:1;justify-self:center;align-self:end;width:max-content;padding:4px 6px;overflow-wrap:normal;text-wrap:balance}
.shared .map-bottom-controls .map-controls{grid-column:3;grid-row:1;align-items:flex-end;pointer-events:auto}
.shared .map-bottom-controls .recenter{max-width:72px}
.destination-title-row{display:flex;align-items:baseline;gap:5px;min-width:0}
#destinationLabel{flex:0 1 auto;max-width:44%;font-size:10px;font-weight:400;color:#52665b;line-height:1.15}
#destinationName{flex:1;min-width:0}
.shared #ownerMarkerPoiRow .owner-poi-choice{display:flex;align-items:center;gap:9px;min-height:44px;margin:4px 0;font-size:13px;line-height:1.3}
.shared #ownerMarkerPoi{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;accent-color:#214c3c}
.shared.gate-locked .map-bottom-controls{display:none}
@media(min-width:701px){.shared.owner-open .map-bottom-controls{right:430px}}
@media(max-width:700px){.shared.owner-open .map-bottom-controls{bottom:calc(48dvh + 12px)}}
@media(max-width:370px){.shared .map-bottom-controls{gap:5px}.shared .map-bottom-controls .demo-legend{padding:6px;font-size:11px}.shared .map-bottom-controls .legend-mixer{width:20px;height:20px}.shared .map-bottom-controls #demoGpsStatus{padding:3px 4px;font-size:9px}.shared .map-bottom-controls .recenter{max-width:65px;font-size:11px}}
/* Only map surfaces and their controls opt out. Sheets, notes and form fields
   retain selection, copy/paste, link menus and ordinary keyboard behavior. */
.shared :is(#map,#languageTabs,.demo-header,.demo-banner,.demo-basemap-toggle,.demo-status-stack,.map-bottom-controls,.destination-dock){-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.shared #map .leaflet-control-attribution,.shared #map a{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
