/* ==========================================================================
   GENESYS LABS · CAPITOLO UMA · l'edizione Ocorex × Genesys Labs (0.2.43)
   Uma LLM è l'assistente AI privato di Ocorex: gira sul PC di chi la usa.
   Qui la finestra dell'app nel tema scuro, coi colori presi dal disegno del
   cavallo (camicia cobalto, carote, mantello sauro, lista color crema) e il
   suo carattere, Manrope: regole e misure da src/collab.css del repo Uma-LLM.
   L'entrata la muove uma.js. Tela del capitolo: 22em × 26em.
   ========================================================================== */
@font-face { font-family: 'Manrope Uma'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../vendor/fonts/manrope-latin.woff2) format('woff2'); }

.fr-uma[data-ui] {
  --notte: #0b1028;
  --notte-2: #131a38;
  --notte-3: #1e274d;
  --crema: #f3ecdf;
  --crema-2: #a3a7c0;
  --carota: #ff8a3d;
  --camicia: #1a327c;
  --sauro: #9a6045;
  --foglia: #7ccf6e;
  --cielo: 125, 149, 255;
  --um-font: 'Manrope Uma', 'Segoe UI', system-ui, sans-serif;
  position: relative; width: 22em; height: 26em; font-size: var(--fr-fs, 14px); text-align: left;
}
.fr-uma[data-ui] *, .fr-uma[data-ui] *::before, .fr-uma[data-ui] *::after { box-sizing: border-box; }
.fr-uma[data-attivo="false"] * { animation-play-state: paused !important; }

/* il palco è largo 44 unità e alto 52 */
.um-palco { position: absolute; top: 0; right: 0; bottom: 0; left: 0; font-size: .5em; line-height: 1.35; font-family: var(--um-font); color: var(--crema); }
.um-palco img { display: block; max-width: none; }
.um-palco p { margin: 0; }
.um-palco i, .um-palco em { font-style: normal; }

