/* Static splash shown from the first byte of index.html until Flutter paints its first frame
   (firebase_sdk.js removes #splash on `flutter-first-frame`). Same-origin file, no inline style
   (no inline style; style-src would allow it, the splash does not need it). Colours are the design tokens (app/lib/theme/tokens.g.dart: surface,
   primary, onSurface); test/web_splash_css_test.dart fails when they drift apart.
   Dark follows the OS; firebase_sdk.js sets html[data-theme] when the user picked a theme in
   Settings (the app stores it in localStorage, key flutter.settings.theme). */
:root {
  color-scheme: light dark;
  --splash-surface: #FBFAF7;
  --splash-primary: #2F5D50;
  --splash-on-surface: #1B1C1A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --splash-surface: #121412;
    --splash-primary: #8FC9B6;
    --splash-on-surface: #E3E3DE;
  }
}
:root[data-theme="dark"] {
  --splash-surface: #121412;
  --splash-primary: #8FC9B6;
  --splash-on-surface: #E3E3DE;
}
html, body {
  margin: 0;
  background: var(--splash-surface);
}
#splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--splash-surface);
  color: var(--splash-on-surface);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#splash .splash-name {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--splash-primary);
}
#splash .splash-spinner {
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  border: 3px solid var(--splash-primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: splash-spin 0.9s linear infinite;
}
@keyframes splash-spin {
  to { transform: rotate(360deg); }
}
/* Reduced motion: no spinning, a calm pulse-free static ring instead. */
@media (prefers-reduced-motion: reduce) {
  #splash .splash-spinner {
    animation: none;
    border-right-color: var(--splash-primary);
    opacity: 0.5;
  }
}
