.doka-chat { position: fixed; z-index: 30; bottom: max(20px, env(safe-area-inset-bottom)); right: 20px; font: 15px/1.45 system-ui, sans-serif; color: #142015; }
.doka-chat button { cursor: pointer; }
.doka-chat-toggle, .doka-chat form button { background: #176c24; color: #fff; border: 0; border-radius: 8px; padding: 12px 16px; font: inherit; font-weight: 700; }
.doka-chat-toggle { display: block; margin-left: auto; box-shadow: 0 3px 14px #0003; }
.doka-chat section[hidden] { display: none; }
.doka-chat section { width: min(380px, calc(100vw - 40px)); margin-bottom: 10px; border: 1px solid #c9d9cb; border-radius: 12px; background: #fff; box-shadow: 0 8px 30px #0003; }
.doka-chat header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e0e8e0; }
.doka-chat-close { border: 0; background: transparent; font-size: 25px; line-height: 1; width: 36px; height: 36px; color: inherit; }
.doka-chat-log { max-height: min(44vh, 340px); overflow: auto; padding: 12px; display: grid; gap: 8px; }
.doka-chat-log p { margin: 0; border-radius: 9px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.doka-chat-reply { background: #f0f3f0; margin-right: 18px; }
.doka-chat-visitor { background: #dff1e0; justify-self: end; max-width: 90%; }
.doka-chat-status { margin: 0; padding: 0 12px; color: #365338; }
.doka-chat form { padding: 10px 12px 12px; }
.doka-chat label { display: block; font-weight: 600; margin-bottom: 4px; }
.doka-chat-input { display: flex; gap: 6px; }
.doka-chat input { flex: 1; min-width: 0; padding: 8px; font: inherit; font-size: 16px; border: 1px solid #8eaa91; border-radius: 7px; }
.doka-chat form button { padding: 8px 10px; }
.doka-chat form button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 720px) { .doka-chat { bottom: max(72px, calc(60px + env(safe-area-inset-bottom))); right: 12px; } }
