/* Production controls only: no laboratory panels. */
#map-search-canvas {touch-action:none;}
#mesh-xy-control{align-self:flex-end;margin:0 10px 0 0}
#mesh-xy-toggle{width:28px;height:31px;padding:0;font:24px/29px Arial,sans-serif;border:1px solid #777;border-radius:4px;background:transparent;color:inherit;cursor:pointer}
#mesh-xy-toggle[aria-pressed=true]{background:#245b7e;color:white}
.mesh-xy-disabled .tree-interaction-guides,.mesh-xy-disabled .stem-drag-hint,.mesh-xy-disabled .stem-outline-overlay,.mesh-xy-disabled .mesh-gesture-preview{display:none!important}
#paint-tree-toggle,#mesh-draw-toggle{position:fixed;right:12px;bottom:32px;width:42px;height:42px;padding:5px;border:1px solid #aaa;border-radius:7px;background:#13131bd9;color:white;z-index:110;cursor:pointer}
#paint-tree-toggle svg{display:block;width:100%;height:100%}
#mesh-draw-toggle{right:62px;font:28px/30px Arial,sans-serif;display:none}
.mobile-layout #mesh-draw-toggle{display:none!important}
.neighbourhood-view #paint-tree-toggle,.neighbourhood-view #mesh-draw-toggle,.photo-layout-active #paint-tree-toggle,.photo-layout-active #mesh-draw-toggle,body:has(#image-detail.visible) #paint-tree-toggle,body:has(#image-detail.visible) #mesh-draw-toggle{display:none!important}
#mesh-draw-toggle[aria-pressed=true]{background:#235c85}
#paint-tree-menu{position:fixed;bottom:80px;right:12px;z-index:111;display:flex;flex-direction:row-reverse;align-items:flex-end;gap:6px;max-width:calc(100vw - 16px);color:#eee;font:14px Arial,sans-serif}
#paint-tree-menu[hidden],.paint-choices[hidden]{display:none!important}
.paint-categories,.paint-choices{border:1px solid #707076;border-radius:7px;background:#181820f5;padding:5px;max-height:65vh;overflow:auto;box-shadow:0 5px 25px #0009}
#paint-tree-menu .paint-categories,#paint-tree-menu .paint-shape-choices{background:rgba(24,24,32,.4)}
.paint-menu-item{padding:8px 10px;cursor:pointer;white-space:nowrap}
.paint-menu-item:hover,.paint-menu-item:focus{background:#474758}
.paint-choices{display:grid;grid-template-columns:repeat(4,75px);gap:4px;direction:ltr}
.paint-thumbnail{width:75px;height:75px;cursor:pointer;border:1px solid transparent;border-radius:4px;overflow:hidden}
.paint-thumbnail:hover,.paint-thumbnail:focus{border-color:white}
.paint-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.tree-interaction-guides{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4}
.tree-interaction-guides polygon{fill:#8bcadd09;stroke:#b9e8ff70;stroke-width:1;stroke-dasharray:2 6}
.stem-drag-hint{position:absolute;z-index:30;pointer-events:none;white-space:pre-line;background:#10121ddc;color:#eee;padding:7px 10px;border-radius:5px;font:13px/1.5 Arial,sans-serif}
.stem-drag-hint[hidden]{display:none}
.internal-node.circuit-node{visibility:hidden!important;pointer-events:none!important}
.internal-node.smoke2-node:not(.smoke2-selected){visibility:hidden!important;pointer-events:none!important}
body:not(.show-non-fork-nodes) .internal-node.smoke2-selected{visibility:visible!important}
body:not(.mesh-view-active) .mesh-atmosphere,body:not(.mesh-view-active) .ray-surface-interaction{display:none!important}
.mesh-atmosphere{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
.mesh-gesture-preview{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
.mesh-gesture-preview[hidden]{display:none}
.stem-outline-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none}
.stem-outline-overlay[hidden]{display:none}
@media(max-width:600px){.paint-choices{grid-template-columns:repeat(4,48px)}.paint-thumbnail{width:48px;height:48px}.paint-menu-item{padding:7px 4px;font-size:11px}#paint-tree-menu{gap:3px}}
body.mobile-layout .paint-choices {min-width:0;flex-shrink:1;grid-template-columns:repeat(4,57.2px);grid-auto-columns:57.2px;}
body.mobile-layout .paint-thumbnail {box-sizing:content-box;width:55.2px;height:55.2px;padding:0;}
body.mobile-layout #paint-tree-menu {bottom:calc(58px + env(safe-area-inset-bottom));}
@media(orientation:landscape){
 body.mobile-layout .paint-choices {grid-template-columns:repeat(7,69.5px);grid-auto-columns:69.5px;grid-template-rows:repeat(3,69.5px);max-height:228.5px;overflow:auto;}
 body.mobile-layout .paint-thumbnail {width:67.5px;height:67.5px;}
 body.mobile-layout #paint-tree-menu {bottom:calc(58px + env(safe-area-inset-bottom));max-height:calc(100dvh - 66px);align-items:flex-end;}
 body.mobile-layout .paint-categories {max-height:calc(100dvh - 100px);}
}

.paint-section-label {padding:3px 7px 1px;font-size:11px;line-height:1.1;color:#bbb;pointer-events:none;}
.paint-section-label:not(:first-child) {margin-top:5px;}
#paint-tree-menu .paint-shape-choices {display:flex;flex-direction:column;gap:4px;min-width:0;max-width:calc(100vw - 160px);max-height:min(65vh,600px);overflow:auto;}
#paint-tree-menu .paint-shape-choice {display:block;flex:none;width:auto;margin:0;padding:8px 12px;background:transparent;color:inherit;text-align:left;font:14px/1.2 Arial,sans-serif;border:0;border-radius:4px;}
#paint-tree-menu .paint-shape-choice:hover,#paint-tree-menu .paint-shape-choice:focus {background:#474758;}
body:not(.mobile-layout) #paint-tree-menu .paint-shape-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;width:240px;}
body.mobile-layout #paint-tree-menu .paint-shape-choices {max-height:calc(100dvh - 100px);}
body.mobile-layout #paint-tree-menu .paint-shape-choice {font-size:13px;padding:8px;}

body.mobile-layout #paint-tree-menu .paint-shape-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-columns:auto;gap:4px;width:190px;max-width:calc(100vw - 145px);}
body.mobile-layout #paint-tree-menu .paint-shape-choice {min-width:0;overflow-wrap:anywhere;}
@media(orientation:landscape){
 body.mobile-layout #paint-tree-menu .paint-shape-choices {grid-template-columns:repeat(3,minmax(0,1fr));width:300px;max-width:calc(100vw - 170px);}
}

#vary-picker {display:none!important;}
#paint-tree-menu .paint-legacy-choices {display:block;grid-template-columns:none;width:160px;max-height:65dvh;overflow:auto;}
#paint-tree-menu .paint-tweaks{display:flex;flex-direction:column;gap:10px;width:190px;max-width:calc(100vw - 145px);box-sizing:border-box;touch-action:pan-y;background:rgba(24,24,32,.2)}
#paint-tree-menu .paint-tweak{display:grid;grid-template-columns:1fr auto;gap:3px 8px;font:13px/1.2 Arial,sans-serif}
#paint-tree-menu .paint-tweak output{color:#bbb;text-align:right}
#paint-tree-menu .paint-tweak input{grid-column:1/-1;width:100%;min-width:0;touch-action:pan-x}
#paint-tree-menu #vary-menu {position:static;transform:none;width:auto;border:0;padding:2px;max-height:none;overflow:visible;}
#paint-tree-menu #vary-menu .picker-buttons {flex-direction:column;flex-wrap:nowrap;align-items:stretch;}
#paint-tree-menu #vary-menu .picker-label {display:block;width:auto;}
#paint-tree-menu #vary-menu{background:transparent;color:inherit}
#paint-tree-menu .paint-categories>button.paint-menu-item{display:block;width:100%;margin:0;padding:8px 10px;background:transparent;color:inherit;border:0;border-radius:0;box-shadow:none;text-align:left;font:inherit}
#paint-tree-menu .paint-categories>button.paint-menu-item:hover,#paint-tree-menu .paint-categories>button.paint-menu-item:focus{background:#474758}
#paint-tree-menu #vary-menu .picker-buttons button[data-menu-label] {width:100%;min-height:29px;justify-content:flex-start;gap:9px;padding:2px 8px;text-align:left;}
#paint-tree-menu #vary-menu .picker-buttons button[data-menu-label]::after {content:attr(data-menu-label);font:13px sans-serif;white-space:nowrap;}
#legacy-quick-styles{position:fixed;right:12px;bottom:78px;width:42px;height:21px;display:flex;z-index:110;border-radius:4px;background:#000;border:1px solid #aaa;box-sizing:border-box;overflow:hidden}
#legacy-quick-styles button{flex:1 1 0;width:50%;min-width:0;min-height:0;height:100%;margin:0;padding:0;box-sizing:border-box;color:#fff;font:12px/1 sans-serif;display:grid;place-items:center;cursor:pointer}
#legacy-quick-styles button,#legacy-quick-styles button:hover,#legacy-quick-styles button:active{background:transparent!important;border:0!important;box-shadow:none!important;filter:none!important;border-radius:0}
#legacy-quick-styles button span{display:block;transform:none;line-height:1}
.neighbourhood-view #legacy-quick-styles,.photo-layout-active #legacy-quick-styles,body:has(#image-detail.visible) #legacy-quick-styles{display:none}
body.mobile-layout #legacy-quick-styles{left:calc(var(--mobile-palette-x,75vw) - 21px);right:auto;bottom:calc(54px + env(safe-area-inset-bottom));}

body:not(.mobile-layout) #paint-tree-menu .paint-tweaks{align-self:flex-start}
