/* Explicit offsets and vh work on the Android 10 WebView as well as newer versions. */
@media (max-width: 900px) {
  html #appMenu.settings-dialog {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 500;
    display: none;
    width: calc(100% - 24px);
    height: auto;
    min-height: 0;
    max-width: none;
    max-height: 78vh;
    margin: 0;
    padding: 18px 16px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--text);
  }
  html #appMenu.settings-dialog[open] { display: grid; align-content: start; grid-row-gap: 8px; }
  html #appMenu .settings-close-button { display: flex; align-items: center; justify-content: center; }
  html #appMenu .settings-theme-toggle { margin-top: 12px; }
}
