Elffuss BraidHub

utopia-ia/elffuss-code public

35d8f2574892 · 58.9 KiBRawPermalink
1/* Elffuss Code — VS Code oscuro con alma élfica */
2:root {
3 --bg: #090a11; --bg2: #101317; --bg3: #161a24; --line: #20252c;
4 /* `--accent2` era #6e63c5: saturación 100 % al lado de un `--accent` arena al
5 46 %, y ese SALTO de saturación es lo que cansa la vista, más que el color.
6 El de ahora tiene la misma saturación que el arena y una luminosidad casi
7 igual (58 % contra 60 %), así que el degradado deja de dar el tirón.
8 De paso arregla la legibilidad: con texto blanco encima el morado viejo
9 daba 3,62:1, por debajo del 4,5:1 que pide WCAG; éste da 4,95:1.
10 ⚠ El arena sigue en 2,42:1 con blanco encima — peor aún— pero bajarlo
11 cambia la identidad de la marca, así que esa decisión no se toma aquí. */
12 --fg: #eae8f2; --muted: #8b929c; --accent: #c8a06a; --accent2: #6e63c5;
13 --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
14}
15* { box-sizing: border-box; }
16html, body { height: 100%; margin: 0; }
17body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--fg); overflow: hidden; }
18
19/* ---------- landing ---------- */
20#landing {
21 position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
22 background: radial-gradient(1100px 700px at 50% 30%, #221740, #0b0d12 72%); text-align: center;
23}
24#landing[hidden] { display: none; }
25#landing canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; }
26#landing .l-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; }
27#landing .hero { width: 170px; filter: drop-shadow(0 12px 40px rgba(124,92,255,.35)); animation: float 5s ease-in-out infinite; }
28@keyframes float { 50% { transform: translateY(-9px); } }
29#landing h1 { margin: 4px 0 0; font-size: 2rem; }
30#landing h1 b { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
31#landing .tag { color: var(--muted); margin: 0; line-height: 1.5; }
32#landing .tag b { color: var(--accent); }
33#open-project {
34 margin-top: 12px; padding: 14px 34px; font-size: 1.08rem; cursor: pointer; color: #fff;
35 border: none; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent2));
36 box-shadow: 0 8px 30px rgba(255,77,141,.35);
37}
38#open-project:hover { filter: brightness(1.12); }
39#landing .ghost, .ghost {
40 background: none; color: var(--muted); border: 1px solid var(--line);
41 border-radius: 8px; padding: 8px 14px; cursor: pointer;
42}
43#landing .mini { font-size: .75rem; color: #5a6480; }
44.resume-clone { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: rgba(124,92,255,.12); border: 1px solid var(--accent2); border-radius: 999px; padding: 7px 8px 7px 16px; font-size: .78rem; color: var(--fg); }
45/* el display:flex de arriba le ganaba a [hidden]: la píldora vacía con
46 Reanudar/Descartar salía SIEMPRE en la landing, sin descarga a medias */
47.resume-clone[hidden] { display: none; }
48.resume-clone a { color: inherit; }
49#open-project:disabled, #clone-url:disabled { opacity: .5; cursor: not-allowed; filter: none; }
50#resume-clone-btn { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .76rem; cursor: pointer; }
51.clone-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
52.clone-or { font-size: .72rem; color: #5a6480; }
53#clone-url { width: 300px; max-width: 60vw; background: var(--bg3); border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 9px 16px; font-size: .82rem; }
54#clone-url:focus { outline: none; border-color: var(--accent2); }
55#clone-btn { background: none; color: var(--fg); border: 1px solid var(--accent2); border-radius: 999px; padding: 9px 16px; font-size: .82rem; cursor: pointer; white-space: nowrap; }
56#clone-btn:hover { background: rgba(124,92,255,.15); }
57#clone-btn:disabled { opacity: .5; cursor: default; }
58.clone-status { min-height: 1.1em; }
59.clone-status.err { color: #ff6b8b; }
60@media (max-width: 560px) { .clone-row { flex-direction: column; } #clone-url { width: 78vw; } }
61
62/* ---------- IDE ---------- */
63#ide { display: flex; flex-direction: column; height: 100vh; }
64#ide[hidden] { display: none; } /* el display:flex le ganaba a [hidden] → el IDE asomaba tras la landing */
65header {
66 display: flex; justify-content: space-between; align-items: center;
67 padding: 6px 12px; background: var(--bg2); border-bottom: 1px solid var(--line);
68}
69.brand { display: flex; align-items: center; gap: 8px; }
70.brand img { width: 26px; height: 26px; }
71.proj { color: var(--muted); font-size: .85rem; white-space: nowrap; }
72.controls { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
73select { background: var(--bg3); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
74.dot { width: 9px; height: 9px; border-radius: 50%; }
75/* el punto del modelo es un botón (lleva a Ajustes → Cerebro) */
76button.dot { border: none; padding: 0; cursor: pointer; flex: 0 0 auto; }
77button.dot:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
78.dot.off { background: #4a5062; } .dot.on { background: #3fb970; }
79.dot.loading { background: #e5a53a; animation: pulse 1.2s infinite; }
80@keyframes pulse { 50% { opacity: .35; } }
81
82#settings-panel { display: flex; gap: 10px; padding: 10px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); overflow-x: auto; position: relative; }
83#settings-panel[hidden] { display: none; } /* ¡el display:flex le ganaba a hidden! */
84#settings-close { position: absolute; top: 6px; right: 10px; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
85#settings-close:hover { color: var(--accent); }
86#settings-panel .card { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; min-width: 200px; }
87#settings-panel input[type=text], #settings-panel input:not([type]) , #settings-panel input[type=password] { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: .78rem; }
88
89main { flex: 1; display: grid; grid-template-columns: 46px 235px minmax(0, 1fr) minmax(440px, 34%); grid-template-rows: minmax(0, 1fr); min-height: 0; overflow: hidden; }
90body.hide-tree main { grid-template-columns: 46px 0 minmax(0, 1fr) minmax(440px, 34%); }
91body.hide-tree #sidebar { display: none; }
92/* Cada pieza en SU columna. Sin esto, al ocultar el explorador (display:none)
93 el resto se corría una columna a la izquierda: el editor caía en la de 0 px y
94 desaparecía, el chat ocupaba su sitio y la columna del chat quedaba vacía. */
95#activity { grid-column: 1; }
96#sidebar { grid-column: 2; }
97#editor-wrap { grid-column: 3; }
98#chat { grid-column: 4; }
99
100/* barra de actividad estilo VS Code */
101#activity {
102 display: flex; flex-direction: column; align-items: center; gap: 4px;
103 background: #0d0f15; border-right: 1px solid var(--line); padding: 8px 0;
104}
105#activity button {
106 width: 44px; height: 42px; background: none; border: none; cursor: pointer;
107 color: #6b7391; display: flex; align-items: center; justify-content: center;
108 border-left: 2px solid transparent;
109}
110#activity button:hover { color: var(--fg); }
111#activity button.on { color: var(--fg); border-left-color: var(--accent); }
112#activity img { width: 26px; height: 26px; margin-top: auto; margin-bottom: 6px; opacity: .85; }
113/* la elfa es un botón (abre la Mente): el botón va abajo, la imagen dentro */
114#activity #act-mind { margin-top: auto; margin-bottom: 6px; }
115#activity #act-mind img { margin: 0; }
116#activity button:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; }
117
118/* explorador */
119#sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--bg2); border-right: 1px solid var(--line); }
120#explorer-head {
121 padding: 8px 12px 6px; font-size: .68rem; letter-spacing: .08em; color: var(--muted);
122 display: flex; gap: 8px; align-items: baseline;
123}
124#explorer-head span { color: var(--fg); font-weight: 700; }
125#tree { flex: 1; overflow: auto; padding: 0 4px 8px; font-size: .82rem; }
126#tree ul { list-style: none; margin: 0; padding-left: 10px; border-left: 1px solid #1d2230; }
127#tree > ul { border-left: none; padding-left: 4px; }
128#tree summary { cursor: pointer; color: #c8cede; padding: 2px 0; display: flex; align-items: center; gap: 4px; user-select: none; }
129#tree summary::-webkit-details-marker, #tree summary::marker { display: none; content: ''; }
130#tree details[open] > summary .chevron { transform: rotate(90deg); transform-origin: 8px 8px; }
131#tree .chevron { transition: transform .12s; }
132#tree summary:hover, #tree .file:hover { color: #fff; background: #ffffff0a; border-radius: 4px; }
133#tree .file { cursor: pointer; display: flex; align-items: center; gap: 5px; padding: 2px 0 2px 16px; color: #b8c0d4; }
134#tree .file.active { color: #fff; background: #ffffff12; border-radius: 4px; }
135#tree summary:focus-visible, #tree .file:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; border-radius: 4px; }
136#tree .tree-more { color: var(--muted); font-size: .74rem; padding: 2px 0 2px 16px; font-style: italic; }
137.tm-item:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; }
138.fico { flex: 0 0 auto; vertical-align: -3px; }
139
140#editor-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
141#tabs-bar { display: flex; background: #0d0f15; border-bottom: 1px solid var(--line); overflow-x: auto; min-height: 34px; }
142.tab { display: flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: .8rem; color: var(--muted); border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
143.tab.active { background: var(--bg); color: var(--fg); box-shadow: inset 0 2px 0 var(--accent); }
144.tab.tab-preview .tab-name { font-style: italic; }
145.tab .tab-ico { display: flex; }
146.tab b, .tab .tab-x { cursor: pointer; opacity: .55; width: 16px; text-align: center; }
147.tab .tab-x { background: none; border: none; color: inherit; padding: 0; font: inherit; line-height: 1; border-radius: 4px; }
148.tab b:hover, .tab .tab-x:hover { opacity: 1; color: var(--accent); }
149.tab b.dirty, .tab .tab-x.dirty { opacity: 1; color: var(--fg); }
150.tab b.dirty:hover::before { content: ''; }
151.tab:focus-visible, .tab .tab-x:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; }
152.tab .tab-name.deleted { text-decoration: line-through; }
153/* «¿Guardar los cambios?» al cerrar una pestaña con cambios sin guardar */
154#dirty-dialog { background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; max-width: min(420px, 92vw); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
155#dirty-dialog::backdrop { background: rgba(0,0,0,.45); }
156#dirty-dialog .dd-title { margin: 0 0 4px; font-weight: 600; }
157#dirty-dialog .dd-sub { margin: 0 0 14px; color: var(--muted); font-size: .85rem; }
158#dirty-dialog .dd-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
159#dirty-dialog button { background: var(--bg3); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; cursor: pointer; font: inherit; font-size: .85rem; }
160#dirty-dialog button.dd-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; }
161#dirty-dialog button:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
162#editor { flex: 1; min-height: 0; }
163#editor-empty { position: absolute; inset: 34px 0 22px 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); color: var(--muted); z-index: 2; text-align: center; }
164#editor-empty img { width: 84px; opacity: .5; }
165#editor-empty p { font-size: .9rem; line-height: 1.5; }
166
167/* la elfa de la barra: animada cuando el cerebro trabaja (invita a hacer clic) */
168#activity img { transition: transform .2s; cursor: pointer; }
169#activity img:hover { transform: scale(1.12); }
170#activity img.working { animation: elfWorking 1.5s ease-in-out infinite; }
171@keyframes elfWorking {
172 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(124,92,255,.5)); }
173 50% { transform: scale(1.14); filter: drop-shadow(0 0 12px rgba(255,77,141,.95)); }
174}
175
176/* ── Mente de Elffuss (cerebro CEO · mundo trance) ─────────────────────── */
177#mind-overlay { position: fixed; inset: 0; z-index: 300; background: radial-gradient(1200px 800px at 50% 45%, #1a0a2e, #05030c 78%); overflow: hidden; }
178#mind-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
179#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; }
180#mind-title span { display: block; font-size: .66rem; font-weight: 500; letter-spacing: .06em; color: #b9a7ff; margin-top: 4px; text-shadow: none; }
181#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); }
182#mind-close:hover { background: rgba(255,77,141,.28); }
183#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); }
184#mind-history:hover { background: rgba(73,232,221,.28); }
185#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); }
186#mind-playstop:hover { background: rgba(63,185,112,.3); }
187#mind-playstop.paused { background: rgba(255,180,70,.16); border-color: #ffb446; color: #ffe0b0; }
188#mind-playstop.paused:hover { background: rgba(255,180,70,.3); }
189#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); }
190#mind-config:hover { background: rgba(124,92,255,.3); }
191/* leyenda de perfiles: fija, no flota (siempre legible) */
192#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; }
193.ml-item { font-size: .68rem; color: #cfe8f0; display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
194.ml-item:hover { background: rgba(255,255,255,.08); }
195.ml-sw { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 6px currentColor; flex: none; }
196/* solo etiquetas de propuestas forjadas flotan ancladas al mundo */
197#mind-anchors { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
198.mind-node-label { position: absolute; 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: none; white-space: nowrap; text-shadow: 0 0 8px #ff4d8d; }
199/* historial completo: TODO lo que ha llegado, sin recortar */
200#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; }
201#mind-log.show { right: 0; }
202.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); }
203.ml-head button { margin-left: auto; background: none; border: none; color: #7fd9d0; cursor: pointer; font-size: .9rem; }
204#mind-log-body { flex: 1; overflow-y: auto; padding: 8px 10px; }
205.ml-row { font-size: .68rem; line-height: 1.6; padding: 3px 4px; border-radius: 5px; display: flex; gap: 6px; align-items: baseline; }
206.ml-row:hover { background: rgba(255,255,255,.04); }
207.ml-row .ml-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
208.ml-row .ml-t { color: #dfeef2; word-break: break-word; }
209/* panel flotante con el .md del pensamiento (clic en un nodo) */
210#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); }
211#mind-panel.show { display: flex; }
212#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); }
213#mind-panel .mp-head button { margin-left: auto; background: none; border: none; color: #b9a7ff; cursor: pointer; font-size: .9rem; }
214#mind-panel .mp-body { flex: 1; overflow: auto; margin: 0; padding: 12px; font-size: .78rem; line-height: 1.55; color: #cfe8f0; }
215#mind-panel .mp-body h1, #mind-panel .mp-body h2, #mind-panel .mp-body h3 { color: #fff; margin: 12px 0 6px; }
216#mind-panel .mp-body code { background: rgba(124,92,255,.18); padding: 1px 5px; border-radius: 4px; font-size: .82em; }
217#mind-panel .mp-body pre { background: #0b0716; border: 1px solid rgba(124,92,255,.3); border-radius: 8px; padding: 8px; overflow-x: auto; }
218#mind-panel .mp-body ul, #mind-panel .mp-body ol { padding-left: 1.2em; }
219.mp-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
220.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; }
221.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; }
222/* panel de configuración del cerebro */
223#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); }
224#mind-cfg.show { display: flex; }
225.cfg-head { display: flex; align-items: center; font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
226.cfg-head button { margin-left: auto; background: none; border: none; color: #b9a7ff; cursor: pointer; }
227.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; }
228.bridge-card #br-token, .bridge-card #br-folder { background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 9px; font-size: .78rem; width: 100%; }
229.bridge-card details { color: var(--muted); }
230.bridge-card details summary::marker { color: var(--accent2); }
231.bridge-card .br-sha { font-size: .64rem; color: var(--muted); margin: 0 0 6px; overflow-wrap: anywhere; }
232.bridge-card .br-sha code { font-size: .64rem; color: var(--fg); }
233#fireworks-fx { position: fixed; inset: 0; z-index: 999; pointer-events: none; }
234.cfg-notif-btn { background: #3fb970; border: none; color: #06180d; border-radius: 6px; padding: 3px 10px; font-size: .68rem; font-weight: 700; cursor: pointer; }
235#mind-cfg label { font-size: .68rem; color: #b9a7ff; margin-top: 4px; }
236#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; }
237#cfg-profiles { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
238.cfg-prof { display: grid; grid-template-columns: 30px 1fr 1.4fr 26px; gap: 6px; align-items: center; }
239.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; }
240.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; }
241.cp-del { background: none; border: none; color: #ff8fb0; cursor: pointer; font-size: .8rem; }
242.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; }
243.cfg-actions { display: flex; gap: 8px; margin-top: 8px; }
244.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; }
245.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; }
246.cfg-note { font-size: .64rem; color: #8a7bb8; margin-top: 4px; }
247.mind-music { position: absolute; bottom: 14px; 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); }
248.mind-music-cap { font-size: .62rem; color: #ffd7e6; background: rgba(10,6,24,.8); padding: 4px 8px; text-align: center; }
249@media (max-width: 820px) { #mind-log { width: 88vw; right: -90vw; } .mind-music { width: 180px; } }
250
251/* menú contextual del árbol y de las pestañas (botón derecho) */
252#tree-menu, #tab-menu, #conv-menu { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 4px; min-width: 168px; box-shadow: 0 10px 34px rgba(0,0,0,.5); display: flex; flex-direction: column; }
253.tm-item { text-align: left; background: none; border: none; color: var(--fg); font-size: .82rem; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
254.tm-item:hover { background: var(--bg3); }
255.tm-item.danger { color: #ff6b8b; }
256.tm-item.danger:hover { background: #3a1420; }
257.tm-sep { height: 1px; background: var(--line); margin: 4px 2px; }
258
259/* vista previa de markdown (pestaña en modo Vista previa, en vez del código fuente) */
260#md-preview-pane { position: absolute; inset: 34px 0 22px 0; overflow-y: auto; background: var(--bg); padding: 18px 26px; z-index: 2; }
261#md-preview-pane h1, #md-preview-pane h2, #md-preview-pane h3 { color: #fff; margin: 18px 0 8px; }
262#md-preview-pane code { background: var(--bg3); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
263#md-preview-pane pre { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; }
264#md-preview-pane a { color: var(--accent2); }
265#md-preview-pane.html-preview { padding: 0; overflow: hidden; }
266#md-preview-pane.html-preview iframe { display: block; width: 100%; height: 100%; border: none; background: #fff; }
267
268/* panel del terminal (abajo del editor, estilo VS Code) */
269#terminal-panel { display: flex; flex-direction: column; height: 260px; flex: 0 0 auto; background: #0b0d12; border-top: 1px solid var(--line); position: relative; }
270#terminal-panel[hidden] { display: none; }
271#term-resize { position: absolute; top: -3px; left: 0; right: 0; height: 6px; cursor: ns-resize; z-index: 3; }
272#term-resize:hover { background: var(--accent2); opacity: .4; }
273#term-head { display: flex; align-items: center; gap: 10px; padding: 3px 10px; background: #0d0f15; border-bottom: 1px solid var(--line); }
274#term-head .term-title { font-size: .68rem; letter-spacing: .08em; color: var(--fg); font-weight: 700; }
275#term-caps { font-size: .68rem; color: var(--muted); flex: 1; }
276.term-btn { background: none; border: none; color: var(--muted); font-size: .72rem; cursor: pointer; padding: 2px 6px; border-radius: 5px; }
277.term-btn:hover { color: var(--fg); background: var(--bg3); }
278#terminal-host { flex: 1; min-height: 0; padding: 4px 6px; overflow: hidden; }
279#terminal-host .xterm { height: 100%; }
280
281#statusbar {
282 padding: 3px 12px; font-size: .74rem; color: #fff; min-height: 22px;
283 background: linear-gradient(90deg, #3d2a68, #4c2050);
284 border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
285}
286
287/* carga del modelo: visible desde el primer segundo, sobre landing e IDE */
288#model-progress {
289 position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
290 z-index: 120; display: flex; align-items: center; gap: 10px;
291 width: min(440px, 92vw); padding: 10px 14px;
292 background: var(--bg3); border: 1px solid var(--accent2); border-radius: 14px;
293 box-shadow: 0 10px 40px rgba(124, 92, 255, .35);
294}
295#model-progress[hidden] { display: none; }
296#model-progress img { width: 34px; height: 34px; }
297#model-progress .mp-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
298#model-progress span { font-size: .82rem; color: var(--fg); }
299#model-progress .track { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
300#model-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .25s; }
301#model-progress .mp-acciones { display: flex; gap: 6px; }
302#model-progress .mp-acciones button { background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: .78rem; cursor: pointer; }
303
304/* ---------- chat ---------- */
305#chat { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg2); min-height: 0; }
306#chat-log { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
307
308/* pestañas de conversación (varias en paralelo — cerrar NO borra, solo quita de la vista) */
309#conv-tabs { display: flex; flex: 0 0 auto; background: #0d0f15; border-bottom: 1px solid var(--line); overflow-x: auto; min-height: 34px; align-items: center; }
310#conv-tabs .tab-add { flex: 0 0 auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 12px; align-self: stretch; }
311#conv-tabs .tab-add:hover { color: var(--fg); background: var(--bg3); }
312.tab.tab-busy .tab-name::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; animation: tab-busy-pulse 1s ease-in-out infinite; }
313@keyframes tab-busy-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
314
315/* panel de historial de conversaciones (todas las guardadas, no solo abiertas) */
316#history-panel { position: fixed; top: 46px; right: 12px; width: 320px; max-height: 60vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.5); z-index: 90; display: flex; flex-direction: column; }
317#history-panel[hidden] { display: none; }
318.hp-head { display: flex; align-items: center; padding: 10px 12px; font-size: .85rem; font-weight: 700; color: var(--fg); border-bottom: 1px solid var(--line); }
319.hp-head button { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: .9rem; }
320#hp-list { overflow-y: auto; padding: 4px; }
321.hp-empty { padding: 16px; color: var(--muted); font-size: .8rem; text-align: center; }
322.hp-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
323.hp-row:hover { background: var(--bg3); }
324/* la fila es un botón (abrir) más el de borrar */
325.hp-row:has(.hp-open) { display: flex; padding: 0 6px 0 0; }
326.hp-open { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: none; border: none; color: inherit; font: inherit; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
327.hp-open[aria-current="true"] .hp-title { color: var(--accent); }
328.hp-open:focus-visible, .hp-del:focus-visible, .hp-head button:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; }
329.hp-title { font-size: .82rem; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
330.hp-date { font-size: .68rem; color: var(--muted); white-space: nowrap; }
331.hp-del { background: none; border: none; cursor: pointer; font-size: .8rem; opacity: .6; }
332.hp-del:hover { opacity: 1; }
333.msg { padding: 8px 11px; border-radius: 11px; font-size: .85rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-width: 95%; }
334.msg.sys { background: linear-gradient(135deg, #1c1430, #14202e); border: 1px solid var(--line); }
335.msg.user { background: var(--accent2); color: #fff; align-self: flex-end; }
336.msg.assistant { background: var(--bg3); border: 1px solid var(--line); align-self: flex-start; }
337.msg.err { border-color: #a03050; }
338/* herramientas estilo plugin de agente: ● nombre + args + resultado plegable */
339.msg.tool { display: flex; align-items: center; gap: 7px; background: none; padding: 2px 6px; font-size: .8rem; }
340.msg.tool .tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
341.msg.tool b { color: var(--fg); font-weight: 600; font-family: ui-monospace, monospace; font-size: .76rem; }
342.msg.tool .targ { color: var(--muted); font-family: ui-monospace, monospace; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
343.msg.tool-result { color: var(--muted); font-size: .74rem; background: none; padding: 0 6px 0 19px; }
344.msg.tool-result summary { cursor: pointer; list-style: none; }
345.msg.tool-result summary::before { content: '⎿ '; color: #4a5266; }
346.msg.tool-result pre { margin: 4px 0 0; background: #0d1117; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; font-size: .72rem; }
347.msg.tool-result.err summary { color: #e5a53a; }
348.msg.user.queued { opacity: .55; }
349.msg.user.queued::after { content: ' ⏳'; }
350/* encolado y descartado al pulsar ■ (parar vacía la cola) */
351.msg.user.cancelled { opacity: .45; text-decoration: line-through; }
352.msg.thinking { background: var(--bg3); border: 1px dashed var(--line); color: var(--muted); font-size: .8rem; }
353.msg.thinking .gen { font-family: ui-monospace, monospace; font-size: .7rem; color: #5f6880; max-height: 168px; overflow-y: auto; white-space: pre-wrap; }
354.msg.thinking .gen.tool-preview { font-family: inherit; font-size: .78rem; color: var(--accent2); font-style: italic; }
355
356/* 🎯 Modo Objetivo: botón + tarjeta de plan (planificador/ejecutor) */
357.cbtn.goal { font-size: .74rem; }
358.cbtn.goal.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2050, #2a1840); }
359.cbtn.hardwork { font-size: .74rem; }
360.cbtn.hardwork.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2a18, #2a1f40); box-shadow: 0 0 0 1px var(--accent) inset; }
361.msg.plan-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: .82rem; align-self: stretch; max-width: 100%; }
362.plan-card .plan-head { font-weight: 600; margin-bottom: 2px; }
363.plan-card .plan-summary { color: var(--muted); font-size: .78rem; margin-bottom: 8px; }
364.plan-card .plan-status { float: right; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
365.plan-card ul.plan-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
366.plan-card ul.plan-tasks li { display: flex; align-items: baseline; gap: 7px; padding: 5px 7px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); }
367.plan-card .task-ico { flex: 0 0 auto; }
368.plan-card .task-title { font-weight: 600; }
369.plan-card .task-desc { color: var(--muted); font-size: .76rem; }
370.plan-card li.task-in-progress { border-color: var(--accent2); }
371.plan-card li.task-done .task-title { color: #7ee787; }
372.plan-card li.task-failed { border-color: #a03050; }
373.plan-card li.task-failed .task-title { color: #e5a53a; }
374.plan-card li.task-skipped { opacity: .5; }
375.plan-card li.task-skipped .task-title { text-decoration: line-through; }
376#composer { display: flex; gap: 6px; padding: 10px; }
377#prompt { flex: 1; background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; color: var(--fg); padding: 9px 11px; outline: none; }
378#prompt:focus { border-color: var(--accent2); }
379#composer button { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; border-radius: 9px; color: #fff; padding: 0 14px; cursor: pointer; }
380
381/* ---------- markdown en el chat (estilo plugin de agente) ---------- */
382.msg.md { white-space: normal; }
383.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; }
384.proposal-exec-btn:hover { filter: brightness(1.1); }
385.proposal-exec-btn:disabled { opacity: .6; cursor: default; filter: none; }
386.msg.md code {
387 background: #0d1117; border: 1px solid var(--line); border-radius: 5px;
388 padding: 1px 6px; font-family: ui-monospace, monospace; font-size: .8em; color: #ffb3c9;
389}
390.msg.md code.file-link { cursor: pointer; color: var(--accent2); border-color: var(--accent2); text-decoration: underline dotted; }
391.msg.md code.file-link:hover { background: rgba(124,92,255,.18); }
392a.file-link { color: var(--accent2); text-decoration: underline dotted; }
393.msg.md code.file-link a.file-link { color: inherit; text-decoration: inherit; }
394a.file-link:focus-visible { outline: 2px solid var(--accent2); outline-offset: 1px; border-radius: 3px; }
395.msg.md pre.codeblock {
396 position: relative; background: #0d1117; border: 1px solid var(--line);
397 border-radius: 8px; padding: 10px 12px; margin: 8px 0; overflow-x: auto;
398}
399.msg.md pre.codeblock code {
400 background: none; border: none; padding: 0; color: #c9d1d9;
401 font-size: .78rem; line-height: 1.5; white-space: pre;
402}
403.msg.md pre.codeblock .lang {
404 position: absolute; top: 4px; right: 8px; font-size: .64rem;
405 color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
406}
407.msg.md h4 { margin: 10px 0 4px; font-size: .92rem; color: var(--fg); }
408.msg.md ul { margin: 4px 0; padding-left: 18px; }
409.msg.md li { margin: 2px 0; }
410.msg.md b { color: #fff; }
411
412/* botón flotante chat↔editor: solo en móvil */
413#code-flip {
414 display: none; position: fixed; bottom: 78px; right: 14px; z-index: 60;
415 padding: 10px 16px; font-size: .9rem; color: #fff; border: none;
416 border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent2));
417 box-shadow: 0 8px 24px rgba(0, 0, 0, .5); cursor: pointer;
418}
419
420/* ---------- móvil: cabecera fija + chat/editor conmutables ---------- */
421@media (max-width: 760px) {
422 main { grid-template-columns: 1fr; }
423 #activity, #sidebar, #editor-wrap, #chat { grid-column: 1; }
424 #activity, #sidebar { display: none; }
425 #code-flip { display: block; }
426 #editor-wrap { display: none; }
427 body.show-editor #editor-wrap { display: flex; }
428 body.show-editor #chat { display: none; }
429 #chat { border-left: none; min-width: 0; }
430 header { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
431 .proj { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
432 select { max-width: 38vw; font-size: .78rem; }
433 #prompt { font-size: 16px; } /* sin auto-zoom iOS */
434 #settings-panel { flex-direction: column; }
435 /* nada puede tapar el composer: píldora y botón flotante, por encima de él */
436 #model-progress { bottom: 132px; }
437 #code-flip { bottom: 76px; }
438}
439
440/* ---------- composer estilo plugin de agente ---------- */
441#composer-wrap { border-top: 1px solid var(--line); background: var(--bg2); }
442#ctx-meter { display: flex; align-items: center; gap: 8px; padding: 5px 12px 0; font-size: .68rem; color: var(--muted); }
443#ctx-meter .ctx-track { flex: 1; height: 3px; background: var(--bg); border-radius: 2px; overflow: hidden; }
444#ctx-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .3s; }
445#ctx-bar.hot { background: linear-gradient(90deg, #e5a53a, #e5533a); }
446#composer { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; }
447.cbtn {
448 flex: 0 0 auto; background: var(--bg3); border: 1px solid var(--line); color: var(--muted);
449 border-radius: 8px; min-width: 30px; height: 32px; padding: 0 8px; cursor: pointer;
450 font-size: .95rem; display: inline-flex; align-items: center; gap: 4px;
451}
452.cbtn:hover { color: var(--fg); border-color: var(--accent2); }
453.cbtn.autoedit { font-size: .74rem; }
454.cbtn.autoedit .ae-ico { font-family: ui-monospace, monospace; }
455.cbtn.autoedit.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2050, #2a1840); }
456#btn-send { position: relative; flex: 0 0 auto; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; border-radius: 8px; color: #fff; height: 32px; padding: 0 14px; cursor: pointer; }
457/* mientras se procesa: la elfa está "pensando" — feedback claro en el propio botón */
458#btn-send.sending { cursor: not-allowed; }
459#btn-send.sending svg { opacity: .25; }
460#btn-send.sending::after {
461 content: ''; position: absolute; inset: 9px; border: 2px solid rgba(255,255,255,.35);
462 border-top-color: #fff; border-radius: 50%; animation: btn-send-spin .7s linear infinite;
463}
464@keyframes btn-send-spin { to { transform: rotate(360deg); } }
465
466/* Botón en modo PARAR (mientras el agente genera): clicable, no un spinner muerto */
467#btn-send.is-stop { background: linear-gradient(135deg, #e5484d, #c0353a); cursor: pointer; }
468#btn-send.is-stop svg { opacity: 1; }
469#btn-send.is-stop::after { display: none; } /* fuera el spinner de bloqueo */
470/* «Parando…»: ya se pulsó ■ y el turno se está soltando. Texto en vez de icono,
471 apagado y sin el spinner (en un botón más ancho saldría ovalado). */
472#btn-send.is-stopping { background: #7a2a2d; color: #f3d6d7; cursor: progress; font-size: .78rem; white-space: nowrap; }
473#btn-send.is-stopping::after { display: none; }
474/* Solo para lectores de pantalla (la región viva del envío). */
475.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; }
476
477#composer #prompt { flex: 1; min-width: 0; }
478/* fichas de lo adjuntado con @, encima de la caja */
479#attach-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 0; }
480#attach-chips[hidden] { display: none; }
481.attach-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; font-size: .72rem; color: var(--fg); background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 1px 2px 1px 8px; overflow-wrap: anywhere; }
482.attach-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .85rem; line-height: 1; padding: 2px 6px; border-radius: 10px; }
483.attach-chip button:hover, .attach-chip button:focus-visible { color: var(--fg); background: var(--line); }
484
485/* menú flotante de +/ */
486#menu {
487 position: absolute; bottom: 96px; left: 10px; right: 10px; z-index: 40;
488 background: var(--bg3); border: 1px solid var(--accent2); border-radius: 10px;
489 box-shadow: 0 -8px 30px rgba(0,0,0,.5); max-height: 320px; overflow-y: auto; padding: 4px;
490}
491#menu[hidden] { display: none; }
492#menu .sep { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 3px; }
493#menu .menu-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: .82rem; }
494#menu .menu-item:hover { background: #ffffff0f; }
495#menu .menu-item.sel { background: #ffffff1a; }
496#menu .menu-item b { font-family: ui-monospace, monospace; font-weight: 600; }
497#menu .menu-item span { color: var(--muted); font-size: .74rem; }
498#chat { position: relative; }
499
500/* panel de skills: «Instaladas» y «Explorar catálogos», una acción por fila.
501 El contenido no pasa de un ancho legible aunque el panel ocupe toda la
502 pantalla; los nombres largos parten en vez de cortarse («Co…» en el móvil). */
503.skills-panel { width: 100%; max-width: 880px; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
504.skills-panel .sk-intro { margin: 0 0 4px; line-height: 1.45; }
505.skills-panel > .sk-msg { margin: 0; min-height: 1.2em; }
506.skills-panel section { display: flex; flex-direction: column; }
507.sk-h { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 6px; font-weight: 600; }
508.sk-h:focus { outline: none; }
509.sk-h:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
510.sk-nota, .sk-vacio { margin: 0 0 8px; font-size: .78rem; }
511.sk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
512.sk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; }
513.sk-info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
514.sk-info b { overflow-wrap: anywhere; }
515.sk-info .muted, .sk-info a { font-size: .74rem; overflow-wrap: anywhere; }
516.sk-row .muted { color: var(--muted); }
517.sk-row a { color: var(--accent2); text-decoration: none; }
518.sk-row a:hover { text-decoration: underline; }
519.sk-row > button { flex: 0 0 auto; min-width: 84px; }
520.sk-browse { flex: 1 0 100%; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
521.sk-browse[hidden] { display: none; }
522.sk-browse .sk-row { background: var(--bg2); }
523.sk-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
524.sk-add input { flex: 1 1 220px; min-width: 0; background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 7px 9px; font-size: .8rem; }
525.skills-panel button.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: .78rem; }
526.skills-panel button.ghost { background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: .78rem; }
527.skills-panel button[aria-disabled="true"] { opacity: .7; cursor: default; }
528.skills-panel button[aria-busy="true"] { cursor: progress; }
529.skills-panel button:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
530.sk-remove-repo { margin-top: 8px; }
531.sk-msg { font-size: .76rem; }
532.sk-msg.err { color: #ff8fb0; }
533
534/* El panel de Ajustes / Skills / Extensiones se SUPERPONE (no empuja el IDE) y
535 ocupa ENTERO el hueco de trabajo: de la cabecera al pie y del borde del
536 explorador al de la ventana. Antes era una persiana de la altura de su
537 contenido (top fijo a 46 px y max-height 78vh): por debajo asomaban el
538 editor y el chat, y empezaba 5 px por debajo de la cabecera. La barra de
539 actividad y el explorador quedan a la vista y funcionando; al ocultar el
540 árbol, el panel se ensancha hasta la barra. */
541#settings-panel {
542 position: fixed; top: var(--ide-top, 41px); left: 281px; right: 0; bottom: 0; z-index: 90;
543 max-height: none; overflow-y: auto; overscroll-behavior: contain; flex-direction: column;
544 border-left: 1px solid var(--line); border-bottom: none;
545}
546#settings-panel > * { flex-shrink: 0; }
547body.hide-tree #settings-panel, body.chat-full #settings-panel { left: 46px; }
548@media (max-width: 760px) { #settings-panel, body.hide-tree #settings-panel { left: 0; border-left: none; } }
549
550/* ---------- móvil: cajón con el árbol y las herramientas ----------
551 En el móvil la barra de actividad, el árbol y la barra de menús están
552 ocultos: sin esto, en la vista Editor no había forma de abrir un fichero
553 (salvo enlaces del chat) ni de llegar a la Mente, el terminal, las vistas 3D
554 o las skills. ☰ abre un cajón con todo eso. */
555#btn-drawer { display: none; }
556@media (max-width: 760px) {
557 #btn-drawer { display: inline-flex; font-size: 1rem; }
558 body.drawer-open #activity {
559 display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start;
560 position: fixed; left: 0; top: var(--drawer-top, 52px); width: min(86vw, 340px); height: auto;
561 z-index: 96; padding: 4px; border-right: none; border-bottom: 1px solid var(--line);
562 }
563 body.drawer-open #activity #act-mind { margin: 0; }
564 body.drawer-open #activity button { width: 36px; height: 40px; border-left: none; border-bottom: 2px solid transparent; }
565 body.drawer-open #sidebar {
566 display: flex; position: fixed; left: 0; top: calc(var(--drawer-top, 52px) + var(--drawer-act, 50px)); bottom: 0;
567 width: min(86vw, 340px); z-index: 95; box-shadow: 12px 0 40px rgba(0,0,0,.55);
568 }
569 body.drawer-open #drawer-scrim { display: block; }
570}
571#drawer-scrim { display: none; position: fixed; inset: 0; z-index: 94; background: rgba(0,0,0,.45); }
572
573/* barra indeterminada (descargas sin loaded/total, p. ej. Gemma vía LiteRT-LM) */
574#model-progress .track { overflow: hidden; }
575#model-bar.indet { width: 35%; animation: indet 1.1s ease-in-out infinite; }
576@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
577
578/* ===== chrome estilo VS Code: menubar + palette + settings + git ===== */
579header { position: relative; }
580#model-select[hidden] { display: none; }
581.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; padding: 0; }
582.icon-btn svg { width: 16px; height: 16px; }
583.icon-inline svg { vertical-align: -3px; }
584
585/* barra de menú File/Edit/View/Git en la MISMA línea */
586#menubar { display: flex; gap: 1px; margin-left: 6px; }
587#menubar button { background: none; border: none; color: var(--muted); padding: 4px 9px; font-size: .8rem; cursor: pointer; border-radius: 5px; }
588#menubar button:hover, #menubar button.open { color: var(--fg); background: #ffffff10; }
589@media (max-width: 900px) { #menubar { display: none; } }
590
591/* dropdown del menú (fixed, anclado al botón) */
592#topmenu { position: fixed; z-index: 110; min-width: 220px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 34px rgba(0,0,0,.55); padding: 4px; }
593#topmenu[hidden] { display: none; }
594#topmenu .menu-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .82rem; }
595#topmenu .menu-item:hover { background: #ffffff10; }
596#topmenu .menu-item span { color: var(--muted); font-size: .74rem; }
597#topmenu .menu-item.disabled { opacity: .55; cursor: default; }
598#topmenu .menu-item.disabled:hover { background: none; }
599#topmenu .menu-item:focus-visible, #menubar button:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; }
600
601/* chip de rama git */
602.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg3); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: .74rem; cursor: pointer; white-space: nowrap; }
603.chip[hidden] { display: none; }
604.chip:hover { color: var(--fg); border-color: var(--accent2); }
605.chip svg { width: 12px; height: 12px; }
606
607/* command palette */
608#palette { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 130; width: min(640px, 92vw); background: var(--bg3); border: 1px solid var(--accent2); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); overflow: hidden; }
609#palette[hidden] { display: none; }
610#pal-input { width: 100%; background: var(--bg); border: none; border-bottom: 1px solid var(--line); color: var(--fg); padding: 12px 14px; font-size: .92rem; outline: none; }
611#pal-list { max-height: 50vh; overflow-y: auto; padding: 4px; }
612.pal-item { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .84rem; }
613.pal-item.sel, .pal-item:hover { background: #7c5cff33; }
614.pal-item .pi-name { font-weight: 500; }
615.pal-item .pi-hint { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
616.pal-empty { padding: 12px 14px; color: var(--muted); font-size: .82rem; }
617
618/* settings: título, cierre y tarjetas de modelo/proveedor */
619.panel-title { margin: 2px 0 8px; font-size: 1rem; }
620.panel-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }
621.panel-close:hover { color: var(--accent); }
622.panel-close svg { width: 16px; height: 16px; }
623.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 6px; }
624.model-card { text-align: left; background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--fg); }
625.model-card:hover { border-color: var(--accent2); }
626.model-card.active { border-color: var(--accent); background: linear-gradient(135deg, #2a1840, #1a1428); }
627.model-card b { font-size: .84rem; color: var(--fg); }
628.model-card.active b { color: #fff; }
629.model-card span { color: #aab2c8; font-size: .72rem; }
630.prov-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; }
631.prov-card.on { border-color: var(--accent2); }
632.prov-head { display: flex; align-items: center; gap: 8px; }
633.prov-head b { flex: 1; font-size: .84rem; }
634.prov-use { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 6px; padding: 4px 10px; font-size: .74rem; cursor: pointer; }
635/* Ocupado (mandando, vaciando): con aria-disabled y no con disabled, para no
636 sacarlo del foco (ver ocupa() en main.js); esto es lo que se ve. */
637.prov-use[aria-busy="true"], .chip[aria-busy="true"] { opacity: .6; cursor: progress; }
638.prov-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
639.prov-fields.hide { display: none; }
640.prov-fields input { background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 9px; font-size: .78rem; width: 100%; }
641.field { display: flex; flex-direction: column; gap: 3px; }
642.field .muted { font-size: .7rem; }
643button.wide { width: 100%; padding: 9px; border-radius: 8px; }
644
645.model-card.disabled { opacity: .5; cursor: not-allowed; }
646.model-card.loading { border-color: #e5a53a; }
647.model-card:focus-visible { outline: 2px solid var(--accent2); outline-offset: 1px; }
648.model-card.disabled:hover { border-color: var(--line); }
649
650/* ---------- vistas Arquitectura / Ciudad 3D (overlay sobre el editor) ---------- */
651#view-overlay { position: absolute; inset: 34px 0 22px 0; z-index: 30; background: #0b0d12; overflow: hidden; }
652/* Lo que hay en la vista 3D, como lista que se puede buscar y recorrer con el teclado */
653.view-list { position: absolute; top: 48px; right: 12px; bottom: 12px; width: 280px; z-index: 31; display: flex; flex-direction: column; background: #0d1117e6; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
654.view-list .vl-filter { width: 100%; box-sizing: border-box; background: var(--bg3); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: .78rem; }
655.view-list .vl-count { color: var(--muted); font-size: .7rem; margin: 6px 2px 0; }
656.view-list .vl-items { list-style: none; margin: 6px 0 0; padding: 0; overflow: auto; flex: 1; }
657.view-list .vl-items li { display: flex; align-items: center; gap: 2px; }
658.view-list .vl-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: #c8cede; padding: 3px 6px; border-radius: 5px; cursor: pointer; font: inherit; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
659.view-list .vl-open:hover, .view-list .vl-open:focus-visible, .view-list .vl-locate:hover, .view-list .vl-locate:focus-visible { background: var(--bg3); }
660.view-list .vl-dir { color: var(--muted); font-size: .68rem; }
661.view-list .vl-locate { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 5px; }
662@media (max-width: 760px) { .view-list { top: auto; left: 8px; right: 8px; width: auto; height: 40%; } }
663#view-overlay[hidden] { display: none; }
664#editor-wrap { position: relative; }
665#view-close { position: absolute; top: 10px; right: 12px; z-index: 32; background: var(--bg3); border: 1px solid var(--line); color: var(--muted); width: 30px; height: 28px; border-radius: 7px; cursor: pointer; }
666#view-close:hover { color: var(--accent); }
667#view-body { width: 100%; height: 100%; position: relative; }
668#view-body svg#arch-svg { width: 100%; height: 100%; display: block; cursor: grab; }
669.arch-node { cursor: pointer; }
670.arch-node:hover circle { stroke-width: 3; }
671.view-head { position: absolute; top: 10px; left: 14px; z-index: 31; font-size: .8rem; color: #c8cede; background: #0d1117cc; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); }
672.view-hint { color: var(--muted); font-size: .72rem; margin-left: 8px; }
673.view-loading { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .9rem; }
674#city-canvas { width: 100%; height: 100%; display: block; }
675
676/* ── Compositor: la caja de escribir es lo más grande de la barra ──────────
677 Antes era un <input> de una línea compartiendo fila con seis botones de
678 colores: acababa siendo una píldora estrecha con el texto recortado («Ask
679 Elffu»), indistinguible de sus vecinas. En un chat, el sitio donde se
680 escribe tiene que ser lo primero que se ve. */
681#composer {
682 display: flex;
683 flex-wrap: wrap;
684 gap: 8px;
685 align-items: center;
686}
687#composer #prompt {
688 /* Dos ids a propósito: más arriba hay un `#composer #prompt { flex: 1 }` que
689 gana por especificidad a un `#prompt` suelto. Se iguala en vez de usar
690 !important, que solo traslada la pelea al siguiente que llegue. */
691 flex: 1 0 100%;
692 min-width: 100%;
693 order: -1; /* fila propia y la primera, pase lo que pase */
694 min-height: 84px;
695 max-height: 40vh; /* crece con el texto, pero no se come el chat */
696 resize: vertical;
697 overflow-y: auto;
698 padding: 14px 16px;
699 font: inherit;
700 font-size: 1rem;
701 line-height: 1.45;
702 color: var(--fg);
703 background: var(--bg3);
704 border: 1.5px solid var(--line);
705 border-radius: 14px;
706 outline: none;
707 transition: border-color .15s ease, box-shadow .15s ease;
708}
709#prompt::placeholder { color: var(--fg3, #8b8b9e); opacity: 1; }
710#prompt:focus {
711 border-color: var(--accent2);
712 box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 22%, transparent);
713}
714
715/* ── Modos: un desplegable EXPLICADO ──────────────────────────────────────
716 «Auto», «Goal» y «Hard Work» sueltos en la barra no dicen qué hacen. Los
717 mismos botones siguen existiendo con los mismos ids —el JS no se entera—
718 pero dentro de un menú donde cada uno lleva su explicación. */
719#modos { position: relative; }
720#modos-menu {
721 position: absolute;
722 bottom: calc(100% + 8px);
723 left: 0;
724 z-index: 40;
725 display: flex;
726 flex-direction: column;
727 gap: 4px;
728 min-width: 300px;
729 padding: 8px;
730 background: var(--bg2);
731 border: 1px solid var(--line);
732 border-radius: 12px;
733 box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
734}
735#modos-menu[hidden] { display: none; }
736/* Sin degradado. `#composer button` lo pone a todos, y en una fila de seis son
737 seis manchas de color compitiendo entre ellas y con el texto — y dentro de un
738 menú, donde lo que importa es LEER qué hace cada modo, el degradado solo
739 estorba. Se deja el color para el estado activo, que es cuando dice algo. */
740#modos-menu .cbtn {
741 background: transparent;
742 color: var(--fg);
743 border: 1px solid transparent;
744 display: block;
745 width: 100%;
746 /* `.cbtn` trae `height: 32px` fija, pensada para la barra. Dentro del menú
747 cada opción lleva su explicación debajo y tiene que CRECER: con la altura
748 fija el texto se salía del botón y se pisaba con el de abajo. */
749 height: auto;
750 min-height: 0;
751 text-align: left;
752 white-space: normal;
753 padding: 10px 12px;
754 line-height: 1.35;
755}
756#modos-menu .modo-que { display: block; font-size: .78rem; opacity: .68; margin-top: 3px; font-weight: 400; }
757#modos-menu .cbtn:hover { background: var(--bg3); border-color: var(--line); }
758/* El degradado se reserva para el modo ENCENDIDO: ahí el color informa. */
759#modos-menu .cbtn.on {
760 background: linear-gradient(135deg, var(--accent), var(--accent2));
761 color: #fff;
762 border-color: transparent;
763}
764#modos-menu .cbtn.on .modo-que { opacity: .85; }
765
766/* ── El chat a toda la ventana ────────────────────────────────────────────
767 Mismo patrón que `hide-tree`, que ya existía. El editor no se destruye: se
768 le da cero de ancho, así que volver es instantáneo y no se pierde estado. */
769#btn-ancho {
770 position: absolute; top: 6px; right: 8px; z-index: 30;
771 background: transparent; border: 1px solid var(--line); color: var(--fg2, #aaa);
772 border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: .9rem;
773}
774#btn-ancho:hover { color: var(--fg); border-color: var(--accent2); }
775#chat { position: relative; }
776body.chat-full main { grid-template-columns: 46px 0 0 minmax(0, 1fr); }
777body.chat-full #chat { border-left: none; }
778
779/* ── Velocímetro ─────────────────────────────────────────────────────────────
780 Panel anclado a la derecha de la cabecera. Posición fija y no absoluta
781 respecto al header a propósito: el header tiene overflow y recortaba la
782 gráfica por abajo. */
783#speed-panel {
784 position: fixed; top: 52px; right: 12px; z-index: 60;
785 width: min(280px, calc(100vw - 24px));
786 background: var(--panel, #15161c); color: var(--fg, #e8e8ef);
787 border: 1px solid var(--line, #2a2b36); border-radius: 10px;
788 padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
789 font-size: .82rem; line-height: 1.35;
790}
791#speed-panel[hidden] { display: none; }
792.vm-tit { font-weight: 600; margin-bottom: 8px; }
793.vm-tit2 { margin-top: 14px; }
794.vm-filas { display: grid; gap: 6px; }
795.vm-filas > div { display: flex; align-items: baseline; gap: 8px; }
796.vm-filas b { font-variant-numeric: tabular-nums; font-size: 1.05rem; min-width: 4.2em; }
797.vm-filas span { opacity: .72; }
798.vm-graf { margin: 10px 0 2px; }
799.vm-graf-top, .vm-graf-pie { display: flex; justify-content: space-between; opacity: .6; font-size: .72rem; }
800.vm-graf svg { width: 100%; height: 38px; display: block; margin: 3px 0; }
801.vm-vacio { opacity: .55; font-size: .76rem; margin: 6px 0; }
802.vm-nota { margin-top: 12px; opacity: .5; font-size: .7rem; line-height: 1.3; }
803.vm-modelo { font-weight: 400; opacity: .6; font-size: .78rem; }
804/* El aviso de «leer va tan lento como escribir»: es un sintoma, no un dato. */
805.vm-alerta { margin: 10px 0 2px; padding: 8px 10px; border-radius: 8px; font-size: .75rem;
806 line-height: 1.35; background: rgba(255,176,32,.10); border: 1px solid rgba(255,176,32,.28); }