.dchat { --dchat-accent: #1d1a16; --dchat-ink: #fff; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; font-size: 15px; line-height: 1.55; }
.dchat-fab { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--dchat-accent); color: var(--dchat-ink); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); }
.dchat-fab-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
.dchat.is-open .dchat-fab { display: none; }
.dchat-panel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column; background: #fff; color: #1b1b1b; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.dchat-panel[hidden] { display: none; }
.dchat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--dchat-accent); color: var(--dchat-ink); }
.dchat-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .18); font-weight: 700; }
.dchat-who { flex: 1; display: flex; flex-direction: column; }
.dchat-who small { opacity: .8; font-size: 12px; }
.dchat-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: inherit; font-size: 22px; cursor: pointer; }
.dchat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f5f5f3; }
.dchat-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; white-space: pre-line; }
.dchat-bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.dchat-me { align-self: flex-end; background: var(--dchat-accent); color: var(--dchat-ink); border-bottom-right-radius: 4px; }
.dchat-typing { display: flex; gap: 4px; padding: 14px; }
.dchat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #aaa; animation: dchat-b 1s infinite; }
.dchat-typing i:nth-child(2) { animation-delay: .15s; }
.dchat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dchat-b { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.dchat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: #f5f5f3; border-top: 1px solid #ebebe8; }
.dchat-chip { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid #d8d8d4; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.dchat-chip:hover { border-color: var(--dchat-accent); }
.dchat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #ebebe8; }
.dchat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid #d8d8d4; border-radius: 12px; font: inherit; font-size: 16px; }
.dchat-send { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--dchat-accent); color: var(--dchat-ink); font: inherit; font-weight: 700; cursor: pointer; }
.dchat-note { margin: 0; padding: 0 14px 10px; font-size: 12px; color: #888; }
@media (prefers-reduced-motion: reduce) { .dchat-typing i { animation: none; } }
