.ai-chat-launcher {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 1035;
    border-radius: 2rem;
    box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .18);
}
.ai-chat-panel { --bs-offcanvas-width: min(480px, 100vw); }
.ai-chat-body { display: flex; flex-direction: column; min-height: 0; }
.ai-chat-messages {
    flex: 1 1 10rem;
    min-height: 8rem;
    overflow-y: auto;
    overflow-wrap: anywhere;
}
.ai-chat-message { border-radius: .75rem; padding: .75rem; margin-bottom: .75rem; }
.ai-chat-message-user { background: var(--bs-tertiary-bg, #f0f1f3); }
.ai-chat-message-assistant { border: 1px solid var(--bs-border-color, #dee2e6); }
.ai-chat-message p { white-space: pre-wrap; margin: 0; }
.ai-chat-source { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--bs-border-color, #dee2e6); }
.ai-chat-source dl { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; margin: .25rem 0; }
.ai-chat-source dd { text-align: right; margin: 0; }
.ai-chat-panel textarea { resize: vertical; max-height: 12rem; }
@media (max-width: 575.98px) {
    .ai-chat-launcher { right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); }
}
