#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f0f5ef;
  background:
    radial-gradient(circle at 50% 44%, #124449 0, #09282f 32%, #06171f 68%, #031017 100%);
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity 0.48s ease, visibility 0.48s ease;
}
#boot-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(#8ae6da55 1px, transparent 1px),
    linear-gradient(90deg, #8ae6da55 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 8%, transparent 72%);
  pointer-events: none;
}
#boot-screen.boot-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#boot-screen[hidden] { display: none; }
.boot-shell {
  position: relative;
  width: min(420px, calc(100vw - 42px));
  padding: 24px 0 58px;
}
.boot-logo-wrap {
  width: 132px;
  height: 132px;
  margin: 0 auto 26px;
  border-radius: 29px;
  box-shadow: 0 0 48px #5bd8d146, 0 20px 50px #0008;
  animation: boot-float 2.8s ease-in-out infinite;
}
.boot-logo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.boot-kicker {
  display: block;
  color: #c7ae78;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}
.boot-shell h1 {
  margin: 15px 0 8px;
  font-size: clamp(31px, 6vw, 43px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -1.2px;
}
.boot-shell h1 span { color: #9ce9df; }
.boot-tagline {
  margin: 0;
  color: #afc8c8;
  font-size: 14px;
}
.boot-indicator {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 34px auto 15px;
  border: 2px solid #8ee6db35;
  border-top-color: #90e8de;
  border-right-color: #d8b875;
  border-radius: 50%;
  animation: boot-spin 1.15s linear infinite;
}
.boot-indicator i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e6c585;
  transform: translate(-50%, -50%);
}
.boot-indicator i:nth-child(2) { transform: translate(10px, -50%); opacity: .6; }
.boot-indicator i:nth-child(3) { transform: translate(-14px, -50%); opacity: .6; }
.boot-track {
  width: 180px;
  height: 3px;
  margin: 0 auto 16px;
  overflow: hidden;
  border-radius: 5px;
  background: #a0d9d638;
}
.boot-track span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #74d6d4, #e9cb8a);
  box-shadow: 0 0 10px #8ce9df;
  animation: boot-progress 1.5s ease-in-out infinite;
}
#boot-state {
  min-height: 18px;
  margin: 0;
  color: #b9cecb;
  font-size: 12px;
  letter-spacing: .5px;
}
#boot-retry {
  margin: 22px auto 0;
  padding: 11px 20px;
  color: #08282a;
  background: #a9ebe1;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
#boot-retry[hidden] { display: none; }
#boot-screen.boot-failed .boot-indicator,
#boot-screen.boot-failed .boot-track { display: none; }
.boot-credit {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(27px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #9cbab7;
  font-size: 11px;
  letter-spacing: .3px;
}
.boot-credit strong { color: #e6d5ad; font-weight: 600; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-progress {
  from { transform: translateX(-105%); }
  to { transform: translateX(355%); }
}
@keyframes boot-float {
  50% { transform: translateY(-5px); box-shadow: 0 0 58px #5bd8d15c, 0 24px 52px #0008; }
}
@media (max-width: 600px) {
  .boot-logo-wrap { width: 116px; height: 116px; border-radius: 25px; }
  .boot-kicker { font-size: 9px; letter-spacing: 2px; }
  .boot-credit { flex-wrap: wrap; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-logo-wrap, .boot-indicator, .boot-track span { animation: none; }
  #boot-screen { transition-duration: .01ms; }
}
