html[data-auth-state=restoring]{scroll-behavior:auto!important}
html[data-auth-state=restoring] .marketing,html[data-auth-state=restoring] .public-nav,html[data-auth-state=restoring] #login,html[data-auth-state=restoring] #dashboard{display:none!important}
html[data-auth-state=restoring] #accountRestoring{display:flex!important}
.account-restoring{max-width:540px;margin:24px auto;align-items:center;gap:16px;min-height:100px;color:#174d42}
.account-restoring[hidden]{display:none}
.account-restoring p{margin:0;line-height:1.7}.account-restoring button{margin-top:14px}
.account-restoring-spinner{flex:none;width:24px;height:24px;border:3px solid #dce8e0;border-top-color:#174d42;border-radius:50%;animation:restore-spin .9s linear infinite}
@keyframes restore-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.account-restoring-spinner{animation:none}}

#loginSlot { display: flow-root; }
html.login-dialog-open { overflow: hidden; }
html.login-dialog-gutter { scrollbar-gutter: stable; }
.login-dialog {
  position: fixed;
  width: min(460px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d8e7dc;
  border-radius: 24px;
  background: #f9fcf7;
  color: var(--ink);
  box-shadow: 0 24px 85px #143c3240;
}
.login-dialog[open] { animation: login-enter .26s cubic-bezier(.22,1,.36,1) both; }
.login-dialog::backdrop {
  background: #123a3159;
  backdrop-filter: blur(4px);
  animation: login-shade .22s ease both;
}
.login-dialog .login {
  max-width: none;
  margin: 0;
  border: 0;
  padding-block-start: 49px;
  background: transparent;
  box-shadow: none;
}
.login-dialog #error { margin: 0 26px 24px; }
.login-dialog-close {
  position: absolute;
  z-index: 1;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d6e5dc;
  border-radius: 50%;
  background: #edf4ed;
  color: #174d42;
  cursor: pointer;
}
.login-dialog-close:hover { background: #dcebe0; }
.login-dialog-close:focus-visible { outline: 2px solid #174d42; outline-offset: 2px; }
@keyframes login-enter {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes login-shade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .login-dialog[open], .login-dialog::backdrop { animation: none; }
}
