/* Maps own the viewport; controls float in small glass panels. */
.map-surface{overflow:hidden;--glass:rgba(255,255,255,.88);--glass-ink:#153d36;--glass-line:rgba(30,70,55,.14)}
.map-surface .top,.map-surface .sidebar{display:none!important}
.map-surface .shell,.map-surface #content{position:fixed;inset:0;width:100%;max-width:none;margin:0;padding:0;display:block;overflow:hidden}
.map-surface .geo-map-shell,.map-surface .navigation-page,.map-surface .navigation-map-wrap{position:absolute;inset:0;margin:0;border:0;border-radius:0;height:100%;max-height:none;min-height:0;width:100%}
.map-surface #road-map,.map-surface #navigation-map{height:100%;width:100%;border-radius:0;min-height:0;max-height:none}
.map-surface #geo-map-label,.map-surface .geo-legend,.map-surface .compact-map-status{display:none}
.surface-account{position:fixed;right:16px;top:calc(16px + env(safe-area-inset-top));display:flex;gap:8px;z-index:900}
.surface-account button,.surface-search button,.surface-filters,.surface-events,.surface-trip,.surface-speed,.surface-route-events,.map-surface .mobile-nav,.map-surface .geo-locate,.map-surface .nav-follow{background:var(--glass);color:var(--glass-ink);border:1px solid var(--glass-line);box-shadow:0 5px 24px #12382a18;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.surface-account button{width:44px;height:44px;border-radius:50%;display:grid;place-items:center}
.surface-search{position:absolute;left:16px;top:calc(16px + env(safe-area-inset-top));right:124px;max-width:420px;z-index:700}
.surface-search button{border-radius:24px;min-height:44px;width:100%;display:flex;align-items:center;gap:10px;padding:10px 15px;font-size:15px}.surface-search span{flex:1;text-align:left}
.surface-filters{position:absolute;left:16px;top:calc(72px + env(safe-area-inset-top));display:flex;gap:2px;padding:4px;border-radius:24px;z-index:700;max-width:calc(100% - 32px)}
.surface-filters button{display:flex;align-items:center;gap:5px;padding:8px 10px;min-height:36px;border:0;border-radius:20px;font-size:12px;white-space:nowrap;background:transparent;color:inherit}.surface-filters svg{width:16px;height:16px}.surface-filters .active{background:#163c35;color:#fff}
.map-surface .mobile-nav{position:fixed;display:flex!important;left:16px;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));width:calc(100% - 32px);max-width:520px;margin:auto;z-index:900;border-radius:28px;height:68px;padding:7px;align-items:center;justify-content:space-around}
.map-surface .mobile-nav button{flex:1;min-width:0;background:transparent;color:var(--glass-ink);border-radius:20px;min-height:48px;font-size:10px}.map-surface .mobile-nav button.active{color:#0b7958}.map-surface .mobile-nav .mobile-report{background:#143d35;color:#c5f38e;max-width:62px;height:54px;transform:none;box-shadow:none}.map-surface .mobile-nav svg{width:21px;height:21px}
.surface-events{position:absolute;left:16px;bottom:calc(106px + env(safe-area-inset-bottom));border-radius:22px;padding:10px 14px;display:flex;align-items:center;gap:9px;z-index:700;font-size:13px}.surface-events strong{background:#e6efdd;border-radius:12px;padding:3px 7px}
.map-surface .geo-locate,.map-surface .nav-follow{position:absolute;right:16px;bottom:calc(106px + env(safe-area-inset-bottom));left:auto;top:auto;width:44px;height:44px;border-radius:50%;z-index:700;display:grid;place-items:center;padding:0}
.map-surface .leaflet-bottom.leaflet-right{bottom:calc(168px + env(safe-area-inset-bottom));right:13px}.map-surface .leaflet-control-attribution{position:fixed;bottom:0;right:0;font-size:9px;background:#ffffffb0}
.surface-trip{position:absolute;left:16px;right:16px;top:calc(76px + env(safe-area-inset-top));z-index:700;padding:14px 16px;border-radius:20px;display:flex;align-items:center;gap:12px;max-width:640px;margin:auto}.surface-trip>div{flex:1;min-width:0}.surface-trip small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#536e65;font-size:12px;margin-bottom:6px}.surface-trip strong{display:block;font-size:17px;line-height:1.35}.surface-trip span{display:block;font-size:12px;margin-top:5px}.surface-trip button{background:#ecf0e7;border:0;border-radius:16px;color:#8e352f;padding:8px;min-width:48px}.surface-trip button svg{width:18px;height:18px}.surface-trip button span{font-size:10px}
.surface-speed{position:absolute;left:16px;bottom:calc(160px + env(safe-area-inset-bottom));z-index:700;padding:10px 14px;border-radius:18px;max-width:calc(100% - 96px)}.surface-speed strong{font-size:22px;display:block}.surface-speed #nav-status:empty{display:none}.surface-speed #nav-status{font-size:11px;display:block;max-width:220px;margin-top:4px}
.surface-route-events{position:absolute;left:16px;bottom:calc(106px + env(safe-area-inset-bottom));border-radius:20px;z-index:710;width:calc(100% - 88px);max-width:460px}.surface-route-events summary{padding:10px 14px;display:flex;gap:8px;align-items:center;cursor:pointer;font-size:13px;list-style:none}.surface-route-events summary svg{width:18px;height:18px}.surface-route-events .full-list{max-height:35svh;overflow:auto;padding:0 8px 8px}.surface-route-events .event{background:transparent;box-shadow:none}.surface-route-events[open]+*{visibility:hidden}
.map-surface .pcg-banner{position:fixed;left:0;right:0;top:calc(122px + env(safe-area-inset-top));z-index:650;margin:0;border-radius:0;padding:6px 16px;min-height:0;background:#fffdf0db;font-size:11px}.map-surface:has(#navigation-map) .pcg-banner{top:calc(202px + env(safe-area-inset-top))}
.surface-settings .settings-row{gap:12px}.surface-settings input[type=range]{width:125px;accent-color:#176e60}.surface-settings .text-button{margin-top:16px}
.map-surface.night{--glass:rgba(23,36,40,.9);--glass-ink:#eef4ed;--glass-line:rgba(230,245,235,.13)}
.night .leaflet-tile-pane{filter:invert(1) hue-rotate(165deg) saturate(.55) brightness(.72)}.night .surface-trip small{color:#c5d4cc}.night .surface-trip button,.night .surface-events strong{background:#30453d;color:#eef4ed}
.navigation-alert{z-index:1400;top:calc(205px + env(safe-area-inset-top));max-width:calc(100% - 32px)}
@media(min-width:800px){.surface-account{right:24px}.surface-search,.surface-filters{left:24px}.surface-trip{top:24px;right:140px;left:24px;margin:0;max-width:620px}.navigation-alert{top:155px}.map-surface:has(#navigation-map) .pcg-banner{top:145px}}
@media(max-width:360px){.surface-filters button{padding:8px 7px;font-size:11px}.surface-filters svg{width:14px;height:14px}.surface-trip strong{font-size:15px}}
.map-surface .geo-map-shell{height:100svh!important;min-height:100svh!important;max-height:none!important}
.map-surface .sponsor-banner{position:fixed;left:0;right:0;top:calc(124px + env(safe-area-inset-top));z-index:650;margin:0;border-radius:0;padding:6px 16px;min-height:0;background:#fffdf0db;font-size:11px}.map-surface:has(#navigation-map) .sponsor-banner{top:calc(202px + env(safe-area-inset-top))}
#sheet .surface-settings input[type=range]{width:125px;padding:0;margin:0;flex-shrink:0}
@media(min-width:800px){.map-surface:has(#navigation-map) .sponsor-banner{top:145px}}
html:has(body.map-surface){scrollbar-gutter:auto}
.map-surface .mobile-nav button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0}.map-surface .mobile-nav .mobile-report{display:flex!important}
.night.map-surface .mobile-nav button.active{color:#c5f38e}.night.map-surface .leaflet-control-zoom a{background:#20343a;color:#edf4ef;border-color:#ffffff24}
#sheet .surface-settings input[type=range][data-surface-volume]{width:125px!important;max-width:45%;flex:0 0 125px;padding:0!important;margin:0!important;border:0;background:transparent}.surface-settings .settings-row>strong{min-width:0;flex:1}.surface-settings{overflow-x:hidden}
#sheet #pcg-report select[name=type]{appearance:none;-webkit-appearance:none;width:auto;max-width:100%;min-height:38px;border:1px solid #d8e3da;border-radius:20px;background:var(--white,#fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23173d38' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;color:var(--ink,#173d38);padding:8px 36px 8px 14px;font:600 13px inherit;margin:0 0 5px}
.surface-start,.surface-overview{position:absolute;z-index:720;bottom:calc(164px + env(safe-area-inset-bottom));left:16px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:24px;padding:12px 20px;min-height:46px}.surface-start{right:16px;width:calc(100% - 32px);max-width:460px;margin:auto;background:#bdf080;color:#153d36;font-size:16px;font-weight:750;box-shadow:0 5px 22px #1234}.surface-overview{bottom:calc(164px + env(safe-area-inset-bottom));left:auto;right:16px;font-size:11px;padding:8px 12px;min-height:36px;background:var(--glass);color:var(--glass-ink);border:1px solid var(--glass-line);backdrop-filter:blur(16px)}.surface-speed[hidden]{display:none!important}
#sheet #pcg-report select[name=type]{font-family:inherit;font-size:13px;font-weight:600}

/* Reveal only the selected initial GPS view, never the placeholder camera. */
.pcg-home-pending #road-map{opacity:0;pointer-events:none}.home-map-loading{position:absolute;inset:0;display:grid;place-items:center;background:#eef2eb;color:#37594e;font-size:14px;z-index:3;pointer-events:none}.night .home-map-loading{background:#132c28;color:#dce8df}
