@media (max-width: 720px) {
    #ai-fab {
        left: auto;
        right: 16px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0)) !important;
        width: 62px;
        height: 62px;
        max-width: none;
        padding: 0;
        justify-content: center;
        border-radius: 50% !important;
        overflow: visible;
    }

    body.ai-has-cart-fixed #ai-fab {
        bottom: calc(var(--ai-cart-offset, 88px) + 18px + env(safe-area-inset-bottom, 0)) !important;
    }

    .ai-fab-icon {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        font-weight: 800;
        font-size: 0.88rem;
        letter-spacing: 0.02em;
        background: rgba(255, 250, 239, 0.2);
    }

    .ai-fab-copy,
    .ai-fab-pulse {
        display: none;
    }

    .ai-fab-mobile-bubble {
        display: block;
        position: absolute;
        right: 54px;
        bottom: 42px;
        width: max-content;
        min-width: 132px;
        max-width: min(62vw, 190px);
        padding: 8px 10px;
        border-radius: 8px 8px 2px 8px;
        background: #fffdfa;
        color: #15534a;
        border: 1px solid rgba(21, 83, 74, 0.14);
        box-shadow: 0 12px 30px rgba(13, 61, 58, 0.18);
        font-size: 0.78rem;
        font-weight: 800;
        line-height: 1.25;
        text-align: left;
        pointer-events: none;
    }

    .ai-modal-shell,
    .ai-modal-shell.ai-mode-review {
        width: min(100vw - 18px, 720px);
        max-height: calc(100vh - 18px);
        border-radius: 8px;
    }

    .ai-modal-main {
        padding: 18px;
    }

    .ai-modal-header {
        gap: 12px;
        align-items: flex-start;
    }

    .ai-chat-thread {
        max-height: min(62vh, 560px);
        padding: 12px;
    }

    .ai-chat-message {
        gap: 8px;
    }

    .ai-chat-message-user {
        margin-left: 32px;
    }

    .ai-chat-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }

    .ai-chat-bubble {
        padding: 12px 14px;
        max-width: 100%;
    }

    .ai-chat-product-card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
    }

    .ai-chat-product-media {
        min-height: 92px;
    }

    .ai-chat-product-head,
    .ai-result-top,
    .ai-result-footer,
    .ai-summary-actions,
    .ai-chat-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ai-chat-input-row {
        align-items: stretch;
    }

    .ai-chat-send {
        width: 58px;
        min-height: 58px;
    }

    .ai-btn,
    .ai-text-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.ai-auth-code-card {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.ai-auth-code-input {
    width: 180px;
    max-width: 100%;
    min-height: 48px;
    border: 1px solid #bfd4ca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1.2rem;
    letter-spacing: 0.18em;
    font-weight: 700;
}
