.web-chat { max-width: 1080px; margin: 0 auto; }
.web-chat .page-head { align-items: flex-start; gap: 18px; }
.web-chat .page-head h1 { margin-top: 8px; }
.web-chat .page-head p { max-width: 620px; line-height: 1.7; }
.web-chat-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.web-chat-panel { overflow: hidden; }
.web-chat-status { margin: 0; padding: 16px 22px; background: var(--orange-bg); color: var(--orange); line-height: 1.7; }
.web-chat-log { min-height: 290px; max-height: 58vh; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; background: #fafbf8; }
.web-chat-bubble { max-width: 86%; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); align-self: flex-start; }
.web-chat-bubble.customer { align-self: flex-end; background: #eaf2e4; border-color: #d6e4cc; }
.web-chat-bubble strong { display: block; font-size: 12px; color: var(--muted); }
.web-chat-bubble p { margin: 7px 0 0; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.web-chat-bubble.is-failed { border-color: #e6c5bd; }
.web-chat-notification { display: block; margin-top: 11px; color: var(--muted); line-height: 1.6; }
.web-chat-notification.is-failed { color: var(--red); }
.web-chat-error { margin: 0; padding: 14px 22px; background: var(--red-bg); color: var(--red); line-height: 1.7; }
.web-chat-compose { padding: 20px 24px; border-top: 1px solid var(--line); }
.web-chat-compose label { display: block; font-weight: 600; margin-bottom: 9px; }
.web-chat-compose textarea { width: 100%; resize: vertical; min-height: 88px; }
.web-chat-compose > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 12px; }
.web-chat-compose p { margin: 0; max-width: 650px; color: var(--muted); line-height: 1.7; font-size: 12px; }
.web-chat-compose .btn { flex-shrink: 0; }
@media (max-width: 700px) {
  .web-chat .page-head { flex-direction: column; }
  .web-chat-actions { justify-content: flex-start; }
  .web-chat-log { padding: 16px; max-height: 52vh; }
  .web-chat-bubble { max-width: 94%; }
  .web-chat-compose { padding: 16px; }
  .web-chat-compose > div { flex-direction: column; align-items: stretch; }
}
