/* Keep the same round emblem in headers, admin pages, and the launch screen. */
.gamegym-emblem {
    display: block;
    border-radius: 50%;
    object-fit: contain;
}

.admin-brand-emblem {
    mix-blend-mode: normal;
}

/* First screen shown after the installed mobile app opens. */
.pwa-launch-screen {
    display: none;
}

html.pwa-launching .pwa-launch-screen {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: block;
    overflow: hidden;
    background: #01010a;
    color: #fff;
    isolation: isolate;
    opacity: 1;
    transition: opacity 320ms ease;
}

html.pwa-launch-finished .pwa-launch-screen {
    opacity: 0;
    pointer-events: none;
}

.pwa-launch-scene,
.pwa-launch-figures {
    position: absolute;
    inset: 0;
    background-image: url('/images/brand/gamegym-header-heroes-mobile.jpg');
    background-repeat: no-repeat;
}

.pwa-launch-scene {
    background-image:
        radial-gradient(ellipse at 18% 65%, rgba(132, 13, 154, .18), transparent 48%),
        radial-gradient(ellipse at 82% 65%, rgba(0, 93, 191, .18), transparent 48%);
}

.pwa-launch-figures {
    background-position: center calc(100% + 75px);
    background-size: 100% auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent calc(100% - 150vw + 75px), #000 calc(100% - 130vw + 75px), #000);
    mask-image: linear-gradient(to bottom, transparent calc(100% - 150vw + 75px), #000 calc(100% - 130vw + 75px), #000);
}

.pwa-launch-brand {
    position: absolute;
    top: max(40px, calc(env(safe-area-inset-top) + 5vh));
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(90vw, 430px);
    transform: translateX(-50%);
    text-align: center;
    text-shadow: 0 2px 20px #01010a;
}

.pwa-launch-brand img {
    display: block;
    width: min(42vw, 180px);
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 50%;
}

.pwa-launch-kicker {
    margin-top: 10px;
    font: 800 clamp(8px, 2.6vw, 12px)/1.3 system-ui, sans-serif;
    letter-spacing: .18em;
}

.pwa-launch-name {
    font: 900 clamp(32px, 10vw, 48px)/1.15 system-ui, sans-serif;
    letter-spacing: .04em;
    background: linear-gradient(90deg, #ff36e5 0%, #c878ff 47%, #14d8ff 53%, #27aaff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (max-height: 690px) {
    .pwa-launch-brand {
        top: max(20px, calc(env(safe-area-inset-top) + 2vh));
    }

    .pwa-launch-brand img {
        width: min(38vw, 145px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.pwa-launching .pwa-launch-screen {
        transition: none;
    }
}
