#quickLayers{position:fixed;left:16px;bottom:64px;z-index:6;width:260px;padding:9px 11px;background:#faf9f3f2;color:#233b30;border:1px solid #fff9;border-radius:10px;box-shadow:0 3px 16px #17292026;font:12px/1.3 system-ui;max-height:38dvh;overflow:auto}
#quickLayers>summary{font:650 13px system-ui;cursor:pointer;padding:4px;list-style:none}#quickLayers>summary::-webkit-details-marker{display:none}#quickLayers>summary::before{content:'▸';display:inline-block;width:16px}#quickLayers[open]>summary::before{content:'▾'}#quickLayers[open]>summary{margin-bottom:5px}#quickLayers:not([open]){width:auto;min-width:94px;overflow:visible}#quickLayers:not([open])>div{display:none}
#quickLayers>div{display:grid;grid-template-columns:1fr 1fr;gap:2px 8px}
#quickLayers label{display:flex;align-items:center;gap:5px;min-height:28px;cursor:pointer}
#quickLayers input{margin:0;flex:none;accent-color:#285542;width:15px;height:15px}
#quickLayers label:has(input:focus-visible){outline:2px solid #285542;border-radius:3px}
#quickLayers.forest-layers{bottom:12px}
@media(max-width:660px){#quickLayers{left:8px;bottom:58px;width:min(270px,calc(100vw - 16px));max-height:28dvh;padding:7px 9px}#quickLayers label{min-height:30px}#sceneTools{z-index:9}#quickLayers.forest-layers{bottom:8px}}

/* One visual hierarchy for every top-level section, including late-built modules. */
#sceneTools #toolsContent>details.tool-section{margin:0 0 6px;padding:0;border:1px solid #d1dbd2;border-radius:8px;background:#f7f8f2;overflow:hidden;font:13px/1.45 system-ui;color:#233b30}
#sceneTools #toolsContent>details.tool-section>summary{display:flex;align-items:center;gap:8px;list-style:none;min-height:42px;padding:10px 12px;margin:0;border:0;background:#eaf0e8;color:#233b30;font:650 13px/1.35 system-ui;cursor:pointer;letter-spacing:normal}
#sceneTools #toolsContent>details.tool-section>summary::-webkit-details-marker{display:none}
#sceneTools #toolsContent>details.tool-section>summary::before{content:'▸';width:10px;flex:none;color:#4f6958}
#sceneTools #toolsContent>details.tool-section[open]>summary::before{content:'▾'}
#sceneTools #toolsContent>details.tool-section[open]>summary{border-bottom:1px solid #d1dbd2;margin-bottom:9px}
#sceneTools #toolsContent>details.tool-section>summary:hover{background:#dce7db}
#sceneTools #toolsContent>details.tool-section>summary:focus-visible,#quickLayers>summary:focus-visible{outline:2px solid #285542;outline-offset:-3px}
#sceneTools #toolsContent>details.tool-section>:not(summary){margin-left:11px;margin-right:11px}
#sceneTools #toolsContent>details.tool-section>:last-child:not(summary){margin-bottom:11px}
#sceneTools #toolsContent>details.tool-section select{max-width:100%;font-size:13px}
#sceneTools #toolsContent>details.tool-section input[type=checkbox]{accent-color:#285542}
#sceneTools #toolsContent>details.tool-section details>summary{font-size:12px;font-weight:550;padding:5px 0;color:#4f6958}
.timeline-active #networkPanel{display:none}

/* Layers and the selected building share a flowing stack, never fixed overlays. */
#mapInfoStack{position:fixed;left:16px;bottom:64px;z-index:6;display:flex;flex-direction:column;align-items:flex-start;gap:10px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 240px);overflow:auto;overscroll-behavior:contain;pointer-events:none;padding:2px}
#mapInfoStack>#quickLayers,#mapInfoStack>#houseCard{position:relative;left:auto;right:auto;top:auto;bottom:auto;margin:0;flex-shrink:0;pointer-events:auto;max-width:100%;box-sizing:border-box}
#mapInfoStack>#houseCard{width:410px;max-height:48dvh;flex-shrink:1;min-height:120px;overflow:auto}
#mapInfoStack>#houseCard[hidden]{display:none}
@media(max-width:660px){#mapInfoStack{left:8px;bottom:58px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 200px);gap:8px}#mapInfoStack>#houseCard{width:calc(100vw - 20px);max-height:40dvh}#mapInfoStack>#quickLayers{max-height:28dvh}}

/* One scroll owner; the disclosure header stays reachable on touch screens. */
body #sceneTools{overflow:hidden}
body #sceneTools #toolsDisclosure{max-height:none;overflow:visible}
body #sceneTools #toolsDisclosure>#toolsContent{max-height:calc(100dvh - var(--atlas-nav-height,52px) - 170px);overflow-y:auto;overflow-x:hidden;min-height:0;overscroll-behavior-y:contain;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;padding-right:3px;padding-bottom:8px}
body #sceneTools #toolsDisclosure:not([open])>#toolsContent{display:none}
body #sceneTools #toolsDisclosure>summary{touch-action:pan-y pinch-zoom}
@media(max-width:660px){body #sceneTools #toolsDisclosure>#toolsContent{max-height:calc(58dvh - 66px)}body:has(#houseCard:not([hidden])) #sceneTools #toolsDisclosure{max-height:none;overflow:visible}}
