/* V296 — Keep desktop sidebar controls inside the *browser viewport*, not below it.
   Windows taskbars are outside the browser viewport; use dvh, not screen.height. */
@media (min-width: 701px) {
  #appView.app-shell { min-height: 100vh; min-height: 100dvh; }
  #appView > aside.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
  #appView > aside.sidebar > #nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #344a68 transparent;
    padding-bottom: 12px;
  }
  #appView > aside.sidebar > .sidebar-bottom {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 12px 6px 0;
    border-top: 1px solid var(--line);
  }
  #appView > aside.sidebar #logoutBtn { min-height: 38px; }
}
@media (min-width: 701px) and (max-height: 500px) {
  #appView > aside.sidebar { padding-top: 8px; padding-bottom: 9px; }
  #appView > aside.sidebar .brand-row { padding-bottom: 8px; }
  #appView > aside.sidebar .wallet-mini { margin-bottom: 8px; }
  #appView > aside.sidebar > .sidebar-bottom { padding-top: 8px; }
}
/* Dialogs must scroll within a small browser window. */
#modal .modal-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
