:root {
  color-scheme: light dark;
  background: #f3f5f9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { background: #0c0f15; }
  :root:not([data-theme]) #app-boot { background: #0c0f15; --app-boot-accent: #a9bcff; --app-boot-track: #505f86; --app-boot-gap: #36415c; }
}

:root[data-theme='light'] { color-scheme: light; background: #f3f5f9; }
:root[data-theme='dark'] { color-scheme: dark; background: #0c0f15; }

html,
body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  background: inherit;
}

#app-boot {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #f3f5f9;
  opacity: 0;
  visibility: hidden;
  animation: app-boot-in 140ms cubic-bezier(.05, .7, .1, 1) 130ms forwards;
}

:root[data-theme='dark'] #app-boot { background: #0c0f15; --app-boot-accent: #a9bcff; --app-boot-track: #505f86; --app-boot-gap: #36415c; }

#app-boot[data-state='closing'] {
  pointer-events: none;
  visibility: visible;
  animation: app-boot-out 180ms cubic-bezier(.4, 0, 1, 1) forwards;
}

.app-boot-mark { display: block; inline-size: 46px; block-size: 46px; }

.app-boot-spinner {
  inline-size: 24px;
  block-size: 24px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, var(--app-boot-gap, transparent) 0deg, var(--app-boot-track, rgb(47 91 234 / 18%)) 70deg, var(--app-boot-accent, #2f5bea) 330deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: app-boot-spin 900ms linear infinite;
}

@keyframes app-boot-in { from { visibility: visible; } to { opacity: 1; visibility: visible; } }
@keyframes app-boot-out { to { opacity: 0; } }
@keyframes app-boot-spin { to { transform: rotate(1turn); } }
@keyframes app-boot-breathe { 50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
  #app-boot { animation-duration: .01ms; animation-delay: 0ms; }
  #app-boot .app-boot-spinner { animation: app-boot-breathe 2s ease-in-out infinite !important; }
  #app-boot[data-state='closing'] { animation-duration: 120ms; }
}
