#boot-screen, #boot-status {
  --boot-bg: #101312;
  --boot-fg: #f3f2eb;
  --boot-text: #b3b5af;
  --boot-line: #ffffff19;
  --boot-gold: #e7ba56;
  --boot-glow: #b9872e24;
  --boot-error: #ffa99b;
  font-family: var(--font-ui, system-ui), sans-serif;
}
[data-theme="light"] :is(#boot-screen, #boot-status) {
  --boot-bg: #f8f7f2;
  --boot-fg: #282822;
  --boot-text: #606359;
  --boot-line: #49463324;
  --boot-gold: #855d0b;
  --boot-glow: #e2b14c37;
  --boot-error: #a02f21;
}
#boot-screen[hidden], #boot-status[hidden], #boot-retry[hidden] { display: none; }
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: auto;
  overscroll-behavior: contain;
  padding: max(22px, env(safe-area-inset-top)) 24px max(22px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: var(--boot-bg);
  color: var(--boot-fg);
}
#boot-card {
  width: min(100%, 400px);
  min-width: 0;
  margin: auto;
  text-align: center;
}
.boot-emblem {
  position: relative;
  isolation: isolate;
  height: clamp(100px, 24vh, 220px);
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
}
.boot-emblem::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -32% 0;
  background: radial-gradient(ellipse closest-side, var(--boot-glow), transparent);
}
.boot-bird {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}
#boot-title { margin: 0; font-size: clamp(23px, 5vw, 32px); font-weight: 600; line-height: 1.07; letter-spacing: -.045em; color: var(--boot-fg); }
#boot-description { margin: 8px 0 0; color: var(--boot-text); font-size: 14px; }
#boot-stages {
  list-style: none;
  display: grid;
  gap: 6px;
  margin: clamp(24px, 5vh, 46px) auto 12px;
  padding: 0;
  text-align: left;
}
#boot-stages li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: color-mix(in srgb, var(--boot-fg) 3%, var(--boot-bg));
  border: 1px solid var(--boot-line);
  border-radius: 10px;
  color: var(--boot-text);
  font-size: 13px;
  line-height: 1.4;
}
#boot-stages li::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
#boot-stages [data-state="loading"] { color: var(--boot-fg); border-color: var(--boot-gold); background: color-mix(in srgb, var(--boot-gold) 9%, var(--boot-bg)); }
#boot-stages [data-state="loading"]::before {
  background: var(--boot-gold);
  border-color: var(--boot-gold);
  box-shadow: 0 0 0 3px var(--boot-glow), 0 0 11px var(--boot-gold);
}
#boot-stages [data-state="loading"] small { color: var(--boot-gold); }
#boot-stages [data-state="ready"]::before { content: "✓"; width: auto; height: auto; border: 0; color: var(--boot-gold); font-weight: bold; }
#boot-stages small { font-size: 11px; }
#boot-stages [data-state="error"], #boot-error { color: var(--boot-error); }
#boot-error { margin: 12px 0; font-size: 13px; overflow-wrap: anywhere; }
#boot-error:empty { display: none; }
#boot-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
#boot-actions button, #boot-status {
  min-height: 42px;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--boot-text);
  font-size: 12px;
  cursor: pointer;
}
#boot-actions #boot-continue { background: #f8ca42; color: #1b190f; font-weight: 650; padding-inline: 22px; }
#boot-actions #boot-continue:hover { background: #ffda66; }
#boot-actions button:hover { color: var(--boot-fg); }
#boot-actions button:focus-visible, #boot-status:focus-visible { outline: 2px solid var(--boot-gold); outline-offset: 1px; }
#boot-status {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 25000;
  max-width: calc(100vw - 24px);
  background: var(--boot-bg);
  border: 1px solid var(--boot-line);
  color: var(--boot-fg);
  box-shadow: 0 4px 15px #0002;
}
@media (max-height: 540px) {
  .boot-emblem { height: 84px; }
  #boot-stages { margin-top: 16px; }
  #boot-stages li { padding-block: 6px; }
}
