html, body {
  background: var(--app-bg);
}

body {
  margin: 0;
  color: var(--fg-white);
  font-family: var(--fontfamily-default);
  height: 100%;
  max-height: 100dvh;
  padding: 4px;

  display: grid;
  grid-gap: 3px 0;
}

.sidebar, .config {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
}

.config, sidebar {
  height: 100%;
}


.layout-wide {
  width: 100%;

  .header {
    grid-column: span 3;
  }

  .main-content {
    min-height: 0;
  }

  .sidebar, .config {
    overflow-y: auto;
  }
}

.layout-narrow {
  .main-content {
    width: 100%;
    order: 1;
  }

  .sidebar, .config {
    display: none;
    overflow-y: auto;
    order: 2;
    border-top: var(--border-solid-grey);
    border-top-width: 1px;
    height: 50dvh;
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
  }
}


