:root{
  --ns-primary:#F9A8BB;
  --ns-secondary:#F5F1E6;
  --ns-text:#1F2937;
  --ns-surface:rgba(255,255,255,.92);
  --ns-border:rgba(234,223,214,.9);
  --ns-shadow:0 28px 80px rgba(15,23,42,.18);
}

.nini-support-widget{
  position:fixed;
  left:22px;
  bottom:22px;
  z-index:99999;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ns-text);
}

.nini-support-fab{
  width:64px;
  height:64px;
  border:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--ns-primary),#f38cab);
  box-shadow:0 18px 38px rgba(249,168,187,.35);
  color:#fff;
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease;
  position:relative;
}

.nini-support-fab:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 22px 48px rgba(249,168,187,.43)}
.nini-support-fab:active{transform:translateY(0) scale(.98)}

.nini-support-fab-badge{
  position:absolute;
  top:-2px;
  right:-2px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  line-height:18px;
  font-weight:800;
  box-shadow:0 8px 18px rgba(239,68,68,.28);
}

.nini-support-panel{
  position:absolute;
  left:0;
  bottom:78px;
  width:min(414px,calc(100vw - 32px));
  height:min(640px,calc(100vh - 120px));
  border-radius:30px;
  background:var(--ns-surface);
  backdrop-filter:blur(24px);
  border:1px solid var(--ns-border);
  box-shadow:var(--ns-shadow);
  overflow:hidden;
  display:none;
}

.nini-support-widget.is-open .nini-support-panel{display:flex;flex-direction:column;animation:nsPanelIn .22s ease}
@keyframes nsPanelIn{from{transform:translateY(12px) scale(.98);opacity:0}to{transform:none;opacity:1}}

.ns-topbar{
  padding:15px 15px 13px;
  background:linear-gradient(135deg,rgba(249,168,187,.20),rgba(245,241,230,.95));
  border-bottom:1px solid rgba(234,223,214,.72);
}

.ns-topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.ns-brand{display:flex;align-items:center;gap:12px;min-width:0}
.ns-brand-mark{
  width:44px;height:44px;border-radius:16px;
  background:linear-gradient(135deg,var(--ns-primary),var(--ns-secondary));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.65),0 10px 24px rgba(249,168,187,.18);
  display:grid;place-items:center;flex:0 0 auto;color:#7a4557;
}
.ns-brand-text{min-width:0}
.ns-title{margin:0;font-size:16px;font-weight:900;line-height:1.1;letter-spacing:-.03em}
.ns-subtitle{margin:5px 0 0;font-size:12px;line-height:1.4;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.ns-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}

