body.sl-workspace-active{overflow:hidden;background:#475467}body.sl-workspace-active .topbar,body.sl-workspace-active .bottomnav{display:none!important}body.sl-workspace-active .app{min-height:100dvh;padding:0!important;background:#475467}body.sl-workspace-active .sl-workspace-page{position:fixed;inset:0;z-index:30;width:100%;max-width:none!important;margin:0!important;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;display:flex;flex-direction:column;overflow:hidden;background:#f8fafc}.sl-workspace-active .sl-viewer-head{min-height:42px;margin:0;flex:0 0 auto;padding:2px 0 6px;gap:8px}.sl-workspace-active .sl-viewer-head>.btn{padding:7px 9px;min-height:34px}.sl-workspace-active .sl-view-title{flex:1;overflow:hidden}.sl-workspace-active .sl-view-title .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sl-workspace-active .sl-view-title .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sl-workspace-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.sl-workspace-icon,.sl-workspace-takeoffs{border:1px solid #d0d5dd;background:#fff;color:#344054;border-radius:9px;height:34px;font-weight:700}.sl-workspace-icon{width:36px;font-size:20px}.sl-workspace-takeoffs{padding:0 10px;white-space:nowrap}.sl-workspace-active .sl-viewbar,.sl-workspace-active .sl-takeoffbar,.sl-workspace-active .sl-tool-actions{position:static!important;top:auto!important;flex:0 0 auto}.sl-workspace-active .sl-viewbar{padding:4px 0 6px}.sl-workspace-active .sl-takeoffbar{padding:5px 0 4px;background:#f8fafc}.sl-workspace-active .sl-colorbar{flex:0 0 auto;padding:4px 1px}.sl-workspace-active .sl-tool-actions{padding:3px 0;background:#f8fafc}.sl-workspace-active .sl-scale-status{flex:0 0 auto;margin:4px 0 6px;padding:7px 10px;font-size:12px;line-height:1.25}.sl-workspace-active .sl-canvas-wrap{flex:1 1 auto;min-height:0;max-height:none!important;height:auto!important;border-radius:8px;padding:5px;margin:0;overscroll-behavior:contain}.sl-workspace-active .sl-canvas-stage{margin:0 auto}.sl-workspace-active .sl-takeoff-heading{display:none}.sl-workspace-active #sl_measure_list{margin:0;padding:0}.sl-drawer-backdrop{display:none;position:fixed;inset:0;z-index:60;background:rgba(16,24,40,.32)}.sl-drawer-backdrop.open{display:block}.sl-takeoff-drawer{position:fixed;left:0;right:0;bottom:0;z-index:61;max-height:min(58dvh,620px);background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px rgba(16,24,40,.24);transform:translateY(102%);transition:transform .2s ease;padding:8px max(12px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column}.sl-takeoff-drawer.open{transform:translateY(0)}.sl-drawer-handle{width:44px;height:5px;border-radius:999px;background:#d0d5dd;margin:0 auto 8px}.sl-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 10px;border-bottom:1px solid #eaecf0}.sl-drawer-head strong{font-size:17px}.sl-drawer-close{width:36px;height:36px;border:0;border-radius:50%;background:#f2f4f7;color:#475467;font-size:24px}.sl-drawer-body{overflow:auto;padding-top:10px;-webkit-overflow-scrolling:touch}.sl-drawer-body .sl-measure-row{margin-bottom:8px}@media(max-width:640px){body.sl-workspace-active .sl-workspace-page{padding:max(5px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left))!important}.sl-workspace-active .sl-viewer-head{min-height:38px;padding-bottom:3px}.sl-workspace-active .sl-view-title .small{display:none}.sl-workspace-active .sl-viewbar{padding:2px 0 3px}.sl-workspace-active .sl-takeoffbar{padding:3px 0}.sl-workspace-active .sl-colorbar{padding:3px 1px}.sl-workspace-active .sl-scale-status{margin:3px 0 4px;padding:5px 8px}.sl-workspace-active .sl-canvas-wrap{padding:3px}.sl-workspace-icon{display:none}.sl-workspace-takeoffs{height:32px;padding:0 8px;font-size:12px}.sl-workspace-active .sl-toolbtn,.sl-workspace-active .sl-zoomlabel{height:32px;min-width:32px;padding:0 7px}.sl-workspace-active .sl-takeoff{padding:7px 9px}.sl-takeoff-drawer{max-height:62dvh}}@media(orientation:landscape) and (max-height:600px){.sl-workspace-active .sl-view-title .small,.sl-workspace-active .sl-scale-status{display:none}.sl-workspace-active .sl-viewer-head{min-height:34px}.sl-workspace-active .sl-takeoffbar{padding:2px 0}.sl-workspace-active .sl-colorbar{padding:2px 1px}.sl-workspace-active .sl-color{width:24px;height:24px;min-width:24px}.sl-workspace-active .sl-takeoff{padding:6px 8px;font-size:11px}}

/* v3 compact drawing workspace: maximize plan area on phones */
.sl-workspace-active .sl-workspace-page{gap:0!important}
.sl-workspace-active .sl-viewer-head{min-height:32px!important;height:32px!important;padding:0 0 2px!important;margin:0!important;gap:5px!important}
.sl-workspace-active .sl-viewer-head>.btn{min-height:29px!important;height:29px!important;padding:0 8px!important;border-radius:8px!important}
.sl-workspace-active .sl-view-title .title{font-size:13px!important;line-height:1.05!important}
.sl-workspace-active .sl-workspace-actions{gap:4px!important}
.sl-workspace-active .sl-workspace-takeoffs{height:29px!important;padding:0 8px!important;font-size:11px!important}
.sl-workspace-active .sl-viewbar{min-height:31px!important;height:31px!important;padding:1px 0 2px!important;gap:5px!important;border-bottom:0!important}
.sl-workspace-active .sl-page-controls,.sl-workspace-active .sl-zoom-controls{gap:3px!important}
.sl-workspace-active .sl-toolbtn,.sl-workspace-active .sl-zoomlabel{height:29px!important;min-width:29px!important;padding:0 7px!important;border-radius:8px!important;font-size:11px!important}
.sl-workspace-active .sl-zoomlabel{min-width:48px!important}
.sl-workspace-active .sl-takeoffbar{padding:2px 0!important;margin:0!important}
.sl-workspace-active .sl-field-toolbar{gap:3px!important}
.sl-workspace-active .sl-field-btn{min-height:31px!important;height:31px!important;padding:1px 5px!important;border-radius:8px!important;font-size:12px!important;flex-direction:row!important;gap:3px!important}
.sl-workspace-active .sl-field-btn span{font-size:10px!important;line-height:1!important}
.sl-workspace-active .sl-tool-actions{min-height:0!important;padding:0!important;margin:0!important;border-bottom:0!important}
.sl-workspace-active .sl-scale-status{display:none!important}
.sl-workspace-active .sl-canvas-wrap{border-radius:5px!important;padding:1px!important;margin:1px 0 0!important}
@media(max-width:640px){
 body.sl-workspace-active .sl-workspace-page{padding:max(3px,env(safe-area-inset-top)) max(3px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(3px,env(safe-area-inset-left))!important}
 .sl-workspace-active .sl-viewer-head{height:31px!important;min-height:31px!important}
 .sl-workspace-active .sl-view-title{min-width:0!important}
 .sl-workspace-active .sl-view-title .title{font-size:12px!important}
 .sl-workspace-active .sl-workspace-takeoffs{height:28px!important}
 .sl-workspace-active .sl-viewbar{height:30px!important;min-height:30px!important}
 .sl-workspace-active .sl-toolbtn,.sl-workspace-active .sl-zoomlabel{height:28px!important;min-width:28px!important;padding:0 6px!important}
 .sl-workspace-active .sl-field-btn{height:30px!important;min-height:30px!important;font-size:11px!important}
}


/* File controls stay inside the compact header instead of covering zoom. */
.sl-viewer-file-menu{position:relative;flex:0 0 auto;margin:0}
.sl-viewer-file-trigger{display:flex;align-items:center;justify-content:center;width:40px;height:30px;box-sizing:border-box;list-style:none;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#344054;font-size:17px;font-weight:800;cursor:pointer}
.sl-viewer-file-trigger::-webkit-details-marker{display:none}
.sl-viewer-file-trigger:focus-visible{outline:2px solid #275efe;outline-offset:2px}
.sl-viewer-file-menu>.sl-file-export{position:absolute;right:0;top:calc(100% + 8px);z-index:45;display:flex;flex-direction:column;gap:6px;width:180px;max-width:calc(100vw - 16px);margin:0;padding:8px;background:#fff;border:1px solid #d0d5dd;border-radius:12px;box-shadow:0 8px 24px #10182826}
.sl-viewer-file-menu:not([open])>.sl-file-export{display:none}
.sl-viewer-file-menu>.sl-file-export>.btn{flex:none;min-height:44px;width:100%;padding:10px 12px;text-align:left}
.sl-workspace-active .sl-viewer-head{align-items:center!important}
.sl-workspace-active .sl-view-title{min-width:0}

/* v4 professional drawing viewer: full-canvas with floating chrome */
body.sl-workspace-active{background:#343a46}
body.sl-workspace-active .sl-workspace-page{
  background:#343a46!important;
  padding:0!important;
}
.sl-workspace-active .sl-canvas-wrap{
  position:fixed!important;
  top:calc(env(safe-area-inset-top) + 34px)!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  z-index:1!important;
  border-radius:0!important;
  padding:0!important;
  margin:0!important;
  background:#3f4653!important;
}
.sl-workspace-active .sl-viewer-head{
  position:fixed!important;
  top:env(safe-area-inset-top)!important;
  left:0!important;
  right:0!important;
  z-index:40!important;
  height:34px!important;
  min-height:34px!important;
  padding:2px 6px!important;
  margin:0!important;
  gap:5px!important;
  background:rgba(248,250,252,.92)!important;
  border-bottom:1px solid rgba(16,24,40,.08);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.sl-workspace-active .sl-viewer-head>.btn{
  height:28px!important;
  min-height:28px!important;
  padding:0 8px!important;
  border-radius:8px!important;
  font-size:11px!important;
}
.sl-workspace-active .sl-view-title .title{
  font-size:12px!important;
  line-height:1!important;
  font-weight:800!important;
}
.sl-workspace-active .sl-workspace-actions{gap:4px!important}
.sl-workspace-active .sl-workspace-takeoffs{
  height:28px!important;
  padding:0 8px!important;
  border-radius:8px!important;
  font-size:10px!important;
  background:rgba(255,255,255,.92)!important;
}
.sl-workspace-active .sl-viewbar{
  position:fixed!important;
  top:calc(env(safe-area-inset-top) + 40px)!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  z-index:35!important;
  width:max-content!important;
  max-width:calc(100vw - 12px)!important;
  min-height:34px!important;
  height:34px!important;
  padding:3px 5px!important;
  gap:4px!important;
  border:1px solid rgba(152,162,179,.55)!important;
  border-radius:11px!important;
  background:rgba(255,255,255,.91)!important;
  box-shadow:0 4px 16px rgba(16,24,40,.18)!important;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.sl-workspace-active .sl-viewbar .sl-toolbtn,
.sl-workspace-active .sl-viewbar .sl-zoomlabel,
.sl-workspace-active .sl-viewbar .sl-page-select,
.sl-workspace-active .sl-viewbar .sl-drawing-done{
  height:28px!important;
  min-height:28px!important;
  border-radius:7px!important;
  font-size:10px!important;
}
.sl-workspace-active .sl-viewbar .sl-page-select{max-width:116px!important;padding:0 6px!important}
.sl-workspace-active .sl-viewbar .sl-zoomlabel{min-width:44px!important}
.sl-workspace-active .sl-takeoffbar{
  position:fixed!important;
  left:50%!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  z-index:35!important;
  width:auto!important;
  max-width:calc(100vw - 12px)!important;
  padding:4px!important;
  margin:0!important;
  border:1px solid rgba(152,162,179,.55)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 5px 18px rgba(16,24,40,.2)!important;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  overflow:visible!important;
}
.sl-workspace-active .sl-tool-actions{
  position:fixed!important;
  left:50%!important;
  bottom:calc(max(8px,env(safe-area-inset-bottom)) + 50px)!important;
  transform:translateX(-50%)!important;
  z-index:34!important;
  width:max-content!important;
  max-width:calc(100vw - 16px)!important;
  border-radius:10px!important;
  padding:4px 6px!important;
  background:rgba(255,255,255,.93)!important;
  box-shadow:0 3px 12px rgba(16,24,40,.14)!important;
}
.sl-workspace-active .sl-tool-actions:empty{display:none!important}
.sl-workspace-active .sl-scale-status,.sl-workspace-active .sl-colorbar{display:none!important}
@media(max-width:640px){
  .sl-workspace-active .sl-view-title .small{display:none!important}
  .sl-workspace-active .sl-workspace-icon{display:none!important}
  .sl-workspace-active .sl-canvas-wrap{top:calc(env(safe-area-inset-top) + 33px)!important}
  .sl-workspace-active .sl-viewbar{top:calc(env(safe-area-inset-top) + 38px)!important}
}
/* Larger touch targets with one consistent navigation bar. */
.sl-workspace-active .sl-viewer-head{height:44px!important;min-height:44px!important;padding:3px 6px!important}
.sl-workspace-active .sl-viewer-head>.btn{height:36px!important;min-height:36px!important;font-size:12px!important}
.sl-workspace-active .sl-viewer-file-trigger{width:40px;height:36px}
.sl-workspace-active .sl-canvas-wrap{top:calc(env(safe-area-inset-top) + 44px)!important}
.sl-workspace-active .sl-viewbar{top:calc(env(safe-area-inset-top) + 50px)!important;height:42px!important;min-height:42px!important;padding:3px 5px!important;flex-wrap:nowrap!important}
.sl-workspace-active .sl-viewbar .sl-toolbtn,.sl-workspace-active .sl-viewbar .sl-zoomlabel,.sl-workspace-active .sl-viewbar .sl-page-select,.sl-workspace-active .sl-viewbar .sl-drawing-done{height:34px!important;min-height:34px!important;font-size:12px!important}
.sl-workspace-active .sl-viewbar .sl-toolbtn{min-width:34px!important}
.sl-workspace-active .sl-viewbar .sl-zoomlabel{min-width:52px!important}
.sl-workspace-active .sl-page-controls{min-width:0;flex:1 1 auto}
.sl-workspace-active .sl-page-controls>.sl-toolbtn{display:none!important}
.sl-workspace-active .sl-viewbar .sl-page-select{min-width:0;width:100%;flex:1}
.sl-workspace-active .sl-zoom-controls,.sl-workspace-active .sl-drawing-done{flex:0 0 auto}
