
/* Talk to 5Dragon — Phase 1 */
#talk5dragon-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: #111;
  color: #fff;
  box-shadow: 0 14px 35px rgba(0,0,0,.25);
  font-size: 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
#talk5dragon-toggle:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(0,0,0,.3); }

#talk5dragon-panel {
  position: fixed;
  right: 24px;
  bottom: 98px;
  z-index: 9999;
  width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 130px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}
#talk5dragon-panel.is-open { display: flex; }

.t5d-header {
  display:flex; align-items:center; justify-content:space-between;
  padding: 17px 18px; background:#111; color:#fff;
}
.t5d-brand { display:flex; align-items:center; gap:11px; }
.t5d-logo { width:38px; height:38px; border-radius:50%; object-fit:cover; background:#fff; }
.t5d-title { font-weight:700; font-size:15px; }
.t5d-status { font-size:11px; opacity:.72; margin-top:2px; }
.t5d-close { border:0; background:transparent; color:#fff; cursor:pointer; font-size:21px; }

.t5d-messages {
  flex:1; overflow:auto; padding:18px 14px; background:#f6f7f8;
}
.t5d-message {
  max-width:86%; padding:11px 13px; margin:0 0 10px;
  border-radius:15px; font-size:14px; line-height:1.55;
  white-space:pre-wrap; word-break:break-word;
}
.t5d-message.bot { background:#fff; border:1px solid #e8e8e8; margin-right:auto; }
.t5d-message.user { background:#111; color:#fff; margin-left:auto; border-bottom-right-radius:5px; }
.t5d-message.bot { border-bottom-left-radius:5px; }

.t5d-composer {
  display:flex; gap:8px; padding:11px; background:#fff; border-top:1px solid #eee;
}
.t5d-input {
  flex:1; min-width:0; resize:none; border:1px solid #ddd; outline:none;
  border-radius:13px; padding:11px 12px; font:inherit; font-size:14px;
}
.t5d-input:focus { border-color:#111; }
.t5d-send {
  width:45px; border:0; border-radius:13px; background:#111; color:#fff;
  cursor:pointer; font-size:16px;
}
.t5d-send:disabled { opacity:.5; cursor:not-allowed; }

@media (max-width:600px) {
  #talk5dragon-toggle { right:16px; bottom:16px; }
  #talk5dragon-panel { right:8px; bottom:88px; width:calc(100vw - 16px); height:calc(100vh - 105px); border-radius:18px; }
}
