.scube-ai-root { --scube-ai-space: 20px; position: fixed; right: var(--scube-ai-space); bottom: var(--scube-ai-space); z-index: 999999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #18212f; }
.scube-ai-launcher { width: 58px; height: 58px; border-radius: 50%; border: 0; background: #18212f; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.2); cursor: pointer; display: grid; place-items: center; font-size: 26px; transition: transform .18s ease; }
.scube-ai-launcher:hover { transform: translateY(-2px); }
.scube-ai-launcher.is-open { opacity: 0; pointer-events: none; }
.scube-ai-panel { position: absolute; right: 0; bottom: 0; width: min(390px, calc(100vw - 24px)); height: min(610px, calc(100vh - 24px)); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.24); overflow: hidden; border: 1px solid rgba(24,33,47,.12); display: grid; grid-template-rows: auto 1fr auto auto auto; }
.scube-ai-panel[hidden] { display: none !important; }
.scube-ai-header { min-height: 64px; padding: 12px 14px 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #18212f; color: #fff; }
.scube-ai-header strong, .scube-ai-header span { display: block; }
.scube-ai-header strong { font-size: 15px; }
.scube-ai-header span { font-size: 11px; opacity: .76; margin-top: 2px; }
.scube-ai-header-actions { display: flex; gap: 4px; }
.scube-ai-icon-button { border: 0; width: 38px; height: 38px; border-radius: 10px; background: transparent; color: #fff; font-size: 22px; cursor: pointer; }
.scube-ai-icon-button:hover, .scube-ai-icon-button:focus-visible { background: rgba(255,255,255,.12); }
.scube-ai-messages { padding: 16px; overflow-y: auto; background: #f7f8fa; }
.scube-ai-message { margin: 0 0 12px; display: flex; flex-direction: column; align-items: flex-start; }
.scube-ai-user { align-items: flex-end; }
.scube-ai-bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid #e2e6eb; line-height: 1.45; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.scube-ai-user .scube-ai-bubble { background: #18212f; color: #fff; border-color: #18212f; border-radius: 14px 14px 4px 14px; }
.scube-ai-message.is-typing .scube-ai-bubble { opacity: .65; font-style: italic; }
.scube-ai-sources { max-width: 88%; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; margin-top: 6px; }
.scube-ai-sources span { opacity: .62; }
.scube-ai-sources a { color: #385d8a; text-decoration: underline; text-underline-offset: 2px; }
.scube-ai-suggestions { display: flex; gap: 7px; overflow-x: auto; padding: 0 12px 9px; background: #f7f8fa; }
.scube-ai-suggestions:empty { display: none; }
.scube-ai-suggestions button { flex: 0 0 auto; max-width: 240px; padding: 7px 10px; border: 1px solid #cfd7e2; border-radius: 999px; background: #fff; color: #2d435f; cursor: pointer; font-size: 12px; }
.scube-ai-form { padding: 10px; display: grid; grid-template-columns: 1fr 42px; gap: 8px; border-top: 1px solid #e4e7eb; background: #fff; align-items: end; }
.scube-ai-form textarea { width: 100%; min-height: 42px; max-height: 120px; resize: none; border: 1px solid #cfd5dd; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; box-sizing: border-box; }
.scube-ai-form textarea:focus { outline: 2px solid #8fb7e4; outline-offset: 1px; }
.scube-ai-form button { width: 42px; height: 42px; border: 0; border-radius: 12px; background: #18212f; color: #fff; cursor: pointer; font-size: 17px; }
.scube-ai-form button:disabled { opacity: .45; cursor: wait; }
.scube-ai-disclaimer { padding: 0 12px 10px; background: #fff; color: #6b7480; font-size: 10px; text-align: center; }
@media (max-width: 480px) {
  .scube-ai-root { --scube-ai-space: 12px; }
  .scube-ai-panel { position: fixed; inset: 8px; width: auto; height: auto; max-height: none; border-radius: 16px; }
  .scube-ai-launcher { width: 54px; height: 54px; }
  .scube-ai-bubble { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) { .scube-ai-launcher { transition: none; } }
