/* v233: one essential toolbar, a stable scene and a separate scrolling settings pane. */
body.mb-responsive-workspace{height:100dvh;min-height:0;overflow:hidden}
body.mb-responsive-workspace main{min-height:0;overflow:hidden;padding:8px}
body.mb-responsive-workspace main>.layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(280px,1fr);grid-template-rows:minmax(0,1fr);gap:10px;height:100%;min-height:0}
body.mb-responsive-workspace .layout>.viewer{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
body.mb-responsive-workspace .layout>.viewer>.scene-stage{flex:1 1 0;height:auto!important;min-height:0!important;width:100%;overflow:hidden}
body.mb-responsive-workspace .layout>.viewer>.scene-stage canvas{width:100%;height:100%}
.mb-essential-toolbar{display:flex;align-items:center;flex:0 0 52px;height:52px;min-width:0;gap:5px;padding:4px 6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;background:#f2f8f5;white-space:nowrap}
.mb-essential-toolbar>*{flex:0 0 auto}.mb-essential-toolbar button{min-height:44px;max-height:44px;white-space:nowrap;font-size:12px;padding:7px 10px;margin:0}
.mb-essential-toolbar .view-buttons{display:flex;flex-wrap:nowrap;gap:4px}
.mb-essential-toolbar #mbPhotoProjectBar{padding:0;margin:0;background:transparent}.mb-essential-toolbar #mbPhotoProjectBar[hidden]{display:none!important}
.mb-essential-toolbar .mb-photo-view-actions{display:flex;flex-wrap:nowrap;gap:4px;margin:0}
body.mb-has-photo .mb-essential-toolbar>.view-buttons,body.mb-photo-active .mb-essential-toolbar>#fitView{display:none!important}
body.mb-responsive-workspace .layout>.viewer .slider-tools{min-height:34px;max-height:40px;padding:3px 8px;flex:0 0 auto;align-items:center}
body.mb-responsive-workspace .layout>.viewer>.foot{flex:0 0 auto;min-height:31px;max-height:50px;padding:5px 8px;gap:3px 7px;align-items:center;overflow:auto}
body.mb-responsive-workspace .layout>.settings{height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 4px 10px 0}
.mb-presentation-dock{margin:6px 0;padding:0;min-width:0;display:block!important}.mb-presentation-dock>details{margin:5px 0;border:1px solid #c4d8ce;border-radius:9px;background:#f6faf8;padding:8px;min-width:0}.mb-presentation-dock>details>summary{margin:0;font-size:13px;line-height:1.4;cursor:pointer;padding:5px 0;color:#244e47}
.mb-presentation-dock>details[open]>summary{margin-bottom:8px}.mb-presentation-dock details>p{font-size:12px;line-height:1.45;margin:7px 0;white-space:normal;overflow-wrap:anywhere}
body.mb-responsive-workspace .mb-presentation-dock .viewer-toolbar{display:flex!important;position:static;flex-wrap:wrap!important;overflow:visible!important;min-height:0!important;max-height:none!important;padding:0!important;gap:5px;z-index:auto}
body.mb-responsive-workspace .mb-presentation-dock button{white-space:normal;min-height:40px;font-size:12px;line-height:1.3;padding:7px 9px;max-width:100%;overflow-wrap:anywhere}
body.mb-responsive-workspace .mb-presentation-dock select,body.mb-responsive-workspace .mb-presentation-dock input{max-width:100%;min-width:0}
body.mb-responsive-workspace .mb-presentation-dock .mb-advanced-tools{width:100%;margin:0}
body.mb-responsive-workspace .mb-presentation-dock .mb-advanced-body{position:static!important;width:100%!important;max-height:none!important;box-shadow:none;border:0;border-top:1px solid #d7e4dd;padding:7px 0;margin:0;overflow:visible;display:flex;flex-wrap:wrap}
body.mb-responsive-workspace .mb-presentation-dock .mb-room-panel,body.mb-responsive-workspace .mb-presentation-dock .mb-niche-tools-panel{position:static!important;left:auto!important;right:auto!important;top:auto!important;width:100%!important;max-height:none!important;min-width:0!important;box-shadow:none!important;padding:8px 0!important;border:0;overflow:visible!important}
body.mb-responsive-workspace .mb-presentation-dock .mb-room-panel[hidden],body.mb-responsive-workspace .mb-presentation-dock .mb-niche-tools-panel[hidden],body.mb-responsive-workspace .mb-presentation-dock [hidden]{display:none!important}
body.mb-responsive-workspace .mb-presentation-dock .mb-photo-calibration-actions,body.mb-responsive-workspace .mb-presentation-dock .mb-photo-zone-tools{display:flex;flex-wrap:wrap;gap:5px}.mb-presentation-dock .mb-photo-calibration-actions button{flex:1 1 45%}.mb-presentation-dock .mb-photo-zone-tools select{width:100%}
body.mb-responsive-workspace .mb-presentation-dock .mb-viewer-information{position:static!important;display:flex!important;flex-wrap:wrap!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0;padding:0;overflow:visible}
body.mb-responsive-workspace .mb-presentation-dock .mb-gap-editor,body.mb-responsive-workspace .mb-presentation-dock .canvas-edit-overlay{position:static!important;left:auto!important;top:auto!important;width:100%!important;max-width:100%!important;box-shadow:none;margin:5px 0}
body.mb-responsive-workspace .mb-presentation-dock #validation{font-size:12px;padding:7px;margin:5px 0;white-space:normal;max-height:none}
#mbSettingsToggle{display:none;min-height:36px;padding:5px 9px;font-size:12px;white-space:nowrap}
@media(max-width:1199px){
 body.mb-responsive-workspace main>.layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,3fr) minmax(0,1fr);gap:5px}
 body.mb-responsive-workspace main.mb-settings-open>.layout,body.mb-responsive-workspace main.settings-expanded.mb-settings-open>.layout{grid-template-rows:minmax(0,1.25fr) minmax(0,1fr)}
 body.mb-responsive-workspace main.settings-expanded:not(.mb-settings-open)>.layout{grid-template-rows:minmax(0,3fr) minmax(0,1fr)}
 body.mb-responsive-workspace .layout>.settings{background:#fff;border-top:2px solid #244e47;border-radius:10px 10px 0 0;padding:0 4px 8px;scrollbar-gutter:auto}
 body.mb-responsive-workspace .layout>.settings .settings-topbar{display:flex!important;min-height:32px;padding:4px 6px;top:0}
 body.mb-responsive-workspace .layout>.settings .settings-nav{top:32px}
 body.mb-responsive-workspace .settings-topbar button{display:none!important}
 #mbSettingsToggle{display:block}
 body.mb-responsive-workspace>header{padding:3px 7px;gap:5px;flex-basis:40px;height:40px}
 body.mb-responsive-workspace>header .mb-brand{width:155px;max-width:43vw;height:30px}body.mb-responsive-workspace>header .mb-brand img{width:155px;max-width:100%}
 body.mb-responsive-workspace>header select{width:60px!important;min-width:50px;max-height:32px;padding:4px;margin:0!important;margin-left:auto!important}
 body.mb-responsive-workspace .mb-essential-toolbar{flex-basis:50px;height:50px;padding:3px 4px}
 body.mb-responsive-workspace .mb-essential-toolbar button{min-height:44px;font-size:12px;padding:6px 9px}
 body.mb-responsive-workspace .layout>.viewer>.foot{max-height:42px;min-height:29px;font-size:10px}
 body.mb-responsive-workspace .layout>.viewer .slider-tools{display:flex!important;min-height:31px;max-height:36px;padding:2px 6px}
 body.mb-responsive-workspace .mb-opening-mode{display:none!important}
}
@media(max-width:1199px) and (min-width:600px) and (orientation:landscape){
 body.mb-responsive-workspace main>.layout,body.mb-responsive-workspace main.mb-settings-open>.layout,body.mb-responsive-workspace main.settings-expanded>.layout{grid-template-columns:minmax(0,7fr) minmax(240px,3fr);grid-template-rows:minmax(0,1fr)}
 body.mb-responsive-workspace .layout>.settings{border-top:0;border-left:2px solid #244e47;border-radius:10px 0 0 10px}
 #mbSettingsToggle{display:none}
}
@media(max-width:599px) and (max-height:600px){body.mb-responsive-workspace main.mb-settings-open>.layout{grid-template-rows:minmax(0,1.85fr) minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){body.mb-responsive-workspace *{scroll-behavior:auto!important}}

/* Existing technical commands remain reachable in the side pane, also on phones. */
body.mb-responsive-workspace .mb-presentation-dock .mb-opening-mode:not([hidden]){display:flex!important}
body.mb-responsive-workspace .mb-presentation-dock #sectionMeasure,body.mb-responsive-workspace .mb-presentation-dock #openingMeasure,body.mb-responsive-workspace .mb-presentation-dock #partHoverHint,body.mb-responsive-workspace .mb-presentation-dock #mbBedReference{position:static!important;inset:auto!important;max-width:100%!important;margin:5px 0;white-space:normal}
@media(max-width:1199px){#mbSettingsToggle{width:84px;max-width:84px;white-space:normal;line-height:1.15}body.mb-responsive-workspace>header .mb-brand{min-width:0;flex:0 1 155px}body.mb-responsive-workspace main{padding-bottom:max(5px,env(safe-area-inset-bottom))}}


/* v0.1.249 — The photo controls occupy their intrinsic height, never clip.
   The zoom group added in v243 was taller than the legacy 52px strip. */
body.mb-responsive-workspace .layout>.viewer>.mb-essential-toolbar {
 flex:0 0 auto; height:auto; min-height:52px; max-height:none;
 align-items:center; align-content:center; flex-wrap:wrap;
 overflow:visible; white-space:normal; box-sizing:border-box;
}
body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoProjectBar:not([hidden]) {
 display:flex; flex:1 1 0; min-width:0; max-width:100%; flex-wrap:wrap;
 align-items:center; gap:5px; padding:0; margin:0;
}
body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoProjectBar .mb-photo-view-actions,
body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoProjectBar .mb-photo-scene-view:not([hidden]) {
 display:flex; flex:0 1 auto; min-width:0; max-width:100%; flex-wrap:wrap;
 align-items:center; gap:5px; margin:0; padding:0;
}
body.mb-responsive-workspace .mb-essential-toolbar button {
 flex:0 0 auto; min-height:44px; height:auto; max-height:none; line-height:1.3;
}
body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoSceneZoomValue {flex:0 0 auto;}
/* Narrow / landscape view: one full-height, horizontally scrollable row.
   The scrollbar is in the toolbar's own auto-sized box, not over the buttons. */
@media(max-width:1199px){
 body.mb-responsive-workspace .layout>.viewer>.mb-essential-toolbar {
  flex:0 0 auto; height:auto; min-height:52px; max-height:none;
  flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden;
  padding:5px 6px 7px; scrollbar-width:auto; white-space:nowrap;
  justify-content:flex-start;
 }
 body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoProjectBar:not([hidden]),
 body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoProjectBar .mb-photo-view-actions,
 body.mb-responsive-workspace .mb-essential-toolbar #mbPhotoProjectBar .mb-photo-scene-view:not([hidden]) {
  flex:0 0 auto; max-width:none; flex-wrap:nowrap;
 }
 body.mb-responsive-workspace .mb-essential-toolbar button {flex:0 0 auto; min-height:44px;}
}
