:root {
  color-scheme: light;
  --background: oklch(0.965 0.004 260);
  --foreground: oklch(0.22 0.02 260);
  --primary: oklch(0.52 0.14 235);
  --primary-foreground: oklch(0.99 0.005 250);
  --app-canvas: var(--background);
}
:root.dark {
  color-scheme: dark;
  --background: oklch(0.18 0.01 260);
  --foreground: oklch(0.94 0.008 260);
  --primary: oklch(0.72 0.15 250);
  --primary-foreground: oklch(0.16 0.02 260);
  --app-canvas: var(--background);
}

#app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: auto;
  background-color: var(--background);
  opacity: 1;
  transition: opacity 0.56s cubic-bezier(0.33, 1, 0.68, 1);
}

#app-splash.app-splash--hidden {
  opacity: 0;
  pointer-events: none;
}

#app-splash.app-splash--hidden .app-splash__stack {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.48s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.48s cubic-bezier(0.33, 1, 0.68, 1);
}

.app-splash__stack {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 3rem 1.5rem;
  justify-items: center;
  align-items: center;
  row-gap: 0.75rem;
  width: 14rem;
  animation: app-splash-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes app-splash-enter {
  from {
    opacity: 0;
    transform: scale(0.86) translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes app-splash-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.72;
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__stack,
  .app-splash__logo,
  .app-splash__mark {
    animation: none;
  }

  #app-splash,
  #app-splash.app-splash--hidden .app-splash__stack {
    transition: none;
  }
}

.app-splash__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
  animation: app-splash-pulse 1.8s cubic-bezier(0.45, 0, 0.55, 1) 0.5s infinite;
}

.app-splash__mark {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.5rem;
  color: var(--foreground);
  text-align: center;
  white-space: nowrap;
  animation: app-splash-pulse 1.8s cubic-bezier(0.45, 0, 0.55, 1) 0.7s infinite;
}
