.account-switcher-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 22px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(53, 35, 95, .2);
  overflow: auto;
  overscroll-behavior: contain;
  letter-spacing: 0;
}
.account-switcher-dialog::backdrop { background: rgba(33, 23, 53, .42); }
.account-switcher-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.account-switcher-head h2 { flex: 1; margin: 0; font-size: 20px; }
.account-switcher-dialog button { cursor: pointer; }
.account-switcher-dialog button:disabled { opacity: .55; cursor: wait; }
.account-switcher-dialog button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.account-switcher-icon {
  display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
  padding: 8px; border: 0; border-radius: 8px; background: transparent; color: #706280;
}
.account-switcher-icon:hover { background: #f5f1fa; color: var(--ink); }
.account-switcher-dialog svg { width: 20px; height: 20px; flex-shrink: 0; }
.account-switcher-list { max-height: min(380px, 52dvh); overflow-y: auto; overscroll-behavior: contain; }
.account-switcher-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 4px 0; }
.account-switcher-account {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 56px;
  padding: 8px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; border-radius: 8px;
}
.account-switcher-account:hover { background: #f7f4fc; }
.account-switcher-identity { display: grid; gap: 3px; flex: 1; min-width: 0; }
.account-switcher-identity strong { overflow-wrap: anywhere; font-size: 16px; font-weight: 600; }
.account-switcher-current { display: flex; align-items: center; gap: 2px; flex-shrink: 0; color: var(--green); font-size: 12px; }
.account-switcher-current svg { width: 16px; height: 16px; }
.account-switcher-actions { display: grid; gap: 12px; padding-top: 20px; }
.account-switcher-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; }
.account-switcher-logout { min-height: 40px; padding: 8px; border: 0; background: transparent; color: #a52a37; font-size: 13px; }
.account-switcher-empty { padding: 24px 0; text-align: center; color: #706280; }
.account-switcher-error { margin: 0; font-size: 13px; line-height: 1.5; color: #b42332; overflow-wrap: anywhere; }
.account-switcher-error:not(:empty) { margin-top: 16px; }
.account-switcher-login { display: grid; gap: 8px; }
.account-switcher-login label { margin: 0; color: var(--ink); font-size: 14px; }
.account-switcher-login label:not(:first-child) { margin-top: 8px; }
.account-switcher-login input { min-height: 48px; }
.account-switcher-login input::placeholder { color: #706280; }
.account-switcher-login .primary { margin-top: 16px; width: 100%; min-height: 48px; }
.account-switcher-confirm { line-height: 1.6; overflow-wrap: anywhere; padding: 8px 0 20px; }
.account-switcher-confirm-actions { display: flex; gap: 12px; }
.account-switcher-confirm-actions button { flex: 1; min-height: 48px; }
#rememberedAccountsButton { margin-top: 12px; width: 100%; }
@media (max-width: 360px) {
  .account-switcher-dialog { padding: 16px; }
  .account-switcher-account { gap: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .account-switcher-dialog[open] { animation: accountSwitcherEnter 180ms ease-out; }
  @keyframes accountSwitcherEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
