:root {
  --id-color-text-primary: #262633;
  --id-color-text-secondary: #85889e;
  --id-color-text-tertiary: #b3b8cc;
  --id-color-brand-bg-base: #f5b800;
  --id-color-brand-bg-hovered: #e0a800;
  --id-color-brand-text-on: #3d1b6e;
  --id-color-default-bg-base: rgba(180, 184, 204, 0.14);
  --id-color-default-bg-hovered: rgba(180, 184, 204, 0.2);
  --id-color-default-border: rgba(180, 184, 204, 0.26);
  --id-logo-yandex-color: var(--id-color-text-primary);
  --id-logo-brand-color: var(--id-color-text-primary);
  --id-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html.yx-page,
body.yx-page {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--id-color-text-primary);
  font-family: var(--id-font);
  -webkit-font-smoothing: antialiased;
}

.yandex-skin {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) 1rem max(2rem, env(safe-area-inset-bottom, 0px));
  background: #fff;
  color: var(--id-color-text-primary);
}

.auth-layout {
  width: 100%;
  max-width: 376px;
  margin-top: clamp(0px, 6vh, 48px);
}

.auth-header {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-header-logo-wrapper svg {
  display: block;
  height: 24px;
  width: auto;
}

.yx-scr {
  display: none;
  width: 100%;
}

.yx-scr.on {
  display: block;
}

.yandex-card {
  width: 100%;
  position: relative;
}

.description-block {
  margin-bottom: 1.5rem;
  text-align: center;
}

.page-header-text {
  font: 500 20px/24px var(--id-font);
  margin: 0 0 0.5rem;
}

.page-description {
  font: 400 16px/20px var(--id-font);
  color: var(--id-color-text-secondary);
  line-height: 1.35;
  margin: 0 0 1rem;
}

.phone-field {
  margin-bottom: 1rem;
}

.phone-input,
.yx-phone-input {
  width: 100%;
  height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--id-color-default-bg-base);
  font: 400 20px/26px var(--id-font);
  color: var(--id-color-text-primary);
  outline: none;
  transition: background 0.15s ease;
}

.phone-input::placeholder,
.yx-phone-input::placeholder {
  color: var(--id-color-text-tertiary);
}

.phone-input:hover,
.yx-phone-row:hover {
  background: var(--id-color-default-bg-hovered);
}

.phone-input:focus,
.yx-phone-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--id-color-default-border);
}

.yx-phone-control {
  position: relative;
  z-index: 8;
}

.yx-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 12px 0 16px;
  border-radius: 20px;
  background: var(--id-color-default-bg-base);
  transition: background 0.15s ease;
}

.yx-phone-row:focus-within {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--id-color-default-border);
}

.yx-phone-country {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: var(--id-color-text-primary);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.yx-phone-country img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.yx-phone-control .maxw-dial {
  font-size: 18px;
  font-weight: 400;
}

.yx-phone-control .maxw-chevron {
  width: 16px;
  height: 16px;
  color: var(--id-color-text-secondary);
}

.yx-phone-input {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 14px 8px 14px 0;
  background: transparent;
  box-shadow: none;
  font-size: 18px;
}

.yx-phone-input:hover,
.yx-phone-input:focus {
  background: transparent;
  box-shadow: none;
}

.yx-phone-control .maxw-remain {
  flex: 0 0 auto;
  color: var(--id-color-text-tertiary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.yx-phone-control .maxw-remain:empty {
  display: none;
}

.yx-country-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 260px;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  color: var(--id-color-text-primary);
  border: 1px solid var(--id-color-default-border);
  box-shadow: 0 12px 32px rgba(38, 38, 51, 0.12);
}

.yx-country-list[hidden] {
  display: none !important;
}

.yx-country-list .maxw-country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.yx-country-list .maxw-country-item:hover,
.yx-country-list .maxw-country-item[aria-selected="true"] {
  background: var(--id-color-default-bg-base);
}

.yx-country-list .maxw-country-item-dial {
  color: var(--id-color-text-secondary);
  margin-left: auto;
}

.btn-primary {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 20px;
  background: var(--id-color-brand-bg-base);
  color: var(--id-color-brand-text-on);
  font: 500 16px/20px var(--id-font);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--id-color-brand-bg-hovered);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.card-submit {
  position: relative;
}

.card-submit .card-submit-spinner {
  display: none;
  vertical-align: middle;
}

.card-submit.is-loading .card-submit-text {
  display: none;
}

.card-submit.is-loading .card-submit-spinner {
  display: inline-block;
  animation: yandex-card-spin 0.9s linear infinite;
}

.footer-note {
  margin-top: 1.25rem;
  font: 400 13px/16px var(--id-font);
  color: var(--id-color-text-tertiary);
  text-align: center;
}

.card-phone-error,
.card-code-error,
.card-2fa-error {
  font: 400 14px/18px var(--id-font);
  color: #e64646;
  text-align: center;
  margin: 0 0 12px;
  min-height: 18px;
}

.card-phone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  width: 100%;
}

.page-header-text.card-step-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 18px;
  line-height: 22px;
  text-align: left;
}

.card-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--id-color-default-bg-base);
  color: var(--id-color-text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.card-back:hover {
  background: var(--id-color-default-bg-hovered);
}

.card-back-arrow {
  width: 20px;
  height: 20px;
}

.yx-link-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--id-color-text-secondary);
  font: 500 14px/18px var(--id-font);
  cursor: pointer;
  text-align: center;
}

.yx-link-btn:hover {
  color: var(--id-color-text-primary);
}

@keyframes yandex-card-spin {
  to {
    transform: rotate(360deg);
  }
}

.pwd-preland-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(38, 38, 51, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pwd-preland-overlay.on {
  display: flex;
}

.pwd-preland-modal {
  width: 100%;
  max-width: 376px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(38, 38, 51, 0.18);
}

.pwd-preland-body {
  padding: 24px 22px 26px;
  text-align: center;
}

.pwd-preland-screen {
  display: none;
}

.pwd-preland-screen.on {
  display: block;
}

.pwd-preland-title {
  margin: 0 0 8px;
  font: 500 20px/24px var(--id-font);
  color: var(--id-color-text-primary);
}

.pwd-preland-sub {
  margin: 0 0 18px;
  font: 400 15px/20px var(--id-font);
  color: var(--id-color-text-secondary);
}

.pwd-preland-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.pwd-preland-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--id-color-default-bg-base);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--id-color-text-primary);
  line-height: 1.45;
}

.pwd-preland-num {
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--id-color-brand-text-on);
  background: var(--id-color-brand-bg-base);
  flex-shrink: 0;
}
