.app-boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 42%, #f8fafc 100%);
  color: #0f172a;
  font-size: 14px;
  transition: opacity .28s ease, visibility .28s ease;
}
.app-boot.hidden { display: none; }
.app-boot.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Flowee branded splash — no loading text */
.flowee-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: flowee-splash-in .55s ease both;
}
.flowee-splash-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .12);
  object-fit: cover;
  background: #fff;
}
.flowee-splash-brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}
@keyframes flowee-splash-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Legacy spinner (errors / fallback only) */
.app-boot-spinner {
  width: 20px; height: 20px; border: 2px solid #e5e7eb;
  border-top-color: #64748b; border-radius: 50%;
  animation: app-spin .7s linear infinite;
}
@keyframes app-spin { to { transform: rotate(360deg); } }

.app-root { min-height: 100vh; }
.app-root.hidden { display: none; }
/* Keep root under splash so restore can mount silently */
.app-root.under-splash {
  visibility: hidden;
  pointer-events: none;
}
.app-page { display: none; min-height: 100vh; }
.app-page.active { display: block; }
.app-error {
  max-width: 400px; margin: 40px auto; padding: 20px;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px;
  color: #b91c1c; font-size: 14px; text-align: center;
}

@media (prefers-color-scheme: dark) {
  .app-boot {
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #f8fafc;
  }
  .flowee-splash-brand { color: #f8fafc; }
}
