/* B034: real available size and input capabilities; no brand/model layout selectors. */
:root{--usable-vh:100dvh;--usable-vw:100vw;--map-vh:100dvh;--visual-top:0px;--visual-left:0px}
html,body{max-width:100%;margin:0;overflow-x:clip}
#mapWorkspace{box-sizing:border-box;max-width:var(--map-layout-vw,100%);width:100%;padding:0!important;min-width:0}
#mapWorkspace .map-stage{height:var(--map-vh);min-height:0;max-width:100%;overflow:hidden;isolation:isolate}
#mapWorkspace #map{height:100%!important;min-height:0!important;max-height:none!important;border:0;border-radius:0;width:100%}
#mapWorkspace .primary-actions{display:flex;flex-direction:column;grid-template-columns:none;width:150px!important;gap:8px;top:calc(var(--map-visible-top,0px) + max(8px,env(safe-area-inset-top)));right:max(8px,env(safe-area-inset-right));max-height:calc(100% - 60px);margin:0}
#mapWorkspace .primary-actions>button{min-width:44px;min-height:48px;padding:8px 10px;line-height:1.35;white-space:normal;overflow-wrap:break-word}
#mapWorkspace .primary-actions .map-action-label{display:block!important;font-size:14px!important;margin:0}
#mapWorkspace .primary-actions .ticket-icon{width:24px;height:24px;flex:none;margin:0}
#mapWorkspace .leaflet-top{top:calc(var(--map-visible-top,0px) + max(8px,env(safe-area-inset-top)))}
#mapWorkspace #map .leaflet-control-zoom{margin-top:0;margin-left:max(8px,env(safe-area-inset-left))}
#mapWorkspace #map .leaflet-control-zoom a{width:44px!important;height:44px!important;min-width:44px;min-height:44px;line-height:44px!important}
#mapLeftStack{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:end;gap:6px;width:max-content;max-width:calc(100% - 76px);bottom:calc(var(--map-hidden-bottom,0px) + max(26px,var(--position-attribution-height,24px)) + 8px + env(safe-area-inset-bottom))}
#mapLeftStack>*{min-width:0}
#mapLeftStack #developerToolsOpen{min-height:44px;max-width:110px;line-height:1.35;white-space:normal}
#mapLeftStack .map-top-actions button{width:44px;height:44px;min-height:44px;font-size:0;padding:9px}
#mapLeftStack .map-top-actions button svg{width:24px;height:24px}
#mapLeftStack #crosshairCoordinateBar{width:auto;max-width:100%;min-height:44px}
#mapLeftStack .coordinate-row{flex-wrap:wrap;line-height:1.35;min-width:0;font-size:13px}
#mapLeftStack .coordinate-row span{white-space:normal;overflow-wrap:normal}
#fullscreenToggle[hidden],#mapLeftStack .map-top-actions[hidden]{display:none!important}
body[data-touch-main='true'] #mapLeftStack{grid-template-columns:auto minmax(0,1fr)}
body[data-adaptive-layout='bottom'] .has-selection-sheet #mapLeftStack{bottom:calc(var(--selection-sheet-height,0px) + var(--map-hidden-bottom,0px) + 8px)}
body[data-adaptive-layout='side'] .has-selection-sheet #mapLeftStack{max-width:calc(100% - min(46%,480px) - 24px);bottom:calc(var(--map-hidden-bottom,0px) + max(26px,var(--position-attribution-height,24px)) + 8px + env(safe-area-inset-bottom))}
body[data-adaptive-layout='side'] .selection-sheet[data-dock='left']{left:max(8px,env(safe-area-inset-left));right:auto}
body[data-adaptive-layout='side'] .map-stage[data-selection-dock='left'] #mapLeftStack{left:auto;right:76px;max-width:calc(100% - min(46%,480px) - 96px)}
.map-stage[data-selection-dock='top'] #mapLeftStack{bottom:calc(var(--map-hidden-bottom,0px) + max(26px,var(--position-attribution-height,24px)) + 8px + env(safe-area-inset-bottom))!important}
.map-stage[data-selection-dock='top'] .primary-actions,.map-stage[data-selection-dock='top'] .leaflet-top{top:calc(var(--selection-sheet-height,0px) + 8px)!important}
#mapWorkspace #reportOpen{right:max(8px,env(safe-area-inset-right));bottom:calc(var(--map-hidden-bottom,0px) + max(28px,var(--position-attribution-height,24px)) + 8px + env(safe-area-inset-bottom));width:48px;height:48px;min-height:48px}
.selection-sheet{max-width:calc(100% - 16px);width:min(640px,calc(100% - 16px));padding:0 8px max(8px,env(safe-area-inset-bottom));z-index:1400}
body[data-adaptive-layout='side'] .selection-sheet{width:min(46%,480px);min-width:280px;left:auto;right:max(8px,env(safe-area-inset-right));transform:none}
.selection-sheet .ticket-popup{width:100%;min-width:0;max-width:100%}
.selection-sheet .ticket-popup-heading h2{word-break:normal;overflow-wrap:anywhere;font-size:16px!important}
.selection-sheet .ticket-popup-body :is(button,a){white-space:normal;overflow-wrap:break-word;min-height:44px;min-width:0}
.selection-related button{max-width:100%}
.ticket-scroll-frame{min-width:0;padding-right:22px}
.ticket-scroll-track{width:16px;right:0;z-index:2}
.ticket-popup-actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr))}
.ticket-popup-actions #popupReport{grid-column:1/-1}
.ticket-popup-calls{grid-template-columns:repeat(3,minmax(0,1fr))}
.ticket-popup-calls a{gap:5px;font-size:15px}
.popup-transport{grid-template-columns:repeat(4,minmax(44px,1fr));gap:4px}
#mapWorkspace .choice-panel,#mapWorkspace #displayMenu{left:50%;right:auto;transform:translateX(-50%);top:calc(var(--map-visible-top,0px) + 8px);bottom:auto;width:min(640px,calc(100% - 16px));min-width:0;max-width:calc(100% - 16px);max-height:min(var(--panel-vh,82dvh),calc(100% - var(--map-visible-top,0px) - var(--map-hidden-bottom,0px) - 16px));padding:8px!important}
.panel-heading{min-width:0;padding-right:60px;flex:none}
.panel-heading h2{font-size:17px;word-break:normal;overflow-wrap:anywhere}
.panel-content{min-width:0;max-width:100%;overflow-x:hidden;overflow-y:auto;scrollbar-width:auto;scrollbar-color:#515b55 #d8ddda}
.panel-content :is(fieldset,legend,details,summary,label,div){min-width:0;max-width:100%;word-break:normal;overflow-wrap:break-word}
.panel-content :is(button,select,input:not([type=checkbox]):not([type=radio])){max-width:100%;font-size:16px;min-height:44px;white-space:normal}
.panel-content .basemap-options{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}
.panel-content .advanced-map-actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}
.developer-tools-dialog[open]{position:fixed;top:calc(var(--visual-top) + 8px);left:calc(var(--visual-left) + 8px);right:auto;bottom:auto;margin:0;width:min(780px,calc(var(--usable-vw) - 16px));max-width:calc(var(--usable-vw) - 16px);max-height:min(var(--panel-vh,82dvh),calc(var(--usable-vh) - 16px))}
.developer-tools-heading{min-width:0}.developer-tools-heading h2{overflow-wrap:anywhere}
#developerToolsBody{min-width:0;overflow-x:hidden;overflow-y:auto}#developerToolsBody :is(pre,details,summary){max-width:100%;min-width:0;overflow-wrap:anywhere}
#developerToolsBody :is(.table-scroll,#lengthTableScroll){max-width:100%;overflow-x:auto}
body.report-page-open #reportPanel{inset:auto;top:var(--visual-top);left:var(--visual-left);width:var(--usable-vw);height:var(--usable-vh);max-height:var(--usable-vh);min-width:0;overflow-x:hidden}
body.report-page-open #reportPanel .report-heading{top:0;flex:none}
body[data-adaptive-controls='compact'] #mapWorkspace .primary-actions{width:48px!important;gap:6px}
body[data-adaptive-controls='compact'] #mapWorkspace .primary-actions>button{width:48px;height:48px;min-height:48px;border-radius:50%;padding:0}
body[data-adaptive-controls='compact'] #mapWorkspace .primary-actions .map-action-label{display:none!important}
body[data-short-viewport='true'][data-adaptive-controls='compact'] #mapWorkspace .primary-actions{display:flex;flex-direction:row;flex-wrap:wrap;width:194px!important;max-width:calc(100% - 112px);gap:4px}
body[data-short-viewport='true'][data-adaptive-controls='compact'] #mapWorkspace .primary-actions>button{width:44px;height:44px;min-height:44px}
body[data-short-viewport='true'] #mapWorkspace .leaflet-control-zoom{display:flex}
body[data-short-viewport='true'] #mapWorkspace .leaflet-control-zoom a:first-child{border-right:1px solid #ccc;border-bottom:0}
body[data-short-viewport='true'] #mapWorkspace .primary-actions{max-height:calc(100% - 16px)}
@media(max-width:360px){#mapLeftStack{gap:4px}#mapLeftStack #developerToolsOpen{max-width:94px;padding:5px 7px;font-size:13px}#mapLeftStack .coordinate-row{font-size:12px}.selection-sheet{padding-left:6px;padding-right:6px}.ticket-popup-calls a{font-size:14px;gap:4px}.ticket-popup-calls svg{width:20px;height:20px}}
@media(prefers-reduced-motion:reduce){.selection-sheet,.primary-actions{transition:none}}
