:root {
  --workspace-scale: 1;
  --workspace-height: calc(100dvh / var(--workspace-scale));
  container: byte-viewport / inline-size;
  zoom: var(--workspace-scale);
}
body, #shell, .auth-screen { min-height: var(--workspace-height); }
.sidebar { height: var(--workspace-height); }
dialog { max-height: calc(var(--workspace-height) * .87); }
dialog.drawer { height: var(--workspace-height); max-height: var(--workspace-height); }

.zoom-controls {
  display: inline-flex;
  align-items: stretch;
  width: max-content;
  flex: none;
  padding: 2px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
}
.zoom-controls button {
  display: grid;
  place-items: center;
  min-width: 31px;
  min-height: 30px;
  border-radius: 5px;
  background: transparent;
  color: #244739;
  font: 500 19px/1 var(--display);
}
.zoom-controls [data-zoom="reset"] {
  min-width: 41px;
  padding-inline: 2px;
  color: #40564a;
  font: 500 11px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.zoom-controls button:hover:not(:disabled), .zoom-controls button:focus-visible {
  color: #153d2e;
  background: #eef4ed;
}
.zoom-controls button:focus-visible { outline-offset: 0; }
.zoom-controls button:disabled { opacity: .38; }
.focus-zoom { padding: 5px 8px; }
.compact-nav .focus-zoom { padding-inline: 0; text-align: center; }
.compact-nav .focus-zoom .zoom-controls { flex-direction: column; }
.dialog-tools { display: flex; gap: 8px; align-items: center; flex: none; }
.sc-dialog-head { flex-wrap: wrap; }
.sc-dialog-head > :first-child { min-width: 0; flex: 1 1 130px; }
.sc-dialog-head .dialog-tools { margin-left: auto; }

@container byte-viewport (max-width: 760px) {
  .focus-zoom { display: none; }
  .topbar { flex-wrap: wrap; }
  .top-tools { margin-left: auto; }
  .sidebar { width: min(278px, calc(85vw / var(--workspace-scale))); }
}
@container byte-viewport (max-width: 410px) {
  .topbar { row-gap: 8px; }
  .topbar .tool-left { flex: 1 1 100%; }
  .top-tools { flex: 1 1 100%; }
  .top-tools .zoom-controls { margin-right: auto; }
}
@container byte-viewport (max-width: 290px) {
  .od-settle-figure { flex-wrap: wrap; }
  .od-top .od-panel.od-holds { display: block; }
  .od-mini-rails dd { white-space: normal; }
  .od-col .od-axis { display: none; }
  .od-col:nth-child(4n+1) .od-axis { display: block; width: max-content; }
  .cx-summary, .cx-controls, .sc-instrument-strip, .an-stats { grid-template-columns: minmax(0,1fr); }
  .cx-summary .cx-stat, .sc-instrument-strip .sc-instrument, .an-stats .an-stat {
    padding-inline: 0;
    border-left: 0;
  }
  .cx-summary .cx-stat + .cx-stat, .sc-instrument-strip .sc-instrument + .sc-instrument, .an-stats .an-stat + .an-stat {
    min-height: 0;
    padding-block: 12px;
    border-top: 1px solid var(--line);
  }
  .cx-summary .cx-stat:first-child, .sc-instrument-strip .sc-instrument:first-child, .an-stats .an-stat:first-child { border-bottom: 0; }
}
