/* Shared by the pre-module shell and React. No JS or portal is needed to paint. */
#boot-shell {
  visibility: visible;
  animation: none;
  background: #333;
  z-index: 10000;
}
.working-window-overlay {
  visibility: hidden;
  animation: working-reveal 0s 1500ms forwards;
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
  background: rgb(0 0 0 / .8);
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  line-height: 1.5;
}
.working-window-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 448px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid hsl(var(--border, 210 16% 80%));
  border-radius: 8px;
  background: hsl(var(--background, 212 22% 91%));
  color: hsl(var(--foreground, 215 30% 12%));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}
.working-window-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 16px 8px;
  text-align: center;
  color: hsl(var(--foreground, 215 30% 12%));
}
.working-window-graphic { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.working-window-halo, .working-window-ring { position: absolute; inset: 0; border-radius: 50%; }
.working-window-halo { background: hsl(var(--primary, 207 78% 46%) / .1); filter: blur(24px); }
.working-window-ring { border: 4px solid hsl(var(--primary, 207 78% 46%) / .15); border-top-color: hsl(var(--primary, 207 78% 46%)); animation: working-spin 1s linear infinite; }
.working-window-ring-inner { inset: 12px; border: 2px dashed rgb(96 165 250 / .4); animation: working-spin 4s linear infinite reverse; }
.working-window-image { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 3px rgb(0 0 0 / .15)); animation: working-float 6s ease-in-out infinite; }
.working-window-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 28px; }
.working-window-description { max-width: 320px; margin: 6px auto 0; font-size: 14px; color: hsl(var(--muted-foreground, 215 20% 18%)); }
.working-window-step { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 20px; font-size: 12px; font-weight: 500; color: hsl(var(--primary, 207 78% 46%)); }
.working-window-step-spinner { width: 14px; height: 14px; flex-shrink: 0; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: working-spin 1s linear infinite; }
.working-window-track { height: 6px; width: 100%; max-width: 320px; overflow: hidden; border-radius: 999px; background: hsl(var(--muted, 210 16% 87%)); }
.working-window-sweep { height: 100%; width: 33.333%; border-radius: inherit; background: linear-gradient(to right, hsl(var(--primary, 207 78% 46%) / .4), hsl(var(--primary, 207 78% 46%)), hsl(var(--primary, 207 78% 46%) / .4)); animation: working-scan 1.6s ease-in-out infinite; }
.working-window-note { margin: 0; font-size: 11px; color: hsl(var(--muted-foreground, 215 20% 18%)); }
.working-window-retry { border: 0; border-radius: 6px; padding: 8px 20px; background: hsl(var(--primary, 207 78% 46%)); color: hsl(var(--primary-foreground, 0 0% 100%)); font: inherit; cursor: pointer; }
.working-window-retry:focus-visible { outline: 2px solid hsl(var(--primary, 207 78% 46%)); outline-offset: 3px; }
.working-window-retry[hidden] { display: none; }
/* Theme fallbacks are scoped to the HTML shell, never override app settings. */
.dark #boot-shell { --background: 215 25% 8%; --foreground: 0 0% 100%; --border: 215 18% 18%; --muted: 215 18% 15%; --muted-foreground: 210 10% 55%; --primary: 207 75% 55%; }
@keyframes working-reveal { to { visibility: visible; } }
@keyframes working-spin { to { transform: rotate(360deg); } }
@keyframes working-float {
  0%, 100% { transform: translate(-50%, -50%); }
  33% { transform: translate(calc(-50% + 15px), calc(-50% - 20px)) scale(1.05); }
  66% { transform: translate(calc(-50% - 10px), calc(-50% + 10px)) scale(.95); }
}
@keyframes working-scan { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (prefers-reduced-motion: reduce) {
  .working-window-body *, .working-window-step-spinner { animation: none !important; }
  .working-window-image { transform: translate(-50%, -50%); }
  .working-window-sweep { transform: translateX(100%); }
}