/* The launch curtain of the native app, before Flutter has started: the same
   page background (AppTheme: ivory, near-black) and the mark. */
:root {
  --tyche-splash-background: #f1ebdd;
  --tyche-splash-ink: #5e5e56;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tyche-splash-background: #11110f;
    --tyche-splash-ink: #b8b8ae;
  }
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--tyche-splash-background);
}

#tyche-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--tyche-splash-background);
  transition: opacity 220ms ease-out;
}

#tyche-splash.tyche-splash-gone {
  opacity: 0;
  pointer-events: none;
}

.tyche-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--tyche-splash-ink);
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.6;
  animation: tyche-spin 0.9s linear infinite;
}

@keyframes tyche-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tyche-spinner {
    animation-duration: 3s;
  }
}

/* Its padding is the size of the notch, the status bar of an app added to the
   home screen and the home indicator; read by the app, never seen. */
#tyche-safe-area {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
