:root{
  --dlsc-primary:#123567;
  --dlsc-primary-dark:#0b2347;
  --dlsc-primary-light:#1f5fb0;
  --dlsc-accent:#f2c24d;
  --dlsc-accent-dark:#d9a92d;
  --dlsc-line:#e4eaf2;
  --dlsc-text:#14253e;
}

#dl-smartchat-root,
#dl-smartchat-root *{
  box-sizing:border-box;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}

#dl-smartchat-root{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:999999;
}

#dl-smartchat-root button,
#dl-smartchat-root input{
  appearance:none;
  -webkit-appearance:none;
  text-decoration:none !important;
}

#dl-smartchat-root .dlsc-launcher{
  width:62px;height:62px;border:none;border-radius:18px;
  display:grid;place-items:center;cursor:pointer;color:#fff;
  background:linear-gradient(145deg,var(--dlsc-primary-light),var(--dlsc-primary-dark));
  box-shadow:0 18px 38px rgba(11,35,71,.32);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
#dl-smartchat-root .dlsc-launcher:hover{transform:translateY(-2px);box-shadow:0 24px 42px rgba(11,35,71,.38);filter:saturate(1.05)}
#dl-smartchat-root .dlsc-launcher-icon{display:grid;place-items:center}

#dl-smartchat-root .dlsc-panel{
  position:relative;
  width:390px;max-width:calc(100vw - 20px);
  height:640px;max-height:calc(100vh - 86px);
  background:#fff;border-radius:24px;overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 28px 80px rgba(11,35,71,.25);
  border:1px solid rgba(16,44,87,.08);
}

#dl-smartchat-root .dlsc-head{
  min-height:78px;padding:14px 14px 14px 16px;
  display:flex;justify-content:space-between;align-items:center;color:#fff;
  background:linear-gradient(145deg,var(--dlsc-primary-light),var(--dlsc-primary-dark));
}
#dl-smartchat-root .dlsc-head-left{display:flex;align-items:center;gap:12px;min-width:0}
#dl-smartchat-root .dlsc-avatar{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;flex:none;
  background:linear-gradient(145deg,var(--dlsc-accent),var(--dlsc-accent-dark));
  color:#1b2b45;font-size:15px;font-weight:800;letter-spacing:.5px;
}
#dl-smartchat-root .dlsc-head-copy{min-width:0}
#dl-smartchat-root .dlsc-head-copy strong{
  display:block;font-size:14px;line-height:1.2;color:#fff;
  white-space:normal;word-break:break-word;max-width:195px;
}
#dl-smartchat-root .dlsc-head-copy span{display:flex;align-items:center;gap:6px;margin-top:5px;color:rgba(255,255,255,.86);font-size:12px}
#dl-smartchat-root .dlsc-head-copy em{font-style:normal}
#dl-smartchat-root .dlsc-dot{width:8px;height:8px;border-radius:50%;background:#49dd8e;box-shadow:0 0 0 4px rgba(73,221,142,.16)}

#dl-smartchat-root .dlsc-head-actions{display:flex;align-items:center;gap:6px}
#dl-smartchat-root .dlsc-icon-btn{
  width:36px;height:36px;border:none;border-radius:11px;background:rgba(255,255,255,.10);
  color:#fff;display:grid;place-items:center;cursor:pointer;transition:background .18s ease, transform .18s ease;
}
#dl-smartchat-root .dlsc-icon-btn:hover{background:rgba(255,255,255,.18);transform:translateY(-1px)}

#dl-smartchat-root .dlsc-menu{
  position:absolute;top:74px;right:12px;width:200px;padding:8px;background:#fff;
  border:1px solid var(--dlsc-line);border-radius:14px;box-shadow:0 18px 40px rgba(11,35,71,.16);z-index:5;
}
#dl-smartchat-root .dlsc-menu button{
  display:block;width:100%;padding:10px 11px;border:none;border-radius:10px;background:transparent;
  color:var(--dlsc-text);font-size:13px;font-weight:600;text-align:left;cursor:pointer;
}
#dl-smartchat-root .dlsc-menu button:hover{background:#eef4fd;color:var(--dlsc-primary)}

#dl-smartchat-root .dlsc-body{
  flex:1;overflow:auto;padding:17px 14px 12px;background:linear-gradient(180deg,#f8fbff 0%,#f2f6fb 100%);
}
#dl-smartchat-root .dlsc-body::-webkit-scrollbar{width:8px}
#dl-smartchat-root .dlsc-body::-webkit-scrollbar-thumb{background:#cfd8e6;border-radius:999px}

