html:not([data-portal-install-available]) .portal-install-item,
html[data-portal-install-mobile] .portal-install-desktop,
html:not([data-portal-install-mobile]) .portal-install-mobile {
    display: none !important;
}

#app-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #151b19;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.portal-launch-backdrop {
    position: absolute;
    inset: 0;
}

.portal-launch-backdrop img {
    display: block;
    width: 100%;
    height: 100%;
}

#app-loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.portal-launch-content {
    position: relative;
    display: grid;
    justify-items: center;
    padding-inline: 1rem;
    text-align: center;
}

.portal-launch-emblem {
    width: clamp(128px, 19vw, 260px);
    height: auto;
}

.portal-launch-title {
    width: clamp(192px, 32vw, 380px);
    height: auto;
    margin-block-start: clamp(14px, 2.5vw, 28px);
}

.portal-launch-progress {
    width: clamp(76px, 12vw, 128px);
    height: 4px;
    margin-block-start: clamp(26px, 4vw, 48px);
    overflow: hidden;
    border-radius: 999px;
    background: rgb(126 240 174 / 24%);
}

.portal-launch-progress::before {
    display: block;
    width: 60%;
    height: 100%;
    border-radius: inherit;
    background: #81efb3;
    content: "";
    animation: portal-launch-progress 1.35s ease-in-out infinite alternate;
}

.portal-launch-brand {
    position: absolute;
    inset-block-end: max(5.5%, calc(env(safe-area-inset-bottom) + 16px));
    width: clamp(54px, 6vw, 86px);
    height: auto;
}

@media (max-width: 600px) and (orientation: portrait) {
    .portal-launch-emblem {
        width: clamp(118px, 42vw, 164px);
    }

    .portal-launch-title {
        width: clamp(172px, 67vw, 240px);
    }
}

@keyframes portal-launch-progress {
    to { transform: translateX(66.67%); }
}

@media (prefers-reduced-motion: reduce) {
    #app-loading-screen {
        transition: none;
    }

    .portal-launch-progress::before {
        animation: none;
    }
}

#portal-install-ios {
    width: min(24rem, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 1.5rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #17201c);
}

#portal-install-ios::backdrop {
    background: rgb(10 20 15 / 58%);
}

#portal-install-ios h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

#portal-install-ios ol {
    margin: 0 0 1.25rem;
    padding-inline-start: 1.25rem;
}

#portal-install-ios li + li {
    margin-block-start: 0.4rem;
}

#portal-install-ios form {
    text-align: end;
}

#portal-install-ios button {
    min-height: 44px;
    padding-inline: 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--primary-color, #0d4870);
    color: #fff;
    font: inherit;
    cursor: pointer;
}
