.app-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--splash-bg, #ffffff);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-splash--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash__blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-splash__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.38;
  animation: splash-blob 2.8s ease-in-out infinite alternate;
}

.app-splash__blob--a {
  width: 240px;
  height: 240px;
  top: 10%;
  left: -14%;
  background: #5ac8fa;
  animation-delay: 0s;
}

.app-splash__blob--b {
  width: 200px;
  height: 200px;
  bottom: 16%;
  right: -10%;
  background: #bf5af2;
  animation-delay: 0.35s;
}

.app-splash__blob--c {
  width: 160px;
  height: 160px;
  top: 40%;
  right: 18%;
  background: #007aff;
  animation-delay: 0.7s;
}

html[data-surface="app"] .app-splash__blobs {
  display: none;
}

html[data-theme="dark"] .app-splash {
  --splash-bg: #000000;
}

html[data-theme="dark"] .app-splash__blob {
  opacity: 0.24;
}

html[data-theme="dark"] .app-splash__blob--a {
  background: #32ade6;
}

html[data-theme="dark"] .app-splash__blob--b {
  background: #bf5af2;
}

html[data-theme="dark"] .app-splash__blob--c {
  background: #0a84ff;
}

.app-splash__mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splash-mark-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-splash__mark img {
  display: block;
  height: 88px;
  width: auto;
  max-width: min(72vw, 320px);
}

.app-splash__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.04em;
  color: var(--splash-text, #1d1d1e);
  animation: splash-title-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

html[data-theme="dark"] .app-splash {
  --splash-text: #f5f5f7;
}

.app-splash__pulse {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #5ac8fa, transparent);
  background-size: 200% 100%;
  animation: splash-pulse 1.1s ease-in-out infinite;
}

@keyframes splash-blob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(12px, -16px) scale(1.08);
  }
}

@keyframes splash-mark-in {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splash-title-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-pulse {
  0% {
    background-position: 100% 0;
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    background-position: -100% 0;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__blob,
  .app-splash__mark,
  .app-splash__title,
  .app-splash__pulse {
    animation: none;
  }

  .app-splash__mark,
  .app-splash__title {
    opacity: 1;
    transform: none;
  }
}
