/* Welcome screen */
html.welcome-active,
html.welcome-active body,
body.welcome-active {
  min-height: 100dvh;
  background: #ffffff;
  overflow: hidden;
}

.auth-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
  background: #ffffff;
}

html.auth-loading .auth-loading-screen {
  display: grid;
}

html.auth-loading #welcomeScreen,
html.auth-loading .app,
html.auth-loading .bottom-nav {
  visibility: hidden;
}

.auth-loading-content {
  width: min(220px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 24px;
}

.auth-loading-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

.auth-loading-progress {
  position: relative;
  width: 160px;
  max-width: 100%;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(1, 45, 237, 0.14);
}

.auth-loading-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: var(--main);
  animation: auth-loading-progress 900ms ease-in-out infinite;
}

@keyframes auth-loading-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}

.welcome-screen {
  position: relative;
  z-index: 9999;
  width: 100%;
  min-height: 100dvh;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 0 var(--screen-x) calc(36px + env(safe-area-inset-bottom));
  background: #ffffff;
  color: var(--main);
}

.welcome-inner {
  width: 100%;
  max-width: 560px;
  min-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome-star {
  width: min(388px, calc((100vw - 48px) * 1.05));
  height: min(415px, calc((100vw - 48px) * 1.124));
  padding-top: 72px;
  margin: 0 auto 96px;
  display: block;
  object-fit: contain;
}

.welcome-copy {
  width: min(520px, calc(100vw - 48px));
  margin: 0;
  text-align: center;
}

.welcome-copy h1 {
  color: var(--main);
  font-size: 40px;
  line-height: 1.08;
  margin: 0 0 18px;
  font-weight: 700;
}

.welcome-copy p {
  color: var(--main);
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
  font-weight: 400;
}

.welcome-copy p:first-of-type {
  margin-bottom: 18px;
}

.welcome-copy p:last-of-type {
  margin-bottom: 48px;
}

.welcome-actions {
  width: 353px;
  max-width: calc(100vw - 48px);
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 167px));
  justify-content: center;
  gap: 18px;
}

.welcome-next,
.welcome-login {
  width: 167px;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0;
}

@media (max-height: 760px) {
  .welcome-star {
    width: min(300px, calc(100vw - 48px));
    height: min(322px, calc((100vw - 48px) * 1.0705));
    margin-bottom: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-loading-progress span {
    width: 100%;
    animation: none;
  }
}
