/* Final login screen layer. Loaded after style.css. */
:root,
:root[data-theme="dark"] {
  --auth-page: #171a1d;
  --auth-panel: #202429;
  --auth-panel-soft: #262b31;
  --auth-line: #38414a;
  --auth-text: #f6f2eb;
  --auth-muted: #aeb8c4;
  --auth-accent: #9fd6d0;
  --auth-accent-text: #101719;
}

/* Unified Signet auth surface */
.auth-screen {
  background: linear-gradient(135deg, #020617 0%, #07111f 48%, #030712 100%) !important;
  animation: none !important;
}

.auth-screen .auth-layout {
  width: min(100%, 540px) !important;
}

.auth-screen .auth-panel {
  border-color: rgba(148, 163, 184, .18) !important;
  border-radius: 18px !important;
  background: rgba(58, 62, 68, .94) !important;
  box-shadow: 0 24px 72px rgba(2, 6, 23, .34) !important;
}

.auth-screen .auth-logo {
  background: transparent !important;
}

.auth-screen .oauth-button {
  min-height: 54px !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  border-color: rgba(148, 163, 184, .18) !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, .58) !important;
  transition: border-color .16s ease, background-color .16s ease !important;
}

.auth-screen .oauth-button::after {
  display: none !important;
}

.auth-screen .oauth-button:hover,
.auth-screen .oauth-button:focus-visible {
  border-color: rgba(34, 211, 238, .42) !important;
  background: rgba(6, 182, 212, .10) !important;
  transform: none !important;
}

.auth-screen .oauth-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  background: #fff !important;
}

.auth-screen .oauth-icon svg {
  width: 25px !important;
  height: 25px !important;
}

.auth-screen .yandex-icon {
  background: #fc3f1d !important;
}

.auth-screen .yandex-icon svg {
  width: 24px !important;
  height: 24px !important;
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--auth-accent) 34%, transparent), transparent 30%),
    radial-gradient(circle at 88% 22%, rgba(122, 167, 255, .2), transparent 26%),
    radial-gradient(circle at 52% 92%, rgba(255,255,255,.09), transparent 30%),
    linear-gradient(135deg, var(--auth-page), color-mix(in srgb, var(--auth-page) 86%, #000));
  background-size: 155% 155%;
  animation: authAmbient 16s ease-in-out infinite alternate;
  color: var(--auth-text);
}

@keyframes authAmbient {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 100% 70%;
  }
}

.auth-screen .auth-layout {
  width: min(100%, 480px);
  margin: 0;
}

.auth-screen .auth-panel {
  width: 100%;
  border: 1px solid var(--auth-line);
  border-radius: 22px;
  padding: clamp(22px, 6vw, 38px);
  background: rgba(228, 232, 238, .92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
}

.auth-screen .brand-lockup {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin: 0 0 28px;
}

.auth-screen .auth-logo {
  width: 150px;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  height: auto;
  background: transparent;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .18));
}

.auth-screen .eyebrow {
  color: var(--auth-accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-screen h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(34px, 6.4vw, 46px);
  font-weight: 620;
  line-height: 1.06;
  letter-spacing: 0;
}

.auth-screen .lead {
  margin: 0 0 26px;
  color: var(--auth-muted);
  font-size: 17px;
  line-height: 1.55;
}

.auth-screen .login-widget,
.auth-screen .oauth-actions,
.auth-screen .email-auth {
  display: grid;
  gap: 10px;
  width: 100%;
}

.auth-screen .login-widget {
  margin-bottom: 16px;
  justify-items: start;
  min-height: 56px;
}

.auth-screen .oauth-actions {
  margin: 0 0 22px;
}

.auth-screen .auth-separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 560;
}

.auth-screen .auth-separator::before,
.auth-screen .auth-separator::after {
  content: "";
  height: 1px;
  background: rgba(148, 163, 184, .18);
}

.auth-screen .auth-form {
  display: grid;
  gap: 10px;
}

.auth-screen .auth-field {
  display: grid;
  gap: 7px;
}

.auth-screen .auth-field span {
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 650;
}

