/* One canvas-tool panel contract. Native callbacks, dock preferences, scene
   geometry, advertising and required attribution remain independently owned. */
:is(#threeWorkspace,#plantRoomThreeWorkspace) { --three-studio-panel-width:360px; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] {
  box-sizing:border-box; min-width:0; min-height:0; margin:0; padding:12px;
  border:1px solid var(--menu-border)!important; border-radius:10px!important;
  background:var(--menu-surface)!important; color:var(--menu-ink); box-shadow:var(--menu-shadow)!important;
  backdrop-filter:none; -webkit-backdrop-filter:none; font:500 12px/1.45 var(--menu-font);
  overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;
}
#threeWorkspace > :is(.three-workbench-popover,.three-design-editor)[data-three-studio-panel] {
  position:absolute; top:8px; left:auto; right:8px; transform:none;
  width:min(var(--three-studio-panel-width),calc(100% - 16px)); max-width:calc(100% - 16px); max-height:calc(100% - 16px);
}
#threeWorkspace > .three-design-editor[data-three-studio-panel] { bottom:8px; }
.three-display-open #threeWorkspace > .three-overlay-layout {
  inset:8px; grid-template-columns:minmax(0,1fr) minmax(0,var(--three-studio-panel-width)); gap:8px;
}
.three-display-open #threeWorkspace[data-google-earth-3d-mode="photorealistic"] > .three-overlay-layout { bottom:32px; }
.three-display-open #threeWorkspace .three-overlay-dock { align-self:start; height:100%; }
#plantRoomThreeWorkspace > .three-overlay-layout {
  inset:8px; grid-template-columns:minmax(0,1fr) minmax(0,var(--three-studio-panel-width)); gap:8px;
}
#plantRoomThreeWorkspace.has-google-earth-3d > .three-overlay-layout { bottom:32px; }
#plantRoomThreeWorkspace .three-overlay-dock { align-self:start; max-height:100%; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] > [data-three-studio-panel-head] {
  position:sticky; top:-12px; z-index:3; display:flex; flex:0 0 auto; align-items:center; justify-content:space-between;
  gap:8px; margin:-12px -12px 0; padding:10px 12px; min-height:54px;
  border-bottom:1px solid var(--menu-border); background:var(--menu-surface); color:var(--menu-ink);
}
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel-head] > div { display:grid; min-width:0; gap:3px; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel-head] :is(strong,h3) { margin:0; color:var(--menu-ink); font:650 15px/1.3 var(--menu-font); overflow-wrap:anywhere; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel-head] :is(small,span) { color:var(--menu-muted); font:500 11px/1.4 var(--menu-font); overflow-wrap:anywhere; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel-head] > button {
  flex:0 0 32px; width:32px; height:32px; min-height:32px; padding:0;
  border:1px solid var(--menu-border-strong); border-radius:7px; background:var(--menu-surface); color:var(--menu-muted); font-size:20px;
}
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel-head] > button svg { width:16px; height:16px; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(button,input,select,textarea) {
  box-sizing:border-box; min-width:0; max-width:100%; border-radius:7px; font-family:var(--menu-font); box-shadow:none;
}
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  min-height:34px; padding:6px 9px; border:1px solid var(--menu-border-strong); background:var(--menu-surface); color:var(--menu-ink); font:500 12px/1.4 var(--menu-font);
}
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] button { min-height:34px; font-size:12px; font-weight:600; white-space:normal; overflow-wrap:anywhere; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(button,input,select,textarea,summary):focus-visible { outline:2px solid var(--menu-primary); outline-offset:2px; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(label,p,small,summary) { min-width:0; overflow-wrap:anywhere; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] p { margin:4px 0; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] .three-visibility-control:has(> button[data-layer="roomObjects"]) { grid-template-columns:minmax(0,1fr) 36px; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] .three-visibility-control > button[data-layer="roomObjects"] { grid-column:1 / -1; width:100%; overflow-wrap:normal; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(.three-finish-library,.three-studio-lighting) > summary { list-style:none; justify-content:flex-start; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(.three-finish-library,.three-studio-lighting) > summary::before { content:"›"; display:inline-block; flex:0 0 10px; font-size:18px; line-height:1; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(.three-finish-library,.three-studio-lighting)[open] > summary::before { transform:rotate(90deg); }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(.three-finish-library,.three-studio-lighting) > summary > :is(span,output) { margin-left:auto; }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(.three-workbench-hint,.three-visibility-site-note,.field-note,.three-edit-status) { color:var(--menu-muted); font:500 11px/1.45 var(--menu-font); }
:is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(.three-workbench-controls label > span,.three-presentation-controls > span) { font-weight:600; }
#threeWorkspace [data-three-studio-panel] .three-design-native :is(.panel-card,.card,.product-card,.settings-card) { margin:8px 0; padding:10px; border:1px solid var(--menu-border); border-radius:8px; background:var(--menu-subtle); box-shadow:none; }
#threeWorkspace [data-three-studio-panel] .three-design-native :is(h2,h3,h4) { margin:8px 0; font:650 14px/1.35 var(--menu-font); color:var(--menu-ink); overflow-wrap:anywhere; }
.three-workspace-v173 .three-workbench-native-actions[data-three-studio-panel] { font:500 12px/1.45 var(--menu-font); }
.three-workspace-v173 .three-workbench-native-actions [data-three-studio-panel-head] { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:6px; border-bottom:1px solid var(--menu-border); font-weight:650; }
.three-workspace-v173 .three-workbench-native-actions [data-three-studio-panel-head] > button { width:30px; min-height:30px; padding:0; }
@container (max-width:760px) {
  .three-display-open #threeWorkspace > .three-overlay-layout { display:flex; flex-direction:column; }
  .three-display-open #threeWorkspace .three-overlay-dock { width:min(var(--three-studio-panel-width),100%); margin-left:auto; }
}
@media(pointer:coarse) {
  :is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] :is(button,select,summary) { min-height:44px; }
  :is(#threeWorkspace,#plantRoomThreeWorkspace) [data-three-studio-panel] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { min-height:44px; font-size:16px; }
}
