/* Let the controls size their own column instead of overflowing a third of the header. */
html body #app:not(.editor) .nav-header .layout.row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}
html body #app:not(.editor) .nav-header .layout.row > .flex {
  width: auto !important;
  min-width: 0;
  max-width: none !important;
}
html body #app:not(.editor) .nav-header .layout.row > .flex:last-child { grid-column: 3; }
html body #app:not(.editor) .nav-header .nav-header-inner.pr-4 > .v-toolbar__content > .v-btn--icon {
  flex-shrink: 0;
  margin-inline: 0 !important;
}

/* Names remain on the accessible labels and hover titles at every zoom level. */
html body #app .ciki-mode-switch::before,
html body #app .ciki-mode-switch__label { display: none !important; }
html body #app .ciki-mode-switch__item {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  padding: 0 !important;
}

@media (max-width: 700px) {
  html body #app:not(.editor) .nav-header .layout.row { grid-template-columns: minmax(0, 1fr); }
  html body #app:not(.editor) .nav-header .layout.row > .flex:last-child { grid-column: 1; }
  html body #app:not(.editor) .nav-header .nav-header-inner.pr-4 .v-btn--icon { height: 40px !important; }
  html body #app .ciki-mode-switch__item { flex-basis: 36px; width: 36px; min-width: 36px; }
}

@media (max-width: 520px) {
  /* The mode controls share the logo row; account controls keep their own row. */
  html body #app:not(.editor) .nav-header .nav-header-inner.pr-4 .ciki-mode-switch {
    position: absolute;
    top: -40px;
    right: 0;
    margin: 0;
  }
}

@media (max-width: 360px) {
  html body #app:not(.editor) .nav-header .ciki-brand-link > span { display: none; }
}
