#splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
  overflow: auto;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  color: #f5efff;
  background:
    radial-gradient(ellipse at 50% 42%, #47266c55, transparent 45%),
    radial-gradient(ellipse at 25% 80%, #2563eb12, transparent 45%),
    #110e1b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  transition: opacity 280ms ease, visibility 0s linear 280ms;
}

#splash.is-ready {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  width: min(100%, 420px);
  margin: auto 0;
  padding: 28px 0;
}

.splash-scene {
  position: relative;
  width: 300px;
  height: 290px;
  max-width: 100%;
  margin: 0 auto 24px;
  perspective: 900px;
  transform-style: preserve-3d;
}

.splash-tile {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 210px;
  height: 210px;
  margin-left: -105px;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-16deg) rotateZ(-3deg);
  animation: splash-float 5s ease-in-out infinite;
}

.splash-tile-face,
.splash-tile-depth {
  position: absolute;
  inset: 0;
  border: 1px solid #d9b6ff55;
  border-radius: 42px;
}

.splash-tile-face {
  background: linear-gradient(145deg, #a875dd30, #291d4255 60%, #638bff25);
  box-shadow: inset 1px 1px 0 #ffffff35, inset -1px -1px 0 #ffffff0d;
  transform: translateZ(8px);
}

.splash-tile-depth {
  background: linear-gradient(135deg, #74409f, #21132f 55%, #353e78);
  box-shadow: 0 24px 45px #00000066, 0 0 48px #b36bff20;
  transform: translateZ(-6px) translateY(8px);
}

.splash-logo {
  position: absolute;
  inset: 5px;
  width: 200px;
  height: 200px;
  object-fit: contain;
  transform: translateZ(30px);
  backface-visibility: hidden;
}

.splash-highlight {
  position: absolute;
  top: 0;
  left: 35px;
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f0ceff, transparent);
  box-shadow: 0 0 12px #d89aff;
  transform: translateZ(10px);
}

.splash-floor {
  position: absolute;
  inset: auto 30px 0;
  height: 90px;
  border: 1px solid #bc8dff25;
  border-radius: 50%;
  background: radial-gradient(ellipse, #ba6bff30, #8051bd0c 60%, transparent 70%);
  box-shadow: 0 0 50px #9058e012;
  transform: rotateX(65deg);
  animation: splash-floor-glow 5s ease-in-out infinite;
}

.splash-orbit {
  position: absolute;
  inset: 8px -8px;
  border: 1px solid #cf9bff30;
  border-radius: 50%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.splash-orbit-back {
  transform: rotateX(68deg) rotateY(-14deg) rotateZ(-25deg);
  animation: splash-orbit-back 12s linear infinite;
}

.splash-orbit-front {
  inset: 24px 0;
  border-color: #8fb8ff25;
  transform: rotateX(68deg) rotateY(24deg) rotateZ(35deg);
  animation: splash-orbit-front 10s linear infinite;
}

.splash-orbit span {
  position: absolute;
  top: 13%;
  left: 13%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e3baff;
  box-shadow: 0 0 12px #ce8aff, 0 0 24px #ce8aff66;
}

.splash-orbit-front span {
  background: #a8ccff;
  box-shadow: 0 0 12px #7aaaff;
}

.splash-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d9b6ff;
  box-shadow: 0 0 14px #c792ff;
  animation: splash-spark 3.5s ease-in-out infinite;
}

.splash-spark-one { top: 38px; right: 8px; }
.splash-spark-two { bottom: 66px; left: 8px; animation-delay: -1.75s; }

.splash-eyebrow {
  margin: 0 0 14px;
  color: #d4b6f3;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.splash-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #bab0ca;
  font-size: 14px;
  line-height: 1.6;
}

.splash-dots { display: inline-flex; gap: 5px; }
.splash-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d1a5ff;
  animation: splash-dot 1.4s ease-in-out infinite;
}
.splash-dots i:nth-child(2) { animation-delay: 160ms; }
.splash-dots i:nth-child(3) { animation-delay: 320ms; }

.splash-credit {
  flex: 0 0 auto;
  margin: 0;
  color: #a79ab8;
  font-size: 12px;
  line-height: 1.8;
}
.splash-credit strong {
  margin-left: 4px;
  color: #e6d7f7;
  font-weight: 600;
  white-space: nowrap;
}

.splash-fallback {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #c4a1ec33;
  border-radius: 16px;
  background: #251b35;
  font-size: 13px;
  line-height: 1.6;
}
.splash-fallback[hidden] { display: none; }
.splash-fallback p { margin: 0 0 10px; }
#splash-slow-title { font-weight: 600; }
#splash-slow-message { color: #c1b3d1; }
.splash-fallback .splash-startup-details {
  margin: 12px 0 0;
  color: #c1b3d1;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.splash-fallback button {
  margin-top: 4px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: #d6bbfb;
  color: #251536;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.splash-fallback button:focus-visible { outline: 2px solid #ffffff; outline-offset: 4px; }
.splash-fallback button:disabled { opacity: 0.6; cursor: wait; }
.splash-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes splash-float {
  0%, 100% { transform: translateY(0) rotateX(12deg) rotateY(-16deg) rotateZ(-3deg); }
  50% { transform: translateY(-14px) rotateX(5deg) rotateY(12deg) rotateZ(2deg); }
}
@keyframes splash-floor-glow {
  0%, 100% { opacity: 0.8; transform: rotateX(65deg) scale(1); }
  50% { opacity: 0.4; transform: rotateX(65deg) scale(0.88); }
}
@keyframes splash-orbit-back {
  from { transform: rotateX(68deg) rotateY(-14deg) rotateZ(-25deg); }
  to { transform: rotateX(68deg) rotateY(-14deg) rotateZ(335deg); }
}
@keyframes splash-orbit-front {
  from { transform: rotateX(68deg) rotateY(24deg) rotateZ(35deg); }
  to { transform: rotateX(68deg) rotateY(24deg) rotateZ(-325deg); }
}
@keyframes splash-spark {
  0%, 100% { opacity: 0.3; transform: translateY(4px); }
  50% { opacity: 1; transform: translateY(-7px); }
}
@keyframes splash-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (max-height: 600px) {
  .splash-content { padding: 12px 0 24px; }
  .splash-scene { height: 240px; margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #splash { transition: none; }
  #splash *, #splash *::before, #splash *::after { animation: none !important; }
  .splash-tile { transform: rotateX(5deg) rotateY(-8deg); }
}
