:root {
  color-scheme: light;
  --twa-purple: #6731f4;
  --twa-purple-2: #7a34f7;
  --twa-ink: #070b42;
  --twa-muted: #71749f;
  --twa-border: #ddd3f6;
  --twa-white: #ffffff;
  --twa-surface: rgba(255, 255, 255, 0.76);
  --twa-canvas-height: 923px;
  --twa-panel-x: 52px;
  --twa-language-top: 57px;
  --twa-logo-width: 146.5px;
  --twa-logo-gap: 32px;
  --twa-title-size: 20px;
  --twa-title-line: 1.08;
  --twa-subtitle-size: 14px;
  --twa-subtitle-line: 1.1;
  --twa-subtitle-gap: 15px;
  --twa-form-gap: 14px;
  --twa-form-top: 46px;
  --twa-field-gap: 8px;
  --twa-input-height: 47px;
  --twa-button-height: 48px;
  --twa-divider-top: 18px;
  --twa-divider-bottom: 17px;
  --twa-google-height: 46px;
  --twa-switch-top: 19px;
  --twa-actions-top: 73px;
  --twa-actions-gap: 13px;
  --twa-landscape-height: 228px;
  --twa-legal-bottom: 35px;
  --twa-entry-panel-top: 203px;
  --twa-login-panel-top: 141px;
  --twa-registration-panel-top: 100px;
  --twa-recovery-panel-top: 150px;
  --twa-registration-form-top: 26px;
  --twa-registration-form-gap: 8px;
  --twa-registration-input-height: 42px;
  --twa-registration-button-height: 44px;
  --twa-registration-google-height: 44px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: clip;
}

.twa-body {
  background: #fbfaff;
  color: var(--twa-ink);
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: start center;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.twa-canvas {
  position: relative;
  width: min(100vw, 426px);
  height: 100vh;
  height: 100dvh;
  max-height: var(--twa-canvas-height);
  margin: 0 auto;
  overflow: clip;
  background:
    radial-gradient(circle at 50% 11%, rgba(255, 255, 255, 0.98) 0 26%, rgba(251, 249, 255, 0.96) 58%, #fbf9ff 100%),
    #fbfaff;
}

.twa-language {
  position: absolute;
  z-index: 5;
  top: calc(var(--twa-language-top) + env(safe-area-inset-top));
  right: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 72px;
  height: 30px;
  padding: 0;
  border: 1px solid #d9cef6;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--twa-purple);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.twa-language svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.twa-language .twa-chevron {
  width: 13px;
  height: 13px;
}

.twa-panel {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: var(--twa-login-panel-top) var(--twa-panel-x) 0;
  text-align: center;
}

.twa-logo {
  display: block;
  width: var(--twa-logo-width);
  height: auto;
  margin: 0 auto var(--twa-logo-gap);
}

.twa-copy h1 {
  margin: 0;
  color: #080b49;
  font-size: var(--twa-title-size);
  font-weight: 900;
  line-height: var(--twa-title-line);
  letter-spacing: 0;
}

.twa-copy p {
  margin: var(--twa-subtitle-gap) 0 0;
  color: var(--twa-muted);
  font-size: var(--twa-subtitle-size);
  font-weight: 600;
  line-height: var(--twa-subtitle-line);
  letter-spacing: 0;
}

.twa-form {
  display: grid;
  gap: var(--twa-form-gap);
  margin-top: var(--twa-form-top);
  text-align: left;
}

.twa-field {
  display: grid;
  gap: var(--twa-field-gap);
  color: #080b49;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.twa-control,
.twa-password {
  position: relative;
  display: block;
}

.twa-control input {
  display: block;
  width: 100%;
  height: var(--twa-input-height);
  border: 1px solid var(--twa-border);
  border-radius: 9px;
  background: var(--twa-surface);
  color: #13164b;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  padding: 0 45px;
}

.twa-control input::placeholder {
  color: #777aa5;
  opacity: 1;
}

.twa-control input:focus {
  border-color: var(--twa-purple);
  box-shadow: 0 0 0 3px rgba(103, 49, 244, 0.12);
}

.twa-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--twa-purple);
  pointer-events: none;
}

.twa-icon svg,
.twa-eye svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.twa-eye {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--twa-purple);
  transform: translateY(-50%);
}

