#map-shell{container:map-controls / inline-size}
#map-shell .map-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px 16px;align-items:center;padding:10px 12px}
#map-shell .map-toolbar-actions{display:contents}
#map-shell .map-toolbar>.search-box{grid-column:1;grid-row:1;max-width:none;min-width:0;width:100%}
#map-shell .map-camera-tools{grid-column:2;grid-row:1;display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;justify-self:center;width:max-content;gap:4px;min-width:0}
#map-shell .map-toolbar .map-context-tools{grid-column:3;grid-row:1;width:auto;gap:12px;justify-self:end;display:flex;align-items:center}
#map-shell .map-context-tools .mode-switch{margin:0}
#map-shell .map-context-tools .mode-switch{gap:4px}
#map-shell .map-context-tools .mode-switch button{width:36px;height:36px;min-width:36px;padding:0}
#map-shell .map-camera-tools button,#map-shell .map-camera-tools #fit,#map-shell .map-camera-tools #focus-route,#map-shell .map-camera-tools #fullscreen{width:36px;height:36px;min-width:36px;padding:0;display:grid;place-items:center}
#map-shell .map-camera-tools output{width:48px;min-width:48px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
#map-shell .map-route-picker summary{display:flex;align-items:center;justify-content:center;gap:8px}
#map-shell .map-route-picker summary .map-route-label{margin:0;color:inherit}
#map-shell .map-route-picker summary .map-route-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;margin:0!important;text-align:center}
#map-shell[data-toolbar-wrapped=true] .map-toolbar{grid-template-columns:minmax(0,1fr);gap:8px;padding:8px}
#map-shell[data-toolbar-wrapped=true] .map-toolbar>.search-box{grid-column:1/-1;grid-row:1}
#map-shell[data-toolbar-wrapped=true] .map-toolbar-actions{display:flex;flex-wrap:nowrap;grid-column:1/-1;grid-row:2;justify-self:stretch;width:100%;max-width:100%;align-items:center;gap:8px;min-width:0}
#map-shell[data-toolbar-wrapped=true] .map-camera-tools{flex:none}
#map-shell[data-toolbar-wrapped=true] .map-context-tools{flex:none;margin-left:auto;gap:8px}
#map-shell[data-toolbar-wrapped=true] .map-route-picker summary{width:36px;height:36px;padding:0!important;gap:0}
#map-shell[data-toolbar-wrapped=true] .map-route-picker summary::after,#map-shell[data-toolbar-wrapped=true] .map-route-label{display:none!important}
#map-shell #search-results{width:100%;max-height:min(320px,45dvh);overflow:auto}
#map-shell .route-menu-row label span{white-space:normal;overflow-wrap:anywhere}
#map-shell .route-menu-row input{flex-shrink:0}
.map-filter-frame{position:relative;flex:none;width:100%;z-index:35}
:is(#map-shell,#map-mobile-dock) .map-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px 16px;padding:8px 12px;align-items:center;background:#fff}
:is(#map-shell,#map-mobile-dock) .map-status label{display:flex;justify-content:center;align-items:center;min-height:36px;gap:8px;font-size:14px;line-height:1.4;min-width:0}
:is(#map-shell,#map-mobile-dock) .map-status [hidden]{display:none!important}
:is(#map-shell,#map-mobile-dock) .map-status input[type=checkbox]{width:16px;height:16px;flex-shrink:0;margin:0;accent-color:#242424}
:is(#map-shell,#map-mobile-dock) .lod-filter{position:relative;margin:0;min-width:0;display:flex;gap:12px;justify-self:end}
:is(#map-shell,#map-mobile-dock) .lod-filter input{width:120px;min-width:0;accent-color:#242424;margin:0}
.map-detail-label{white-space:nowrap;font-size:14px;font-family:ScaleFieldMiSans,'MiSans',sans-serif}
.map-check-compact{display:none}
#map-shell[data-map-compact=true] .map-status{grid-template-columns:repeat(3,minmax(0,1fr))}
#map-shell[data-map-compact=true] .map-status .lod-filter{grid-column:1/-1;width:100%;justify-self:stretch}
#map-shell[data-map-compact=true] .lod-filter input{flex:1;width:100%}
#map-legend[hidden],#map-mobile-dock[hidden]{display:none!important}
.map-filter-frame #map-legend:not([hidden]){position:absolute;bottom:calc(100% + 8px);left:12px;right:12px;width:auto;max-width:none;display:flex;flex-wrap:wrap;gap:10px 20px;margin:0!important;padding:12px;background:#fff;border:1px solid #dedede;border-radius:2px;box-shadow:none;font-size:12px;line-height:1.4}
#map-legend span{min-width:0;white-space:normal}
#map-legend svg{width:18px;height:18px;flex:none}
#map-shell>.map-lod-indicator{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:0;margin:0;width:auto;min-width:0;height:auto;border:0;border-radius:0;background:none;box-shadow:none;color:#242622;font-family:ScaleFieldMiSans,'MiSans',sans-serif;font-size:clamp(64px,10vw,112px);font-weight:550;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;pointer-events:none;opacity:0;visibility:hidden;z-index:100;transition:opacity .12s}
#map-shell>.map-lod-indicator[data-visible=true]{opacity:1;visibility:visible}
#map-shell .map-edit-toolbar{position:static;inset:auto;transform:none;width:100%;max-width:none;min-height:44px;flex:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px;padding:6px 12px;border:0;border-bottom:1px solid #dedede;box-shadow:none;overflow:visible}
body:not(.editing) #map-shell .map-edit-toolbar{display:none}
#map-shell .map-edit-toolbar .edit-session-actions,#map-shell .map-edit-toolbar .edit-map-actions{display:flex;flex-wrap:nowrap;gap:4px;margin:0}
#map-shell .map-edit-toolbar .edit-status{position:static;transform:none;max-width:180px;padding:0;border:0;box-shadow:none;background:transparent;display:block}
#map-shell .map-edit-toolbar .edit-status:empty{display:none}
#map-shell .map-edit-toolbar button{height:36px}
#map-shell .map-panel-switch{left:12px;right:auto;top:var(--panel-switch-top,80px);bottom:auto;height:36px;align-items:stretch;z-index:42}
#map-shell .map-panel-switch button{height:34px;flex:none}
#map-shell:fullscreen,#map-shell.fullscreen-fallback{--map-page-top:0px}
@container map-controls (max-width:800px){
 #map-shell .map-edit-toolbar .edit-status{display:none}
 #map-shell .map-edit-toolbar .edit-map-actions button{font-size:0;gap:0;width:36px;min-width:36px;padding:0}
}
#workbench-rail .wb-heading .wb-mobile-close{display:none}
#workspace-ai [data-close-workspace-ai-mobile]{display:none}
#map-shell .map-toolbar{z-index:45}
@media(max-width:800px){
 #workspace-ai [data-close-workspace-ai]{display:none}
 #workspace-ai [data-close-workspace-ai-mobile]{display:grid;place-items:center;width:36px;height:36px;padding:8px;border:0;background:transparent!important;color:#242622;box-shadow:none!important;transform:none!important;filter:none!important}
 #workspace-ai [data-close-workspace-ai-mobile]>svg{width:18px;height:18px}
}
/* Both desktop panels reserve their width, including the narrow desktop range. */
html:has(body[data-workbench=true]:not([data-empty-map=true])){overflow:hidden;scrollbar-gutter:auto}
@media(min-width:801px){
 body[data-workbench=true] main,body[data-workbench=true][data-ai-open=true] main{margin-left:var(--rail-width);margin-right:var(--ai-width);width:calc(100% - var(--rail-width) - var(--ai-width))}
 body[data-workbench=true] #workspace-ai{left:auto;right:0;top:var(--site-header-height);bottom:0;width:var(--ai-width);max-width:none}
}
.workspace-ai-heading .workspace-ai-toggle{display:grid;place-items:center;width:36px;height:36px;padding:8px;border:0;background:transparent;color:#242622}
.workspace-ai-heading .workspace-ai-toggle svg{width:18px;height:18px}
@media(max-width:800px){
 #map-shell{--map-control-size:clamp(28px,8cqw,36px)}
 #map-shell .map-toolbar,#map-shell[data-toolbar-wrapped=true] .map-toolbar{padding:8px;gap:6px}
 #map-shell .map-toolbar .search-box input{height:40px;font-size:14px;padding:8px 10px}
 #map-shell .map-camera-tools{gap:2px}
 #map-shell .map-toolbar .map-context-tools{gap:4px;position:relative}
 #map-shell[data-toolbar-wrapped=true] .map-toolbar-actions{gap:6px}
 #map-shell .map-camera-tools button,#map-shell .map-camera-tools #fit,#map-shell .map-camera-tools #focus-route,#map-shell .map-camera-tools #fullscreen,#map-shell .map-context-tools .mode-switch button{width:var(--map-control-size);min-width:var(--map-control-size);height:36px}
 #map-shell .map-camera-tools output{width:32px;min-width:32px;font-size:11px}
 #map-shell .map-context-tools .mode-switch{gap:2px;flex:none}
 #map-shell .map-route-picker{position:static;min-width:0}
 #map-shell .map-route-picker summary{width:var(--map-control-size);height:36px;padding:0!important;gap:0}
 #map-shell .map-route-picker summary::after{display:none!important}
 #map-shell .map-route-label{display:none!important}
 #map-shell .map-route-menu{left:auto;right:0;top:calc(100% + 6px);width:min(340px,calc(100vw - 24px));max-width:none;max-height:50dvh;padding:10px}
 #map-shell .map-edit-toolbar{padding:6px 8px;gap:4px 12px}
 #map-shell .map-edit-toolbar .edit-session-actions button,#map-shell .map-edit-toolbar .edit-map-actions button{width:32px;min-width:32px;height:36px;padding:0}
 body[data-demo=true] #map-shell:not(:fullscreen):not(.fullscreen-fallback){display:flex;flex-direction:column;height:calc(100svh - var(--map-page-top,240px) - 12px);min-height:440px}
 body[data-demo=true] #map-scroll{flex:1;height:auto;min-height:190px}
 #map-shell .map-toolbar{flex:none}
 #map-mobile-dock{position:fixed;left:68px;right:68px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:112;background:#fff;border:0;border-radius:8px;box-shadow:inset 0 0 0 1px #dedede,0 2px 12px #0001}
 #map-mobile-dock .map-filter-frame{position:static}
 #map-mobile-dock .map-status{border:0;background:transparent;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 4px;padding:8px 6px}
 #map-mobile-dock .map-status label:not(.lod-filter){flex-direction:column;min-height:40px;font-size:13px;gap:4px}
 #map-mobile-dock .map-check-full,#map-mobile-dock .map-detail-label{display:none}
 #map-mobile-dock .map-check-compact{display:inline}
 #map-mobile-dock .map-status .lod-filter{grid-column:1/-1;width:100%;justify-self:stretch;min-height:28px}
 #map-mobile-dock .lod-filter input{width:100%;height:28px}
 #map-mobile-dock #map-legend:not([hidden]){left:0;right:0;width:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:10px;border-radius:8px;font-size:12px}
 body[data-workbench=true][data-ai-open=true] #map-mobile-dock,body[data-workbench=true][data-rail-collapsed=false] #map-mobile-dock{visibility:hidden;pointer-events:none}
 body[data-workbench=true][data-rail-collapsed=false] #workbench-rail{top:auto!important;left:0;right:0;bottom:0;width:100%!important;height:66dvh;max-height:calc(100dvh - 96px);z-index:120;border:1px solid #dedede;border-radius:16px 16px 0 0;box-shadow:0 -16px 40px #0002}
 body[data-workbench=true][data-rail-collapsed=false] #workbench-rail .wb-heading{height:64px;min-height:64px;padding:12px 16px;justify-content:space-between}
 body[data-workbench=true][data-rail-collapsed=false] #workbench-rail .wb-heading [data-wb-collapse]{display:none}
 body[data-workbench=true][data-rail-collapsed=false] #workbench-rail .wb-mobile-close{display:grid;place-items:center;width:36px;height:36px;padding:8px;margin:0}
 body[data-workbench=true] #workbench-rail .panel-resize{display:none}
 body[data-workbench=true][data-rail-collapsed=true] #workbench-rail,body[data-workbench=true] .workspace-ai-rail{bottom:calc(16px + env(safe-area-inset-bottom))}
 body[data-workbench=true][data-view=map] #map-shell :is(#inspector,#map-relations,#map-relations.expanded){top:var(--panel-top);bottom:var(--panel-bottom);height:auto;max-height:none;padding:20px;z-index:60}
}