.auth-screen .auth-field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  padding: 0 16px;
  background: rgba(15, 23, 42, .58);
  color: var(--auth-text);
  font-size: 16px;
}

.auth-screen .auth-field input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, .42);
}

.auth-screen .auth-submit {
  justify-content: center;
  grid-template-columns: 1fr !important;
}

.auth-screen .auth-code-form {
  margin-top: 4px;
}

.auth-screen .auth-hint {
  margin: -2px 0 2px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-screen .oauth-button {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  padding: 0 16px;
  background: var(--auth-panel-soft);
  color: var(--auth-text);
  font-size: 16px;
  font-weight: 560;
  text-decoration: none;
  box-shadow: none;
}

.auth-screen .oauth-button::after {
  content: "";
}

.auth-screen .oauth-button:hover,
.auth-screen .oauth-button:focus-visible {
  border-color: var(--auth-accent) !important;
  background: color-mix(in srgb, var(--auth-accent) 12%, var(--auth-panel-soft)) !important;
  color: var(--auth-text) !important;
  transform: none !important;
}

.auth-screen .oauth-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: transparent;
}

/* Stability overrides against older global auth button rules. */
.auth-screen .oauth-button,
.auth-screen .oauth-button *,
.auth-screen .text-link {
  box-sizing: border-box;
}

.auth-screen .oauth-button:hover,
.auth-screen .oauth-button:focus-visible,
.auth-screen .oauth-button:hover span,
.auth-screen .oauth-button:focus-visible span {
  background-color: color-mix(in srgb, var(--auth-accent) 12%, var(--auth-panel-soft)) !important;
  color: var(--auth-text) !important;
}

.auth-screen .oauth-icon svg {
  width: 23px;
  height: 23px;
  display: block;
}

.auth-screen .yandex-icon svg {
  filter: drop-shadow(0 0 0 transparent);
}

.auth-screen .auth-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px;
}

.auth-screen .text-link {
  color: var(--auth-text);
  font-weight: 560;
  line-height: 1.35;
  text-decoration-color: color-mix(in srgb, var(--auth-accent) 55%, transparent);
  text-underline-offset: 4px;
}

@media (max-width: 520px) {
  .auth-screen {
    place-items: stretch;
    padding: 16px;
  }

  .auth-screen .auth-layout {
    align-self: center;
  }

  .auth-screen .auth-panel {
    border-radius: 18px;
  }

  .auth-screen .brand-lockup {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 14px;
  }

  .auth-screen .auth-logo {
    width: 118px;
  }

  .auth-screen h1 {
    font-size: clamp(28px, 10vw, 38px);
  }

  .auth-screen .auth-actions {
    grid-template-columns: 1fr;
  }

}


.auth-screen .login-widget iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

/* 2026-05-12 black login and stable Telegram iframe */
:root,
:root[data-theme="dark"] {
  --auth-page: #000000;
  --auth-panel: #0b0b0b;
  --auth-panel-soft: #111111;
  --auth-line: #232323;
}

.auth-screen {
  background: #000 !important;
}

.auth-screen .auth-panel,
.auth-screen .auth-panel-compact {
  background: #d9dbdf !important;
  border-color: #d9dbdf !important;
}

.auth-screen .auth-separator::before,
.auth-screen .auth-separator::after {
  background: rgba(70, 75, 82, .24) !important;
}

.auth-screen .auth-separator span {
  color: #666d76 !important;
}

.auth-screen .google-auth-link {
  width: 100%;
  max-width: 520px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
  border-radius: 22px;
  border: 1px solid #cfd3d8;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
}

.auth-screen .google-auth-link:hover,
.auth-screen .google-auth-link:focus-visible {
  transform: none !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}

.auth-screen .google-auth-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.auth-screen .google-auth-icon svg {
  display: block;
}

@media (max-width: 520px) {
  .auth-screen .google-auth-link {
    min-height: 52px;
    border-radius: 18px;
    font-size: 17px;
    gap: 12px;
    padding: 0 16px;
  }

  .auth-screen .google-auth-icon {
    width: 24px;
    height: 24px;
  }

  .auth-screen .google-auth-icon svg {
    width: 24px;
    height: 24px;
  }
}

