@font-face {
  font-family: "YS Text";
  src: url("//yastatic.net/s3/home/fonts/ys/1/text-regular.woff2") format("woff2"),
       url("//yastatic.net/s3/home/fonts/ys/1/text-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YS Text";
  src: url("//yastatic.net/s3/home/fonts/ys/1/text-medium.woff2") format("woff2"),
       url("//yastatic.net/s3/home/fonts/ys/1/text-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --id-color-text-primary: #262633;
  --id-color-text-secondary: #85889e;
  --id-color-text-tertiary: #b3b8cc;
  --id-color-brand-bg-base: #292933;
  --id-color-brand-bg-hovered: #1b1b26;
  --id-color-brand-text-on: #fff;
  --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);
}

html.land-yandex,
html.land-yandex body,
html.land-yandex.theme-white,
html.land-yandex.theme-white body,
html.land-yandex.theme-dark,
html.land-yandex.theme-dark body {
  background: #ffffff !important;
  color: var(--id-color-text-primary) !important;
  font-family: "YS Text", "Helvetica Neue", Arial, sans-serif;
  min-height: 100dvh;
}

html.land-yandex body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(2rem, env(safe-area-inset-top, 0px)) 1rem max(2rem, env(safe-area-inset-bottom, 0px));
}

html.land-yandex * { box-sizing: border-box; }

.ya-wrap { width: 100%; max-width: 376px; }
.ya-logo { display: flex; justify-content: center; margin-bottom: 2rem; }
.ya-logo-inner svg { display: block; height: 24px; width: auto; }
.ya-copy { margin-bottom: 1.5rem; text-align: center; }
.ya-copy h1,
.ya-step-head h2 {
  font: 500 20px/24px "YS Text", Arial, sans-serif;
  margin: 0 0 0.5rem;
  color: var(--id-color-text-primary);
}
.ya-copy p {
  margin: 0;
  color: var(--id-color-text-secondary);
  font: 400 16px/22px "YS Text", Arial, sans-serif;
}
.ya-copy strong { font-weight: 500; color: var(--id-color-text-primary); }
.ya-phone-row {
  display: flex;
  align-items: stretch;
  border-radius: 20px;
  background: var(--id-color-default-bg-base);
  overflow: hidden;
  margin-bottom: 1rem;
}
.ya-phone-row input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 14px 16px 14px 8px;
  border: 0;
  background: transparent;
  font: 400 20px/26px "YS Text", Arial, sans-serif;
  color: var(--id-color-text-primary);
  outline: none;
}
.ya-phone-row input::placeholder { color: var(--id-color-text-tertiary); }
.ya-btn {
  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 "YS Text", Arial, sans-serif;
  cursor: pointer;
  position: relative;
}
.ya-btn:hover { background: var(--id-color-brand-bg-hovered); }
.ya-btn:active { transform: scale(0.99); }
.ya-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.ya-btn-spin { display: none; vertical-align: middle; }
.ya-btn.is-loading .ya-btn-label { display: none; }
.ya-btn.is-loading .ya-btn-spin { display: inline-block; animation: ya-spin 0.9s linear infinite; }
.ya-note {
  margin-top: 1.25rem;
  font: 400 13px/16px "YS Text", Arial, sans-serif;
  color: var(--id-color-text-tertiary);
  text-align: center;
}
.ya-card { width: 100%; position: relative; }
.ya-phone, .ya-code, .ya-2fa { display: none; }
.ya-card.show-phone .ya-phone,
.ya-card.show-code .ya-code,
.ya-card.show-2fa .ya-2fa { display: block; }
.ya-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  width: 100%;
}
.ya-step-head h2 {
  margin: 0;
  flex: 1;
  font-size: 18px;
  line-height: 22px;
  text-align: left;
}
.ya-sub {
  margin: -8px 0 14px;
  color: var(--id-color-text-secondary);
  font: 400 14px/18px "YS Text", Arial, sans-serif;
  text-align: left;
}
.ya-otp {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 1rem;
  width: 100%;
}
.ya-otp input {
  flex: 1 1 0;
  min-width: 0;
  max-width: 52px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--id-color-default-bg-base);
  font: 500 22px/28px "YS Text", Arial, sans-serif;
  color: var(--id-color-text-primary);
  text-align: center;
  outline: none;
  appearance: none;
}
.ya-otp input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--id-color-default-border);
}
.ya-error {
  font: 400 14px/18px "YS Text", Arial, sans-serif;
  color: #e64646;
  text-align: center;
  margin: 0 0 12px;
}
.ya-error.is-hidden { display: none; }
.ya-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;
}
.ya-back:hover { background: var(--id-color-default-bg-hovered); }
.ya-2fa input[type="text"] {
  width: 100%;
  height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--id-color-default-bg-base);
  font: 400 20px/26px "YS Text", Arial, sans-serif;
  color: var(--id-color-text-primary);
  outline: none;
  margin-bottom: 12px;
}
.ya-2fa input[type="text"]:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--id-color-default-border);
}
.ya-resend {
  margin: 16px 0 0;
  text-align: center;
}
.ya-resend button {
  border: 0;
  background: transparent;
  color: var(--id-color-text-secondary);
  font: 400 14px/18px "YS Text", Arial, sans-serif;
  cursor: pointer;
}
.ya-resend button:disabled { color: var(--id-color-text-tertiary); cursor: default; }

.country-wrap { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 10px 0 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--id-color-text-primary);
}
.country-btn .c-flag { font-size: 20px; line-height: 1; }
.country-btn .c-code { font-weight: 700; }
.country-btn::after { content: "▾"; font-size: 10px; margin-left: 2px; opacity: 0.5; }
.country-drop {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  z-index: 999;
}
.country-drop.open { display: block; }
.country-opt {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  color: var(--id-color-text-primary);
}
.country-opt:hover,
.country-opt.active { background: rgba(0, 0, 0, 0.06); }
.country-opt .c-cd { margin-left: auto; opacity: 0.5; font-weight: 700; color: var(--id-color-text-secondary); }

@keyframes ya-spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  html.land-yandex body { justify-content: flex-start; padding-top: max(1.25rem, env(safe-area-inset-top, 0px)); }
  .ya-wrap { margin-top: clamp(0px, 6vh, 48px); }
}
@media (max-width: 380px) {
  .ya-otp { gap: 6px; }
  .ya-otp input { height: 52px; font-size: 20px; border-radius: 14px; }
}
