.auth-dialog {
  width: min(100%, 420px);
  padding: 28px 24px 24px;
}
.auth-dialog [hidden],
.auth-dialog .account-preview > #accountState,
.auth-dialog .account-preview > #accountProgress {
  display: none !important;
}
.auth-dialog #authDialogTitle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.auth-dialog .auth-brand {
  display: block;
  width: min(190px, 64%);
  height: auto;
  margin: 0 auto 18px;
}
.auth-dialog .account-preview,
.auth-dialog #authPanel {
  margin: 0 !important;
}
.auth-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 18px;
}
.auth-choices button {
  min-height: 42px;
  padding: 8px 4px;
  color: #e7d9c6;
  background: #1f1b19;
  border: 1px solid #77634d;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
.auth-choices button[aria-pressed="true"] {
  background: #382d22;
  border-color: #e1bd8d;
  color: #fff3de;
}
.auth-dialog .auth-actions {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
.auth-dialog .auth-primary {
  min-height: 44px;
  background: #dfbf8d;
  border-color: #dfbf8d;
  color: #241b14;
  font-weight: 700;
  cursor: pointer;
}
.auth-dialog #authReset {
  justify-self: center;
  background: transparent;
  border: 0;
  color: #dfbf8d;
  text-decoration: underline;
  cursor: pointer;
}
.auth-dialog #authMessage:empty { display: none; }

.auth-dialog button:not(:disabled) {
  transition: background-color 150ms ease, border-color 150ms ease,
    box-shadow 150ms ease, transform 150ms ease;
}
@media (hover: hover) {
  .auth-dialog button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #0005;
  }
  .auth-choices button:hover,
  .auth-dialog .auth-close:hover {
    background: #473627;
    border-color: #dfbf8d;
  }
  .auth-dialog .auth-primary:hover {
    background: #f1d5a8;
    border-color: #f1d5a8;
  }
}
.auth-dialog button:not(:disabled):active {
  transform: scale(.98);
  box-shadow: none;
}
.auth-dialog button:focus-visible {
  outline: 2px solid #f1d5a8;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .auth-dialog button:not(:disabled),
  .auth-dialog button:not(:disabled):hover,
  .auth-dialog button:not(:disabled):active {
    transition: none;
    transform: none;
  }
}

.auth-greeting {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 24px), 410px);
  padding: 36px 28px 28px;
  border: 1px solid #9e815c;
  border-radius: 10px;
  background: #211b18;
  color: #f8eee5;
  text-align: center;
  box-shadow: 0 20px 70px #0009;
}
.auth-greeting::backdrop { background: #000b; }
.auth-greeting .auth-brand {
  display: block;
  width: min(175px, 65%);
  height: auto;
  margin: 0 auto 18px;
}
.auth-greeting h2 {
  margin: 0;
  font-size: clamp(23px, 5vw, 32px);
  line-height: 1.25;
}
.auth-greeting .auth-close {
  background: #211b18;
  border-color: #9e815c;
  color: #f8eee5;
  cursor: pointer;
}
.auth-greeting .auth-close:hover { background: #473627; }
.auth-greeting .auth-close:focus-visible {
  outline: 2px solid #f1d5a8;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .auth-greeting[open] { animation: auth-greeting-in 160ms ease-out; }
  .auth-greeting .auth-close { transition: background-color 150ms ease, transform 150ms ease; }
  .auth-greeting .auth-close:hover { transform: translateY(-1px); }
  .auth-greeting .auth-close:active { transform: scale(.96); }
}
@keyframes auth-greeting-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