/* ── la finestra ── */
.um-fin {
  position: absolute; left: 0; top: 0; width: 44em; height: 52em;
  display: flex; flex-direction: column;
  border-radius: 1.3em; overflow: hidden; background: var(--notte);
  border: .1em solid rgba(243, 236, 223, .16);
  box-shadow: 0 2.6em 5em -1.8em rgba(0, 0, 0, .65); /* taste-skill-ignore: la finestra dell'app vera */
}
.um-barra { flex: none; display: flex; align-items: center; gap: .8em; height: 4em; padding: 0 1.3em; background: #0f1530; border-bottom: .08em solid rgba(243, 236, 223, .09); }
.um-avatar { width: 2.4em; height: 2.4em; border-radius: 50%; flex: none; border: .14em solid var(--sauro); background: var(--camicia) url(/redesign/cap/uma-cavallo.webp) 46% 16% / 150% no-repeat; }
.um-nome { font-size: 1.5em; font-weight: 800; letter-spacing: -.035em; }
.um-collab { font-size: 1.02em; font-weight: 600; color: var(--crema-2); white-space: nowrap; }
.um-collab i, .um-credito i { color: var(--carota); font-weight: 800; }
.um-locale { font-size: .9em; font-weight: 650; padding: .12em .75em; border-radius: 99em; border: .1em solid rgba(255, 138, 61, .55); color: var(--carota); }
.um-modello { margin-left: auto; display: inline-flex; align-items: center; gap: .5em; font-size: .95em; color: var(--crema-2); white-space: nowrap; }
.um-modello i { width: .55em; height: .55em; border-radius: 50%; background: var(--foglia); }

/* ── la chat nuova: Uma sale dalla fascia della sua camicia ── */
.um-scena { flex: none; position: relative; height: 11.4em; margin: 1.2em 3em 0; overflow: hidden; border-radius: 0 0 1.5em 1.5em; }
.um-fascia { position: absolute; left: 0; right: 0; bottom: 0; height: 5.4em; border-radius: 1.5em; background: var(--camicia) url(/redesign/cap/uma-carote.svg) 0 0 / 5.4em 5.4em repeat; animation: um-stampa 9s linear infinite; }
@keyframes um-stampa { to { background-position: 5.4em 5.4em; } }
.um-cavallo { position: absolute; left: 50%; bottom: -.1em; width: 10em; height: auto; margin-left: -5em; }
.um-credito { flex: none; display: flex; align-items: center; justify-content: center; gap: .45em; margin-top: .8em; font-size: 1em; font-weight: 600; color: var(--crema-2); }
.um-gl { display: inline-block; width: 1em; height: 1.15em; background: currentColor; -webkit-mask: url(/redesign/cap/uma-genesys.png) center / contain no-repeat; mask: url(/redesign/cap/uma-genesys.png) center / contain no-repeat; }

/* ── la conversazione ── */
.um-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .7em; padding: 1.3em 2em 0; }
.um-tu {
  align-self: flex-end; max-width: 30em; padding: .75em 1.1em; font-size: 1.22em; font-weight: 600; letter-spacing: -.01em;
  border-radius: 1.2em 1.2em .4em 1.2em; background: rgba(var(--cielo), .13); border: .08em solid rgba(var(--cielo), .26);
  transform-origin: 100% 100%;
}
.um-passo {
  display: flex; align-items: center; gap: .8em; height: 3.2em; padding: 0 1em; font-size: 1.05em;
  border-radius: .85em; background: var(--notte-2); border: .09em solid rgba(243, 236, 223, .09);
}
.um-passo b { font-weight: 700; white-space: nowrap; }
.um-passo span:not(.um-spunta) { color: var(--crema-2); white-space: nowrap; }
.um-passo em { margin-left: auto; font-size: .9em; color: var(--crema-2); text-decoration: underline; text-underline-offset: .2em; white-space: nowrap; }
.um-spunta { position: relative; width: 1.25em; height: 1.25em; flex: none; border-radius: 50%; border: .16em solid var(--foglia); }
.um-spunta::after { content: ''; position: absolute; left: 27%; top: 12%; width: 32%; height: 54%; border: solid var(--foglia); border-width: 0 .16em .16em 0; transform: rotate(42deg); }
.um-passo.um-gira .um-spunta { border-color: rgba(243, 236, 223, .2); border-top-color: var(--carota); animation: um-gira .7s linear infinite; }
.um-passo.um-gira .um-spunta::after { display: none; }
@keyframes um-gira { to { transform: rotate(360deg); } }
.um-risposta { margin-top: .3em; font-size: 1.28em; line-height: 1.55; font-weight: 500; }
.um-risposta code { font-family: 'Geist Mono', ui-monospace, Consolas, monospace; font-size: .86em; padding: .1em .4em; border-radius: .35em; background: var(--notte-3); color: #ffd166; }
.um-w { display: inline-block; }

/* ── il campo per scrivere ── */
.um-scrivi {
  flex: none; position: relative; display: flex; flex-direction: column; justify-content: space-between;
  height: 6.2em; margin: 1em 1.6em 1.5em; padding: .9em 1.2em;
  border-radius: 1.3em; background: var(--notte-2); border: .09em solid rgba(243, 236, 223, .14);
}
.um-segnaposto { font-size: 1.1em; color: var(--crema-2); }
.um-cartella { align-self: flex-start; display: inline-flex; gap: .6em; padding: .2em .8em; font-size: .88em; font-weight: 650; border-radius: .6em; border: .09em solid rgba(243, 236, 223, .14); }
.um-cartella i { color: var(--crema-2); font-weight: 500; }
.um-invia { position: absolute; right: 1em; bottom: .9em; display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: .85em; background: var(--carota); color: #1b0e03; }
.um-invia svg { width: 1.25em; height: 1.25em; }

@media (prefers-reduced-motion: reduce) {
  .um-fascia, .um-passo.um-gira .um-spunta { animation: none; }
}
html.leggero .um-fascia { animation: none; }
