:root {
  --swex-loader-bg: #ffffff;
  --swex-loader-pink: #fba8c5;
  --swex-loader-wordmark: #767179;
}

html,
body {
  background: var(--swex-loader-bg);
}

.swex-boot {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--swex-loader-bg);
  color: var(--swex-loader-wordmark);
  pointer-events: none;
  isolation: isolate;
}

.swex-boot-shell {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 430px);
  min-height: 100dvh;
  min-height: var(--tg-viewport-height, 100dvh);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding:
    calc(24px + var(--safe-top, 0px))
    24px
    calc(28px + var(--safe-bottom, 0px));
}

.swex-boot-mark {
  width: clamp(136px, 38vw, 176px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.swex-boot-fallback,
.swex-boot-animation {
  grid-area: 1 / 1;
}

.swex-boot-fallback {
  width: 74%;
  height: 74%;
  color: var(--swex-loader-pink);
  opacity: 1;
  animation: swex-loader-fallback-turn 1.55s linear infinite;
  transition: opacity 0.18s ease;
}

.swex-boot-fallback circle {
  fill: currentColor;
}

.swex-boot-animation {
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.28s ease,
    transform 0.5s cubic-bezier(0.2, 0.82, 0.2, 1);
}

.swex-boot-animation.is-ready {
  opacity: 1;
  transform: none;
}

.swex-boot-logo-ready .swex-boot-fallback {
  opacity: 0;
}

.swex-boot-animation svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
}

/* The supplied TGS contains only animated outline strokes. */
.swex-boot-animation svg path {
  stroke: var(--swex-loader-pink) !important;
}

.swex-boot-wordmark {
  position: absolute;
  left: 50%;
  bottom: calc(32px + var(--safe-bottom, 0px));
  padding-left: 0.58em;
  color: var(--swex-loader-wordmark);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 520;
  line-height: 1;
  letter-spacing: 0.58em;
  text-transform: lowercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 5px);
  animation: swex-loader-wordmark-in 0.5s 0.12s ease-out forwards;
}

.swex-boot--leaving {
  opacity: 0;
  transition: opacity 0.28s ease;
}

/* The React bundle briefly mounts its legacy loader. It stays behind the
   boot layer until real application content is ready. */
.launch-screen {
  background: #fff !important;
}

@keyframes swex-loader-wordmark-in {
  to {
    opacity: 0.66;
    transform: translate(-50%, 0);
  }
}

@keyframes swex-loader-fallback-turn {
  to {
    transform: rotate(360deg);
  }
}

@media (max-height: 620px) {
  .swex-boot-mark {
    width: 126px;
  }

  .swex-boot-wordmark {
    bottom: calc(22px + var(--safe-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .swex-boot-animation,
  .swex-boot-fallback,
  .swex-boot-wordmark {
    transition: none;
    animation-duration: 0.01ms;
  }
}
