:root{
  --hw-brand:#FF6B00;
  --hw-brand-dark:#e55f00;
  --hw-text:#1f2937;
  --hw-muted:#6b7280;
  --hw-border:#e5e7eb;
  --hw-bg:#ffffff;
  --hw-soft:#fff4ec;
  --hw-shadow:0 12px 30px rgba(0,0,0,.12);
  --hw-font:"Helvetica Neue", Helvetica, Arial, sans-serif;
}

#hw-chat-open{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9998;
  border:none;
  border-radius:999px;
  background:var(--hw-brand);
  color:#fff;
  padding:14px 18px;
  font:600 14px var(--hw-font);
  cursor:pointer;
  box-shadow:var(--hw-shadow);
}

#hw-chat-panel{
  position:fixed;
  right:22px;
  bottom:78px;
  width:360px;
  max-width:calc(100vw - 24px);
  height:560px;
  background:var(--hw-bg);
  border:1px solid var(--hw-border);
  border-radius:18px;
  box-shadow:var(--hw-shadow);
  overflow:hidden;
  z-index:9999;
  display:none;
  font-family:var(--hw-font);
}

#hw-chat-panel.show{
  display:flex;
  flex-direction:column;
}

.hw-chat-header{
  background:linear-gradient(135deg, var(--hw-brand), #ff924d);
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.hw-chat-title{
  font-size:15px;
  font-weight:700;
  line-height:1.2;
}

.hw-chat-sub{
  font-size:12px;
  opacity:.9;
  margin-top:3px;
}

#hw-chat-close{
  border:none;
  background:transparent;
  color:#fff;
  font-size:20px;
  cursor:pointer;
}

#hw-chat-messages{
  flex:1;
  overflow:auto;
  background:#fafafa;
  padding:14px;
}

.hw-msg{
  margin-bottom:12px;
  max-width:88%;
  padding:11px 12px;
  border-radius:14px;
  font-size:14px;
  line-height:1.5;
  word-wrap:break-word;
}

.hw-msg.user{
  background:var(--hw-brand);
  color:#fff;
  margin-left:auto;
  border-bottom-right-radius:6px;
}

.hw-msg.bot{
  background:#fff;
  color:var(--hw-text);
  border:1px solid var(--hw-border);
  margin-right:auto;
  border-bottom-left-radius:6px;
}

.hw-links{
  margin-top:10px;
  padding-top:8px;
  border-top:1px dashed var(--hw-border);
}

.hw-links-title{
  font-size:12px;
  font-weight:700;
  color:var(--hw-muted);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.hw-links a{
  color:var(--hw-brand-dark);
  text-decoration:none;
  font-weight:600;
}

.hw-links a:hover{
  text-decoration:underline;
}

.hw-type{
  color:var(--hw-muted);
  font-size:12px;
}

.hw-chat-footer{
  border-top:1px solid var(--hw-border);
  background:#fff;
  padding:12px;
}

.hw-chat-help{
  font-size:12px;
  color:var(--hw-muted);
  margin-bottom:8px;
}

.hw-chat-input-row{
  display:flex;
  gap:8px;
}

#hw-chat-input{
  flex:1;
  height:42px;
  border:1px solid var(--hw-border);
  border-radius:12px;
  padding:0 12px;
  font-size:14px;
  outline:none;
}

#hw-chat-input:focus{
  border-color:var(--hw-brand);
  box-shadow:0 0 0 3px rgba(255,107,0,.12);
}

#hw-chat-send{
  border:none;
  border-radius:12px;
  background:var(--hw-brand);
  color:#fff;
  padding:0 14px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}

#hw-chat-send:hover,
#hw-chat-open:hover{
  background:var(--hw-brand-dark);
}

@media (max-width: 640px){
  #hw-chat-panel{
    right:12px;
    bottom:70px;
    width:calc(100vw - 24px);
    height:72vh;
  }

  #hw-chat-open{
    right:12px;
    bottom:12px;
  }
}