.sw{
  position:fixed;right:14px;bottom:14px;z-index:60;
  font-family:Inter,-apple-system,"Segoe UI",sans-serif;
}
.sw-fab{
  width:56px;height:56px;border-radius:50%;border:0;cursor:pointer;
  background:linear-gradient(135deg,#38f2d6,#ff7ac1 55%,#ff3f9a);color:#16051b;
  box-shadow:0 12px 30px -8px rgba(255,63,154,.9),0 0 24px rgba(56,242,214,.45),inset 0 1px 0 rgba(255,255,255,.45);
  display:grid;place-items:center;position:relative;transition:transform .15s;
}
.sw-fab:active{transform:scale(.95)}
.sw-fab svg{width:26px;height:26px}
.sw-fab .badge{
  position:absolute;top:-2px;right:-2px;min-width:18px;height:18px;border-radius:9px;background:var(--lime,#b6ff3d);color:#0a0710;
  font-size:11px;font-weight:800;display:grid;place-items:center;padding:0 4px;box-shadow:0 0 12px rgba(182,255,61,.8);
}
.sw-fab .badge[hidden]{display:none}
.sw-panel{
  position:absolute;right:0;bottom:68px;width:min(330px,calc(100vw - 28px));
  background:linear-gradient(180deg,#1a0729,#0d0418);border:1px solid rgba(157,251,233,.35);border-radius:8px;overflow:hidden;
  box-shadow:0 30px 70px -25px #000,inset 0 0 0 1px rgba(255,122,193,.14),0 0 30px rgba(56,242,214,.18);
  display:none;flex-direction:column;
}
.sw-panel.open{display:flex;animation:swin .18s ease-out}
@keyframes swin{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.sw-head{display:flex;align-items:center;gap:10px;padding:10px 12px;background:linear-gradient(92deg,rgba(56,242,214,.16),rgba(255,63,154,.22));border-bottom:1px solid rgba(157,251,233,.3)}
.sw-av{width:52px;height:52px;border-radius:50%;object-fit:cover;flex:0 0 auto;
  border:2px solid rgba(255,255,255,.45);box-shadow:0 0 16px rgba(255,46,136,.45)}
.sw-tt{flex:1;min-width:0}
.sw-tt b{display:block;font-size:14px;line-height:1.2;letter-spacing:.01em}
.sw-tt i{font-style:normal;font-size:10.5px;color:#b6ff3d;display:flex;align-items:center;gap:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sw-tt i::before{content:"";width:5px;height:5px;border-radius:50%;background:#b6ff3d;box-shadow:0 0 8px #b6ff3d}
.sw-x{border:0;background:rgba(0,0,0,.25);color:#cfc9e6;width:26px;height:26px;border-radius:8px;cursor:pointer;font-size:15px;line-height:1}
.sw-body{padding:11px;max-height:min(46vh,300px);overflow-y:auto;display:flex;flex-direction:column;gap:8px;background:#0a0416}
.sw-msg{max-width:86%;padding:8px 11px;border-radius:13px;font-size:12.5px;line-height:1.4;word-wrap:break-word}
.sw-msg.them{background:#1d0a2d;border:1px solid rgba(255,255,255,.08);border-bottom-left-radius:5px;align-self:flex-start}
.sw-msg.me{background:linear-gradient(135deg,#38f2d6,#7ef0e0);color:#03231f;border-bottom-right-radius:5px;align-self:flex-end;font-weight:600}
.sw-msg.sys{align-self:center;background:transparent;color:#8b83a8;font-size:10.5px;padding:2px}
.sw-chips{display:flex;gap:6px;padding:0 11px 9px;flex-wrap:wrap;background:#0b0914}
.sw-chip{border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:#d9d3f0;border-radius:99px;
  padding:5px 10px;font-size:11px;cursor:pointer}
.sw-chip:hover{border-color:var(--pink,#ff2e88);color:#fff}
.sw-form{display:flex;gap:7px;padding:9px 11px;border-top:1px solid rgba(255,255,255,.08);background:#0f0c19}
.sw-form input{flex:1;min-width:0;background:#0b0914;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:9px 10px;
  color:#fff;font-size:13px;font-family:inherit;outline:none}
.sw-form input:focus{border-color:var(--pink,#ff2e88)}
.sw-form button{width:36px;border:0;border-radius:10px;background:linear-gradient(135deg,#ff6ec7,#ff2e88);color:#16040d;cursor:pointer;
  display:grid;place-items:center;font-size:14px}
.sw-form button[disabled]{opacity:.5;cursor:progress}
.sw-typing{align-self:flex-start;display:flex;gap:3px;padding:8px 11px;background:#1d0a2d;border-radius:13px;border-bottom-left-radius:5px}
.sw-typing i{width:5px;height:5px;border-radius:50%;background:#8b83a8;animation:swb 1s infinite}
.sw-typing i:nth-child(2){animation-delay:.15s}
.sw-typing i:nth-child(3){animation-delay:.3s}
@keyframes swb{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
@media (max-width:400px){.sw{right:10px;bottom:10px}.sw-fab{width:52px;height:52px}}

/* support popup */
#popWrap{position:fixed;left:0;right:0;bottom:96px;z-index:70;display:flex;justify-content:center;pointer-events:none;padding:0 10px}
.pop{
  pointer-events:auto;width:100%;max-width:420px;display:none;align-items:flex-start;gap:10px;
  background:linear-gradient(120deg,#38f2d6,#ff7ac1 55%,#ff3f9a);
  color:#150419;border-radius:16px;padding:11px 12px;
  box-shadow:0 18px 44px -14px rgba(255,63,154,.85),0 0 26px rgba(56,242,214,.35),inset 0 1px 0 rgba(255,255,255,.45);
  transform:translateY(14px) scale(.98);opacity:0;transition:transform .18s ease-out,opacity .18s ease-out;cursor:pointer;
}
.pop.show{display:flex;transform:none;opacity:1}

.pop .tt{flex:1;min-width:0}
.pop .who{font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;font-weight:800;opacity:.72}
.pop .tx{font-size:13px;line-height:1.35;font-weight:600;margin-top:2px;word-break:break-word}
.pop .x{flex:0 0 auto;border:0;background:rgba(24,5,16,.14);color:#180510;width:22px;height:22px;border-radius:7px;font-size:12px;cursor:pointer;line-height:1}

/* support message rows with Mia avatar */
.sw-row.them{display:flex;align-items:flex-end;gap:7px;align-self:flex-start;max-width:100%}
.sw-row.them .av{width:22px;height:22px;border-radius:50%;object-fit:cover;flex:0 0 auto;border:1px solid rgba(255,255,255,.18)}
.sw-row.them .sw-msg.them{max-width:calc(88% - 39px)}
.pop .ic{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:0 0 auto;border:1px solid rgba(24,5,16,.18)}