#nova-root * { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-body); }

#nova-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(255,66,100,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
#nova-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(255,66,100,0.5); }
#nova-fab svg { width: 24px; height: 24px; fill: white; transition: opacity 0.2s; }
#nova-fab .icon-close { display: none; }
#nova-fab.open .icon-chat { display: none; }
#nova-fab.open .icon-close { display: block; }

#nova-panel {
  position: fixed; bottom: 96px; right: 28px; z-index: 9999;
  width: 360px; height: 520px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#nova-panel.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }

#nova-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}
#nova-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,66,100,0.15);
  border: 1px solid rgba(255,66,100,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; color: var(--accent);
}
#nova-header-text { flex: 1 }
#nova-header-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.2 }
#nova-header-sub { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 1px }
.nova-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status); animation: nova-pulse 2s infinite }
@keyframes nova-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

#nova-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
#nova-messages::-webkit-scrollbar { width: 4px }
#nova-messages::-webkit-scrollbar-track { background: transparent }
#nova-messages::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 2px }

.nova-msg { display: flex; gap: 8px; align-items: flex-end }
.nova-msg.user { flex-direction: row-reverse }
.nova-msg-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: rgba(255,66,100,0.12); border: 1px solid rgba(255,66,100,0.25); color: var(--accent);
}
.nova-msg.user .nova-msg-av { background: var(--surface-2); border-color: var(--hairline-strong); color: var(--text-secondary) }

.nova-bubble {
  max-width: 78%; padding: 10px 13px;
  font-size: 0.825rem; line-height: 1.6; color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px 12px 12px 3px;
}
.nova-msg.user .nova-bubble {
  background: rgba(255,66,100,0.14);
  border-color: rgba(255,66,100,0.28);
  border-radius: 12px 12px 3px 12px;
  color: var(--text);
}

.nova-typing { display: flex; gap: 4px; align-items: center; padding: 4px 2px }
.nova-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: nova-bounce 1.2s infinite }
.nova-typing span:nth-child(2) { animation-delay: 0.2s }
.nova-typing span:nth-child(3) { animation-delay: 0.4s }
@keyframes nova-bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

#nova-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; flex-shrink: 0 }
.nova-sq {
  font-size: 0.7rem; padding: 5px 10px; border-radius: 20px;
  border: 1px solid var(--hairline-strong); color: var(--text-muted);
  background: transparent; cursor: pointer; font-family: inherit;
  transition: all 0.18s; white-space: nowrap;
}
.nova-sq:hover { border-color: var(--accent); color: var(--accent) }

#nova-input-area { padding: 12px 14px 14px; border-top: 1px solid var(--hairline); flex-shrink: 0; background: var(--surface) }
#nova-input-row { display: flex; gap: 8px; align-items: flex-end }
#nova-input {
  flex: 1; background: var(--bg);
  border: 1px solid var(--hairline-strong); border-radius: 8px;
  color: var(--text); font-size: 0.825rem; padding: 9px 12px;
  resize: none; outline: none; line-height: 1.5;
  font-family: inherit; max-height: 100px; overflow-y: auto;
  transition: border-color 0.2s;
}
#nova-input:focus { border-color: var(--accent) }
#nova-input::placeholder { color: var(--text-muted) }
#nova-send {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  background: var(--accent); color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s, transform 0.15s;
}
#nova-send:hover { background: var(--accent-deep); transform: scale(1.05) }
#nova-send:disabled { background: var(--hairline-strong); cursor: not-allowed; transform: none }
#nova-send svg { width: 15px; height: 15px; fill: white }
#nova-disclaimer { text-align: center; font-size: 0.63rem; color: var(--text-muted); margin-top: 8px; line-height: 1.4; padding: 0 2px }

@media (max-width: 480px) {
  #nova-panel { width: calc(100vw - 24px); right: 12px; bottom: 88px; height: 70vh }
  #nova-fab { bottom: 20px; right: 16px }
}
