/* Shared by the first HTML paint and React's startup/loading states. */
.app-splash {
  --splash-surface: hsl(var(--background, 220 15% 98%));
  --splash-ink: hsl(var(--foreground, 220 20% 15%));
  --splash-muted: hsl(var(--muted-foreground, 220 15% 45%));
  --splash-accent: hsl(var(--primary, 174 60% 45%));
  position: fixed; inset: 0; z-index: 90; isolation: isolate;
  display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center;
  overflow: auto; background: var(--splash-surface); color: var(--splash-ink);
  padding: max(24px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: center;
}
.app-splash__art { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.app-splash__art::before, .app-splash__art::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: min(150vw, 960px); height: min(150vw, 960px); border-radius: 50%;
  border: 1px solid hsl(var(--primary, 174 60% 45%) / .09);
  inset-inline-start: 50%; top: 50%; transform: translate(-50%, -50%);
}
.app-splash__art::after { width: min(180vw, 1160px); height: min(180vw, 1160px); opacity: .55; }
.app-splash:dir(rtl) .app-splash__art::before, .app-splash:dir(rtl) .app-splash__art::after { transform: translate(50%, -50%); }
.app-splash__brand { grid-row: 2; display: flex; align-items: center; flex-direction: column; transform: translateY(-28px); }
.app-splash__wordmark { display: block; width: clamp(208px, 58vw, 288px); height: auto; }
.dark .app-splash__wordmark { filter: brightness(0) invert(1); }
.app-splash__rule { width: 28px; height: 2px; background: var(--splash-accent); margin: 28px 0 20px; border-radius: 2px; }
.app-splash__tagline { margin: 0; font-size: clamp(18px, 3vw, 21px); font-weight: 500; line-height: 1.6; letter-spacing: -.025em; }
.app-splash:lang(ar) .app-splash__tagline { letter-spacing: 0; }
.app-splash__status { grid-row: 3; align-self: end; width: min(100%, 360px); min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: end; padding-top: 40px; }
.app-splash__dots { display: flex; align-items: center; justify-content: center; gap: 6px; height: 12px; margin-bottom: 16px; }
.app-splash__dots i { width: 4px; height: 4px; background: var(--splash-accent); border-radius: 50%; animation: splash-breathe 1.6s ease-in-out infinite; }
.app-splash__dots i:nth-child(2) { animation-delay: .16s; }
.app-splash__dots i:nth-child(3) { animation-delay: .32s; }
.app-splash__message { margin: 0; color: var(--splash-muted); font-size: 14px; line-height: 1.6; }
.app-splash__message p { margin: 0; }
.app-splash__retry { display: none; min-height: 44px; align-items: center; justify-content: center; margin-top: 12px; padding: 0 20px; border: 1px solid hsl(var(--border, 220 15% 90%)); border-radius: 12px; background: var(--splash-surface); color: var(--splash-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.app-splash__retry:hover { border-color: var(--splash-accent); }
.app-splash__retry:focus-visible { outline: 2px solid var(--splash-ink); outline-offset: 4px; }
.app-splash .splash-copy--ar, .app-splash__slow, .app-splash__offline { display: none; }
.app-splash:lang(ar) .splash-copy--en { display: none; }
.app-splash:lang(ar) .splash-copy--ar { display: inline; }
.app-splash[data-state='slow'] .app-splash__loading, .app-splash[data-state='offline'] .app-splash__loading { display: none; }
.app-splash[data-state='slow'] .app-splash__slow, .app-splash[data-state='offline'] .app-splash__offline { display: block; }
.app-splash[data-state='slow'] .app-splash__retry, .app-splash[data-state='offline'] .app-splash__retry { display: inline-flex; }
.app-splash[data-state='offline'] .app-splash__dots { visibility: hidden; }
@keyframes splash-breathe { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@media (max-height: 480px) { .app-splash { padding-block: 20px; } .app-splash__brand { transform: none; } .app-splash__wordmark { width: 208px; } .app-splash__rule { margin-block: 16px 12px; } .app-splash__status { min-height: 80px; padding-top: 24px; } }
@media (prefers-reduced-motion: reduce) { .app-splash__dots i { animation: none; opacity: .65; } }
