/* The in-page screen and the iOS launch images use this same static layout. */
:root {
  --camayo-launch-canvas: #1a191d;
  --camayo-launch-pattern: url('/images/background-pattern.webp');
  --camayo-launch-logo-filter: none;
}

@media (prefers-color-scheme: light) {
  :root {
    --camayo-launch-canvas: #f4f1f4;
    --camayo-launch-pattern: url('/images/background-pattern-light.webp');
    --camayo-launch-logo-filter: brightness(.42);
  }
}

body .camayo-launch-screen,
body.auth-auto-resume .auth-resume-splash.camayo-launch-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background-color: var(--camayo-launch-canvas);
  background-image:
    radial-gradient(circle at center, #24707b24 0, transparent min(44vw, 24rem)),
    linear-gradient(#11101312, #11101308),
    var(--camayo-launch-pattern);
  background-size: auto, auto, 318px 327px;
  background-position: 0 0;
  background-repeat: repeat;
}

body .camayo-launch-screen[hidden] { display: none; }

body .camayo-launch-screen .camayo-launch-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(9rem, 34vw, 11rem);
  height: clamp(9rem, 34vw, 11rem);
  flex: 0 0 auto;
  padding: clamp(1.35rem, 5vw, 1.75rem);
  border-radius: clamp(1.5rem, 6vw, 2.25rem);
  background: var(--camayo-launch-canvas);
  overflow: hidden;
}

body .camayo-launch-screen .camayo-launch-brand img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  filter: var(--camayo-launch-logo-filter);
  animation: none;
}

/* A cold installed launch first reports a viewport without the top inset.
   Both launch screens fill the real screen from their first frame, bounded by
   that inset like the app shell. Anything outside is painted alike. */
html:has(> body.app-starting), html:has(> body.auth-auto-resume) { background-color: var(--camayo-launch-canvas); }
@media (display-mode: standalone) and (max-width: 649.98px) {
  body .camayo-launch-screen, body.auth-auto-resume .auth-resume-splash.camayo-launch-screen {
    inset: 0 0 auto; height: 100%; height: clamp(100%, 100lvh, calc(100dvh + env(safe-area-inset-top, 0px)));
  }
}
