/* ===========================================================================
   Neo-Figur — gemeinsame Komponente (Website + App). Quelle: static/neo/neo.css
   Markup:  <span class="neo neo--md neo-kopf" data-neo="gefunden"><picture>…<img src=".../neo-gefunden-kopf-128.webp" alt="…"></picture></span>
   Groesse ueber Klasse (xs 24 · sm 32 · md 48 · lg 96 · xl bis 240) oder --neo-size.
   Bis 72 px der runde Kopf (neo-<zustand>-kopf-64/128), darüber das Brustbild (neo-<zustand>-160/320/480).
   Zustandswechsel ohne JS: .neo-seq mit zwei Ebenen (.neo-a -> .neo-b), bei reduzierter Bewegung sofort Endzustand.
   Die Figur ist austauschbar (3D-PNG/WebP/Video): nur Dateien in neo/ ersetzen, Klassen bleiben.
   =========================================================================== */
.neo{--neo-size:48px;position:relative;display:inline-block;flex:none;width:var(--neo-size);height:var(--neo-size);line-height:0;vertical-align:middle}
.neo>img,.neo>video,.neo>picture>img{width:100%;height:100%;object-fit:contain;display:block}
.neo--xs{--neo-size:24px}
.neo--sm{--neo-size:32px}
.neo--md{--neo-size:48px}
.neo--lg{--neo-size:96px}
.neo--xl{--neo-size:clamp(150px,20vw,240px)}
/* Kreis-Plakette fuer Chat-Kopfzeilen (klein, ruhiger Hintergrund) */
.neo--badge{border-radius:10px;background:var(--b50);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--b500) 18%,transparent);padding:3px}
.neo--badge>img{width:100%;height:100%}

/* Zustandsfolge: erst A (z. B. arbeitet), dann B (z. B. gefunden) */
.neo-seq>.neo-a,.neo-seq>.neo-b{position:absolute;inset:0}
.neo-seq>.neo-b{opacity:0}
.neo-seq>.neo-a{animation:neoOut .3s ease 2.6s forwards}
.neo-seq>.neo-b{animation:neoIn .35s cubic-bezier(.22,1,.36,1) 2.6s forwards}
@keyframes neoOut{to{opacity:0}}
@keyframes neoIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}

/* Sprechblase */
.neo-say{position:relative;display:inline-block;background:var(--n0);color:var(--ink);border-radius:14px 14px 14px 4px;
  padding:10px 14px;font-size:15px;line-height:1.4;font-weight:560;box-shadow:0 0 0 1px color-mix(in srgb,var(--n950) 6%,transparent),0 2px 4px color-mix(in srgb,var(--n950) 4%,transparent),0 16px 40px -12px color-mix(in srgb,var(--n950) 16%,transparent)}
.neo-say small{display:block;font-size:12px;font-weight:500;color:var(--muted);margin-top:2px}

/* Kennzeichnung "Neo · KI-Assistent" */
.neo-tag{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:560;color:var(--ink)}
.neo-tag small{font-weight:500;color:var(--muted);font-size:12px}

@media (prefers-reduced-motion:reduce){
  .neo-seq>.neo-a{opacity:0!important;animation:none!important}
  .neo-seq>.neo-b{opacity:1!important;animation:none!important;transform:none!important}
}

/* Avatar an Neos Nachrichten (App-Chat, Builder): Element mit .neo-msg bekommt links die kleine Figur.
   Beim Austausch der Figur hier den Dateinamen mitziehen (wie in neo.json). */
.neo-msg{position:relative}
.neo-msg::before{content:"";position:absolute;left:-40px;top:0;width:30px;height:30px;background:url("neo-neutral-kopf-64.webp") center/contain no-repeat}

/* Denk-Anzeige: kleine Figur im Zustand "arbeitet", nach Abschluss (.done) "fertig" (App: ersetzt die alten KI-Orbs) */
.neo-think{display:inline-block;flex:none;width:24px;height:24px;background:url("neo-arbeitet-kopf-64.webp") center/contain no-repeat}
.neo-think.done{background-image:url("neo-fertig-kopf-64.webp")}

/* Run AD — Nicks Neo: runder Kopf bis 72 px (Kreis ist im Bild), Brustbild darüber. Neo ist immer als KI erkennbar:
   Klasse .ki hängt unten rechts das Etikett „KI“ an (Knopf „Neo fragen“, Neo-Kasten, Chat-Kopf, Handy-Knopf). */
.neo>picture{display:block;width:100%;height:100%}
.neo-kopf>picture>img,.neo-kopf>img{border-radius:50%}
/* Run AF (Nick, Testrunde 20.10.): das „KI“-Schild sitzt OBEN ÜBER dem Kopf (mittig, ragt über den Rand hinaus) —
   nie auf dem Gesicht, in allen Größen. */
.neo.ki{overflow:visible}
.neo.ki::after{content:"KI";position:absolute;left:50%;top:-8px;right:auto;bottom:auto;transform:translateX(-50%);z-index:1;
  min-width:18px;height:14px;padding:0 4px;border-radius:7px;
  background:var(--b600);color:var(--n0);font-weight:700;font-size:9px;line-height:14px;letter-spacing:.02em;text-align:center;
  box-shadow:0 0 0 2px var(--n0);pointer-events:none}
.neo.ki.ki-gross::after{min-width:24px;height:18px;font-size:11px;line-height:18px;border-radius:9px;top:-11px}
.neo-ki-tag{display:inline-flex;align-items:center;height:18px;padding:0 6px;border-radius:9px;background:var(--b50);
  color:var(--b700);font-size:11px;font-weight:700;letter-spacing:.02em}
.neo picture{display:block;width:100%;height:100%}.neo picture img{width:100%;height:100%;object-fit:contain;display:block}
