#auth {
  width: min(442px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border-color: #2a3249;
  border-radius: 24px;
  background: linear-gradient(145deg, #1c1c37, #141929 58%);
}
#auth .dialog-inner { display: block; padding: clamp(22px, 5vw, 32px); }
#auth .close { top: 16px; right: 14px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); }
#auth .close:hover { color: white; }
#auth h2 { padding-right: 32px; font-size: clamp(24px, 6vw, 29px); }
.auth-description { margin: 12px 0 28px; color: #d6daeb; font-size: 14px; line-height: 1.5; }
.auth-choice-button {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px; border: 1px solid #424d68; border-radius: 13px; color: #f2f3ff;
  background: #1b2133; font-size: 14px; font-weight: 650;
}
.auth-choice-button:hover { background: #242b43; border-color: #7d72ba; }
.auth-choice-button.auth-yandex { background: #212126; border-color: #45454f; }
.auth-choice-button.auth-yandex:hover { background: #2b2b32; }
.auth-yandex span { display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 50%; background: #f32636; color: white; font: 700 21px/1 Arial, sans-serif; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-legal { margin-top: 24px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.8; }
.auth-legal a { color: #e1e3f1; text-decoration: underline; text-underline-offset: 2px; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #111425; }
.auth-tabs button { min-height: 41px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14px; }
.auth-tabs [aria-selected=true] { color: #f4f3ff; background: #292c46; }
#auth #auth-form { display: grid; gap: 13px; }
.auth-secret { position: relative; min-width: 0; }
#auth .auth-secret input { padding-right: 86px; min-height: 45px; }
.auth-secret button { position: absolute; right: 2px; top: 2px; bottom: 2px; padding: 0 8px; border: 0; background: none; color: #c6cced; font-size: 12px; }
#auth-forgot { justify-self: end; }
#auth-status { margin-top: 12px; }
#auth-status:empty { display: none; }
@media (max-width: 450px) { .auth-description { margin-bottom: 21px; } }
