html.pwa-launch-pending,
html.pwa-launch-pending body {
    background: #F8F5ED;
}

.pwa-launch-splash {
    --pwa-launch-primary: var(--brand-primary, #1B2746);
    --pwa-launch-secondary: var(--brand-secondary, #0F172A);
    --pwa-launch-accent: var(--brand-accent, #BD9441);
    --pwa-launch-bg: var(--brand-surface-soft, #F8F5ED);
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    background:
        radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--pwa-launch-accent) 14%, transparent) 0 15rem, transparent 22rem),
        linear-gradient(180deg, #FFFEFB 0%, var(--pwa-launch-bg) 100%);
    color: var(--pwa-launch-secondary);
    opacity: 1;
    pointer-events: auto;
    transition: opacity 240ms ease, transform 240ms ease;
}

html.pwa-launch-pending .pwa-launch-splash,
.pwa-launch-splash.is-visible {
    display: flex;
}

body.pwa-launch-lock {
    overflow: hidden;
}

.pwa-launch-splash.is-hiding {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.01);
}

.pwa-launch-splash__content {
    width: min(82vw, 320px);
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.pwa-launch-splash__logo {
    width: clamp(92px, 26vw, 132px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--pwa-launch-primary) 12%, #FFFFFF);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 24px 56px color-mix(in srgb, var(--pwa-launch-secondary) 16%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    overflow: hidden;
}

.pwa-launch-splash__logo img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 12px 22px color-mix(in srgb, var(--pwa-launch-secondary) 18%, transparent));
    animation: pwa-launch-breathe 1.8s ease-in-out infinite;
}

.pwa-launch-splash__name {
    width: 100%;
    margin: 2px 0 0;
    color: var(--pwa-launch-secondary);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 850;
    line-height: 1.18;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.pwa-launch-splash__bar {
    width: min(180px, 54vw);
    height: 4px;
    margin-top: 2px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pwa-launch-primary) 10%, #FFFFFF);
    overflow: hidden;
}

.pwa-launch-splash__bar span {
    display: block;
    width: 46%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--pwa-launch-primary), var(--pwa-launch-accent), transparent);
    transform: translateX(-105%);
    animation: pwa-launch-progress 1.1s ease-in-out infinite;
}

@keyframes pwa-launch-breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.965);
    }
}

@keyframes pwa-launch-progress {
    0% {
        transform: translateX(-105%);
    }
    100% {
        transform: translateX(225%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-launch-splash,
    .pwa-launch-splash__logo img,
    .pwa-launch-splash__bar span {
        animation: none !important;
        transition-duration: 1ms !important;
    }
}
