html.mobile-app-gate-active,
body.mobile-app-gate-active {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.mobile-app-gate[hidden] {
    display: none !important;
}

.mobile-app-gate {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
        max(24px, env(safe-area-inset-top))
        max(20px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-left));
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 8%, rgba(37, 99, 235, 0.22), transparent 34%),
        #070b1a;
    font-family: 'Manrope', sans-serif;
}

.mobile-app-gate.is-active {
    display: flex;
}

.mobile-app-gate__panel {
    width: min(100%, 420px);
    padding: 32px 24px 24px;
    color: #f8fbff;
    text-align: center;
    background: #111a33;
    border-radius: 16px;
    box-shadow: 0 28px 72px -24px rgba(0, 0, 0, 0.78);
}

.mobile-app-gate__logo {
    display: block;
    width: auto;
    height: 38px;
    margin: 0 auto 30px;
}

.mobile-app-gate__device {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 26px;
    color: #ffffff;
    background: #2563eb;
    border-radius: 16px;
    box-shadow: 0 14px 30px -16px rgba(37, 99, 235, 0.9);
}

.mobile-app-gate__device svg {
    width: 34px;
    height: 34px;
}

.mobile-app-gate__title {
    max-width: 12ch;
    margin: 0 auto 14px;
    color: #ffffff;
    font-size: clamp(26px, 8vw, 34px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.mobile-app-gate__description {
    max-width: 34ch;
    margin: 0 auto 28px;
    color: #c9d5ef;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    text-wrap: pretty;
}

.mobile-app-gate__store-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 14px 20px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    background: #2563eb;
    border-radius: 12px;
    box-shadow: 0 14px 30px -18px rgba(37, 99, 235, 0.95);
    transition: background-color 180ms ease-out, transform 180ms ease-out;
    -webkit-tap-highlight-color: transparent;
}

.mobile-app-gate__store-link:active {
    background: #1d4ed8;
    transform: translateY(1px);
}

.mobile-app-gate__store-link[hidden] {
    display: none !important;
}

.mobile-app-gate__store-link--primary {
    margin-bottom: 12px;
    color: #0b1220;
    background: #f8fbff;
    box-shadow: 0 14px 30px -18px rgba(248, 251, 255, 0.6);
}

.mobile-app-gate__store-link--primary:active {
    background: #d4dcef;
}

.mobile-app-gate__store-link--primary + .mobile-app-gate__store-link {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: none;
}

.mobile-app-gate__store-link--primary + .mobile-app-gate__store-link:active {
    background: rgba(148, 163, 184, 0.12);
}

.mobile-app-gate__store-link:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 4px;
}

.mobile-app-gate__store-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.mobile-app-gate__store-icon [hidden] {
    display: none !important;
}

@media (max-height: 560px) and (orientation: landscape) {
    .mobile-app-gate {
        align-items: flex-start;
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .mobile-app-gate__panel {
        width: min(100%, 520px);
        padding: 22px 24px 20px;
    }

    .mobile-app-gate__logo {
        height: 30px;
        margin-bottom: 16px;
    }

    .mobile-app-gate__device {
        width: 52px;
        height: 52px;
        margin-bottom: 16px;
    }

    .mobile-app-gate__device svg {
        width: 26px;
        height: 26px;
    }

    .mobile-app-gate__title {
        max-width: none;
        margin-bottom: 8px;
        font-size: 24px;
    }

    .mobile-app-gate__description {
        max-width: 48ch;
        margin-bottom: 18px;
        line-height: 1.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-app-gate__store-link {
        transition: none;
    }
}
