.avc-root, .avc-root * { box-sizing: border-box; }
.avc-root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px; }

.avc-panel {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e2e5ea; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12); overflow: hidden;
}
.avc-inline { max-width: 560px; margin: 20px auto; }
.avc-inline .avc-panel { height: 480px; }

.avc-float { position: fixed; right: 20px; bottom: 20px; z-index: 99999; }
.avc-float .avc-panel { width: 360px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 40px); }
.avc-fab {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: #2563eb; color: #fff; font-size: 26px; box-shadow: 0 6px 18px rgba(37,99,235,.45);
}

.avc-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #2563eb; color: #fff; }
.avc-title { flex: 1; font-weight: 600; }
.avc-icon { background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 16px; padding: 4px 6px; }

.avc-list { flex: 1; overflow-y: auto; padding: 14px; background: #f6f7f9; display: flex; flex-direction: column; gap: 8px; }
.avc-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.avc-user { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.avc-bot { align-self: flex-start; background: #fff; color: #1f2937; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.avc-typing { opacity: .6; font-style: italic; }
.avc-err { align-self: center; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-size: 13px; }

.avc-bar { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #e5e7eb; background: #fff; }
.avc-input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 20px; outline: none; font-size: 15px; }
.avc-input:focus { border-color: #2563eb; }
.avc-mic, .avc-send { border: 0; cursor: pointer; border-radius: 20px; padding: 0 14px; font-size: 15px; }
.avc-mic { background: #eef2ff; }
.avc-mic.avc-on { background: #ef4444; animation: avc-pulse 1s infinite; }
.avc-send { background: #2563eb; color: #fff; }
.avc-send:disabled { opacity: .5; cursor: default; }

@keyframes avc-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
