.account-entry { width: 44px; min-height: 44px; flex: none; padding: 0; border-radius: 50%; }
.account-entry.account-avatar { background: var(--accent-ink); color: var(--bg); }
.account-entry svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.account-entry img { width: 100%; height: 42px; object-fit: cover; border-radius: 50%; }
.account-entry [hidden] { display: none !important; }
.account-dialog {
  box-sizing: border-box;
  width: min(27rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid var(--strong-rule);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
}
.account-dialog::backdrop { background: rgb(16 11 24 / .72); }
.account-dialog [hidden] { display: none !important; }
.account-dialog h2 { font-size: 1.5rem; margin-block: 0 1rem; }
.account-dialog .account-close { float: inline-end; padding-inline: .8rem; }
.account-dialog label { display: block; margin-block: 1rem .35rem; }
.account-dialog input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  margin-block-end: .8rem;
  border: 1px solid var(--strong-rule);
  border-radius: .5rem;
  background: var(--bg);
  color: inherit;
  font: inherit;
}
.account-dialog :disabled { opacity: .6; cursor: default; }
#account-identity, #account-status { overflow-wrap: anywhere; }

.account-dialog { width: min(29rem, calc(100% - 1.5rem)); }
.account-intro { clear: both; text-align: center; margin-block: .5rem 1.45rem; }
.account-intro h2 { margin-block: .6rem .3rem; }
.account-intro p { margin: 0; color: var(--muted); font-size: .9rem; }
.account-mark {
  display: inline-block;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: contain;
}
.account-password-field { position: relative; }
.account-password-field input { padding-inline-end: 8.5rem; }
.account-password-field button { position: absolute; inset: 0 4px auto auto; }
:dir(rtl) .account-password-field button { inset: 0 auto auto 4px; }
.account-link { min-height: 44px; padding: 0 .4rem; border: 0; background: transparent; color: var(--accent-ink); font: inherit; cursor: pointer; }
.account-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem; margin-block-end: .55rem; }
.account-options label { display: inline-flex; align-items: center; gap: .5rem; margin: 0; min-height: 44px; }
.account-dialog input[type="checkbox"] { width: 1rem; min-height: auto; margin: 0; padding: 0; accent-color: #7257b9; }
.account-wide { width: 100%; border-radius: .65rem; }
.account-divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; border-top: 1px solid var(--strong-rule); }
.account-google { gap: .6rem; }
.account-google svg { flex: none; }
#account-mode { display: block; margin: .3rem auto 0; }
#account-mode[hidden] { display: none; }

.account-dialog.account-signed-in {
  position: fixed;
  inset: calc(var(--header, 74px) + 8px) var(--edge, 16px) auto auto;
  margin: 0;
  width: min(360px, calc(100% - 32px));
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 18px 55px rgb(19 14 29 / .45);
}
.account-signed-in::backdrop { background: transparent; }
.account-signed-in .account-intro { display: none; }
.account-signed-in > form[method="dialog"] { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; }
.account-signed-in .account-close { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.account-profile { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 11px; padding-inline-end: 52px; }
.account-profile-initials { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--raised); font-weight: 700; }
.account-profile h2 { margin: 0; font-size: 1.02rem; }
#account-profile-email { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: .875rem; }
.account-signed-in #account-signout { display: flex; width: 100%; min-height: 44px; justify-content: flex-start; margin-top: 14px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--raised); }
.account-signed-in #account-signout:hover { background: var(--hover); }
.account-signed-in .account-profile { padding-block-end: 14px; border-block-end: 1px solid var(--strong-rule); }
.account-signed-in #account-status:empty { display: none; }
@media (max-width: 600px) {
  .account-dialog.account-signed-in { inset: auto 0 0; width: 100%; border-radius: 22px 22px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .account-signed-in::backdrop { background: rgb(16 11 24 / .67); }
}
