.tt-mobile-app-prompt :is(button, a):focus-visible {
    outline: 3px solid rgba(255, 91, 10, .3);
    outline-offset: 3px;
}

.tt-mobile-app-prompt {
    display: none;
}

@keyframes tt-mobile-app-prompt-fade {
    from { opacity: 0; }
}

@keyframes tt-mobile-app-prompt-pop {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
}

@media (max-width: 1023px) {

    body.tt-mobile-app-prompt-open {
        overflow: hidden;
    }

    .tt-mobile-app-prompt.is-open:not([hidden]) {
        position: fixed;
        z-index: 1200;
        inset: 0;
        padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
        display: grid;
        place-items: end center;
        animation: tt-mobile-app-prompt-fade .22s ease both;
    }

    .tt-mobile-app-prompt__backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgba(12, 18, 23, .48);
        backdrop-filter: blur(9px);
        -webkit-backdrop-filter: blur(9px);
        cursor: pointer;
    }

    .tt-mobile-app-prompt__dialog {
        position: relative;
        width: min(100%, 480px);
        max-height: calc(100dvh - 32px);
        overflow: auto;
        padding: 30px 22px 22px;
        border: 1px solid rgba(26, 34, 40, .07);
        border-radius: 28px;
        background: #fffdfb;
        box-shadow: 0 30px 90px rgba(16, 22, 27, .3);
        color: #15191d;
        text-align: center;
        animation: tt-mobile-app-prompt-pop .45s cubic-bezier(.16, 1, .3, 1) both;
    }

    .tt-mobile-app-prompt__icon {
        width: 68px;
        height: 68px;
        margin: 0 auto;
        display: grid;
        place-items: center;
        border-radius: 21px;
        background: linear-gradient(145deg, #ff6a16, #ff4e00);
        box-shadow: 0 14px 28px rgba(255, 83, 0, .22);
    }

    .tt-mobile-app-prompt__icon img {
        width: 42px;
        height: 42px;
        filter: brightness(0) invert(1);
    }

    .tt-mobile-app-prompt h2 {
        color: #12171b;
        font-weight: 850;
    }

    .tt-mobile-app-prompt__dialog > p:not(.tt-mobile-app-prompt__downloads) {
        max-width: 380px;
        margin: 14px auto 0;
        color: #596570;
        font-size: 15px;
        line-height: 1.5;
    }

    .tt-mobile-app-prompt__actions {
        margin-top: 24px;
        display: grid;
        gap: 10px;
    }

    .tt-mobile-app-prompt__actions > a,
    .tt-mobile-app-prompt__actions > button {
        width: 100%;
        min-height: 58px;
        padding: 0 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 11px;
        border-radius: 17px;
        cursor: pointer;
        font-size: 15px;
        font-weight: 780;
    }

    .tt-mobile-app-prompt__actions > a {
        color: #fff;
        background: linear-gradient(135deg, #ff6907, #ff5000);
        box-shadow: 0 13px 28px rgba(255, 83, 0, .2);
    }

    .tt-mobile-app-prompt__actions > a svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
    }

    .tt-mobile-app-prompt__actions > button {
        border: 1px solid #e2e6ea;
        color: #3e4953;
        background: #fff;
    }

    html[data-theme="dark"] .tt-mobile-app-prompt__backdrop {
        background: rgba(3, 9, 16, .7);
    }

    html[data-theme="dark"] .tt-mobile-app-prompt__dialog {
        border-color: rgba(114, 139, 168, .22);
        color: #eef4fb;
        background: #0c1928;
        box-shadow: 0 34px 96px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .04);
    }

    html[data-theme="dark"] .tt-mobile-app-prompt h2 {
        color: #f5f8fc;
    }

    html[data-theme="dark"] .tt-mobile-app-prompt__dialog > p:not(.tt-mobile-app-prompt__downloads) {
        color: #a3b2c4;
    }

    html[data-theme="dark"] .tt-mobile-app-prompt__actions > button {
        border-color: #30445b;
        color: #dce6f0;
        background: #142438;
    }
}

@media (min-width: 1024px) {
    .tt-mobile-app-prompt {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tt-mobile-app-prompt *,
.tt-mobile-app-prompt *::before,
.tt-mobile-app-prompt *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}

/* Compact mobile prompt: one short message and exactly two actions. */
@media (max-width: 1023px) {
    .tt-mobile-app-prompt .tt-mobile-app-prompt__dialog {
        width: min(100%, 420px);
        padding: 18px;
        border-radius: 24px;
        text-align: left;
        box-shadow: 0 24px 70px rgba(16, 22, 27, .28);
    }

    .tt-mobile-app-prompt__head {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        align-items: center;
        gap: 14px;
    }

    .tt-mobile-app-prompt .tt-mobile-app-prompt__icon {
        width: 52px;
        height: 52px;
        margin: 0;
        border-radius: 16px;
        box-shadow: 0 10px 20px rgba(255, 83, 0, .22);
    }

    .tt-mobile-app-prompt .tt-mobile-app-prompt__icon img {
        width: 32px;
        height: 32px;
    }

    .tt-mobile-app-prompt h2 {
        margin: 0;
        max-width: none;
        font-size: clamp(17px, 4.8vw, 20px);
        line-height: 1.2;
        letter-spacing: -.02em;
    }

    .tt-mobile-app-prompt .tt-mobile-app-prompt__text > p {
        max-width: none;
        margin: 4px 0 0;
        font-size: clamp(12.5px, 3.5vw, 14px);
        line-height: 1.4;
    }

    .tt-mobile-app-prompt .tt-mobile-app-prompt__actions {
        margin-top: 16px;
        gap: 8px;
    }

    .tt-mobile-app-prompt .tt-mobile-app-prompt__actions > a,
    .tt-mobile-app-prompt .tt-mobile-app-prompt__actions > button {
        min-height: 50px;
        border-radius: 15px;
        font-size: 15px;
    }

    .tt-mobile-app-prompt .tt-mobile-app-prompt__actions > button {
        min-height: 46px;
        border-color: transparent;
        background: #f3f1ef;
    }

    html[data-theme="dark"] .tt-mobile-app-prompt .tt-mobile-app-prompt__actions > button {
        background: rgba(255, 255, 255, .07);
    }

    /* The site-wide dark rule for [role="dialog"] treats it as a full-screen backdrop (translucent) and its
       child divs as cards (opaque): here the dialog is the card, so it stays one solid card. */
    html[data-theme="dark"] .tt-mobile-app-prompt .tt-mobile-app-prompt__dialog {
        background: #0c1928 !important;
    }

    html[data-theme="dark"] .tt-mobile-app-prompt .tt-mobile-app-prompt__dialog > div {
        border-color: transparent !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}
