:root{
  --neo-bg:#070506;
  --neo-panel:rgba(18,7,9,.92);
  --neo-panel-soft:rgba(255,255,255,.05);
  --neo-text:#fff7f8;
  --neo-muted:rgba(255,232,235,.72);
  --neo-stroke:rgba(255,162,176,.16);
  --neo-accent:#d14a5f;
  --neo-accent-2:#ffb1bd;
  --neo-assistant:#1f0f12;
  --neo-user:#fff0f2;
  --neo-user-text:#271417;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{
  color:var(--neo-text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(176,35,56,.28), transparent 36%),
    radial-gradient(circle at 78% 10%, rgba(120,11,30,.22), transparent 28%),
    linear-gradient(180deg, #130607 0%, #040405 70%, #020203 100%);
}
.neo-shell{padding:12px;min-height:100vh}
.neo-card{
  min-height:calc(100vh - 24px);
  display:flex;
  flex-direction:column;
  border-radius:22px;
  border:1px solid var(--neo-stroke);
  background:var(--neo-panel);
  box-shadow:0 18px 40px rgba(0,0,0,.28);
  overflow:hidden;
}
.neo-head{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
  padding:18px 18px 14px;
  border-bottom:1px solid var(--neo-stroke);
}
.neo-kicker{
  margin:0 0 6px;
  color:var(--neo-muted);
  letter-spacing:.16em;
  text-transform:uppercase;
  font-size:11px;
}
.neo-head h1{margin:0;font-size:clamp(1.4rem,2vw,2rem)}
.neo-copy{margin:8px 0 0;color:var(--neo-muted);line-height:1.5;max-width:44ch}
.neo-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.neo-pill{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--neo-stroke);
  background:var(--neo-panel-soft);
  color:var(--neo-muted);
  font-size:13px;
}
.neo-pill.is-online{
  color:#dff9ea;
  border-color:rgba(99,212,140,.28);
  background:rgba(99,212,140,.14);
}
.neo-pill.is-offline{
  color:#ffd6db;
  border-color:rgba(209,74,95,.28);
  background:rgba(209,74,95,.14);
}
.neo-quick{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:14px 18px 0;
}
.neo-chip{
  border:1px solid var(--neo-stroke);
  background:rgba(255,255,255,.04);
  color:var(--neo-text);
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  font:inherit;
}
.neo-chip:hover{background:rgba(255,255,255,.09)}
.neo-messages{
  flex:1 1 auto;
  min-height:320px;
  overflow:auto;
  padding:16px 18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.neo-message{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:86%;
}
.neo-message.is-user{align-self:flex-end}
.neo-message.is-assistant{align-self:flex-start}
.neo-message-meta{
  display:flex;
  gap:8px;
  padding:0 4px;
  color:var(--neo-muted);
  font-size:12px;
}
.neo-bubble{
  padding:14px 16px;
  border-radius:18px;
  line-height:1.58;
  white-space:pre-wrap;
  word-break:break-word;
}
.neo-message.is-assistant .neo-bubble{
  background:var(--neo-assistant);
  border-top-left-radius:6px;
}
.neo-message.is-user .neo-bubble{
  background:var(--neo-user);
  color:var(--neo-user-text);
  border-top-right-radius:6px;
}
.neo-message.is-typing .neo-bubble{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.neo-message.is-typing .neo-bubble span{
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--neo-accent-2);
  animation:neoPulse 1.1s infinite ease-in-out;
}
.neo-message.is-typing .neo-bubble span:nth-child(2){animation-delay:.12s}
.neo-message.is-typing .neo-bubble span:nth-child(3){animation-delay:.24s}
.neo-form{
  border-top:1px solid var(--neo-stroke);
  padding:16px 18px 18px;
}
.neo-form textarea{
  width:100%;
  min-height:56px;
  max-height:180px;
  resize:none;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04);
  color:var(--neo-text);
  padding:14px 16px;
  font:inherit;
  line-height:1.45;
}
.neo-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:12px;
}
.neo-btn{
  min-height:46px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid var(--neo-stroke);
  cursor:pointer;
  font:inherit;
  font-weight:700;
}
.neo-btn-soft{
  background:rgba(255,255,255,.05);
  color:var(--neo-text);
}
.neo-btn-primary{
  border-color:rgba(255,162,176,.3);
  background:linear-gradient(180deg, rgba(209,74,95,.28), rgba(122,18,33,.44));
  color:var(--neo-text);
}
.neo-btn:hover{filter:brightness(1.04)}
body.neo-embed .neo-shell{padding:0;min-height:100vh}
body.neo-embed .neo-card{
  min-height:100vh;
  border-radius:0;
  border-left:0;
  border-right:0;
}
body.neo-embed .neo-head{padding:14px 14px 10px}
body.neo-embed .neo-quick{padding:10px 14px 0}
body.neo-embed .neo-messages{padding:14px}
body.neo-embed .neo-form{padding:14px}

@keyframes neoPulse{
  0%,80%,100%{opacity:.35;transform:translateY(0)}
  40%{opacity:1;transform:translateY(-2px)}
}

@media (max-width:720px){
  .neo-head{flex-direction:column}
  .neo-badges{justify-content:flex-start}
  .neo-message{max-width:100%}
  .neo-actions > *{flex:1 1 0}
}
