/* Tema Nano (rediseño 2026-11-26): crema + verde bosque de El Tarot de Goni.
   Solo colores, letras y formas. Copia anterior: /root/backups/rediseno-20261126/nanobot/ */
@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@500;600&display=swap");

html:root {
  --nb-forest: #23473A;
  --nb-oro: #A07A2C;
  --background: 43 35% 92.2%;
  --foreground: 150 15% 13.3%;
  --card: 42 42% 95.3%;
  --card-foreground: 150 15% 13.3%;
  --popover: 42 42% 95.3%;
  --popover-foreground: 150 15% 13.3%;
  --primary: 158 34% 20.8%;
  --primary-foreground: 43 35% 95%;
  --secondary: 111 21% 88%;
  --secondary-foreground: 158 34% 20.8%;
  --muted: 43 30% 88.5%;
  --muted-foreground: 148 23% 31.8%;
  --accent: 111 21% 88%;
  --accent-foreground: 158 34% 20.8%;
  --border: 42 27% 82.7%;
  --input: 42 27% 82.7%;
  --ring: 158 34% 20.8%;
  --content-link: #23473A;
  --content-link-hover: #16302A;
  --sidebar: 43 32% 89%;
  --sidebar-foreground: 150 15% 13.3%;
  --sidebar-content: 150 15% 20%;
  --sidebar-muted-foreground: 148 23% 31.8%;
  --sidebar-selected: 111 21% 84%;
  --sidebar-accent: 111 21% 86%;
  --sidebar-accent-foreground: 158 34% 20.8%;
  --sidebar-border: 42 27% 82.7%;
  --settings-surface: 42 42% 95.3%;
  --scrollbar-thumb: hsl(148 23% 31.8% / .28);
  --scrollbar-thumb-hover: hsl(148 23% 31.8% / .45);
}

html.dark:root {
  --nb-forest: #DCE7DA;
  --background: 150 19% 10.6%;
  --foreground: 44 31% 90.4%;
  --card: 148 18% 13.9%;
  --card-foreground: 44 31% 90.4%;
  --popover: 148 18% 13.9%;
  --popover-foreground: 44 31% 90.4%;
  --primary: 111 21% 88%;
  --primary-foreground: 150 19% 10.6%;
  --secondary: 148 17% 17.1%;
  --secondary-foreground: 44 31% 90.4%;
  --muted: 148 17% 17.1%;
  --muted-foreground: 141 13% 70.2%;
  --accent: 148 17% 19.8%;
  --accent-foreground: 44 31% 92%;
  --border: 145 14% 23.3%;
  --input: 145 14% 23.3%;
  --ring: 111 21% 80%;
  --content-link: #B9D3C2;
  --content-link-hover: #DCE7DA;
  --sidebar: 153 17% 12.4%;
  --sidebar-foreground: 44 31% 90.4%;
  --sidebar-content: 44 20% 84%;
  --sidebar-muted-foreground: 141 13% 70.2%;
  --sidebar-selected: 148 17% 19.8%;
  --sidebar-accent: 148 17% 16%;
  --sidebar-accent-foreground: 44 31% 92%;
  --sidebar-border: 145 14% 23.3%;
  --settings-surface: 148 18% 13.9%;
}

/* El fondo inicial (antes de que cargue la app) también en crema / bosque noche */
html body { background: #F2EEE4; color: #1D2722; }
html.dark body { background: #16201B; color: #EEEADF; }

/* Letras: Figtree para todo, Fraunces para títulos */
html body, html .font-sans, html textarea {
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
html h1, html h2, html h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Cuadro de escribir: la pieza protagonista, marco de carta con filete de oro suave */
html .thread-composer-surface {
  --composer-shadow-color: 158 34% 20.8%;
  --tw-shadow: inset 0 0 0 1px hsl(var(--border)), inset 0 0 0 5px hsl(var(--card)), inset 0 0 0 6px rgb(160 122 44 / .32), 0 6px 22px -10px hsl(var(--composer-shadow-color) / .22);
}
html.dark .thread-composer-surface {
  --composer-shadow-color: 150 30% 3%;
  --tw-shadow: inset 0 0 0 1px hsl(var(--border)), inset 0 0 0 5px hsl(var(--card)), inset 0 0 0 6px rgb(201 165 92 / .28), 0 6px 22px -10px hsl(var(--composer-shadow-color) / .6);
}

/* Botón principal del cuadro (hablar / enviar): verde bosque lleno */
html .composer-primary-action { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
html .composer-primary-action:hover:not(:disabled) { background-color: hsl(var(--primary) / .88); }
html .composer-primary-action:active:not(:disabled) { transform: translateY(1px); }

/* Foco visible en verde (oscuro: menta) */
html :focus-visible { outline-color: hsl(var(--ring)); }

/* Panel de uso Go: mismos colores de la marca (solo variables, la lógica no cambia) */
html #gou { --b: #DFD8C7; --bg: rgba(248, 245, 238, .92); --fg: #1D2722; --mu: #3E6450; --tr: #E4DECF;
  font-family: "Figtree", system-ui, sans-serif; }
html.dark #gou { --b: #33443A; --bg: rgba(29, 42, 35, .92); --fg: #EEEADF; --mu: #A9BDB0; --tr: #33443A; }
html #gou .pill:focus-visible { outline-color: #23473A; }
html.dark #gou .pill:focus-visible { outline-color: #DCE7DA; }
html #gou .card { border-radius: 1rem; }
/* En un chat la barra de arriba tiene más botones: el panel se corre para no taparlos */
@media (min-width: 641px) {
  html:has([data-header-controls="end"] > :nth-child(3)) #gou { right: 114px; }
  html:has([data-header-controls="end"] > :nth-child(4)) #gou { right: 144px; }
}

/* Ajustes de accesibilidad de la pasada aifix (2026-11-25) */
.thread-composer-access { color: #B23E0B !important; }
.dark .thread-composer-access { color: #F5B98A !important; }

[class*="text-[11px]"] { font-size: 12px !important; }

@media (pointer: coarse) {
  .touch-target,
  header button,
  nav button,
  aside button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ---- Estilo "pixel acogedor" (aifix 2026-11-26). Backup: /root/backups/nanobot-optim-20261126/ ---- */
html h1, html h2, html h3, html .settings-section-title {
  font-family: "Pixelify Sans", "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}
html .thread-composer-surface {
  border-radius: 10px;
  --tw-shadow: 0 0 0 2px hsl(var(--primary) / .85), 5px 5px 0 0 hsl(var(--primary) / .18);
}
html.dark .thread-composer-surface {
  --tw-shadow: 0 0 0 2px hsl(var(--primary) / .7), 5px 5px 0 0 hsl(150 30% 3% / .6);
}
html .composer-primary-action { border-radius: 6px; }
html .rounded-panel.bg-settings-surface {
  border-radius: 8px;
  box-shadow: 0 0 0 2px hsl(var(--border)), 4px 4px 0 0 hsl(var(--border));
}
html #gou .pill { border-width: 2px; border-radius: 6px; box-shadow: 2px 2px 0 var(--b); }
html #gou .card { border-width: 2px; border-radius: 8px; box-shadow: 5px 5px 0 var(--b); }
/* Celular: el panel de uso solo en el chat, para no tapar títulos de Ajustes y Skills */
@media (max-width: 640px) {
  html[data-ns-route="settings"] #gou, html[data-ns-route="apps"] #gou { display: none; }
}
/* Celular: el panel de uso queda debajo del menú lateral cuando se abre */
@media (max-width: 640px) { html #gou { z-index: 40; } }