#dl-smartchat-root .dlsc-msg{display:flex;align-items:flex-end;gap:8px;margin:10px 0}
#dl-smartchat-root .dlsc-msg.user{justify-content:flex-end}
#dl-smartchat-root .dlsc-mini-avatar{
  width:26px;height:26px;border-radius:9px;display:grid;place-items:center;flex:none;
  background:linear-gradient(145deg,var(--dlsc-accent),var(--dlsc-accent-dark));
  color:#1b2b45;font-size:11px;font-weight:800;
}
#dl-smartchat-root .dlsc-bubble{
  max-width:82%;white-space:pre-wrap;padding:12px 14px;font-size:14px;line-height:1.48;border-radius:16px;
  box-shadow:0 7px 18px rgba(18,53,103,.06);
}
#dl-smartchat-root .dlsc-msg.bot .dlsc-bubble{background:#fff;color:var(--dlsc-text);border:1px solid var(--dlsc-line);border-bottom-left-radius:6px}
#dl-smartchat-root .dlsc-msg.user .dlsc-bubble{background:linear-gradient(145deg,var(--dlsc-primary-light),var(--dlsc-primary));color:#fff;border-bottom-right-radius:6px}

#dl-smartchat-root .dlsc-typing{
  margin:0 0 10px 48px;width:54px;height:34px;border-radius:15px 15px 15px 6px;background:#fff;
  border:1px solid var(--dlsc-line);display:flex;align-items:center;justify-content:center;gap:4px;
}
#dl-smartchat-root .dlsc-typing span{width:6px;height:6px;border-radius:50%;background:#8d9bb0;animation:dlscTyping 1s infinite}
#dl-smartchat-root .dlsc-typing span:nth-child(2){animation-delay:.12s}
#dl-smartchat-root .dlsc-typing span:nth-child(3){animation-delay:.24s}
@keyframes dlscTyping{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}

#dl-smartchat-root .dlsc-quick{
  display:flex;flex-wrap:wrap;gap:8px;max-height:112px;overflow:auto;padding:11px 13px;background:#fff;border-top:1px solid var(--dlsc-line);
}
#dl-smartchat-root .dlsc-quick.is-empty{display:none}
#dl-smartchat-root .dlsc-quick button{
  padding:9px 12px;border-radius:999px;border:1px solid #d8e1ee;background:#fff;color:var(--dlsc-primary);
  font-size:12px;font-weight:700;cursor:pointer;transition:all .18s ease;
}
#dl-smartchat-root .dlsc-quick button:hover{background:#eef4fd;border-color:#91b2df;transform:translateY(-1px)}
#dl-smartchat-root .dlsc-quick button.primary{background:linear-gradient(145deg,var(--dlsc-accent),var(--dlsc-accent-dark));border-color:transparent;color:#1b2b45}
#dl-smartchat-root .dlsc-quick button.primary:hover{box-shadow:0 8px 16px rgba(217,169,45,.22)}

#dl-smartchat-root .dlsc-form{display:flex;align-items:center;gap:10px;padding:12px;background:#fff;border-top:1px solid var(--dlsc-line)}
#dl-smartchat-root .dlsc-input{
  width:100%;min-width:0;padding:13px 14px;font-size:14px;line-height:1.2;border:1px solid #d6deeb;border-radius:15px;
  background:#fbfdff;color:var(--dlsc-text);outline:none;box-shadow:none;transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
#dl-smartchat-root .dlsc-input:focus{background:#fff;border-color:#87a9dd;box-shadow:0 0 0 4px rgba(40,99,180,.08)}
#dl-smartchat-root .dlsc-send{
  width:46px;height:46px;flex:none;border:none;border-radius:14px;display:grid;place-items:center;cursor:pointer;
  background:linear-gradient(145deg,var(--dlsc-accent),var(--dlsc-accent-dark));color:#1b2b45;transition:transform .18s ease, box-shadow .18s ease;
}
#dl-smartchat-root .dlsc-send:hover{transform:translateY(-1px);box-shadow:0 10px 18px rgba(217,169,45,.24)}

#dl-smartchat-root .dlsc-privacy{padding:0 14px 5px;background:#fff;color:#8a96a8;font-size:10px;text-align:center}
#dl-smartchat-root .dlsc-brand{padding:0 0 10px;background:#fff;color:#8390a4;font-size:10px;text-align:center}

@media(max-width:520px){
  #dl-smartchat-root{right:10px;bottom:10px}
  #dl-smartchat-root .dlsc-panel{width:calc(100vw - 20px);height:74vh;border-radius:20px}
  #dl-smartchat-root .dlsc-head-copy strong{max-width:150px;font-size:13px}
}