body.booting > :not(#boot-screen) {
  visibility: hidden !important;
}

#boot-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 78% 18%, #d3e9cb 0 10%, transparent 43%),
    linear-gradient(160deg, #e3efdc 0%, #c8e0cf 54%, #a9d0c2 100%);
  color: #245446;
}

.boot-card {
  width: min(100%, 390px);
  padding: clamp(28px, 7vw, 42px) clamp(22px, 7vw, 38px);
  border: 1px solid #ffffffb8;
  border-radius: 28px;
  background: #fffdf0ed;
  box-shadow: 0 18px 55px #244e512b, 0 5px 0 #57745316;
  text-align: center;
}

.boot-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border: 2px solid #cbd9b5;
  border-radius: 20px;
  background: #e8efd9;
  color: #38816a;
  font-size: 26px;
  font-weight: 900;
}

.boot-eyebrow {
  margin: 0;
  color: #9d9b6b;
  font-size: 10px;
  letter-spacing: .22em;
}

.boot-card h1 {
  margin: 9px 0 7px;
  color: #32694f;
  font-size: clamp(22px, 6vw, 28px);
  letter-spacing: .06em;
}

.boot-message {
  margin: 0;
  color: #718873;
  font-size: 13px;
  line-height: 1.7;
}

.boot-spinner {
  width: 30px;
  height: 30px;
  margin: 23px auto 0;
  border: 3px solid #dbe5ca;
  border-top-color: #398568;
  border-radius: 50%;
  animation: boot-spin .8s linear infinite;
}

#boot-screen[data-state="error"] .boot-spinner {
  display: none;
}

.boot-error {
  margin: 15px 0 0;
  color: #a45e42;
  font-size: 12px;
  line-height: 1.7;
}

#boot-retry {
  margin-top: 18px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: #2f835f;
  box-shadow: 0 3px 0 #1c5b43;
  color: #fffae6;
  font-weight: 800;
}

#boot-retry:focus-visible {
  outline: 3px solid #eba846;
  outline-offset: 3px;
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-spinner { animation-duration: 2.4s; }
}
