html,
body {
  background: #f2f2f7;
}

html.happy-ios-pwa,
html.happy-ios-pwa body {
  background: var(--happy-ios-system-bg, #f2f2f7);
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
}

#happy-pwa-status-bar {
  position: fixed;
  z-index: 2147483646;
  top: 0;
  right: 0;
  left: 0;
  display: none;
  height: var(--happy-safe-area-top, env(safe-area-inset-top, 0px));
  background: var(--happy-ios-system-bg, #f2f2f7);
  pointer-events: none;
}

html.happy-ios #happy-pwa-status-bar {
  display: block;
}

#happy-launch-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(env(safe-area-inset-top, 0px), 20px) 24px max(env(safe-area-inset-bottom, 0px), 20px);
  color: #18171c;
  background: #f2f2f7;
  opacity: 1;
  transition: opacity 220ms ease;
  pointer-events: none;
}

#happy-launch-splash[data-state="hidden"] {
  opacity: 0;
}

.happy-launch-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: #18171c;
  box-shadow: 0 18px 42px rgb(24 23 28 / 18%), inset 0 1px 0 rgb(255 255 255 / 40%);
  font: 700 28px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
}

.happy-launch-progress {
  position: absolute;
  bottom: max(calc(env(safe-area-inset-bottom, 0px) + 42px), 42px);
  left: 50%;
  width: 96px;
  height: 3px;
  margin-left: -48px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(24 23 28 / 12%);
}

.happy-launch-progress::after {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: #18171c;
  animation: happy-launch-progress 1120ms ease-in-out infinite;
  content: "";
}

@keyframes happy-launch-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(240%); }
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] #happy-launch-splash {
  background: #090a0d;
}

html[data-theme="dark"] #happy-launch-splash {
  color: #fff;
}

html[data-theme="dark"] .happy-launch-mark {
  color: #18171c;
  background: #fff;
  box-shadow: 0 18px 42px rgb(0 0 0 / 36%), inset 0 1px 0 rgb(255 255 255 / 55%);
}

html[data-theme="dark"] .happy-launch-progress {
  background: rgb(255 255 255 / 18%);
}

html[data-theme="dark"] .happy-launch-progress::after {
  background: #fff;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]),
  html:not([data-theme]) body,
  html:not([data-theme]) #happy-launch-splash {
    background: #090a0d;
  }

  html:not([data-theme]) #happy-launch-splash {
    color: #fff;
  }

  html:not([data-theme]) .happy-launch-mark {
    color: #18171c;
    background: #fff;
    box-shadow: 0 18px 42px rgb(0 0 0 / 36%), inset 0 1px 0 rgb(255 255 255 / 55%);
  }

  html:not([data-theme]) .happy-launch-progress {
    background: rgb(255 255 255 / 18%);
  }

  html:not([data-theme]) .happy-launch-progress::after {
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  #happy-launch-splash {
    transition: none;
  }

  .happy-launch-progress::after {
    width: 100%;
    animation: none;
  }
}
