.account-sidebar {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.account-nav [hidden] { display: none; }

.account-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-menu-close,
.account-menu-backdrop {
  display: none;
}

.account-nav-label {
  padding: 0 12px 6px;
  color: #b0b0ba;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-nav {
  margin-bottom: 20px;
}

.account-nav-label--secondary {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.account-profile {
  grid-template-columns: 36px minmax(0, 1fr) 44px;
  padding-top: 16px;
}

.account-profile button {
  width: 44px;
  height: 44px;
}

.account-sidebar :is(a, button):focus-visible {
  outline: 3px solid #c9bdff;
  outline-offset: 3px;
}

#account-view:focus-visible {
  outline: 2px solid var(--portal-violet-dark);
  outline-offset: 8px;
}

@media (max-width: 920px) {
  .account-menu-open {
    overflow: hidden;
  }

  .account-sidebar {
    width: min(330px, 90vw);
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .account-sidebar-head .account-brand {
    padding-left: 10px;
  }

  .account-menu-close {
    display: grid;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 12px;
    background: rgb(255 255 255 / 8%);
    color: #fff;
    font: 28px/1 var(--portal-font);
    cursor: pointer;
  }

  .account-menu-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 29;
    inset: 0;
    background: rgb(16 16 20 / 48%);
  }

  .account-workspace {
    margin-top: 22px;
    margin-bottom: 20px;
  }

  .account-nav a {
    min-height: 48px;
  }

  .account-mobile-head {
    gap: 12px;
  }

  .account-mobile-location {
    display: grid;
    gap: 6px;
  }

  #account-current-page {
    color: var(--portal-muted);
    font-size: 12px;
    line-height: 1.3;
  }

  .account-mobile-head button {
    min-width: 72px;
    min-height: 44px;
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-sidebar {
    transition: none;
  }
}
