.nn-bot{
  position:fixed !important;
  right:16px !important;
  bottom:16px !important;
  left:auto !important;
  top:auto !important;
  z-index:10020 !important;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
  width:auto;
  max-width:calc(100vw - 20px);
  pointer-events:auto;
}

.nn-bot__trigger{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:11px 16px;
  border-radius:999px;
  background:rgba(10,10,10,0.96);
  color:#fff;
  box-shadow:0 16px 42px rgba(0,0,0,0.22);
  transition:transform 0.25s var(--snap),background 0.25s,box-shadow 0.25s;
  backdrop-filter:blur(10px);
}
.nn-bot__trigger:hover{
  transform:translateY(-2px) scale(1.02);
  background:#111;
  box-shadow:0 20px 46px rgba(0,0,0,0.26);
}
.nn-bot__trigger-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--wine-light);
  box-shadow:0 0 0 6px rgba(160,51,85,0.12);
}
.nn-bot__trigger-text{
  font-size:0.68rem;
  font-weight:700;
  letter-spacing:0.04em;
  text-transform:none;
}

.nn-bot__panel{
  width:min(336px,calc(100vw - 24px));
  max-height:min(74vh,620px);
  background:rgba(255,255,255,0.98);
  backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,0.42);
  box-shadow:0 28px 80px rgba(0,0,0,0.22);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-radius:26px;
  opacity:0;
  transform:translateY(14px) scale(0.98);
  pointer-events:none;
  transition:opacity 0.25s ease,transform 0.25s ease;
}
.nn-bot.is-open .nn-bot__panel{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}

.nn-bot__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  background:var(--black);
  color:#fff;
}
.nn-bot__head-title{
  font-family:var(--display);
  font-size:0.95rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  line-height:1;
}
.nn-bot__head-sub{
  font-family:var(--code);
  font-size:0.52rem;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--blush);
  margin-top:4px;
}
.nn-bot__close{
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.12rem;
  color:var(--light);
  transition:background 0.2s,color 0.2s;
}
.nn-bot__close:hover{
  background:rgba(255,255,255,0.08);
  color:#fff;
}

.nn-bot__body{
  padding:16px;
  background:linear-gradient(180deg,#ffffff 0%,#fafafa 100%);
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:176px;
  -webkit-overflow-scrolling:touch;
}

.nn-bot__msg{
  max-width:85%;
  padding:12px 14px;
  border-radius:18px;
  line-height:1.5;
  font-size:0.94rem;
  word-wrap:break-word;
}
.nn-bot__msg--bot{
  align-self:flex-start;
  background:#fff;
  color:var(--black);
  border:1px solid rgba(0,0,0,0.05);
  box-shadow:0 7px 16px rgba(0,0,0,0.035);
}
.nn-bot__msg--user{
  align-self:flex-end;
  background:var(--black);
  color:#fff;
  border:1px solid var(--black);
}

.nn-bot__typing{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  font-size:0.72rem;
  letter-spacing:0.02em;
  color:var(--grey);
  background:#fff;
  border:1px solid rgba(0,0,0,0.06);
}

.nn-bot__actions{
  padding:14px 16px 16px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  background:#fff;
  border-top:1px solid rgba(0,0,0,0.05);
}

.nn-bot__choice,
.nn-bot__restart{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background:#fff;
  color:var(--black);
  font-size:0.72rem;
  font-weight:700;
  letter-spacing:0.02em;
  text-transform:none;
  transition:border-color 0.2s,transform 0.2s var(--snap),color 0.2s,background 0.2s;
}
.nn-bot__choice:hover,
.nn-bot__restart:hover{
  border-color:var(--wine);
  color:var(--wine);
  background:#fff;
  transform:translateY(-1px);
}

.nn-bot__go{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 16px;
  border-radius:999px;
  background:var(--wine);
  color:#fff;
  font-size:0.72rem;
  font-weight:700;
  letter-spacing:0.02em;
  text-transform:none;
  transition:background 0.2s,transform 0.2s var(--snap),box-shadow 0.2s;
  box-shadow:0 10px 20px rgba(122,37,64,0.16);
}
.nn-bot__go:hover{
  background:var(--wine-light);
  transform:translateY(-1px);
}

@media(max-width:900px){
  .nn-bot{
    right:12px !important;
    bottom:12px !important;
  }

  .nn-bot__panel{
    width:min(330px,calc(100vw - 20px));
    max-height:72vh;
    border-radius:22px;
  }

  .nn-bot__body{
    min-height:164px;
  }
}

@media(max-width:640px){
  .nn-bot{
    right:10px !important;
    bottom:10px !important;
    max-width:calc(100vw - 12px);
  }

  .nn-bot__trigger{
    padding:10px 14px;
    gap:8px;
  }

  .nn-bot__trigger-text{
    font-size:0.66rem;
  }

  .nn-bot__panel{
    width:calc(100vw - 16px);
    max-height:70vh;
    border-radius:20px;
  }

  .nn-bot__head{
    padding:14px 16px;
  }

  .nn-bot__head-title{
    font-size:0.9rem;
  }

  .nn-bot__head-sub{
    font-size:0.5rem;
  }

  .nn-bot__body{
    padding:14px;
    min-height:150px;
    gap:9px;
  }

  .nn-bot__msg{
    max-width:90%;
    font-size:0.9rem;
    padding:11px 13px;
    line-height:1.45;
  }

  .nn-bot__actions{
    flex-direction:column;
    padding:12px 14px 14px;
    gap:8px;
  }

  .nn-bot__choice,
  .nn-bot__restart,
  .nn-bot__go{
    width:100%;
    min-height:42px;
    font-size:0.74rem;
  }
}

@media(max-width:420px){
  .nn-bot{
    right:8px !important;
    bottom:8px !important;
  }

  .nn-bot__panel{
    width:calc(100vw - 12px);
    max-height:68vh;
    border-radius:18px;
  }

  .nn-bot__trigger{
    padding:10px 13px;
  }

  .nn-bot__trigger-text{
    font-size:0.64rem;
  }

  .nn-bot__body{
    min-height:138px;
  }

  .nn-bot__msg{
    font-size:0.88rem;
  }
}