.dchat, .dchat * { box-sizing: border-box; }
.dchat { --d-ink: #14213D; --d-main: #C2410C; --d-teal: #0E7C8B; --d-muted: #4B5563; --d-font: "Outfit", "Helvetica Neue", Arial, sans-serif; font-family: var(--d-font); color: var(--d-ink); }
.dchat .dchat-launch { position: fixed; z-index: 9990; right: max(16px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 22px; font: 700 17px var(--d-font); color: #fff; background: var(--d-main); border: 0; border-radius: 100px; box-shadow: 0 8px 24px rgba(20, 33, 61, .3); cursor: pointer; }
.dchat .dchat-launch:hover, .dchat .dchat-launch:focus { color: #fff; background: #9A3412; }
.dchat .dchat-launch svg { width: 21px; height: 21px; flex: none; }
.dchat .dchat-launch[hidden] { display: none; }
.dchat-short { display: none; }
.dchat-panel { position: fixed; z-index: 9991; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 32px)); overflow: hidden; background: #fff; border-radius: 20px; box-shadow: 0 22px 60px rgba(20, 33, 61, .38); }
.dchat-panel[hidden] { display: none; }
.dchat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 16px; color: #fff; background: var(--d-main); }
.dchat-head b { font-weight: 700; font-size: 18px; line-height: 1.2; }
.dchat .dchat-close { flex: none; width: 44px; height: 44px; margin: 0; padding: 0; font-size: 28px; line-height: 1; color: #fff; background: transparent; border: 0; border-radius: 12px; cursor: pointer; }
.dchat .dchat-close:hover, .dchat .dchat-close:focus { color: #fff; background: rgba(0, 0, 0, .18); }
.dchat-log { flex: 1 1 auto; min-height: 0; padding: 14px; overflow-y: auto; background: #FFF7F0; overscroll-behavior: contain; }
.dchat-msg { max-width: 88%; margin-bottom: 10px; padding: 10px 14px; font-size: 16px; line-height: 1.38; color: var(--d-ink); white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 16px; }
.dchat-bot { background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(20, 33, 61, .12); }
.dchat-me { margin-left: auto; color: #fff; background: var(--d-ink); border-bottom-right-radius: 4px; }
.dchat-err { background: #FFE3DC; }
.dchat-typing { color: var(--d-muted); }
.dchat .dchat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; background: #FFF7F0; }
.dchat .dchat-chips[hidden] { display: none; }
.dchat .dchat-chips button { min-height: 44px; padding: 0 14px; font: 600 15px var(--d-font); color: var(--d-ink); background: #fff; border: 2px solid var(--d-ink); border-radius: 100px; cursor: pointer; }
.dchat .dchat-chips button:hover, .dchat .dchat-chips button:focus { color: #fff; background: var(--d-ink); }
.dchat .dchat-form { display: flex; gap: 8px; margin: 0; padding: 10px 12px; background: #fff; border-top: 1px solid #E5E7EB; }
.dchat .dchat-form textarea { flex: 1 1 auto; min-width: 0; min-height: 46px; max-height: 110px; padding: 10px 12px; font: 400 16px var(--d-font); color: var(--d-ink); background: #fff; border: 2px solid #CBD0D8; border-radius: 14px; resize: none; }
.dchat .dchat-form textarea:focus { outline: 0; border-color: var(--d-main); }
.dchat .dchat-form button { flex: none; min-width: 68px; min-height: 46px; padding: 0 14px; font: 700 16px var(--d-font); color: #fff; background: var(--d-main); border: 0; border-radius: 14px; cursor: pointer; }
.dchat .dchat-form button:hover, .dchat .dchat-form button:focus { color: #fff; background: #9A3412; }
.dchat .dchat-form button:disabled { opacity: .5; cursor: default; }
.dchat-note { margin: 0; padding: 0 14px 10px; font-size: 13px; line-height: 1.3; color: var(--d-muted); background: #fff; }
.dchat :focus-visible { outline: 3px solid #14213D; outline-offset: 2px; }
@media (max-width: 560px) {
  .dchat-long { display: none; }
  .dchat-short { display: inline; }
  .dchat .dchat-launch { min-height: 48px; padding-inline: 16px; font-size: 16px; }
}
