.ddh-agent-root{position:fixed;right:20px;bottom:20px;z-index:99999;font-family:'Inter',system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif}

.ddh-agent-bubble{width:60px;height:60px;border-radius:50%;background:#B8863B;border:1px solid #2A1E15;color:#241A12;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.ddh-agent-bubble:hover{background:#9C6F2C}
.ddh-agent-bubble-icon{line-height:1;display:flex}

.ddh-agent-panel{display:none;position:fixed;right:20px;bottom:92px;width:400px;max-width:calc(100vw - 32px);height:min(600px, calc(100vh - 120px));height:min(600px, calc(100dvh - 120px));background:#F8F2E3;border:1px solid #CBB896;border-radius:10px;flex-direction:column;overflow:hidden}
.ddh-agent-open .ddh-agent-panel{display:flex}
.ddh-agent-open .ddh-agent-bubble{display:none}

.ddh-agent-header{background:#2A1E15;color:#EEE3C8;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.ddh-agent-header-title{font-weight:700;font-size:16px;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ddh-agent-header-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.ddh-agent-clear{background:none;border:none;color:#CBB896;font-size:12.5px;font-family:inherit;text-decoration:underline;cursor:pointer;padding:0;flex-shrink:0;white-space:nowrap}
.ddh-agent-clear:hover{color:#B8863B}
.ddh-agent-close{background:none;border:none;color:#EEE3C8;font-size:24px;line-height:1;cursor:pointer;padding:0;flex-shrink:0}
.ddh-agent-close:hover{color:#B8863B}

.ddh-agent-messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px;min-height:0}

.ddh-agent-msg{max-width:88%;font-size:14.5px;line-height:1.55}
.ddh-agent-msg--user{align-self:flex-end}
.ddh-agent-msg--assistant{align-self:flex-start}
.ddh-agent-bubble-text{white-space:pre-wrap;padding:10px 14px;border-radius:8px;word-break:break-word}
.ddh-agent-msg--user .ddh-agent-bubble-text{background:#2A1E15;color:#EEE3C8}
.ddh-agent-msg--assistant .ddh-agent-bubble-text{background:#EEE3C8;color:#241A12;border:1px solid #CBB896}
.ddh-agent-bubble-text a{color:#8B3A2B;text-decoration:underline}
.ddh-agent-bubble-text a:hover{color:#7A2E22}
.ddh-agent-msg--user .ddh-agent-bubble-text a{color:#EEE3C8;text-decoration:underline}
.ddh-agent-msg--user .ddh-agent-bubble-text a:hover{color:#B8863B}

.ddh-agent-citations{margin-top:6px;display:flex;flex-direction:column;gap:2px;padding:0 2px}
.ddh-agent-citation a{font-size:12.5px;color:#8B3A2B;text-decoration:underline}
.ddh-agent-citation a:hover{color:#7A2E22}

.ddh-agent-typing{display:flex;align-items:center;gap:4px;padding:12px 14px}
.ddh-agent-typing span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#6B5D4F;animation:ddh-agent-blink 1s infinite}
.ddh-agent-typing span:nth-child(2){animation-delay:.15s}
.ddh-agent-typing span:nth-child(3){animation-delay:.3s}
@keyframes ddh-agent-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}

.ddh-agent-starters{padding:0 18px 12px;display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}
.ddh-agent-starter{background:#EEE3C8;border:1px solid #B8863B;color:#241A12;border-radius:8px;padding:8px 12px;font-size:13px;font-family:inherit;cursor:pointer;text-align:left}
.ddh-agent-starter:hover{background:#B8863B}

.ddh-agent-input-row{display:flex;gap:8px;padding:14px;border-top:1px solid #CBB896;background:#F8F2E3;flex-shrink:0}
.ddh-agent-input{flex:1;resize:none;border:1px solid #CBB896;border-radius:6px;padding:10px 12px;font-family:inherit;font-size:16px;color:#241A12;background:#fff;max-height:120px}
.ddh-agent-input:focus{outline:2px solid #B8863B;outline-offset:-1px}
.ddh-agent-send{background:#B8863B;color:#2A1E15;border:none;border-radius:6px;padding:0 18px;font-weight:700;font-size:14px;cursor:pointer;flex-shrink:0}
.ddh-agent-send:hover{background:#9C6F2C}

@media (max-width:640px){
  .ddh-agent-panel{right:12px;left:12px;bottom:88px;width:auto;max-width:none;height:calc(100vh - 104px);height:calc(100dvh - 104px)}
  .ddh-agent-root{right:12px;bottom:12px}
  .ddh-agent-bubble{width:54px;height:54px}
}

@media (max-width:900px) and (min-width:641px){
  .ddh-agent-panel{width:380px;height:min(560px, calc(100vh - 120px));height:min(560px, calc(100dvh - 120px))}
}

@media (hover:none) and (pointer:coarse){
  .ddh-agent-starter{padding:10px 14px}
  .ddh-agent-send{min-width:64px}
}
