Elffuss BraidHub

utopia-ia/elffuss-claw public

c019865fced5 · 39.4 KiBRawPermalink
1/* Elffuss — tema "aurora local": charcoal, brass y un secundario índigo */
2:root {
3 --bg: #090a11;
4 --bg2: #101317;
5 --bg3: #161a24;
6 --line: #20252c;
7 --fg: #eae8f2;
8 --muted: #8b929c;
9 --accent: #c8a06a;
10 --accent2: #6e63c5;
11 --ok: #7faa7f;
12 --warn: #c9a15a;
13 --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
14}
15* { box-sizing: border-box; }
16html, body { height: 100%; }
17body {
18 margin: 0;
19 font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
20 background: var(--bg);
21 color: var(--fg);
22 display: flex;
23 flex-direction: column;
24 overflow: hidden;
25}
26
27/* ---------- header ---------- */
28header {
29 display: flex;
30 align-items: center;
31 justify-content: space-between;
32 gap: 12px;
33 padding: 10px 16px;
34 border-bottom: 1px solid var(--line);
35 background: var(--bg2);
36}
37.brand { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-family: var(--serif); letter-spacing: .2px; }
38.logo { width: 30px; height: 30px; }
39.beta { color: var(--accent2); font-size: .75rem; }
40.claim { color: var(--muted); font-size: .8rem; font-style: italic; }
41.controls { display: flex; align-items: center; gap: 10px; }
42.model-pick { font-size: .9rem; color: var(--muted); }
43
44/* Cabecera en UNA línea. Se partía en dos y tres (2026-09-13) por tres cosas a
45 la vez: el <select> de modelo toma el ancho de su opción más larga —la del 27B
46 pasa de 120 caracteres— y sin tope aplastaba al resto; la etiqueta que lo
47 envuelve es en línea, así que el icono se iba a una fila y el selector a otra;
48 y ni la marca, ni el lema, ni el chip de disco tenían nowrap, de modo que en vez
49 de encoger se partían. Regla: NADA en la cabecera parte línea; lo que sobra se
50 recorta. Va antes del bloque responsive para que en móvil siga mandando ese. */
51.brand { min-width: 0; }
52.brand b, .beta { white-space: nowrap; flex: none; }
53.claim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
54#build { flex: none; }
55.controls { flex: none; }
56.model-pick { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
57.model-pick select { max-width: min(30vw, 380px); text-overflow: ellipsis; }
58#disk-chip { white-space: nowrap; flex: none; padding: 4px 10px; font-size: .78rem; border-radius: 999px; }
59select {
60 background: var(--bg3);
61 color: var(--fg);
62 border: 1px solid var(--line);
63 border-radius: 8px;
64 padding: 6px 8px;
65 font-size: .85rem;
66}
67.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
68.dot.off { background: #4a5062; }
69.dot.loading { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
70.dot.on { background: var(--ok); }
71.dot.gpu { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
72@keyframes pulse { 50% { opacity: .35; } }
73
74/* ---------- layout ---------- */
75main {
76 flex: 1;
77 display: grid;
78 grid-template-columns: minmax(360px, 42%) 1fr;
79 min-height: 0;
80}
81
82/* botón flotante chat↔vista: solo existe en móvil */
83#btn-flip {
84 display: none;
85 position: fixed; bottom: 86px; right: 14px; z-index: 60;
86 padding: 10px 16px; font-size: .9rem; color: #fff; border: none;
87 border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent2));
88 box-shadow: 0 8px 24px rgba(0, 0, 0, .5); cursor: pointer;
89}
90
91
92/* ---------- chat ---------- */
93#chat {
94 display: flex;
95 flex-direction: column;
96 border-right: 1px solid var(--line);
97 min-height: 0;
98 min-width: 0; /* los chips en nowrap no deben ensanchar la columna */
99}
100#log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
101.msg { padding: 10px 14px; border-radius: 14px; max-width: 92%; white-space: pre-wrap; word-break: break-word; line-height: 1.45; font-size: .93rem; }
102.msg.sys { background: linear-gradient(135deg, #1c1430, #14202e); border: 1px solid var(--line); white-space: normal; }
103.msg.user { background: var(--accent2); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
104.msg.assistant { background: var(--bg3); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
105.msg.err { border-color: #a03050; }
106.msg.thinking {
107 display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
108 background: var(--bg3); border: 1px dashed var(--line);
109 align-self: flex-start; color: var(--muted); font-size: .85rem;
110}
111.msg.thinking .mini { width: 22px; height: 22px; }
112.msg.thinking .dots i {
113 display: inline-block; width: 6px; height: 6px; margin-left: 4px;
114 border-radius: 50%; background: var(--accent);
115 animation: bounce 1.2s ease-in-out infinite;
116}
117.msg.thinking .dots i:nth-child(2) { animation-delay: .2s; }
118.msg.thinking .dots i:nth-child(3) { animation-delay: .4s; }
119@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
120.msg.thinking .gen {
121 width: 100%; font-family: ui-monospace, monospace; font-size: .72rem;
122 white-space: pre-wrap; word-break: break-word;
123 max-height: 168px; overflow-y: auto; color: #5f6880;
124 background: rgba(0,0,0,.16); border-radius: 8px; padding: 6px 8px; margin-top: 4px;
125}
126.msg.thinking .gen:empty { display: none; }
127.msg.thinking .gen.tool-preview {
128 font-family: inherit; font-size: .8rem; color: #a9b2c8;
129 background: none; max-height: none; overflow: visible; padding: 2px 0;
130}
131.msg.tool { color: var(--accent); font-size: .8rem; background: none; padding: 0 14px; }
132.msg.tool-result { font-size: .8rem; color: var(--muted); background: var(--bg2); border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; }
133.msg.tool-result.err summary { color: var(--warn); }
134.msg.tool-result pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow: auto; }
135.msg.tool-result summary { cursor: pointer; }
136
137#chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; }
138.chip {
139 font-size: .78rem;
140 color: var(--muted);
141 border: 1px solid var(--line);
142 border-radius: 999px;
143 padding: 4px 12px;
144 cursor: pointer;
145 transition: all .15s;
146}
147.chip:hover { color: var(--fg); border-color: var(--accent); }
148
149/* El campo de texto va en SU PROPIA FILA y los botones debajo.
150 Antes compartía fila con ellos, y como los botones se inyectan desde el JS la
151 fila fue creciendo hasta seis: el sitio donde se escribe acabó siendo una
152 píldora estrecha, del mismo tamaño y forma que sus vecinas, distinguible solo
153 por un borde de un píxel. O sea el elemento MENOS visible de la barra, que es
154 justo al revés de lo que tiene que ser en un chat. */
155#composer {
156 display: flex;
157 flex-wrap: wrap;
158 gap: 8px;
159 padding: 12px 14px 16px;
160}
161#prompt {
162 /* Fila entera y la primera, pase lo que pase con los botones de al lado. */
163 flex: 1 0 100%;
164 order: -1;
165 background: var(--bg2, var(--bg3));
166 border: 1.5px solid var(--line);
167 border-radius: 14px;
168 color: var(--fg);
169 padding: 15px 16px;
170 font-size: 1rem;
171 outline: none;
172 transition: border-color .15s ease, box-shadow .15s ease;
173}
174/* El marcador de posición tiene que LEERSE: es lo único que dice para qué
175 sirve la caja cuando está vacía. */
176#prompt::placeholder { color: var(--fg3, #8b8b9e); opacity: 1; }
177#prompt:focus {
178 border-color: var(--accent2);
179 box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 22%, transparent);
180}
181#send {
182 background: linear-gradient(135deg, var(--accent), var(--accent2));
183 color: #fff;
184 border: none;
185 border-radius: 12px;
186 padding: 0 18px;
187 font-size: 1rem;
188 cursor: pointer;
189}
190.cbtn.hardwork {
191 display: inline-flex; align-items: center; gap: 5px;
192 background: var(--bg3); border: 1px solid var(--line); color: var(--fg-dim, #9aa0ab);
193 border-radius: 12px; padding: 0 12px; font-size: .78rem; cursor: pointer; white-space: nowrap;
194}
195.cbtn.hardwork:hover { border-color: var(--accent2); color: var(--fg); }
196.cbtn.hardwork.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2a18, #2a1f40); box-shadow: 0 0 0 1px var(--accent) inset; }
197@media (max-width: 560px) { .cbtn.hardwork .hw-txt { display: none; } }
198
199/* ---------- visualizador ---------- */
200/* min-width: 0 para que la fila de pestañas se desplace DENTRO y no ensanche la
201 columna: en un teléfono, con 7 pestañas, #viz medía 447 px en una pantalla de
202 390 y la página entera se desplazaba de lado (y «💬 Chat» quedaba fuera). */
203#viz { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg2); }
204#tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
205#tabs button {
206 background: none;
207 border: none;
208 border-bottom: 2px solid transparent;
209 color: var(--muted);
210 padding: 8px 14px;
211 font-size: .88rem;
212 cursor: pointer;
213}
214#tabs button.active { color: var(--fg); border-bottom-color: var(--accent); }
215#tabs button:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; border-radius: 4px; }
216/* lo que señala una ruta (#/tareas/<id>, #/skills/<nombre>…) */
217.resaltado { outline: 2px solid var(--accent); outline-offset: 2px; }
218/* enlaces en el chat: URL de fuera y rutas de Claw */
219.msg a, .msg.tool-result pre a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
220.msg.tool .tool-link { text-decoration: none; margin-left: 2px; }
221.panel { display: none; flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
222.panel.active { display: block; }
223#panel-vista { padding: 0; position: relative; }
224#panel-vista.active { display: flex; }
225#appframe { flex: 1; width: 100%; height: 100%; border: none; background: #0d1117; }
226#vista-empty[hidden] { display: none; }
227#vista-empty {
228 position: absolute; inset: 0;
229 display: flex; flex-direction: column; align-items: center; justify-content: center;
230 color: var(--muted); text-align: center; gap: 8px;
231}
232#vista-empty .big { width: 120px; opacity: .5; }
233
234/* ---------- escaparate de descarga (mini-UIs mientras baja el modelo) ---------- */
235#loading-stage {
236 position: absolute; inset: 0; z-index: 4; overflow: hidden;
237 display: flex; align-items: center; justify-content: center;
238 background: radial-gradient(1100px 700px at 50% 32%, #1a1236, #0b0d12 72%);
239}
240#loading-stage .ls-galaxy { position: absolute; inset: 0; }
241#loading-stage .ls-galaxy canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; }
242#loading-stage .ls-content {
243 position: relative; z-index: 1; width: 100%; max-width: 520px; padding: 24px;
244 display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
245}
246#loading-stage .ls-window {
247 width: min(440px, 82vw); aspect-ratio: 4 / 3; display: flex; flex-direction: column;
248 background: #0b0d12; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
249 box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(124, 92, 255, .12),
250 0 0 60px rgba(124, 92, 255, .18);
251}
252#loading-stage .ls-bar-top {
253 display: flex; align-items: center; gap: 6px; padding: 8px 12px;
254 background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--line);
255}
256#loading-stage .ls-bar-top .d { width: 9px; height: 9px; border-radius: 50%; opacity: .8; }
257#loading-stage .ls-bar-top .d.r { background: #ff6b6b; }
258#loading-stage .ls-bar-top .d.y { background: #ffc94a; }
259#loading-stage .ls-bar-top .d.g { background: #5fbf6e; }
260#loading-stage .ls-badge {
261 margin-left: 8px; font-size: .72rem; color: var(--muted);
262 overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
263}
264#loading-stage .ls-frames { position: relative; flex: 1; }
265#loading-stage .ls-frame {
266 position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #090a11;
267 opacity: 0; transition: opacity .6s ease; pointer-events: none;
268}
269#loading-stage .ls-frame.on { opacity: 1; }
270#loading-stage .ls-head {
271 margin-top: 4px; font-size: 1.18rem; font-weight: 600;
272 background: linear-gradient(90deg, var(--accent), var(--accent2));
273 -webkit-background-clip: text; background-clip: text; color: transparent;
274}
275#loading-stage .ls-sub { margin: -4px 0 2px; color: var(--muted); font-size: .86rem; line-height: 1.5; max-width: 420px; }
276#loading-stage .ls-sub b { color: var(--fg); }
277#loading-stage .ls-prog { width: min(320px, 76vw); height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; }
278#loading-stage .ls-bar {
279 height: 100%; width: 0; border-radius: 3px;
280 background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .3s ease;
281}
282#loading-stage .ls-bar.indet { width: 38%; animation: indet 1.1s ease-in-out infinite; }
283#loading-stage .ls-progtext { font-size: .74rem; color: var(--muted); font-family: ui-monospace, monospace; min-height: 1.1em; }
284@media (prefers-reduced-motion: reduce) {
285 #loading-stage .ls-frame { transition: none; }
286 #loading-stage .ls-bar.indet { animation: none; }
287}
288@media (max-width: 820px) {
289 #loading-stage .ls-window { width: min(360px, 86vw); }
290 #loading-stage .ls-head { font-size: 1.05rem; }
291}
292.msg.sys .avatar { width: 44px; height: 44px; float: left; margin: 2px 10px 4px 0; }
293
294/* ---------- tarjetas y controles de paneles ---------- */
295.card {
296 display: flex; align-items: center; gap: 10px;
297 background: var(--bg3);
298 border: 1px solid var(--line);
299 border-radius: 10px;
300 padding: 10px 12px;
301 margin-bottom: 8px;
302 font-size: .9rem;
303}
304.card b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
305.card code { background: var(--bg); padding: 2px 8px; border-radius: 6px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
306.card.col { flex-direction: column; align-items: stretch; gap: 8px; }
307.card.col b { flex: none; }
308.row.between { justify-content: space-between; align-items: center; }
309.field { display: flex; flex-direction: column; gap: 3px; }
310.field .muted { font-size: .74rem; }
311.msg.user.queued { opacity: .55; }
312.msg.user.queued::after { content: ' ⏳'; }
313/* en cola cuando pulsaste ■: no se llegó a procesar ni se procesará */
314.msg.user.cancelled { opacity: .45; text-decoration: line-through; }
315.muted { color: var(--muted); font-size: .82rem; }
316.row { display: flex; gap: 8px; margin: 10px 0; }
317.row.right { justify-content: flex-end; }
318.panel input {
319 background: var(--bg);
320 border: 1px solid var(--line);
321 border-radius: 8px;
322 color: var(--fg);
323 padding: 9px 12px;
324 flex: 1;
325}
326button.primary {
327 background: linear-gradient(135deg, var(--accent), var(--accent2));
328 color: #fff; border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer; font-size: .88rem;
329}
330button.ghost {
331 background: none; color: var(--muted);
332 border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: .85rem;
333}
334button.ghost:hover { color: var(--fg); border-color: var(--accent); }
335h3 { margin: 6px 0 12px; font-size: .95rem; }
336
337/* ---------- modal de permisos ---------- */
338dialog {
339 background: var(--bg2);
340 color: var(--fg);
341 border: 1px solid var(--line);
342 border-radius: 16px;
343 padding: 22px 24px;
344 max-width: 420px;
345 box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
346}
347dialog::backdrop { background: rgba(5, 6, 10, .7); backdrop-filter: blur(3px); }
348dialog h3 { margin: 0 0 8px; }
349dialog p { margin: 6px 0; font-size: .9rem; }
350
351/* ---------- toasts y progreso ---------- */
352#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
353.toast {
354 background: var(--bg3);
355 border: 1px solid var(--line);
356 border-left: 3px solid var(--accent);
357 border-radius: 10px;
358 padding: 10px 14px;
359 font-size: .85rem;
360 max-width: 340px;
361 box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
362 animation: slidein .2s ease-out;
363 display: flex; align-items: flex-start; gap: 8px;
364}
365@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }
366.toast .toast-txt { flex: 1; min-width: 0; }
367.toast .toast-accion {
368 flex: none; background: none; border: 1px solid var(--accent); color: var(--fg);
369 border-radius: 6px; padding: 2px 8px; font-size: .8rem; cursor: pointer; white-space: nowrap;
370}
371.toast .toast-accion:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
372.toast .toast-x {
373 flex: none; background: none; border: none; color: var(--muted); cursor: pointer;
374 font-size: .8rem; padding: 0 2px; line-height: 1.4;
375}
376.toast .toast-x:hover { color: var(--fg); }
377@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
378#model-progress {
379 position: fixed; bottom: 18px; left: 18px; z-index: 50;
380 background: var(--bg3); border: 1px solid var(--line); border-radius: 10px;
381 padding: 10px 14px; font-size: .8rem; color: var(--muted); width: 300px;
382}
383#model-progress .track { height: 4px; background: var(--bg); border-radius: 2px; margin-bottom: 6px; overflow: hidden; }
384#model-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }
385#model-bar.indet { width: 35%; animation: indet 1.1s ease-in-out infinite; }
386@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
387
388/* ---------- splash de primera visita ---------- */
389#splash {
390 position: fixed; inset: 0; z-index: 100;
391 display: flex; align-items: center; justify-content: center;
392 background: radial-gradient(1100px 700px at 50% 28%, #16182a, #090a11 72%);
393 text-align: center; transition: opacity .6s ease;
394}
395#splash[hidden] { display: none; }
396#splash canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; }
397#splash .s-inner { position: relative; z-index: 1; max-width: 540px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
398#splash svg { width: 190px; height: 190px; animation: sfloat 5s ease-in-out infinite; filter: drop-shadow(0 12px 40px rgba(124, 92, 255, .35)); }
399@keyframes sfloat { 50% { transform: translateY(-9px); } }
400#splash .spark { animation: spark 2.4s ease-in-out infinite; transform-origin: center; }
401#splash .spark.s2 { animation-delay: 1.2s; }
402@keyframes spark { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
403#splash h1 { margin: 10px 0 2px; font-size: 1.7rem; }
404#splash h1 b { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
405#splash .l { margin: 0; color: var(--muted); font-size: 1.02rem; opacity: 0; animation: srise .7s ease-out forwards; }
406#splash .l b { color: var(--accent); }
407#splash .l1 { animation-delay: .6s; }
408#splash .l2 { animation-delay: 1.7s; }
409#splash .l3 { animation-delay: 2.8s; }
410#splash .l4 { animation-delay: 3.9s; font-size: 1.12rem; color: var(--fg); }
411@keyframes srise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
412/* el guiño: el ojo derecho se cierra un instante, sincronizado con «entre tú y yo» */
413#splash .eye-r { transform-origin: 76px 73px; animation: wink 5s ease-in-out 4.1s infinite; }
414@keyframes wink { 0%, 7%, 100% { transform: scaleY(1); } 3.5% { transform: scaleY(.06); } }
415#splash button {
416 margin-top: 16px; padding: 13px 38px; font-size: 1.05rem; cursor: pointer;
417 color: #fff; border: none; border-radius: 999px;
418 background: linear-gradient(135deg, var(--accent), var(--accent2));
419 box-shadow: 0 8px 30px rgba(255, 77, 141, .35);
420 opacity: 0; animation: srise .7s ease-out 4.9s forwards;
421}
422#splash button:hover { filter: brightness(1.1); }
423
424/* ---------- móvil: una columna, chat ↔ visualizador conmutables ---------- */
425@media (max-width: 700px) {
426 main { grid-template-columns: minmax(0, 1fr); }
427 #btn-flip { display: block; }
428 /* por encima de los chips y del compositor (su alto lo mide ui.js en
429 --alto-pie): antes tapaba la fila de chips */
430 #btn-flip { bottom: calc(var(--alto-pie, 150px) + 8px); }
431 body.show-viz #btn-flip { bottom: 14px; }
432 #viz { display: none; }
433 body.show-viz #viz { display: flex; }
434 body.show-viz #chat { display: none; }
435 #chat { border-right: none; }
436
437 header { padding: 8px 10px; gap: 6px; }
438 .claim { display: none; }
439 .beta { display: none; }
440 .brand { font-size: .95rem; gap: 6px; }
441 .logo { width: 26px; height: 26px; }
442 .controls { gap: 6px; }
443 /* En móvil la cabecera no cabe entera, así que aquí SÍ se encoge — pero lo
444 que encoge es el selector (se queda con el hueco que sobre), no los botones.
445 Sin esto, el nowrap de la regla general cambiaba «se parte en líneas» por
446 «Permisos se sale de la pantalla», que es peor: medido a 390 px. */
447 .controls { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
448 .model-pick { flex: 1 1 auto; min-width: 0; }
449 .model-pick select { max-width: none; width: 100%; min-width: 0; font-size: .78rem; }
450 #disk-chip { padding: 4px 7px; font-size: .72rem; }
451 /* Solo el logo como marca. El nombre y el icono del selector no caben en un
452 teléfono, y con el nombre dentro el selector se le montaba ENCIMA: medido a
453 390 px, «Elffu» asomaba por detrás de la caja del selector. Al tocarlo se
454 abre el selector nativo del sistema, que sí enseña los nombres enteros. */
455 .brand { flex: none; }
456 .brand b, #model-ico { display: none; }
457 #btn-clear, #btn-perms { padding: 7px 9px; font-size: .78rem; }
458
459 #log { padding: 10px; }
460 .msg { max-width: 100%; font-size: .9rem; }
461 .msg.sys .avatar { width: 36px; height: 36px; }
462
463 #chips { flex-wrap: nowrap; overflow-x: auto; padding: 6px 10px; scrollbar-width: none; }
464 #chips::-webkit-scrollbar { display: none; }
465 .chip { flex: 0 0 auto; }
466
467 #composer { padding: 8px 10px 12px; }
468 #prompt { font-size: 16px; } /* evita el zoom automático de iOS */
469 #send { padding: 0 16px; min-width: 48px; }
470
471 #tabs { overflow-x: auto; scrollbar-width: none; }
472 #tabs button { padding: 8px 10px; font-size: .82rem; white-space: nowrap; }
473 .panel { padding: 12px; }
474 .card { flex-wrap: wrap; }
475
476 dialog { max-width: 92vw; margin: auto; }
477 #toasts { left: 12px; right: 12px; bottom: 12px; }
478 .toast { max-width: none; }
479 #model-progress { left: 12px; right: 12px; width: auto; bottom: 60px; }
480
481 #splash svg { width: 140px; height: 140px; }
482 #splash h1 { font-size: 1.35rem; }
483 #splash .l { font-size: .92rem; }
484 #splash .s-inner { padding: 18px; }
485}
486
487
488/* ---------- markdown en el chat (estilo plugin de Claude Code) ---------- */
489.msg.md { white-space: normal; }
490.msg.md code {
491 background: #0d1117; border: 1px solid var(--line); border-radius: 5px;
492 padding: 1px 6px; font-family: ui-monospace, monospace; font-size: .8em; color: #ffb3c9;
493}
494.msg.md pre.codeblock {
495 position: relative; background: #0d1117; border: 1px solid var(--line);
496 border-radius: 8px; padding: 10px 12px; margin: 8px 0; overflow-x: auto;
497}
498.msg.md pre.codeblock code {
499 background: none; border: none; padding: 0; color: #c9d1d9;
500 font-size: .78rem; line-height: 1.5; white-space: pre;
501}
502.msg.md pre.codeblock .lang {
503 position: absolute; top: 4px; right: 8px; font-size: .64rem;
504 color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
505}
506.msg.md h4 { margin: 10px 0 4px; font-size: .95rem; }
507.msg.md ul { margin: 4px 0; padding-left: 18px; }
508.msg.md li { margin: 2px 0; }
509.msg.md b { color: #fff; }
510
511/* ---------- iconos vectoriales + menú de comandos (/) ---------- */
512.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; padding: 0; }
513.icon-btn svg, .icon-inline svg { width: 16px; height: 16px; }
514.icon-inline { display: inline-flex; vertical-align: middle; color: var(--muted); }
515#send { display: inline-flex; align-items: center; justify-content: center; }
516#send svg { width: 18px; height: 18px; }
517/* mientras trabaja, el mismo botón PARA (como en Elffuss Code) */
518#send.is-stop { background: linear-gradient(135deg, #e5484d, #c0353a); }
519#send.is-stop svg { width: 14px; height: 14px; }
520/* ■ ya pulsado y el turno aún soltando el modelo: «Parando…», sin más clics */
521#send.is-stopping { background: #7a2a2d; color: #f3d6d7; cursor: progress; font-size: .78rem; white-space: nowrap; }
522.msg.thinking.stopping .dots i { animation: none; opacity: .35; }
523/* lo que llegó a escribir antes de parar: se queda, apagado */
524.msg.assistant.partial { opacity: .75; }
525#btn-clear[aria-busy="true"] { opacity: .5; cursor: progress; }
526/* solo para lectores de pantalla */
527.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
528#btn-slash { background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
529#btn-slash:hover { color: var(--fg); border-color: var(--accent2); }
530#cmd-menu {
531 position: absolute; left: 14px; right: 14px; bottom: 72px; z-index: 40;
532 background: var(--bg3); border: 1px solid var(--accent2); border-radius: 12px;
533 box-shadow: 0 -8px 30px rgba(0,0,0,.5); max-height: 320px; overflow-y: auto; padding: 4px;
534}
535#cmd-menu[hidden] { display: none; }
536.cmd-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: .86rem; }
537.cmd-item:hover { background: #ffffff10; }
538.cmd-item b { font-family: ui-monospace, monospace; font-weight: 600; }
539.cmd-item span { color: var(--muted); font-size: .76rem; }
540#chat { position: relative; }
541
542/* ── Mente de Elffuss (cerebro CEO · mundo trance) ─────────────────────── */
543#mind-overlay { position: fixed; inset: 0; z-index: 300; background: radial-gradient(1200px 800px at 50% 45%, #1a0a2e, #05030c 78%); overflow: hidden; }
544#mind-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
545#mind-title { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); text-align: center; font-size: 1.1rem; font-weight: 800; letter-spacing: .18em; color: #fff; text-shadow: 0 0 22px #ff4d8d; pointer-events: none; }
546#mind-title span { display: block; font-size: .66rem; font-weight: 500; letter-spacing: .06em; color: #b9a7ff; margin: 4px auto 0; text-shadow: none; max-width: min(520px, 44vw); }
547/* en estrecho la explicación no cabe sin tapar los botones: se queda solo para
548 el lector de pantalla (aria-describedby la sigue leyendo) */
549@media (max-width: 900px) { #mind-title span { display: none; } }
550#mind-close { position: absolute; top: 14px; right: 16px; z-index: 6; background: rgba(255,77,141,.14); border: 1px solid #ff4d8d; color: #ffd7e6; border-radius: 999px; padding: 7px 14px; font-size: .8rem; cursor: pointer; backdrop-filter: blur(6px); }
551#mind-close:hover { background: rgba(255,77,141,.28); }
552#mind-history { position: absolute; top: 14px; right: 182px; z-index: 6; background: rgba(73,232,221,.14); border: 1px solid #49e8ff; color: #bfeef6; border-radius: 999px; padding: 7px 12px; font-size: .78rem; cursor: pointer; backdrop-filter: blur(6px); }
553#mind-history:hover { background: rgba(73,232,221,.28); }
554#mind-playstop { position: absolute; top: 14px; right: 278px; z-index: 6; background: rgba(63,185,112,.16); border: 1px solid #3fb970; color: #b7f2cf; border-radius: 999px; padding: 7px 12px; font-size: .78rem; cursor: pointer; backdrop-filter: blur(6px); }
555#mind-playstop:hover { background: rgba(63,185,112,.3); }
556#mind-playstop.paused { background: rgba(255,180,70,.16); border-color: #ffb446; color: #ffe0b0; }
557#mind-playstop.paused:hover { background: rgba(255,180,70,.3); }
558#mind-config { position: absolute; top: 14px; right: 96px; z-index: 6; background: rgba(124,92,255,.16); border: 1px solid #7c5cff; color: #d8ccff; border-radius: 999px; padding: 7px 12px; font-size: .78rem; cursor: pointer; backdrop-filter: blur(6px); }
559#mind-config:hover { background: rgba(124,92,255,.3); }
560/* leyenda de perfiles: fija, no flota (siempre legible) */
561#mind-legend { position: absolute; top: 60px; left: 14px; z-index: 5; display: flex; flex-direction: column; gap: 5px; background: rgba(8,5,18,.5); border: 1px solid rgba(124,92,255,.3); border-radius: 10px; padding: 8px 12px; backdrop-filter: blur(6px); pointer-events: auto; }
562.ml-item { font: inherit; font-size: .68rem; color: #cfe8f0; display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 2px 4px; border-radius: 5px; background: none; border: none; text-align: left; }
563.ml-item:hover, .ml-item:focus-visible { background: rgba(255,255,255,.08); }
564.ml-sw { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 6px currentColor; flex: none; }
565/* solo etiquetas de propuestas forjadas flotan ancladas al mundo */
566#mind-anchors { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
567/* la capa no recibe clics (deja girar el mundo), pero cada etiqueta SÍ: es un
568 botón y su clic abre la propuesta. Antes heredaba pointer-events:none y solo
569 funcionaba atinar a la malla 3D que hubiera debajo. */
570.mind-node-label { position: absolute; font: inherit; font-size: .6rem; color: #ffd7e6; background: rgba(255,77,141,.18); border: 1px solid rgba(255,77,141,.5); border-radius: 6px; padding: 1px 6px; pointer-events: auto; cursor: pointer; white-space: nowrap; text-shadow: 0 0 8px #ff4d8d; }
571.mind-node-label:hover, .mind-node-label:focus-visible { background: rgba(255,77,141,.34); outline: 1px solid #ffd7e6; }
572#mind-overlay button:focus-visible { outline: 2px solid #ffd7e6; outline-offset: 2px; }
573.ml-open { margin-left: 6px; background: none; border: 1px solid rgba(73,232,221,.45); color: #bfeef6; border-radius: 5px; padding: 0 6px; font-size: .62rem; cursor: pointer; }
574.cfg-status { font-size: .72rem; color: #bfeef6; min-height: 1em; }
575.cfg-status:empty { display: none; }
576.mind-music-btn { position: absolute; bottom: 14px; right: 14px; z-index: 6; background: rgba(255,77,141,.14); border: 1px solid rgba(255,77,141,.5); color: #ffd7e6; border-radius: 999px; padding: 6px 12px; font-size: .74rem; cursor: pointer; backdrop-filter: blur(6px); }
577.mind-music-btn:hover { background: rgba(255,77,141,.28); }
578.mind-music-cap a { color: #ffd7e6; }
579/* historial completo: TODO lo que ha llegado, sin recortar */
580#mind-log { position: absolute; top: 0; right: -380px; width: 360px; height: 100%; z-index: 8; display: flex; flex-direction: column; background: rgba(6,4,14,.92); border-left: 1px solid rgba(73,232,221,.35); backdrop-filter: blur(10px); transition: right .25s ease; }
581#mind-log.show { right: 0; }
582.ml-head { display: flex; align-items: center; padding: 12px 14px; font-size: .82rem; font-weight: 700; color: #bfeef6; border-bottom: 1px solid rgba(73,232,221,.25); }
583.ml-head button { margin-left: auto; background: none; border: none; color: #7fd9d0; cursor: pointer; font-size: .9rem; }
584#mind-log-body { flex: 1; overflow-y: auto; padding: 8px 10px; }
585.ml-row { font-size: .68rem; line-height: 1.6; padding: 3px 4px; border-radius: 5px; display: flex; gap: 6px; align-items: baseline; }
586.ml-row:hover { background: rgba(255,255,255,.04); }
587.ml-row .ml-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
588.ml-row .ml-t { color: #dfeef2; word-break: break-word; }
589/* panel flotante con el .md del pensamiento (clic en un nodo) */
590#mind-panel { position: absolute; top: 70px; right: 16px; width: min(420px, 40vw); max-height: 70vh; z-index: 6; display: none; flex-direction: column; background: rgba(8,5,18,.9); border: 1px solid #7c5cff; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 50px rgba(0,0,0,.6); }
591#mind-panel.show { display: flex; }
592#mind-panel .mp-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: .74rem; color: #d8ccff; background: rgba(124,92,255,.14); border-bottom: 1px solid rgba(124,92,255,.3); }
593#mind-panel .mp-head button { margin-left: auto; background: none; border: none; color: #b9a7ff; cursor: pointer; font-size: .9rem; }
594#mind-panel .mp-body { flex: 1; overflow: auto; margin: 0; padding: 12px; font-size: .78rem; line-height: 1.55; color: #cfe8f0; }
595#mind-panel .mp-body h1, #mind-panel .mp-body h2, #mind-panel .mp-body h3 { color: #fff; margin: 12px 0 6px; }
596#mind-panel .mp-body code { background: rgba(124,92,255,.18); padding: 1px 5px; border-radius: 4px; font-size: .82em; }
597#mind-panel .mp-body pre { background: #0b0716; border: 1px solid rgba(124,92,255,.3); border-radius: 8px; padding: 8px; overflow-x: auto; }
598#mind-panel .mp-body ul, #mind-panel .mp-body ol { padding-left: 1.2em; }
599.mp-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
600.mp-exec { flex: 1; background: linear-gradient(135deg, #ff4d8d, #7c5cff); border: none; color: #fff; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .78rem; font-weight: 600; }
601.mp-open { flex: 1; background: rgba(124,92,255,.15); border: 1px solid #7c5cff; color: #d8ccff; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .78rem; }
602/* panel de configuración del cerebro */
603#mind-cfg { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: min(520px, 92vw); z-index: 7; display: none; flex-direction: column; gap: 6px; background: rgba(8,5,18,.94); border: 1px solid #7c5cff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 16px 60px rgba(0,0,0,.6); }
604#mind-cfg.show { display: flex; }
605.cfg-head { display: flex; align-items: center; font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
606.cfg-head button { margin-left: auto; background: none; border: none; color: #b9a7ff; cursor: pointer; }
607.cfg-notif { font-size: .68rem; color: #9fb; background: rgba(63,185,112,.1); border: 1px solid rgba(63,185,112,.3); border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
608.cfg-notif-btn { background: #3fb970; border: none; color: #06180d; border-radius: 6px; padding: 3px 10px; font-size: .68rem; font-weight: 700; cursor: pointer; }
609#mind-cfg label { font-size: .68rem; color: #b9a7ff; margin-top: 4px; }
610#mind-cfg textarea, #mind-cfg input:not([type=color]) { background: #0b0716; border: 1px solid rgba(124,92,255,.4); color: #e8ebf4; border-radius: 8px; padding: 8px 10px; font-size: .78rem; font-family: inherit; resize: vertical; }
611#cfg-profiles { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
612.cfg-prof { display: grid; grid-template-columns: 30px 1fr 1.4fr 26px; gap: 6px; align-items: center; }
613.cfg-prof input[type=color] { width: 30px; height: 30px; padding: 0; border: 1px solid rgba(124,92,255,.4); border-radius: 6px; background: none; cursor: pointer; }
614.cfg-prof input[type=text] { background: #0b0716; border: 1px solid rgba(124,92,255,.4); color: #e8ebf4; border-radius: 6px; padding: 6px 8px; font-size: .72rem; }
615.cp-del { background: none; border: none; color: #ff8fb0; cursor: pointer; font-size: .8rem; }
616.cfg-add { align-self: flex-start; background: rgba(124,92,255,.15); border: 1px dashed rgba(124,92,255,.5); color: #d8ccff; border-radius: 8px; padding: 6px 12px; font-size: .74rem; cursor: pointer; margin-top: 4px; }
617.cfg-actions { display: flex; gap: 8px; margin-top: 8px; }
618.cfg-ghost { flex: 1; background: rgba(73,232,221,.14); border: 1px solid #49e8ff; color: #bfeef6; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .78rem; }
619.cfg-save { flex: 1; margin-top: 0; background: linear-gradient(135deg, #ff4d8d, #7c5cff); border: none; color: #fff; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .8rem; font-weight: 600; }
620.cfg-note { font-size: .64rem; color: #8a7bb8; margin-top: 4px; }
621.mind-music { position: absolute; bottom: 52px; right: 14px; z-index: 5; width: 300px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,77,141,.4); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
622.mind-music-cap { font-size: .62rem; color: #ffd7e6; background: rgba(10,6,24,.8); padding: 4px 8px; text-align: center; }
623.proposal-exec-btn { display: block; margin-top: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 8px; padding: 8px 14px; font-size: .78rem; font-weight: 600; cursor: pointer; }
624.proposal-exec-btn:hover { filter: brightness(1.1); }
625.proposal-exec-btn:disabled { opacity: .6; cursor: default; filter: none; }
626
627/* modelos externos: sección plegada, al final y visualmente secundaria */
628.ext-block{opacity:.72}
629.ext-block:hover,.ext-block[open]{opacity:1}
630.ext-block>summary{cursor:pointer;font-weight:600;font-size:.9rem;list-style:none;padding:2px 0}
631.ext-block>summary::-webkit-details-marker{display:none}
632.ext-block>summary::before{content:'▸ ';color:var(--accent)}
633.ext-block[open]>summary::before{content:'▾ '}
634
635/* ── Velocímetro ─────────────────────────────────────────────────────────────
636 Panel anclado a la derecha de la cabecera. Posición fija y no absoluta
637 respecto al header a propósito: el header tiene overflow y recortaba la
638 gráfica por abajo. */
639#speed-panel {
640 position: fixed; top: 52px; right: 12px; z-index: 60;
641 width: min(280px, calc(100vw - 24px));
642 background: var(--panel, #15161c); color: var(--fg, #e8e8ef);
643 border: 1px solid var(--line, #2a2b36); border-radius: 10px;
644 padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
645 font-size: .82rem; line-height: 1.35;
646}
647#speed-panel[hidden] { display: none; }
648.vm-tit { font-weight: 600; margin-bottom: 8px; }
649.vm-tit2 { margin-top: 14px; }
650.vm-filas { display: grid; gap: 6px; }
651.vm-filas > div { display: flex; align-items: baseline; gap: 8px; }
652.vm-filas b { font-variant-numeric: tabular-nums; font-size: 1.05rem; min-width: 4.2em; }
653.vm-filas span { opacity: .72; }
654.vm-graf { margin: 10px 0 2px; }
655.vm-graf-top, .vm-graf-pie { display: flex; justify-content: space-between; opacity: .6; font-size: .72rem; }
656.vm-graf svg { width: 100%; height: 38px; display: block; margin: 3px 0; }
657.vm-vacio { opacity: .55; font-size: .76rem; margin: 6px 0; }
658.vm-nota { margin-top: 12px; opacity: .5; font-size: .7rem; line-height: 1.3; }
659.vm-modelo { font-weight: 400; opacity: .6; font-size: .78rem; }
660/* El aviso de «leer va tan lento como escribir»: es un sintoma, no un dato. */
661.vm-alerta { margin: 10px 0 2px; padding: 8px 10px; border-radius: 8px; font-size: .75rem;
662 line-height: 1.35; background: rgba(255,176,32,.10); border: 1px solid rgba(255,176,32,.28); }
663
664/* Barra del PREFILL dentro de la burbuja de «pensando». El prefill es la espera
665 larga antes de la primera letra y no se veía: con un prompt de arnés en el
666 modelo grande son decenas de segundos de burbuja quieta, que se leen como un
667 cuelgue. Sin animación propia: el ancho lo mueve el motor por lote terminado
668 en la GPU, así que la barra avanza cuando hay trabajo hecho y se para cuando
669 de verdad está parada — que es justo la información que hace falta. */
670.msg.thinking .prefill { height: 3px; border-radius: 2px; background: #ffffff1a; margin: 6px 0 2px; overflow: hidden; }
671.msg.thinking .prefill > i { display: block; height: 100%; width: 0; border-radius: 2px; background: currentColor; opacity: .7; transition: width .18s linear; }
672
673/* ── Dedos, no ratón ────────────────────────────────────────────────────────
674 Medido en un iPhone (393 px de ancho): los controles de las barras salían a
675 30-36 px de alto. La guía de Apple pide 44 y no es capricho: por debajo de
676 eso se falla el toque y se pulsa el de al lado, que en una barra con el botón
677 de limpiar al lado del de enviar es caro.
678 Va bajo `pointer: coarse` y no bajo un ancho: lo que decide no es el tamaño
679 de la pantalla sino con qué se toca. Una tablet grande con dedo lo necesita;
680 una ventana estrecha con ratón, no — y encajonar el escritorio a 44 px le
681 estropearía la densidad sin motivo. */
682@media (pointer: coarse) {
683 #composer button, #composer select, #composer input,
684 .bar button, .bar select, #tabs button, button.ghost,
685 #model-select, #send, #btn-clear, #btn-mind, #btn-perms,
686 #btn-slash, #btn-hardwork, #btn-flip {
687 min-height: 44px;
688 }
689 /* Los que además son estrechos: un cuadrado de 44 se falla por los lados. */
690 #btn-clear, #btn-mind, #btn-slash, #btn-hardwork { min-width: 44px; }
691 /* El alto crece, así que el espacio entre ellos puede bajar sin apelotonarse. */
692 #composer { gap: 6px; }
693}