.auth-screen .auth-panel {
  background: rgba(11, 11, 11, .94) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .36) !important;
}

.auth-screen .oauth-button,
.auth-screen .auth-field input {
  background: rgba(17, 17, 17, .96) !important;
}

.auth-screen .telegram-login-frame {
  width: 238px;
  min-width: 238px;
  height: 50px;
  overflow: hidden;
}

@media (max-width: 520px) {
  .auth-screen .login-widget {
    justify-items: start;
    overflow: visible;
  }

  .auth-screen .telegram-login-frame {
    width: 238px;
    min-width: 238px;
    max-width: 100%;
  }
}

/* 2026-05-12 compact auth card */
.auth-screen .auth-panel-compact {
  width: min(100%, 580px) !important;
  min-height: 0 !important;
  padding: 28px 28px 30px !important;
}

.auth-screen .auth-top-logo {
  display: grid;
  justify-items: center;
  margin: 0 0 18px;
}

.auth-screen .auth-top-logo img {
  width: 132px;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .28));
}

.auth-screen .brand-lockup,
.auth-screen .lead,
.auth-screen .auth-actions {
  display: none !important;
}

.auth-screen .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.auth-screen .auth-telegram-block {
  display: grid;
  justify-items: center;
}

.auth-screen .login-widget {
  width: 100% !important;
  min-height: 50px;
  margin: 0 !important;
  justify-items: center !important;
}

.auth-screen .login-widget iframe {
  margin: 0 auto !important;
  display: block;
  max-width: 100%;
}

.auth-screen .auth-separator {
  margin: 18px 0 20px !important;
}

.auth-screen .auth-separator span {
  display: inline-block;
  color: #59606a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.auth-screen .auth-buttons {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
  align-items: center;
}

.auth-screen .yandex-suggest-button {
  width: 100%;
  max-width: 520px;
  min-height: 58px;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  border-radius: 22px;
  background: transparent;
  box-sizing: border-box;
  overflow: visible;
}

.auth-screen .yandex-suggest-button::before {
  display: none;
}

.auth-screen .google-signin-button {
  width: auto !important;
  max-width: 100%;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  align-self: center;
}

.auth-screen .yandex-suggest-button > * {
  width: 100% !important;
  min-width: 100% !important;
  display: block;
}

.auth-screen .google-signin-button > div,
.auth-screen .google-signin-button > iframe {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.auth-screen .google-signin-button > div {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0 !important;
}

.auth-screen .google-signin-button #g_id_onload {
  display: none !important;
}

.auth-screen .google-signin-button .g_id_signin,
.auth-screen .google-signin-button .g_id_signin > div {
  width: fit-content !important;
  max-width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 auto !important;
}

/* Google GIS internal button overrides. */
.auth-screen .google-signin-button .nsm7Bb-HzV7m-LgbsSe,
.auth-screen .google-signin-button .nsm7Bb-HzV7m-LgbsSe-bN97Pc-sM5MNb,
.auth-screen .google-signin-button .nsm7Bb-HzV7m-LgbsSe-MJoBVe,
.auth-screen .google-signin-button .nsm7Bb-HzV7m-LgbsSe-fbJiye,
.auth-screen .google-signin-button .nsm7Bb-HzV7m-LgbsSe-Bz112c {
  background: transparent !important;
  box-shadow: none !important;
}

