.mfm-ai-concierge {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10040;
    font-family: inherit;
}

.mfm-ai-trigger {
    position: relative;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(225, 176, 94, .72);
    border-radius: 999px;
    background: linear-gradient(135deg, #e7ba68, #b98232);
    color: #070604;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 8px rgba(225, 176, 94, .08);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.mfm-ai-trigger__icon {
    font-size: 24px;
    line-height: 1;
}

.mfm-ai-trigger__dot {
    position: absolute;
    right: 8px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.mfm-ai-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(410px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(225, 176, 94, .22);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(225, 176, 94, .14), transparent 32%),
        linear-gradient(145deg, rgba(24, 16, 13, .98), rgba(5, 5, 5, .98));
    box-shadow: 0 24px 90px rgba(0, 0, 0, .62);
    opacity: 0;
    transform: translateY(12px) scale(.98);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.mfm-ai-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mfm-ai-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mfm-ai-panel__header .mfm-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #d8a953;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mfm-ai-panel__header h3 {
    margin: 0;
    color: #fffaf0;
    font-size: 21px;
    line-height: 1.12;
}

.mfm-ai-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px !important;
    min-width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .05);
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
}

.mfm-ai-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-color: rgba(225, 176, 94, .5) rgba(255, 255, 255, .04);
}

.mfm-ai-message {
    max-width: 88%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .055);
}

.mfm-ai-message strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 12px;
}

.mfm-ai-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.58;
    white-space: pre-line;
}

.mfm-ai-message.is-user {
    align-self: flex-end;
    background: rgba(225, 176, 94, .18);
    border-color: rgba(225, 176, 94, .26);
    color: #fff7e5;
}

.mfm-ai-message.is-typing p {
    color: rgba(255, 255, 255, .56);
}

.mfm-ai-cards {
    display: grid;
    gap: 10px;
}

.mfm-ai-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: stretch;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(225, 176, 94, .18);
    background: rgba(0, 0, 0, .24);
    color: inherit;
    text-decoration: none;
}

.mfm-ai-card img {
    width: 78px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.mfm-ai-card__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.mfm-ai-card__content strong {
    color: #fff;
    font-size: 14px;
    line-height: 1.25;
}

.mfm-ai-card__content span {
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mfm-ai-card__content em {
    color: #e1b05e;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.mfm-ai-response-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 2px;
}

.mfm-ai-response-actions a {
    min-height: 36px;
    border: 1px solid rgba(225, 176, 94, .22);
    border-radius: 999px;
    background: rgba(225, 176, 94, .12);
    color: #f7d48e;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    padding: 9px 12px;
    cursor: pointer;
}

.mfm-ai-form {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .28);
}

.mfm-ai-status {
    padding: 8px 14px 0;
    background: rgba(0, 0, 0, .28);
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    line-height: 1.35;
}

.mfm-ai-form input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: 16px;
    padding: 0 15px;
    outline: none;
}

.mfm-ai-form input::placeholder {
    color: rgba(255, 255, 255, .42);
}

.mfm-ai-form button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto !important;
    min-width: 88px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #e1b05e;
    color: #080604;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    padding: 0 18px;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
}

.mfm-ai-trigger:focus-visible,
.mfm-ai-close:focus-visible,
.mfm-ai-form input:focus-visible,
.mfm-ai-form button:focus-visible,
.mfm-ai-response-actions a:focus-visible {
    outline: 2px solid #fff1bd;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .mfm-ai-concierge {
        right: 14px;
        bottom: 14px;
    }

    .mfm-ai-trigger {
        width: 54px;
        height: 54px;
    }

    .mfm-ai-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(72px + env(safe-area-inset-bottom));
        width: auto;
        height: min(560px, calc(100vh - 96px));
        height: min(560px, calc(100dvh - 96px));
        max-height: calc(100vh - 96px);
        max-height: calc(100dvh - 96px);
        display: flex;
        overflow: hidden;
        border-radius: 18px;
    }

    .mfm-ai-panel__header {
        padding: 18px 16px 14px;
    }

    .mfm-ai-panel__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px;
    }

    .mfm-ai-message {
        max-width: 94%;
    }

    .mfm-ai-form {
        flex: 0 0 auto;
        padding: 12px 12px 14px;
    }
}

/* MFM-CODEX-M3: AI presentation shell only */
.mfm-ai-panel__header h2 { margin: 0; color: #fff; font-size: 23px; line-height: 1.1; }
.mfm-ai-panel { max-height: min(640px,calc(100dvh - 120px)); }
.mfm-ai-trigger,.mfm-ai-close,.mfm-ai-form button { min-width: 48px; min-height: 48px; }
@media (max-width: 767px) {
  .mfm-ai-concierge { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mfm-ai-panel { width: min(370px,calc(100vw - 24px)); right: 0; bottom: 66px; max-height: calc(100dvh - 96px - env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .mfm-ai-panel,.mfm-ai-trigger { transition: none !important; animation: none !important; } }
