.auth-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(440px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  height: fit-content;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 28px 90px #00000040;
  overflow: hidden;
}
.auth-dialog::backdrop {
  background: #101216a8;
  backdrop-filter: blur(8px);
}
.auth-card {
  padding: 28px 28px 24px;
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #151515;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px #15151512;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.auth-close::before,
.auth-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.auth-close::before { transform: rotate(45deg); }
.auth-close::after { transform: rotate(-45deg); }
.auth-close:hover {
  background: #151515;
  border-color: #151515;
  color: #fff;
  transform: scale(1.04);
}
.auth-close:focus-visible {
  outline: 2px solid #c4f042;
  outline-offset: 2px;
}
.auth-kicker {
  color: #6a8f12;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.auth-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  font-weight: 700;
}
.auth-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.discord-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: #5865f2;
  color: #fff;
  font: 800 14px var(--font);
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
.discord-login:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.discord-login svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}
.auth-form input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
}
.auth-form input:focus {
  outline: 2px solid #c4f04277;
  border-color: var(--brand-hi);
}
.auth-form .btn.primary {
  width: 100%;
  margin-top: 2px;
  padding: 14px 18px;
}
.auth-error {
  min-height: 0;
  color: var(--err);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.auth-error:empty {
  display: none;
}
.auth-success {
  margin: 0 0 14px;
  border-radius: 14px;
  padding: 12px 14px;
  background: #eaf7d6;
  color: #3f5c0a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-success[hidden] {
  display: none;
}
.auth-switch {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-align: center;
}
.auth-resend {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a8f12;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.auth-resend[hidden] {
  display: none;
}
.auth-forgot {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a8f12;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.auth-forgot:hover {
  text-decoration: underline;
}
.auth-forgot[hidden] {
  display: none;
}
.auth-form[hidden],
.auth-switch[hidden],
.auth-divider[hidden],
.discord-login[hidden] {
  display: none;
}
.account-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-credit {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

