/* Flat theme canvas, aligned attribution, and pill-shaped desktop actions. */
html:root[data-mode],
html:root[data-mode] body {
  background: var(--os-page) !important;
}

html:root[data-mode] body::before,
html:root[data-mode] body::after {
  content: none !important;
  display: none !important;
}

@media (min-width: 720px) {
  html body {
    min-height: 100dvh !important;
    display: flex;
    flex-direction: column;
  }

  html body > .topbar {
    flex: 0 0 auto;
  }

  html body > main {
    flex: 1 0 auto;
  }

  html body > .site-footer {
    width: min(1460px, calc(100% - 56px)) !important;
    max-width: 1460px !important;
    margin: 32px auto 0 !important;
    padding: 24px 0 28px !important;
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    border-top: 1px solid var(--os-line);
    color: var(--os-muted) !important;
    background: transparent !important;
    font-size: 11px;
    line-height: 1.6;
  }

  html body > .site-footer a {
    color: inherit;
  }

  html body > .site-footer small {
    width: auto;
    margin: 0;
    justify-self: end;
    text-align: right;
    font-size: inherit;
    line-height: inherit;
  }

  html body .topbar .top-actions > :is(
    #exportButton, #importButton, #personalizeButton,
    #historyButton, #updatesButton, #accountButton
  ) {
    border-radius: 999px !important;
  }
}
