/* The two bars, on every page (the labs, the tools, the start page) and the same everywhere: one under the menu bar (the lab's own controls: drop-downs, buttons,
   the environment switch, a status) and one at the bottom (scale, frames per second, GameLaboratory).
     <div class="bar"> <select>… <div class="btns"><button>…</div> <div class="envSwitch">… <span class="dimtxt" id="status"></span> <span class="sp"></span> </div>
     <div class="foot"> <span id="fps" data-auto></span> <span class="sp"></span> <span>GameLaboratory</span> </div>
   (data-auto: ui/shell/bars.js counts the frames for a lab that does not write #fps itself.) The lab's name, version and
   links to other labs are on the menu bar (ui/shell/menubar.js), not here.
   Self-contained: fixed heights, opaque backgrounds and every control in the bars defined here, so neither the scene
   behind nor a lab's own sheet changes them. Only the page's own bars (children of <body>): a page may use .bar for
   something else inside (a progress bar in the image lab). The environment switch: ui/shell/envswitch.css. */

/* the bars; OPTIONS → Bars hides either one (ui/shell/menubar.js: body.lmNoBar, body.lmNoFoot) */
body.lmNoBar > .bar, body.lmNoFoot > .foot{display:none}
body > :is(.bar, .foot){position:fixed;left:0;right:0;z-index:5;box-sizing:border-box;display:flex;align-items:center;flex-wrap:nowrap;
  margin:0;padding:0 14px;overflow:hidden;background:var(--barBg);color:var(--text);font:400 13px/1.4 var(--font);letter-spacing:0;
  text-transform:none;backdrop-filter:none;box-shadow:none}
body > .bar{top:var(--menuH);height:var(--barH);gap:10px;border-bottom:1px solid var(--line)}
body > .foot{bottom:0;height:var(--footH);gap:18px;border-top:1px solid var(--line);font-size:12px;color:var(--dim)}
body > :is(.bar, .foot) > *{flex:none;margin:0}
body > :is(.bar, .foot) .sp{flex:1 1 auto;min-width:0}

/* under the menu bar: drop-downs and buttons, 28 px high */
body > .bar .btns{display:flex;align-items:center;gap:6px;margin:0;padding:0}
body > .bar :is(button, select){box-sizing:border-box;height:28px;margin:0;padding:0 10px;border:1px solid var(--line);border-radius:6px;
  background-color:var(--field);color:var(--text);font:500 13px/26px var(--font);letter-spacing:0;text-transform:none;text-shadow:none;
  box-shadow:none;outline:none;filter:none;transform:none;cursor:pointer;transition:border-color .15s,color .15s}
body > .bar :is(button, select):hover{border-color:var(--line2);color:var(--head)}
body > .bar :is(button, select):focus-visible{border-color:var(--accent)}
body > .bar :is(button, select):disabled{opacity:.45;cursor:default;border-color:var(--line);color:var(--text)}
body > .bar button.on{border-color:var(--accent);color:var(--accent)}
body > .bar button.go{border-color:var(--accent);color:var(--accent);font-weight:600}
body > .bar button.go.due{background-color:var(--accent);color:#14110a}
/* a drop-down: the same box, a small arrow drawn with gradients (no image, CSP 'self') */
body > .bar select{-webkit-appearance:none;appearance:none;max-width:260px;padding:0 28px 0 10px;font-weight:400;
  background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%);
  background-position:calc(100% - 15px) 11px,calc(100% - 10px) 11px;background-size:5px 5px;background-repeat:no-repeat}
body > .bar select option{background:var(--card);color:var(--text)}
/* buttons joined into one (renderer: GPU · CPU) */
body > .bar .seg{display:inline-flex}
body > .bar .seg button{border-radius:0}
body > .bar .seg button + button{margin-left:-1px}
/* back / forward (ui/shell/nav.js), first on every toolbar */
body > .bar .navSeg{display:inline-flex}
body > .bar .navSeg button{padding:0 9px;font-size:15px;line-height:26px;border-radius:0}
body > .bar .navSeg button + button{margin-left:-1px}
body > .bar .navSeg button:first-child{border-radius:6px 0 0 6px}
body > .bar .navSeg button:last-child{border-radius:0 6px 6px 0}
body > .bar .navSeg .navHome{display:inline-flex;align-items:center;justify-content:center}
body > .bar .navSeg .navHome svg{width:15px;height:15px;display:block}
body > .bar .seg button:first-child{border-radius:6px 0 0 6px}
body > .bar .seg button:last-child{border-radius:0 6px 6px 0}
body > .bar .seg button.on{position:relative;z-index:1}
/* a status or a label */
body > .bar .dimtxt{color:var(--dim);font:400 12.5px/1.4 var(--font);white-space:nowrap}

/* at the bottom: plain text, numbers in the mono font */
body > .foot :is(#fps, .mono){font-family:var(--mono)}
body > .foot #hint{color:var(--dim);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto;min-width:0}
body > .foot .scale{display:flex;align-items:center;gap:8px}
body > .foot .scale i{display:block;height:6px;border:1px solid var(--text);border-top:0}

/* a page that scrolls as a document (the language and image labs, SDF Walkers, the tools): it starts under the menu
   bar and the bar, and ends above the bottom bar — <body class="pageFlow"> */
body.pageFlow{padding-top:calc(var(--menuH) + var(--barH) + 24px);padding-bottom:calc(var(--footH) + 24px)}
body.pageFlow.lmNoBar{padding-top:calc(var(--menuH) + 24px)}
body.pageFlow.lmNoFoot{padding-bottom:24px}
