/* Floating windows (ui/shell/windows.js): a lab's options, opened and closed from OPTIONS → Windows.
   Dark glass, a thin line, a gold title; what is inside: ui/style/controls.css. */
.labWin{position:fixed;z-index:20;display:flex;flex-direction:column;width:330px;max-width:calc(100vw - 16px);max-height:calc(100vh - 132px);
  background:var(--glass);border:1px solid var(--line);border-radius:var(--r);backdrop-filter:blur(6px);box-shadow:0 12px 32px rgba(0,0,0,.4);
  transition:opacity .4s}
.labWin.right{width:300px}
.labWin[hidden]{display:none}
.labWin.dragging{transition:none;box-shadow:0 18px 44px rgba(0,0,0,.55);opacity:.96}
.labWinHead{flex:none;display:flex;align-items:center;gap:8px;height:34px;padding:0 6px 0 14px;border-bottom:1px solid var(--line);cursor:move;
  user-select:none;touch-action:none}
.labWinTitle{flex:1;font:600 11px var(--font);letter-spacing:1.4px;text-transform:uppercase;color:var(--accent);white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.labWinClose{width:26px;height:26px;border:0;border-radius:6px;background:none;color:var(--dim);font:13px var(--font);cursor:pointer}
.labWinClose:hover{background:var(--field);color:var(--head)}
.labWinPin{width:26px;height:26px;border:0;border-radius:6px;background:none;color:var(--dim);font:14px var(--font);cursor:pointer}
.labWinPin:hover{background:var(--field);color:var(--accent)}
.labWin.docked .labWinPin{color:var(--accent)}
/* the side panels (window or panel: ui/shell/windows.js): real panels flush with the edges, between the bars;
   a docked window is a section of the panel (its title a heading, a thin line under it), the panel scrolls */
.labDock{position:fixed;z-index:19;top:calc(var(--menuH) + var(--barH));bottom:var(--footH);width:330px;
  display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;background:var(--menuBg)}
.labDock.left{left:0;border-right:1px solid var(--line)}
.labDock.right{right:0;width:300px;border-left:1px solid var(--line)}
body.lmNoBar .labDock{top:var(--menuH)}
body.lmNoFoot .labDock{bottom:0}
.labDock:not(:has(> .labWin:not([hidden]))),.labDock.noWins{display:none}
.labWin.docked{position:static;flex:none;width:auto;max-width:none;max-height:none;background:none;border:0;border-bottom:1px solid var(--line);
  border-radius:0;box-shadow:none;backdrop-filter:none;transform:none}
.labWin.docked .labWinHead{cursor:default;border-bottom:0;height:32px}
.labWin.docked > .labWinBody{overflow:visible;padding-top:4px}
/* the lab's panel inside: no longer placed on its own */
.labWin > .labWinBody{position:static !important;inset:auto !important;width:auto !important;max-height:none !important;flex:1;min-height:0;overflow:auto;
  margin:0;padding:12px 14px 16px;background:none;border:0;border-radius:0;backdrop-filter:none;box-shadow:none;transform:none;pointer-events:auto}
/* the first section heading, when it is the window's title */
.labWin .labWinDup{display:none}
/* the labs' own "hide the panels" (H) and idle dimming apply to the whole window */
.labWin:has(> .hidden-panel){display:none}
.labWin:has(> :is(.idle, .labIdle)){opacity:.18}
.labWin > :is(.idle, .labIdle){opacity:1}
.labWin > .labIdle, .labWin > .labIdle *{pointer-events:auto !important}
/* a page that fits its 3D view into the free middle (body.viewFits: the scene editor) */
/* Full: the whole space between the toolbar and the info bar; Middle (default): also between the panels and the console */
body.viewFits #view > canvas{display:block;width:100%;height:100%}
/* .viewLayer: a page's overlay drawn over the view (labels, dimension lines) — the same box as #view */
body.viewFits :is(#view, .viewLayer){top:calc(var(--menuH) + var(--barH));bottom:var(--footH);left:0;right:0;width:auto;height:auto}
body.viewFits .viewLayer{overflow:hidden}
body.viewFits.lmNoBar :is(#view, .viewLayer){top:var(--menuH)}
body.viewFits.lmNoFoot :is(#view, .viewLayer){bottom:0}
body.viewFits:not(.vfFull) :is(#view, .viewLayer){left:var(--viewL,0px);right:var(--viewR,0px);bottom:calc(var(--footH) + var(--viewB,0px))}
body.viewFits.lmNoFoot:not(.vfFull) :is(#view, .viewLayer){bottom:var(--viewB,0px)}
@media (max-width:640px){.labWin,.labWin.right{width:calc(100vw - 16px)}.labDock,.labDock.right{width:calc(100vw - 16px)}}
