/* The control stays at the device's readable font size in every layout. */
.tb-screen-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  box-sizing: border-box;
  gap: .375rem;
  padding: .25rem clamp(.75rem, 2%, 1.5rem);
  background: #121617;
  color: #f1f3ef;
  font: 500 .875rem/1.25 Roboto, system-ui, sans-serif;
  color-scheme: dark;
}
.tb-screen-tools label { margin: 0; color: inherit; font: inherit; }
.tb-screen-tools select {
  display: block; width: auto; max-width: 100%; min-width: 0; min-height: 2rem;
  margin: 0; padding: .25rem .375rem; border: 1px solid #505955;
  border-radius: .375rem; color: #f1f3ef; background: #202625;
  font: inherit; appearance: auto; cursor: pointer;
}
.tb-screen-tools [hidden] { display: none !important; }
.tb-screen-tools select:focus-visible { outline: 2px solid #cedc00; outline-offset: 2px; }
@media screen {
  /* The transformed root contains fixed app navigation while the body scrolls inside it. */
  html[data-screen-width] {
    position: fixed; top: var(--tb-screen-toolbar-height); left: 50%;
    box-sizing: border-box; margin: 0; padding: 0;
    width: var(--tb-screen-width); height: var(--tb-screen-height);
    contain: layout; overflow: visible; background: #0a0c0d;
    transform: translateX(-50%) scale(var(--tb-screen-scale)); transform-origin: top center;
  }
  html[data-screen-width] > body {
    box-sizing: border-box; width: 100% !important; height: 100% !important;
    max-width: none !important; min-width: 0 !important; min-height: 0 !important;
    margin: 0 !important; overflow: auto;
  }
  html[data-screen-width] .tb-screen-tools {
    position: fixed; z-index: 1000; left: 50%; bottom: 100%;
    width: var(--tb-screen-host-width);
    transform: translateX(-50%) scale(var(--tb-screen-inverse)); transform-origin: bottom center;
  }
}
@media print { .tb-screen-tools { display: none !important; } }
