/* App splash — centered on screen */
body:has(#ppAppSplash:not(.is-hidden)) {
  overflow: hidden;
}

.pp-app-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30, 136, 229, 0.35), transparent 55%),
    linear-gradient(165deg, #0d47a1 0%, #1565c0 48%, #0b1f3a 100%),
    url('../images/brand/luayver-pattern-dots.svg') 0 0 / 48px 48px repeat,
    url('../images/brand/luayver-pattern-water.svg') 0 100% / 240px 80px repeat-x;
  transition: none;
}

.pp-app-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pp-app-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  max-width: min(92vw, 320px);
  animation: none;
}

.pp-app-splash__logo {
  animation: none;
}

.pp-app-splash__logo img {
  border-radius: 22%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pp-app-splash__brand,
.pp-app-splash__sub {
  animation: none;
}

.pp-app-splash.is-hidden .pp-app-splash__inner {
  animation: none;
}

@keyframes ppSplashToCenter {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ppSplashFromLeft {
  from {
    opacity: 0;
    transform: translateX(-28%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ppSplashFromRight {
  from {
    opacity: 0;
    transform: translateX(28%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ppSplashExitCenter {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

.pp-app-splash__logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.pp-app-splash__logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.pp-app-splash__brand {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.pp-app-splash__sub {
  margin: -0.35rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.pp-app-splash__spinner {
  width: 40px;
  height: 40px;
  margin-top: 0.25rem;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffeb3b;
  border-radius: 50%;
  animation: ppSplashSpin 0.75s linear infinite;
}

.pp-app-splash__text {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

@keyframes ppSplashSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pp-app-splash__inner,
  .pp-app-splash__logo,
  .pp-app-splash__brand,
  .pp-app-splash__sub {
    animation: none !important;
  }

  .pp-app-splash__spinner {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.7);
  }
}
