html:has(.boot-screen),body:has(.boot-screen) { margin: 0; background: #f6f6f4; color-scheme: light; }
.boot-screen {
  --boot-canvas: #f6f6f4; --boot-ink: #202020; --boot-red: #b51f24; --boot-rose: #fceaea;
  --boot-secondary: #545454; --boot-control-edge: #777774;
  box-sizing: border-box; display: grid; min-block-size: 100vh; min-block-size: 100svh;
  place-content: center; padding: 24px; text-align: center;
  background: var(--boot-canvas); color: var(--boot-ink);
}
.boot-content { display: grid; justify-items: center; gap: 8px; max-inline-size: 100%; }
.boot-hardware { width: min(220px,60vw); height: auto; display: block; }
.boot-spin { transform-box: fill-box; transform-origin: center; animation: boot-rotate 2.5s linear infinite; }
.boot-spin-lag { animation-delay: -.41s; }
.boot-wordmark { margin: 0; font: 700 clamp(26px,5vw,34px)/1.2 "Segoe UI",Arial,sans-serif; }
.boot-wordmark img { display: block; width: min(190px,62vw); height: auto; aspect-ratio: 580 / 135; }
.boot-status { display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  margin: 4px 0 0; color: var(--boot-secondary); font: 400 16px/1.6 Vazirmatn,Tahoma,sans-serif; }
.boot-led { width: 7px; height: 7px; border-radius: 50%; background: var(--boot-red); }
#boot-recovery { visibility: hidden; display: grid; justify-items: center; gap: 8px;
  /* A delayed visibility change also works when the JS modules fail to download. */
  animation: boot-recovery-ready 0s step-end 10s forwards !important; }
#boot-slow, .boot-nojs { margin: 6px 0 0; color: var(--boot-secondary); font: 400 14px/1.7 Vazirmatn,Tahoma,sans-serif; }
#boot-retry { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; min-height: 44px; color: var(--boot-red); background: var(--boot-rose); text-decoration: none;
  border: 1px solid var(--boot-control-edge); border-radius: 10px; font: inherit; cursor: pointer; }
.boot-content:has(.boot-nojs) .boot-status, .boot-content:has(.boot-nojs) #boot-slow { display: none; }
.boot-content:has(.boot-nojs) .boot-spin { animation: none; }
#boot-retry:focus-visible { outline: 3px solid var(--boot-red); outline-offset: 3px; }
@keyframes boot-recovery-ready { to { visibility: visible; } }
@keyframes boot-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-spin { animation: none; } }