.twa-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.twa-forgot {
  justify-self: end;
  margin-top: -1px;
  color: var(--twa-purple);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.twa-button {
  display: inline-flex;
  width: 100%;
  min-height: var(--twa-button-height);
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.twa-button-primary {
  background: linear-gradient(135deg, var(--twa-purple-2), #5c2ee7);
  color: var(--twa-white);
  box-shadow: 0 16px 38px rgba(102, 47, 232, 0.24);
}

.twa-button-secondary {
  border: 1px solid var(--twa-border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--twa-purple);
}

.twa-actions {
  display: grid;
  gap: var(--twa-actions-gap);
  margin-top: var(--twa-actions-top);
}

.twa-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin: var(--twa-divider-top) 0 var(--twa-divider-bottom);
  color: #777aa5;
  font-size: 12px;
  font-weight: 700;
}

.twa-divider::before,
.twa-divider::after {
  content: "";
  height: 1px;
  background: #e2ddf3;
}

.twa-google {
  display: flex;
  min-height: var(--twa-google-height);
  align-items: center;
  justify-content: center;
  gap: 17px;
  border: 1px solid var(--twa-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: #080b49;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.twa-google-g {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0 100%);
  color: var(--twa-white);
  font-size: 16px;
  font-weight: 900;
}

.twa-switch {
  margin: var(--twa-switch-top) 0 0;
  color: #73769e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.34;
  text-align: center;
}

.twa-switch a {
  color: var(--twa-purple);
  font-weight: 800;
  text-decoration: none;
}

.twa-message {
  margin: 16px 0 -24px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(103, 49, 244, 0.09);
  color: #14184b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.twa-message-error {
  background: rgba(220, 38, 38, 0.08);
  color: #9f1239;
}

.twa-field-error {
  color: #9f1239;
  font-size: 10px;
  font-weight: 700;
}

.twa-landscape {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--twa-landscape-height);
  pointer-events: none;
  overflow: hidden;
}

.twa-landscape img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.twa-legal-hit {
  position: absolute;
  z-index: 2;
  bottom: var(--twa-legal-bottom);
  height: 16px;
  pointer-events: auto;
}

.twa-legal-terms {
  left: 15%;
  width: 27%;
}

.twa-legal-privacy {
  left: 45%;
  width: 42%;
}

.twa-panel.twa-screen--entry {
  padding-top: var(--twa-entry-panel-top);
}

.twa-screen--entry .twa-logo {
  margin-bottom: 33px;
}

.twa-screen--entry .twa-copy h1 {
  font-size: 25px;
  line-height: 1.18;
}

.twa-screen--entry .twa-copy p {
  font-size: 17px;
  line-height: 1.25;
}

.twa-panel.twa-screen--login {
  padding-top: var(--twa-login-panel-top);
}

.twa-panel.twa-screen--registration {
  padding-top: var(--twa-registration-panel-top);
}

.twa-screen--registration .twa-logo {
  margin-bottom: 25px;
}

.twa-screen--registration .twa-copy p {
  margin-top: 13px;
}

.twa-screen--registration .twa-form {
  gap: var(--twa-registration-form-gap);
  margin-top: var(--twa-registration-form-top);
}

.twa-screen--registration .twa-switch {
  margin-top: 14px;
}

.twa-screen--registration .twa-field {
  gap: 6px;
  font-size: 12px;
}

.twa-screen--registration .twa-control input {
  height: var(--twa-registration-input-height);
}

.twa-screen--registration .twa-button {
  min-height: var(--twa-registration-button-height);
}

.twa-screen--registration .twa-divider {
  margin: 13px 0 12px;
}

.twa-screen--registration .twa-google {
  min-height: var(--twa-registration-google-height);
}

.twa-panel.twa-screen--password-recovery {
  padding-top: var(--twa-recovery-panel-top);
}

.twa-screen--password-recovery .twa-form {
  margin-top: var(--twa-recovery-form-top, 42px);
}

.twa-canvas[data-google="hidden"] .twa-panel.twa-screen--login {
  padding-top: var(--twa-login-panel-top);
}

.twa-canvas[data-google="hidden"] .twa-screen--login .twa-switch {
  margin-top: 24px;
}

.twa-canvas[data-google="hidden"] .twa-panel.twa-screen--registration {
  padding-top: var(--twa-registration-panel-top);
}

.twa-canvas[data-google="hidden"] .twa-screen--registration .twa-switch {
  margin-top: 22px;
}

@media (max-width: 360px) {
  :root {
    --twa-panel-x: 34px;
  }

  .twa-canvas {
    width: 100vw;
  }

  .twa-copy h1 {
    font-size: 20px;
  }

  .twa-copy p {
    font-size: 14px;
  }

}

@media (max-height: 819px) {
  :root {
    --twa-language-top: 34px;
    --twa-panel-x: 44px;
    --twa-logo-width: 132px;
    --twa-logo-gap: 22px;
    --twa-subtitle-gap: 10px;
    --twa-form-top: 30px;
    --twa-form-gap: 10px;
    --twa-field-gap: 6px;
    --twa-input-height: 44px;
    --twa-button-height: 46px;
    --twa-divider-top: 12px;
    --twa-divider-bottom: 12px;
    --twa-google-height: 44px;
    --twa-switch-top: 12px;
    --twa-actions-top: 50px;
    --twa-actions-gap: 10px;
    --twa-landscape-height: 185px;
    --twa-legal-bottom: 26px;
    --twa-entry-panel-top: 150px;
    --twa-login-panel-top: 104px;
    --twa-registration-panel-top: 64px;
    --twa-recovery-panel-top: 112px;
    --twa-recovery-form-top: 30px;
    --twa-registration-form-top: 20px;
    --twa-registration-form-gap: 6px;
    --twa-registration-input-height: 40px;
    --twa-registration-button-height: 42px;
    --twa-registration-google-height: 42px;
  }

  .twa-screen--entry .twa-logo {
    margin-bottom: 24px;
  }

  .twa-screen--entry .twa-copy h1 {
    font-size: 23px;
    line-height: 1.14;
  }

  .twa-screen--entry .twa-copy p {
    font-size: 15px;
    line-height: 1.18;
  }

  .twa-screen--registration .twa-logo {
    margin-bottom: 18px;
  }

  .twa-screen--registration .twa-copy p {
    margin-top: 9px;
  }

  .twa-screen--registration .twa-divider {
    margin: 10px 0 10px;
  }

  .twa-screen--registration .twa-switch {
    margin-top: 10px;
  }

  .twa-canvas[data-google="hidden"] .twa-screen--login .twa-switch {
    margin-top: 16px;
  }

  .twa-canvas[data-google="hidden"] .twa-screen--registration .twa-switch {
    margin-top: 14px;
  }
}

@media (max-height: 699px) {
  :root {
    --twa-language-top: 16px;
    --twa-panel-x: 34px;
    --twa-logo-width: 112px;
    --twa-logo-gap: 12px;
    --twa-title-size: 18px;
    --twa-title-line: 1.05;
    --twa-subtitle-size: 12px;
    --twa-subtitle-line: 1.08;
    --twa-subtitle-gap: 7px;
    --twa-form-top: 16px;
    --twa-form-gap: 6px;
    --twa-field-gap: 4px;
    --twa-input-height: 40px;
    --twa-button-height: 42px;
    --twa-divider-top: 8px;
    --twa-divider-bottom: 8px;
    --twa-google-height: 40px;
    --twa-switch-top: 7px;
    --twa-actions-top: 34px;
    --twa-actions-gap: 8px;
    --twa-landscape-height: 138px;
    --twa-legal-bottom: 16px;
    --twa-entry-panel-top: 92px;
    --twa-login-panel-top: 62px;
    --twa-registration-panel-top: 34px;
    --twa-recovery-panel-top: 70px;
    --twa-recovery-form-top: 16px;
    --twa-registration-form-top: 12px;
    --twa-registration-form-gap: 4px;
    --twa-registration-input-height: 40px;
    --twa-registration-button-height: 40px;
    --twa-registration-google-height: 40px;
  }

  .twa-language {
    height: 28px;
  }

  .twa-copy h1 {
    font-size: var(--twa-title-size);
  }

  .twa-copy p {
    font-size: var(--twa-subtitle-size);
  }

  .twa-field {
    font-size: 11px;
  }

  .twa-control input {
    font-size: 11px;
    padding: 0 40px;
  }

  .twa-button {
    font-size: 14px;
  }

  .twa-google {
    gap: 12px;
    font-size: 13px;
  }

  .twa-google-g {
    width: 19px;
    height: 19px;
    font-size: 14px;
  }

  .twa-switch {
    font-size: 12px;
    line-height: 1.2;
  }

  .twa-screen--entry .twa-logo {
    margin-bottom: 14px;
  }

  .twa-screen--entry .twa-copy h1 {
    font-size: 21px;
    line-height: 1.1;
  }

  .twa-screen--entry .twa-copy p {
    font-size: 13px;
    line-height: 1.14;
  }

  .twa-screen--registration .twa-logo {
    margin-bottom: 12px;
  }

  .twa-screen--registration .twa-copy p {
    margin-top: 6px;
  }

  .twa-screen--registration .twa-field {
    gap: 3px;
    font-size: 11px;
  }

  .twa-screen--registration .twa-divider {
    margin: 7px 0;
  }

  .twa-screen--registration .twa-switch {
    margin-top: 7px;
  }

  .twa-canvas[data-google="hidden"] .twa-screen--login .twa-switch {
    margin-top: 10px;
  }

  .twa-canvas[data-google="hidden"] .twa-screen--registration .twa-switch {
    margin-top: 9px;
  }
}

@media (min-width: 431px) {
  .twa-canvas {
    box-shadow: 0 24px 80px rgba(52, 24, 132, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }
}