.ns-action-btn,.ns-action-chip{
  min-height:38px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  border:1px solid rgba(234,223,214,.95);
  background:linear-gradient(180deg,#fff,rgba(255,252,249,.92));
  color:#3b4252;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease,color .18s ease,opacity .18s ease;
}
.ns-action-btn svg,.ns-action-chip svg{flex:0 0 auto}
.ns-action-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(249,168,187,.72);
  box-shadow:0 14px 28px rgba(249,168,187,.14);
  color:#1f2937;
  background:linear-gradient(180deg,#fff,#fff7f9);
}
.ns-action-btn.secondary{
  background:linear-gradient(135deg,#fff,rgba(245,241,230,.95));
  color:#5f3748;
}
.ns-action-btn.secondary:hover{
  background:linear-gradient(135deg,#fff,rgba(249,168,187,.10));
  color:#4b2740;
}
.ns-action-btn.switch{
  background:linear-gradient(135deg,var(--ns-primary),#f38cab);
  color:#fff;
  border-color:rgba(249,168,187,.55);
  box-shadow:0 12px 26px rgba(249,168,187,.28);
}
.ns-action-btn.switch:hover{
  background:linear-gradient(135deg,#f39ab0,#ec769d);
  color:#fff;
  box-shadow:0 14px 32px rgba(249,168,187,.35);
}
.ns-action-btn.ghost{
  width:38px;
  padding:0;
  justify-content:center;
  background:linear-gradient(180deg,#fff,rgba(255,252,249,.92));
}
.ns-action-btn.ghost:hover{
  background:linear-gradient(180deg,rgba(249,168,187,.14),rgba(245,241,230,.76));
  color:#8e3557;
}
.ns-action-btn.danger{
  background:linear-gradient(135deg,#fff,#fff6f7);
  color:#9d3f63;
  border-color:rgba(249,168,187,.45);
}
.ns-action-btn.danger:hover{
  background:linear-gradient(135deg,rgba(249,168,187,.18),rgba(255,245,247,.95));
  color:#8e3557;
}
.ns-action-chip.live{background:rgba(16,185,129,.10);color:#047857;border-color:rgba(16,185,129,.18);cursor:default}
.ns-action-chip.muted{background:rgba(148,163,184,.12);color:#64748b;border-color:rgba(148,163,184,.18);cursor:default}

.ns-thread{
  flex:1;
  overflow:auto;
  padding:18px 16px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:
    radial-gradient(circle at top left, rgba(249,168,187,.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(245,241,230,.72), transparent 28%),
    linear-gradient(180deg,#fff 0%,#fffdfb 100%);
}

.ns-thread-empty{
  margin:auto;
  max-width:250px;
  text-align:center;
  color:#94a3b8;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  padding:20px 16px;
}
.ns-thread-empty strong{font-size:15px;color:#334155}
.ns-thread-empty span{font-size:13px;line-height:1.55}

.ns-message{
  max-width:82%;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.ns-message.user{align-self:flex-end}
.ns-message.bot,.ns-message.system{align-self:flex-start}
.ns-bubble{
  position:relative;
  padding:12px 14px;
  font-size:14px;
  line-height:1.56;
  white-space:pre-wrap;
  word-break:break-word;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
  border:1px solid rgba(234,223,214,.95);
}
.ns-message.bot .ns-bubble,.ns-message.system .ns-bubble{
  background:#fff;
  border-radius:18px 18px 18px 8px;
}
.ns-message.user .ns-bubble{
  background:linear-gradient(135deg,var(--ns-primary),#f38cab);
  color:#fff;
  border-color:rgba(249,168,187,.45);
  border-radius:18px 18px 8px 18px;
}
.ns-message.system .ns-bubble{
  background:linear-gradient(135deg,rgba(245,241,230,.95),#fff);
  color:#6b7280;
  font-size:13px;
}
.ns-message.bot .ns-bubble::after,
.ns-message.system .ns-bubble::after,
.ns-message.user .ns-bubble::after{
  content:'';
  position:absolute;
  bottom:10px;
  width:10px;
  height:10px;
  transform:rotate(45deg);
  background:inherit;
  border-radius:2px;
  opacity:.95;
}
.ns-message.bot .ns-bubble::after,
.ns-message.system .ns-bubble::after{
  left:-4px;
  border-left:1px solid rgba(234,223,214,.95);
  border-bottom:1px solid rgba(234,223,214,.95);
}
.ns-message.user .ns-bubble::after{
  right:-4px;
  border-right:1px solid rgba(249,168,187,.35);
  border-top:1px solid rgba(249,168,187,.35);
}
.ns-meta{font-size:11px;color:#94a3b8;padding:0 4px}

.ns-composer{
  padding:12px 14px 14px;
  background:rgba(255,255,255,.92);
  border-top:1px solid rgba(234,223,214,.72);
}
.ns-composer-row{display:flex;gap:10px;align-items:flex-end}
.ns-input{
  flex:1;
  min-height:48px;
  max-height:132px;
  resize:none;
  border-radius:18px;
  border:1px solid rgba(234,223,214,.95);
  padding:12px 14px;
  outline:none;
  font-size:14px;
  line-height:1.45;
  background:#fff;
}
.ns-input:focus{border-color:var(--ns-primary);box-shadow:0 0 0 4px rgba(249,168,187,.15)}
.ns-send{
  height:48px;
  min-width:52px;
  padding:0 16px;
  border:0;
  border-radius:18px;
  font-weight:900;
  background:linear-gradient(135deg,var(--ns-primary),#f38cab);
  color:#fff;
  box-shadow:0 10px 24px rgba(249,168,187,.3);
  cursor:pointer;
  display:grid;
  place-items:center;
}
.ns-send:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}

.ns-toast{
  position:absolute;
  left:50%;
  bottom:82px;
  transform:translateX(-50%) translateY(8px);
  background:rgba(17,24,39,.92);
  color:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-size:12px;
  font-weight:700;
  box-shadow:0 18px 40px rgba(15,23,42,.22);
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
  white-space:nowrap;
}
.ns-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:480px){
  .nini-support-widget{left:16px;bottom:16px}
  .nini-support-panel{width:calc(100vw - 32px);height:min(74vh,680px);border-radius:26px}
  .nini-support-fab{width:58px;height:58px}
  .ns-message{max-width:88%}
  .ns-subtitle{max-width:190px}
  .ns-head-actions{gap:6px}
  .ns-action-btn{padding:0 12px}
}



button.nini-support-fab {
    border-radius: 20px !important;
    display: flex;
}
.ns-action-btn,.ns-send{
border-radius: 16px !important;
}
.ns-subtitle{
  display: none !important;
}
.ns-action-btn svg {
    vertical-align: middle !important;
}

.ns-action-btn span {
    margin-left: 5px;
}