/* Вход и регистрация: переключатель языка внутри страницы, а не под 100vh. */
.auth {
  display: grid;
  grid-template-columns: minmax(420px, .96fr) minmax(0, 1.04fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
  gap: 14px;
}
.auth__form {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 14px clamp(24px, 3.6vw, 56px) 8px;
}
.auth__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 16px;
  min-height: 38px;
}
.auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.035em;
}
.auth__brand img { width: 29px; height: 29px; border-radius: 9px; }
.auth__topbar .language-footer { padding: 0; font-size: 12px; }
.auth__topbar .language-icon { left: 10px; width: 14px; height: 14px; }
.auth__topbar .language-footer select:not([multiple]):not([size]) {
  width: 116px;
  min-height: 36px;
  padding: 7px 26px 7px 31px;
  border-color: transparent;
  border-radius: 9px;
  background-color: transparent;
  background-position: right 8px center;
  background-size: 12px;
}
.auth__topbar .language-footer select:hover { border-color: var(--line); background-color: var(--surface); }
.auth__body {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.auth__inner { width: min(400px, 100%); margin-inline: auto; }
.auth h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.2; letter-spacing: -.04em; font-weight: 600; }
.auth__lede { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth__field { margin-bottom: 13px; }
.auth__field label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.auth__field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 65%, var(--bg));
  color: var(--text);
  font: 400 14px/1 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
.auth__field input::placeholder { color: var(--faint); opacity: 1; }
.auth__field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.auth__hint { color: var(--faint); font-weight: 400; }
.auth .password-rules { font-size: 11px; margin-top: 7px; }
.auth .auth-consent { margin: 18px 0; font-size: 11px; line-height: 1.6; gap: 9px; }
.auth .auth-consent input { width: 15px; height: 15px; }
.auth__submit { width: 100%; min-height: 46px; margin-top: 2px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.auth__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; text-underline-offset: 3px; }
.auth__forgot { margin: 15px 0 0; text-align: center; font-size: 12px; }
.auth__forgot button, .auth__switch button { border: 0; background: none; padding: 0; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth__forgot button { color: var(--muted); }
.auth__forgot button:hover, .auth__switch button:hover, .auth__back:hover { color: var(--accent); }
.auth__switch { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth__offer {
  margin: 0 0 19px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.auth__offer strong { display: block; font-weight: 500; }
.auth__offer small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth__note { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.auth__note[data-tone='bad'] { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.auth__note[data-tone='good'] { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.auth .auth__desktop { margin: 0 0 16px; padding: 0; border: 0; border-radius: 0; font-size: 12px; line-height: 1.5; }
.auth .auth__verify-actions { gap: 12px; }
.auth__verify-actions .auth__lede { margin: 0; font-size: 12px; }
.auth__verify-actions .button { font-size: 13px; }

/* На коротком экране уменьшаются отступы, а не поля и читаемость текста. */
@media (min-width: 901px) and (max-height: 780px) {
  .auth { padding: 10px; gap: 10px; }
  .auth__form { padding-top: 6px; }
  .auth__body { padding-block: 16px; }
  .auth h1 { font-size: 29px; margin-bottom: 6px; }
  .auth__lede { margin-bottom: 13px; font-size: 13px; }
  .auth__offer { margin-bottom: 12px; padding: 9px 12px; }
  .auth__field { margin-bottom: 8px; }
  .auth .auth-consent { margin-block: 12px; }
  .auth__switch { margin-top: 14px; }
}
/* Телефон и большой масштаб: естественный скролл, клавиатура не отрезает форму. */
@media (max-width: 900px) {
  .auth { display: block; height: auto; min-height: 100vh; min-height: 100dvh; padding: 0; overflow: visible; }
  .auth__form { min-height: 100vh; min-height: 100dvh; padding: 20px clamp(20px, 6vw, 48px) 28px; }
  .auth__topbar { gap: 10px; }
  .auth__body { overflow: visible; flex: 1 0 auto; padding: 36px 0 12px; }
  .auth h1 { font-size: 30px; }
  .auth__field input { font-size: 16px; }
  .auth__brand { font-size: 16px; }
}
@media (max-width: 370px) {
  .auth__form { padding-inline: 18px; }
  .auth__brand { font-size: 15px; gap: 7px; }
  .auth__brand img { width: 26px; height: 26px; }
  .auth__topbar .language-footer select:not([multiple]):not([size]) { width: 108px; padding-left: 29px; }
  .auth__body { padding-top: 28px; }
}
