.map-dock,.quick-categories{display:none}
@media(max-width:760px){
.map-dock{position:absolute;z-index:15;bottom:0;left:50%;transform:translateX(-50%);width:520px;max-width:100%;display:flex;background:var(--panel);border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;padding:6px 8px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -8px 30px #0002}
.map-dock button{flex:1;min-width:0;min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:0;border-radius:10px;padding:6px 2px;background:none;font-size:11px}
.map-dock svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.map-dock .active{color:var(--accent);background:#ff891f12}
.quick-categories{position:absolute;z-index:14;bottom:calc(76px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:7px;max-width:calc(100% - 24px);overflow:auto;scrollbar-width:none;padding:3px 1px;overscroll-behavior-x:contain}.quick-categories button{white-space:nowrap;flex-shrink:0;font-size:12px;min-height:42px;padding:9px 15px;border-radius:22px;box-shadow:0 2px 8px #0002}.quick-categories .active{background:var(--accent);color:#182a30;border-color:var(--accent)}
.bottom-tools{display:none}.attribution{bottom:calc(130px + env(safe-area-inset-bottom))}.map-legend,.navigation-hint{bottom:155px}#explorer{bottom:145px}#detail{max-height:calc(100% - 230px)}#ruler-panel{bottom:150px}#toast{bottom:160px}.dialog-close{float:right;min-width:44px;min-height:44px}#map-more>button:not(.dialog-close){display:block;width:100%;text-align:left;margin-top:8px;min-height:44px}
@media(max-width:760px){
 .map-dock{width:100%;border-radius:0;min-height:68px}.quick-categories{left:0;right:0;transform:none;max-width:none;padding:4px 12px;bottom:calc(70px + env(safe-area-inset-bottom))}
 #explorer{top:10px;bottom:auto;padding:6px 10px;max-height:calc(100% - 170px)}#explorer .tabs{display:none}.list-heading{min-height:36px}.list-heading button{min-height:36px}#list{max-height:32dvh}.view-switch{top:110px}.map-controls{top:170px}
 body.has-detail #detail{bottom:calc(126px + env(safe-area-inset-bottom));max-height:calc(100% - 260px);border-radius:18px;left:8px;right:8px;padding-bottom:0}
 body.detail-folded #detail{max-height:120px}body.has-detail .attribution{top:112px;bottom:auto}body.has-detail .map-controls{top:62px}.attribution{bottom:calc(123px + env(safe-area-inset-bottom));font-size:8px}
 #ruler-panel{bottom:calc(132px + env(safe-area-inset-bottom))}#toast{bottom:calc(142px + env(safe-area-inset-bottom))}body.measuring .quick-categories{display:none}
}

}

.view-switch{right:auto;min-width:0;padding:4px}.dimension-switch{border-left:0;padding-left:0;margin-left:0}.dimension-switch button{min-width:44px;min-height:40px}
@media(max-width:760px){.view-switch,body.has-detail .view-switch{right:auto;width:auto;justify-content:flex-start}.dimension-switch{gap:3px}.dimension-switch button,.dimension-switch #flat{font-size:12px;padding:8px 12px}}

.attribution{display:flex;align-items:center;gap:4px;padding:0 5px 0 0;font-size:11px}#attribution-toggle{border:0;background:transparent;color:inherit;min-width:36px;min-height:36px;padding:4px;font-size:17px}#attribution-text[hidden]{display:none}.attribution:has(#attribution-text[hidden]){padding:0;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px}body.has-detail .attribution{font-size:11px}

.brand{display:flex;flex:none;align-items:center}.brand img{display:block;width:170px;height:46px;object-fit:contain}.brand .map-logo-light{display:none}body.light .brand .map-logo-light{display:block}body.light .brand .map-logo-dark{display:none}@media(max-width:760px){.brand img{width:154px;height:42px}}

@media(max-width:760px){#explorer{top:auto;bottom:calc(128px + env(safe-area-inset-bottom));left:10px;right:10px;max-height:calc(100% - 190px);padding:6px 8px;border-radius:14px}#explorer.collapsed .list-heading{display:none}#explorer .search{flex:none}.view-switch{top:12px;left:12px}.map-controls{top:68px}.attribution{bottom:auto;top:12px;right:12px}#list{max-height:30dvh}body.has-detail .view-switch{top:12px}body.has-detail .attribution{top:112px}#explorer:not(.collapsed){z-index:16}}

#scene{touch-action:none}@media(max-width:760px){.map-controls{flex-direction:column;top:68px;bottom:auto;width:44px}body.has-detail .map-controls{flex-direction:row;width:auto}}

.key.roads{background:#b5bdc4}.light .key.roads{background:#68737b}
@media(min-width:761px){
 .map-controls>.view-switch{position:static;display:block;transform:none;inset:auto;width:44px;min-width:0;padding:0;margin:3px 0;border:0;background:none;box-shadow:none;border-radius:10px}
 .map-controls .dimension-switch{display:flex;flex-direction:column;gap:3px;margin:0;padding:0;border:0}
 .map-controls .dimension-switch button,.map-controls .dimension-switch #flat{width:44px;min-width:44px;height:38px;min-height:38px;padding:0;font-size:12px}
}

/* Permanent, readable OSM attribution, including after interaction. */
body .attribution,body.has-detail .attribution{padding:4px 7px;font:11px/1.4 Arial,sans-serif;background:#fffffff0;color:#33424b;border:1px solid #d8dfe3;border-radius:5px;max-width:calc(100% - 24px)}
.attribution a{white-space:nowrap;text-decoration:underline;text-underline-offset:2px}
@media(max-width:760px){body .attribution,body.has-detail .attribution{top:12px;right:12px;bottom:auto;max-width:calc(100% - 150px);font-size:10px;text-align:right}}

@media(max-width:760px){body .attribution,body.has-detail .attribution{right:40px;max-width:calc(100% - 160px)}.attribution a{white-space:normal}}

/* Desktop utility controls share the attribution footprint. */
@media(min-width:761px){.bottom-tools{right:15px;bottom:35px;width:200px;gap:6px}.bottom-tools button{height:30px;padding:5px 8px;font-size:11px;border-radius:8px}.bottom-tools #reset{flex:1}.bottom-tools #about{flex:0 0 68px}body .attribution,body.has-detail .attribution{right:15px;bottom:8px;top:auto;width:200px;max-width:200px;padding:4px 6px;font-size:10px;line-height:1.25;text-align:center;justify-content:center}.attribution a{white-space:normal}}

@media(min-width:761px){#explorer>h1{margin-bottom:14px}}
