/* First paint uses document theme tokens, before application CSS arrives. */
:root {
  --boot-surface: var(--background, 0 0% 96%);
  --boot-ink: var(--foreground, 0 0% 12%);
  --boot-track: var(--muted, 0 0% 88%);
  --boot-accent: var(--foreground, 0 0% 25%);
}
#app-splash, .client-loading-surface {
  background: hsl(var(--boot-surface)) !important;
  color: hsl(var(--boot-ink));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
#app-splash { z-index: 70000 !important; transition: none !important; }
#app-splash > :not(.client-boot-status):not(.client-boot-error) { display: none !important; }
.client-boot-status {
  width: 176px; max-width: calc(100vw - 48px);
  display: flex; flex-direction: column; gap: 16px;
  color: hsl(var(--boot-ink)); animation: none;
  font: 500 13px/1.5 -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0; text-align: center;
}
#app-splash > .client-boot-status { animation: none !important; }
.client-loading-surface { flex: 1; width: 100%; }
.client-boot-progress {
  appearance: none; width: 100%; height: 3px; overflow: hidden;
  background: hsl(var(--boot-track)); border: 0; border-radius: 2px;
}
.client-boot-progress::before {
  content: ''; display: block; width: 35%; height: 100%;
  background: hsl(var(--boot-accent));
  animation: clientBootSlide 1.2s ease-in-out infinite;
}
@keyframes clientBootSlide { from { transform: translateX(-100%); } to { transform: translateX(286%); } }
.client-boot-error { max-width: 280px; margin: 12px 24px; text-align: center; font: 14px/1.6 -apple-system, BlinkMacSystemFont, sans-serif; animation: none !important; }
#app-splash a.client-boot-error { color: hsl(var(--boot-ink)); text-decoration: underline; padding: 12px; }
@media (prefers-reduced-motion: reduce) { .client-boot-progress::before { animation: none; } }