.auth-screen .google-signin-button .nsm7Bb-HzV7m-LgbsSe {
  border: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

.auth-screen .yandex-suggest-button iframe,
.auth-screen .yandex-suggest-button [role="button"],
.auth-screen .google-signin-button iframe,
.auth-screen .google-signin-button [role="button"] {
  border-radius: 22px !important;
  display: block !important;
}

.auth-screen .auth-btn {
  width: 100%;
  height: 72px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  box-sizing: border-box;
  cursor: pointer;
}

.auth-screen .auth-btn:hover,
.auth-screen .auth-btn:focus-visible {
  transform: translateY(-2px);
}

.auth-screen .auth-btn:active {
  transform: translateY(0);
}

.auth-screen .auth-btn-yandex {
  background: #111111;
  color: #ffffff;
  border: 1px solid #111111;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.auth-screen .auth-btn-yandex:hover,
.auth-screen .auth-btn-yandex:focus-visible {
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28);
}

.auth-screen .auth-btn-google {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d6d6d6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.auth-screen .auth-btn-google:hover,
.auth-screen .auth-btn-google:focus-visible {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
}

.auth-screen .auth-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-screen .auth-icon svg {
  display: block;
}

@media (max-width: 520px) {
  .auth-screen .auth-panel-compact {
    padding: 22px 18px 22px !important;
  }

  .auth-screen .auth-top-logo {
    margin-bottom: 14px;
  }

  .auth-screen .auth-top-logo img {
    width: 116px;
  }

  .auth-screen .auth-buttons {
    max-width: 100%;
    gap: 10px;
  }

  .auth-screen .yandex-suggest-button {
    min-height: 52px;
    border-radius: 18px;
  }

  .auth-screen .google-signin-button {
    min-height: 58px;
    border-radius: 18px;
  }

  .auth-screen .auth-btn {
    min-height: 68px;
    height: 58px;
    gap: 12px;
    border-radius: 16px;
    font-size: 17px;
  }

  .auth-screen .auth-icon {
    width: 32px;
    height: 32px;
  }

  .auth-screen .auth-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* 2026-05-12 single-screen login composition */
html,
body.auth-screen {
  height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.auth-screen {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.auth-screen .auth-layout {
  min-height: 100dvh;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 18px 0;
}

.auth-screen .auth-top-logo {
  margin: 0 0 12px !important;
}

.auth-screen .auth-top-logo img {
  width: 112px !important;
}

.auth-screen .auth-welcome {
  margin: 0 0 16px;
  text-align: center;
}

.auth-screen .auth-welcome p {
  margin: 0;
  color: #d4dae3;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.auth-screen .auth-panel-compact {
  padding: 22px 26px 24px !important;
}

.auth-screen .auth-panel-compact .notice.success,
.auth-screen .auth-panel-compact .notice.danger {
  color: #101317;
}

@media (max-width: 520px) {
  .auth-screen .auth-layout {
    padding: 14px 0;
  }

  .auth-screen .auth-top-logo {
    margin-bottom: 10px !important;
  }

  .auth-screen .auth-top-logo img {
    width: 96px !important;
  }

  .auth-screen .auth-welcome {
    margin-bottom: 12px;
    padding: 0 10px;
  }

  .auth-screen .auth-welcome p {
    font-size: 16px;
  }

  .auth-screen .auth-panel-compact {
    padding: 18px 16px 18px !important;
  }
}

/* Final auth surface override: page stays black, only the form card is gray. */
.auth-screen {
  background: #000 !important;
}

.auth-screen .auth-panel,
.auth-screen .auth-panel-compact {
  background: #ffffff !important;
  border-color: #ffffff !important;
}

.auth-screen .auth-separator::before,
.auth-screen .auth-separator::after {
  background: #e5e7eb !important;
}

.auth-screen .auth-separator span {
  color: #6b7280 !important;
}

.auth-screen .google-signin-button {
  width: 100% !important;
  max-width: 520px !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

.auth-screen .google-signin-button > div {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.auth-screen .google-signin-button iframe,
.auth-screen .google-signin-button [role="button"] {
  display: block !important;
  background: transparent !important;
  border-radius: 8px !important;
}

/* Stable OAuth buttons. Provider widgets change their appearance per browser/session. */
.auth-screen .provider-auth-button {
  width: 100%;
  max-width: 520px;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: 22px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  box-sizing: border-box;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.auth-screen .provider-auth-button:hover,
.auth-screen .provider-auth-button:focus-visible {
  transform: translateY(-1px);
}

.auth-screen .provider-auth-button-yandex {
  background: #050505;
  color: #ffffff;
  border: 1px solid #050505;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .18);
}

.auth-screen .provider-auth-button-google {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d7dce3;
  box-shadow: none;
}

.auth-screen .provider-auth-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-screen .provider-auth-icon svg {
  display: block;
}

.auth-screen .provider-auth-button > span:last-child {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .auth-screen .provider-auth-button {
    min-height: 52px;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 0 14px;
    border-radius: 18px;
    font-size: 14px;
  }

  .auth-screen .provider-auth-icon {
    width: 28px;
    height: 28px;
  }

  .auth-screen .provider-auth-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* No extra backing layer around Google auth controls. */
.auth-screen .auth-buttons > .provider-auth-button-google,
.auth-screen .auth-buttons > .google-signin-button,
.auth-screen .google-signin-button,
.auth-screen .google-signin-button > div,
.auth-screen .google-signin-button > iframe {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.auth-screen .auth-buttons > .provider-auth-button-google {
  background: #ffffff !important;
}

/* Final dark glass auth card. */
.auth-screen .auth-panel,
.auth-screen .auth-panel-compact {
  background: rgba(31, 35, 42, .72) !important;
  border: 1px solid rgba(148, 163, 184, .26) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34) !important;
  backdrop-filter: blur(18px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(130%) !important;
}

.auth-screen .auth-separator::before,
.auth-screen .auth-separator::after {
  background: rgba(148, 163, 184, .22) !important;
}

.auth-screen .auth-separator span {
  color: rgba(203, 213, 225, .62) !important;
}

/* Unified Signet login screen. Keep this block last: it replaces provider widgets with stable buttons. */
.auth-screen .auth-layout {
  gap: 0 !important;
  padding: 24px 16px !important;
}

.auth-screen .auth-top-logo {
  margin: 0 0 8px !important;
}

.auth-screen .auth-top-logo img {
  width: 108px !important;
  max-width: 32vw !important;
  display: block;
}

.auth-screen .auth-brand-copy {
  margin: 0 0 16px;
  text-align: center;
}

.auth-screen .auth-brand-copy p {
  margin: 0;
  color: rgba(226, 232, 240, .84);
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 650;
  line-height: 1.35;
}

.auth-screen .auth-welcome {
  display: none !important;
}

.auth-screen .auth-panel,
.auth-screen .auth-panel-compact {
  width: min(100%, 560px) !important;
  padding: 20px 24px !important;
  border-radius: 24px !important;
  background:
    linear-gradient(145deg, rgba(37, 42, 50, .78), rgba(17, 20, 26, .68)) !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .42) !important;
  backdrop-filter: blur(18px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(125%) !important;
}

.auth-screen .auth-telegram-primary {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
  box-sizing: border-box;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0, rgba(56, 189, 248, .18), transparent 46%),
    rgba(8, 13, 22, .46);
  border: 1px solid rgba(56, 189, 248, .26);
}

.auth-screen .auth-recommend-label {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.auth-screen .auth-telegram-primary .login-widget {
  width: min(100%, 430px) !important;
  min-height: 42px !important;
  transform: scale(1.08);
  transform-origin: center;
}

.auth-screen .auth-telegram-primary .login-widget iframe {
  max-width: 100% !important;
}

.auth-screen .auth-separator {
  margin: 14px 0 12px !important;
}

.auth-screen .signet-auth-stack {
  width: 100%;
  max-width: none !important;
  display: grid !important;
  gap: 10px !important;
  justify-items: stretch !important;
}

.auth-screen .signet-auth-btn {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  box-sizing: border-box;
  border-radius: 16px;
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(20, 27, 39, .98), rgba(9, 13, 21, .98));
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-screen .signet-auth-btn:hover,
.auth-screen .signet-auth-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, .48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 12px 30px rgba(0, 0, 0, .22);
  outline: none;
}

.auth-screen .signet-auth-btn:active {
  transform: translateY(0);
}

.auth-screen .signet-auth-icon,
.auth-screen .signet-auth-spacer {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-screen .signet-auth-icon svg {
  display: block;
}

.auth-screen .signet-auth-icon img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.auth-screen .signet-auth-btn > span:nth-child(2) {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-screen .auth-login-purpose {
  margin: 10px 0 0;
  color: rgba(226, 232, 240, .64);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.auth-screen .auth-terms-note {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, .62);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.auth-screen .auth-panel-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  color: rgba(226, 232, 240, .76);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.auth-screen .auth-secure-note {
  min-width: 0;
}

.auth-screen .auth-support-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(226, 232, 240, .82);
  background: rgba(15, 23, 42, .34);
  border: 1px solid rgba(148, 163, 184, .22);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.auth-screen .auth-support-link:hover,
.auth-screen .auth-support-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, .52);
  border-color: rgba(148, 163, 184, .34);
  outline: none;
}

@media (max-width: 520px) {
  .auth-screen .auth-layout {
    min-height: 100svh !important;
    padding: 18px 14px !important;
  }

  .auth-screen .auth-top-logo {
    margin-bottom: 8px !important;
  }

  .auth-screen .auth-top-logo img {
    width: 92px !important;
    max-width: 34vw !important;
  }

  .auth-screen .auth-brand-copy {
    margin-bottom: 14px;
  }

  .auth-screen .auth-brand-copy p {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
  }

  .auth-screen .auth-panel,
  .auth-screen .auth-panel-compact {
    padding: 16px 14px !important;
    border-radius: 20px !important;
  }

  .auth-screen .auth-telegram-primary {
    padding: 10px 10px 12px;
    border-radius: 18px;
  }

  .auth-screen .auth-recommend-label {
    font-size: 10px;
  }

  .auth-screen .auth-telegram-primary .login-widget {
    transform: none;
  }

  .auth-screen .auth-separator {
    margin: 12px 0 10px !important;
  }

  .auth-screen .signet-auth-stack {
    gap: 10px !important;
  }

  .auth-screen .signet-auth-btn {
    min-height: 52px;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 14px;
  }

  .auth-screen .auth-terms-note {
    margin-top: 7px;
    font-size: 11px;
  }

  .auth-screen .auth-login-purpose {
    margin-top: 8px;
    font-size: 11px;
  }

  .auth-screen .signet-auth-icon,
  .auth-screen .signet-auth-spacer {
    width: 30px;
    height: 30px;
  }

  .auth-screen .signet-auth-icon svg {
    width: 24px;
    height: 24px;
  }

  .auth-screen .signet-auth-icon img {
    width: 24px;
    height: 24px;
  }

  .auth-screen .auth-panel-footer {
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 12px;
  }

  .auth-screen .auth-support-link {
    width: 100%;
    min-height: 38px;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 980px) {
  .auth-screen {
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .auth-screen .auth-layout {
    min-height: 100dvh !important;
    justify-content: flex-start !important;
    padding: 12px 16px !important;
  }

  .auth-screen .auth-top-logo {
    margin-bottom: 4px !important;
  }

  .auth-screen .auth-top-logo img {
    width: 76px !important;
    max-height: 58px !important;
    object-fit: contain;
  }

  .auth-screen .auth-brand-copy {
    margin-bottom: 8px !important;
  }

  .auth-screen .auth-brand-copy p {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  .auth-screen .auth-panel,
  .auth-screen .auth-panel-compact {
    width: min(620px, 100%) !important;
    padding: 12px 16px !important;
    border-radius: 18px !important;
  }

  .auth-screen .auth-telegram-primary {
    padding: 6px 8px 8px !important;
    border-radius: 14px !important;
  }

  .auth-screen .auth-recommend-label {
    margin-bottom: 4px !important;
    font-size: 9px !important;
  }

  .auth-screen .auth-separator {
    margin: 8px 0 !important;
  }

  .auth-screen .signet-auth-stack {
    gap: 7px !important;
  }

  .auth-screen .signet-auth-btn {
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  .auth-screen .signet-auth-icon,
  .auth-screen .signet-auth-spacer {
    width: 28px !important;
    height: 28px !important;
  }

  .auth-screen .signet-auth-icon img {
    width: 22px !important;
    height: 22px !important;
  }

  .auth-screen .auth-login-purpose,
  .auth-screen .auth-terms-note {
    margin-top: 6px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
  }

  .auth-screen .auth-panel-footer {
    margin-top: 7px !important;
    padding-top: 7px !important;
    font-size: 11px !important;
  }

  .auth-screen .auth-support-link {
    min-height: 28px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
  }
}
