/* Un hilo (chat.js). Medidas de Chat.swift de la Mac; en angosto, las del iPhone. */

.ch-centro { min-height: 0; }
.ch-lista { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overflow-anchor: none; overscroll-behavior: contain; }
.ch-carril {
  display: flex; flex-direction: column; gap: calc(14 * var(--u)); width: 100%; max-width: calc(var(--carril) + 56px); margin: 0 auto;
  padding: 20px 28px 14px; min-width: 0;
}
.ch-carril > * { min-width: 0; }
.ch-cargando { display: grid; place-items: center; padding-top: 40px; color: var(--texto2); }
.ch-cargando-mas { display: grid; place-items: center; height: 28px; flex: none; color: var(--texto3); }
.ch-flecha { color: var(--texto3); transition: transform .12s ease-out; }
.ch-flecha.abierta { transform: rotate(90deg); }
.ch-mas { color: var(--verde); }
.ch-menos { color: var(--rojo); }
.ch-fallo { color: color-mix(in srgb, var(--rojo) 70%, transparent); }

/* MARK: Abajo: ir al final, avisos, tareas, la caja y el pie */

.ch-abajo { flex: none; position: relative; display: flex; flex-direction: column; min-width: 0; }
.ch-al-final {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  height: calc(24 * var(--u)); padding: 0 10px; border-radius: 99px; font-size: var(--f115); font-weight: 500; color: rgba(var(--p), .8);
  background: color-mix(in srgb, var(--flota) 92%, transparent); box-shadow: 0 0 0 1px rgba(var(--p), .1), 0 1px 4px rgba(0, 0, 0, .3); animation: aparecer .15s;
}
.ch-al-final:hover { color: var(--texto); }
.ch-carril-linea { width: 100%; max-width: calc(var(--carril) + 56px); margin: 0 auto; padding: 0 28px 6px; font-size: var(--f12); }
.ch-conexion { display: flex; align-items: center; gap: 8px; font-size: var(--f125); color: var(--texto2); }
.vacio .ch-conexion { justify-content: center; }

.ch-tira { align-self: center; width: calc(100% - 56px); max-width: var(--carril); margin-bottom: 4px; padding: calc(9 * var(--u)) 14px; border-radius: 12px;
  background: var(--tarjeta); box-shadow: inset 0 0 0 1px rgba(var(--p), .05); display: flex; flex-direction: column; gap: 8px; }
.ch-tira-cabeza { display: flex; align-items: center; gap: 8px; width: 100%; font-size: var(--f12); min-width: 0; }
.ch-tira-cabeza > .ico { color: var(--texto2); }
.ch-tira-cabeza > .ico:last-child { color: var(--texto3); }
.ch-tira-cabeza b { font-weight: 500; flex: none; }
.ch-tira-cabeza .corta { color: var(--texto2); }

.ch-tareas { display: flex; flex-direction: column; gap: calc(5 * var(--u)); }
.ch-tarea { display: flex; align-items: baseline; gap: 8px; font-size: var(--f125); line-height: 1.35; }
.ch-tarea .ico { position: relative; top: 2px; }
.ch-tarea.hecha span { color: var(--texto2); text-decoration: line-through; }

.ch-pie-hilo {
  align-self: center; display: flex; align-items: center; gap: 14px; width: 100%; max-width: calc(var(--carril) + 56px); min-width: 0;
  margin-top: calc(-4 * var(--u)); padding: 0 36px calc(10 * var(--u)); font-size: var(--f12); color: var(--texto2);
}
.ch-pie-hilo > span, .ch-pie-rama { display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.ch-pie-hilo > span:first-child { flex: none; }
.ch-pie-ruta { flex: 0 1 auto; }
/* La ruta se corta por adelante: lo que importa es el final. */
.ch-pie-ruta bdi { direction: rtl; text-align: left; }
.ch-pie-rama { flex: 0 1 auto; max-width: 40%; height: calc(22 * var(--u)); margin: 0 -6px; padding: 0 6px; border-radius: 6px; color: var(--texto2); }
.ch-pie-rama:hover, .ch-pie-rama.activo { background: rgba(var(--p), .08); color: var(--texto); }

/* MARK: Encabezado */

.ch-cab {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; min-width: calc(28 * var(--u)); height: calc(28 * var(--u)); padding: 0 7px;
  border-radius: 7px; color: var(--texto2); font-size: var(--f12); transition: background .12s;
}
.ch-cab:hover { background: rgba(var(--p), .08); color: var(--texto); }
.ch-cab.activo { background: rgba(var(--p), .1); color: var(--texto); }
.ch-cab.cortar { color: var(--rojo); }
.ch-cuenta { display: inline-grid; place-items: center; min-width: calc(16 * var(--u)); height: calc(16 * var(--u)); padding: 0 5px; border-radius: 99px;
  background: var(--ambar); color: #1a1a1a; font-size: var(--f11); font-weight: 600; font-variant-numeric: tabular-nums; }

/* MARK: Tus mensajes */

.ch-usuario { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-left: calc(132 * var(--u)); }
.ch-burbuja { max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: calc(12 * var(--u)); border-radius: 16px; background: var(--mensaje); }
.ch-burbuja-texto { font-size: var(--f14); line-height: calc(22 * var(--u)); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.ch-burbuja-texto.cortado { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; }
.ch-mostrar { font-size: var(--f12); font-weight: 500; color: var(--texto2); }
.ch-mostrar:hover { color: var(--texto); }
.ch-mencion { display: inline-flex; align-items: center; gap: 3px; vertical-align: -3px; padding: 0 5px 0 2px; border-radius: 5px; font-weight: 500; text-decoration: none;
  color: #5c9efa; background: color-mix(in srgb, #5c9efa 16%, transparent); cursor: pointer; }
.ch-adjuntos { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ch-adjunto { width: calc(132 * var(--u)); height: calc(99 * var(--u)); border-radius: 8px; overflow: hidden; background: rgba(var(--p), .06); box-shadow: inset 0 0 0 1px var(--borde); cursor: zoom-in; }
.ch-adjunto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hoja.ch-visor { width: auto; max-width: min(1100px, 94vw); max-height: 92dvh; padding: 8px; display: grid; }
.ch-imagen-grande { display: block; max-width: 100%; max-height: calc(92dvh - 16px); object-fit: contain; border-radius: 8px; cursor: zoom-out; }

.ch-pie-mensaje { display: flex; align-items: center; gap: 6px; height: calc(20 * var(--u)); font-size: var(--f12); color: var(--texto2); opacity: 0; transition: opacity .2s ease-out; }
.ch-claude .ch-pie-mensaje { height: calc(22 * var(--u)); gap: 8px; margin-left: -3px; }
.ch-usuario:hover .ch-pie-mensaje, .ch-claude:hover .ch-pie-mensaje, .ch-pie-mensaje:focus-within { opacity: 1; }

.ch-linea-chica { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; font-size: var(--f115); color: var(--texto3); text-align: center; }
button.ch-linea-chica:hover { color: var(--texto2); }
.ch-aviso { font-size: var(--f12); color: var(--texto3); text-align: center; }
.ch-error { display: flex; align-items: baseline; gap: 8px; padding: 11px 14px; border-radius: 12px; font-size: var(--f13); color: var(--rojo); line-height: 1.45;
  background: color-mix(in srgb, var(--rojo) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rojo) 32%, transparent); overflow-wrap: anywhere; }
.ch-error .ico { position: relative; top: 2px; }
.ch-error span { white-space: pre-wrap; min-width: 0; }

/* MARK: Lo que escribe Claude */

.ch-claude { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px; }
.ch-autor { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; font-size: var(--f13); }
.ch-autor b { font-weight: 600; }
.ch-autor small { font-size: var(--f115); color: var(--texto3); }

/* MARK: Registro de trabajo */

.ch-registro, .ch-entrada, .ch-agentes { display: flex; flex-direction: column; min-width: 0; }
.ch-registro-cabeza, .ch-entrada-cabeza { display: flex; align-items: center; gap: 6px; width: 100%; height: calc(26 * var(--u)); min-width: 0; font-size: var(--f135); color: var(--texto2); cursor: default; }
.ch-registro-cabeza, .ch-entrada-cabeza.con-detalle { cursor: pointer; }
.ch-entrada-icono { flex: none; display: grid; place-items: center; width: calc(24 * var(--u)); color: color-mix(in srgb, var(--texto2) 75%, transparent); }
.ch-entrada-icono.fallo { color: color-mix(in srgb, var(--rojo) 55%, transparent); }
.ch-entrada-icono.pendiente { color: var(--ambar); }
.ch-entrada-titulo { flex: none; white-space: nowrap; }
.ch-entrada-titulo.en-curso { color: rgba(var(--p), .85); }
.ch-entrada-detalle { flex: 0 1 auto; font-size: var(--f12); color: var(--texto3); }
.ch-entrada-cabeza > .ch-flecha { opacity: 0; }
.ch-entrada-cabeza:hover > .ch-flecha, .ch-entrada-cabeza.abierta > .ch-flecha { opacity: .9; }
.ch-entrada-cuerpo { margin: 4px 0 6px calc(30 * var(--u)); border-radius: 8px; background: rgba(var(--p), .04); overflow: hidden; min-width: 0; }
.ch-entrada-cuerpo pre { margin: 0; padding: 9px 12px; font: var(--f12)/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-comando { color: var(--texto); }
.ch-comando + .ch-entrada-salida { border-top: 1px solid var(--borde); }
pre.ch-entrada-salida { color: var(--texto2); max-height: calc(256 * var(--u)); overflow: auto; }
pre.ch-entrada-salida.fallo { color: var(--rojo); }
.ch-entrada-salida.diff { max-height: calc(320 * var(--u)); overflow: auto; }
.ch-entrada-tareas { padding: 10px; }
.ch-trayendo { display: flex; align-items: center; gap: 7px; padding: 6px 12px 8px; font-size: var(--f115); color: var(--texto3); }
.ch-minidiff { padding: 6px 0; font: var(--f115)/1.45 var(--mono); color: var(--texto2); min-width: 0; }
.ch-minidiff > div { padding: 1px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-minidiff .mas { color: var(--verde); background: color-mix(in srgb, var(--verde) 9%, transparent); }
.ch-minidiff .menos { color: var(--rojo); background: color-mix(in srgb, var(--rojo) 9%, transparent); }

/* MARK: Subagentes */

.ch-agente { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: calc(5 * var(--u)) 8px calc(5 * var(--u)) 0; border-radius: 7px; cursor: pointer; }
.ch-agente:hover { background: rgba(var(--p), .05); }
.ch-agente-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ch-agente-texto b { font-size: var(--f13); font-weight: 500; color: rgba(var(--p), .8); }
.ch-agente-texto b.en-curso { color: rgba(var(--p), .95); }
.ch-agente-texto small { font-size: var(--f115); color: color-mix(in srgb, var(--texto2) 85%, transparent); }
.ch-agente .fallo { color: color-mix(in srgb, var(--rojo) 85%, transparent); }
.ch-agente-estado { flex: none; margin-left: 4px; font-size: var(--f12); color: var(--texto2); }
.ch-agente-tiempo { flex: none; font-size: var(--f12); color: var(--texto3); }
.ch-agente-flecha { color: var(--texto3); opacity: 0; }
.ch-agente:hover .ch-agente-flecha { opacity: .9; }

/* MARK: Turno plegado, llamadas, rutinas */

.ch-plegado, .ch-rutinas, .ch-llamada { display: flex; flex-direction: column; min-width: 0; }
.ch-plegado { gap: calc(10 * var(--u)); }
.ch-rutinas { gap: calc(14 * var(--u)); }
.ch-plegado-cabeza { display: flex; align-items: center; gap: 5px; padding: 0 3px 8px; border-bottom: 1px solid rgba(var(--p), .06); font-size: var(--f13); color: var(--texto2); cursor: pointer; }
.ch-plegado-cabeza:hover { color: var(--texto); }
.ch-plegado-cabeza > .ch-flecha { color: currentColor; }
.ch-chip-agentes { display: inline-flex; align-items: center; gap: 5px; height: calc(20 * var(--u)); padding: 0 6px; border-radius: 99px; font-size: var(--f12);
  color: color-mix(in srgb, var(--violeta) 90%, transparent); background: color-mix(in srgb, var(--violeta) 12%, transparent); }
.ch-chip-agentes:hover { background: color-mix(in srgb, var(--violeta) 22%, transparent); }

.ch-llamada { gap: calc(8 * var(--u)); align-items: flex-start; }
.ch-llamada-tarjeta { display: inline-flex; align-items: center; gap: calc(10 * var(--u)); padding: 7px 12px 7px 8px; border-radius: 12px; background: rgba(var(--p), .06); cursor: pointer; }
.ch-llamada-tarjeta:hover { background: rgba(var(--p), .09); }
.ch-llamada-icono { display: grid; place-items: center; width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 50%; color: var(--verde); background: color-mix(in srgb, var(--verde) 14%, transparent); }
.ch-llamada-texto { display: flex; flex-direction: column; gap: 1px; margin-right: 6px; }
.ch-llamada-texto b { font-size: var(--f13); font-weight: 500; }
.ch-llamada-texto small { font-size: var(--f115); color: var(--texto2); }
.ch-llamada-dichos { display: flex; flex-direction: column; gap: calc(5 * var(--u)); padding-left: 8px; }
.ch-dicho { display: flex; align-items: baseline; gap: 6px; font-size: var(--f125); color: var(--texto2); line-height: 1.4; }
.ch-dicho > span:first-child { flex: none; width: calc(13 * var(--u)); color: var(--texto3); position: relative; top: 1.5px; }

/* MARK: Tarjetas */

.ch-cambios { margin-top: 2px; padding: 0 6px 6px; border-radius: 8px; background: rgba(var(--p), .03); display: flex; flex-direction: column; gap: 0; }
.ch-cambios header { display: flex; align-items: center; gap: 8px; padding: 3px 0 5px 6px; font-size: var(--f115); }
.ch-cambios header b { font-size: var(--f12); font-weight: 500; }
.ch-archivo { display: flex; align-items: center; gap: 7px; height: calc(28 * var(--u)); padding: 0 6px; border-radius: 6px; min-width: 0; font-size: var(--f105); cursor: pointer; }
.ch-archivo:hover { background: rgba(var(--p), .06); }
.ch-archivo > .ico { color: var(--texto2); }
.ch-archivo-nombre { flex: none; font-size: var(--f12); color: rgba(var(--p), .85); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-archivo-carpeta { flex: 0 1 auto; font-size: var(--f11); color: var(--texto3); }
.ch-archivo-abrir { opacity: 0; }
.ch-archivo:hover .ch-archivo-abrir, .ch-archivo-abrir:focus-visible { opacity: 1; }

.ch-plan { display: flex; flex-direction: column; gap: calc(12 * var(--u)); padding: calc(18 * var(--u)); border-radius: 16px; background: var(--tarjeta); box-shadow: inset 0 0 0 1px var(--borde); min-width: 0; }
.ch-plan header, .ch-plan footer { display: flex; align-items: center; gap: 8px; }
.ch-plan-marca { display: inline-grid; place-items: center; height: calc(20 * var(--u)); padding: 0 8px; border-radius: 99px; font-size: calc(9.5 * var(--u)); font-weight: 600; letter-spacing: 1.2px;
  color: var(--violeta); background: color-mix(in srgb, var(--violeta) 14%, transparent); }
.ch-plan-texto.cortado { max-height: calc(280 * var(--u)); overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.ch-plan footer small { font-size: var(--f115); color: var(--texto3); }

.ch-pedido { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ch-pedido-detalle { margin-left: calc(30 * var(--u)); border-radius: 8px; background: rgba(var(--p), .04); min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.ch-pedido-detalle.con-tope { padding: 0; max-height: calc(160 * var(--u)); overflow: auto; gap: 0; }
.ch-pedido-detalle p { font-size: var(--f13); line-height: 1.45; white-space: pre-wrap; }
.ch-pedido-detalle pre { margin: 0; padding: 9px 12px; font: var(--f12)/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-pedido-ruta { padding: 8px 10px 0; font-size: var(--f12); color: var(--texto2); }
.ch-pedido-linea { display: flex; align-items: center; gap: 6px; min-height: calc(26 * var(--u)); min-width: 0; font-size: var(--f135); color: var(--texto2); flex-wrap: wrap; }
.ch-pedido-linea > .ch-entrada-detalle { flex: 1 1 0; }
.ch-pedido-pregunta { flex: 0 1 auto; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ch-pedido-respuesta { color: rgba(var(--p), .85); }
.ch-pedido-espera { color: var(--ambar); white-space: nowrap; }
.ch-pedido-hecho { white-space: nowrap; flex: none; }
.ch-punto { color: var(--texto3); }
.ch-captura { align-self: flex-start; display: block; max-width: min(100%, calc(460 * var(--u))); border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--borde); background: rgba(var(--p), .06); cursor: zoom-in; }
.ch-captura img { display: block; max-width: 100%; max-height: calc(300 * var(--u)); min-height: 60px; object-fit: contain; }

.ch-pedido-tarjeta { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(var(--p), .05); box-shadow: inset 0 0 0 1px rgba(var(--p), .1); min-width: 0; }
.ch-pedido-tarjeta.pendiente { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ambar) 50%, transparent); }
.ch-pedido-titulo { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--texto2); }
.ch-pedido-tarjeta.pendiente .ch-pedido-titulo { color: var(--ambar); }
.ch-pedido-tarjeta p { font-size: 15px; font-weight: 500; line-height: 1.4; }
.ch-pedido-tarjeta small { font-size: 12.5px; color: var(--texto2); white-space: pre-wrap; line-height: 1.4; }
.ch-pedido-tarjeta pre { margin: 0; font: 12.5px/1.45 var(--mono); color: var(--texto2); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.ch-pedido-botones { display: flex; align-items: center; gap: 8px; }

.ch-formulario { display: flex; flex-direction: column; gap: calc(12 * var(--u)); width: 100%; max-width: calc(480 * var(--u)); padding: 14px; border-radius: 12px; background: var(--tarjeta); box-shadow: inset 0 0 0 1px var(--borde); }
.ch-formulario.pendiente { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--azul) 45%, transparent); }
.ch-formulario-cabeza { display: flex; flex-direction: column; gap: 4px; }
.ch-formulario-cabeza b { font-size: var(--f135); font-weight: 600; }
.ch-formulario-cabeza p { font-size: var(--f125); color: var(--texto2); line-height: 1.45; white-space: pre-wrap; }
.ch-formulario-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: var(--f12); font-weight: 500; color: var(--azul); text-decoration: none; }
.ch-formulario-link:hover { text-decoration: underline; }
.ch-campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ch-campo > span { font-size: var(--f115); font-weight: 500; color: var(--texto2); }
.ch-campo .campo { height: calc(32 * var(--u)); background: rgba(var(--p), .06); }
.ch-campo .campo:focus { border-color: color-mix(in srgb, var(--primario) 70%, transparent); }
.ch-campo-valor { font-size: var(--f13); color: var(--texto2); overflow-wrap: anywhere; }
.ch-campo-opciones { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-campo-opciones button { height: calc(28 * var(--u)); padding: 0 11px; border-radius: 8px; font-size: var(--f125); background: rgba(var(--p), .06); }
.ch-campo-opciones button.elegida { font-weight: 600; background: color-mix(in srgb, var(--primario) 22%, transparent); box-shadow: inset 0 0 0 1px var(--primario); }
.ch-formulario-pie { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ch-formulario-pie small, .ch-formulario-estado { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f11); color: var(--texto3); }
.ch-formulario-estado { font-size: var(--f115); }
.ch-formulario-pie .boton.primario { height: calc(28 * var(--u)); padding: 0 14px; border-radius: 8px; font-weight: 600; }

.ch-indicador { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; border-bottom: 1px solid rgba(var(--p), .05); font-size: var(--f135); color: var(--texto2); }

/* MARK: Celular (como el iPhone) */

.ch-titulo-bot { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; }
.ch-titulo-bot b, .ch-titulo-movil b { font-weight: 600; }
.ch-titulo-movil { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ch-titulo-movil b { font-size: 15px; }
.ch-titulo-movil small { font-size: 11.5px; color: var(--texto2); }
.ch-cab-movil { position: relative; width: 40px; height: 40px; }
.ch-punto-ambar { position: absolute; top: 8px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--ambar); }
.ch-fin { display: flex; align-items: center; gap: 5px; align-self: flex-start; padding-top: 2px; font-size: 12.5px; color: var(--texto2); text-align: left; }
button.ch-fin { min-height: 32px; margin: -6px 0; }
.ch-fin .ico { color: var(--texto3); }

@media (max-width: 760px) {
  .ch-carril { gap: 20px; padding: 12px 18px; max-width: none; }
  .ch-carril-linea { max-width: none; padding: 0 18px 6px; font-size: 13px; }
  .ch-al-final.redondo { left: auto; right: 16px; bottom: calc(100% + 10px); transform: none; width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%;
    background: color-mix(in srgb, var(--flota) 80%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .ch-tira { width: calc(100% - 20px); max-width: none; padding: 11px 14px; }
  .ch-tira-cabeza { font-size: 14px; min-height: 22px; }
  .ch-tarea { font-size: 14px; }

  .ch-usuario { padding-left: 48px; gap: 6px; }
  .ch-burbuja { padding: 11px 15px; border-radius: 18px; background: rgba(var(--p), .12); }
  .ch-burbuja-texto { font-size: 16px; line-height: 1.4; }
  .ch-mostrar { font-size: 13.5px; min-height: 30px; }
  .ch-adjunto { width: 90px; height: 90px; border-radius: 10px; }
  .hoja.ch-visor { padding: 8px 8px max(16px, env(safe-area-inset-bottom)); background: #000; }
  /* Sin mouse no hay «al pasar por encima»: la hora y copiar quedan a la vista, apagados. */
  .ch-pie-mensaje { opacity: 1; height: 26px; font-size: 12px; color: var(--texto3); }
  .ch-pie-mensaje .boton-icono.chico { min-width: 26px; min-height: 26px; }

  .ch-claude { gap: 6px; padding: 0; }
  .ch-claude .markdown { font-size: 16px; line-height: 1.5; }
  .ch-autor { font-size: 15px; }
  .ch-linea-chica, .ch-aviso { font-size: 13px; }
  button.ch-linea-chica { min-height: 36px; margin: -8px 0; }
  .ch-error { font-size: 14px; padding: 10px 12px; }
  .ch-indicador { border-bottom: 0; padding: 0; font-size: 14px; }

  .ch-registro { gap: 6px; }
  .ch-registro-cabeza { height: auto; min-height: 32px; margin: -5px 0; font-size: 14px; }
  .ch-registro-cabeza .ch-entrada-icono { width: 14px; }
  .ch-entrada-cabeza { height: auto; min-height: 30px; font-size: 14px; }
  .ch-entrada-icono { width: 18px; }
  .ch-entrada-detalle { font-size: 12.5px; }
  .ch-entrada-cabeza > .ch-flecha { display: none; }
  .ch-entrada-cuerpo { margin-left: 24px; background: rgba(var(--p), .05); }
  .ch-entrada-cuerpo pre, .ch-minidiff { font-size: 11.5px; }
  pre.ch-entrada-salida, .ch-entrada-salida.diff { max-height: 260px; }

  .ch-agente { padding: 8px 4px 8px 0; min-height: 44px; }
  .ch-agente-texto b { font-size: 15px; }
  .ch-agente-texto small, .ch-agente-estado, .ch-agente-tiempo { font-size: 12.5px; }
  .ch-agente-flecha { opacity: .9; }

  .ch-llamada-tarjeta { padding: 8px 14px 8px 8px; border-radius: 16px; background: rgba(var(--p), .07); }
  .ch-llamada-icono { width: 34px; height: 34px; }
  .ch-llamada-texto b { font-size: 15px; }
  .ch-llamada-texto small { font-size: 12.5px; }
  .ch-dicho { font-size: 14px; }

  .ch-plan { padding: 14px; border-radius: 14px; background: rgba(var(--p), .05); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violeta) 35%, transparent); }
  .ch-plan footer small { display: none; }
  .ch-plan footer .boton.primario { flex: 1; height: 44px; font-size: 16px; border-radius: 11px; }
  .ch-pedido-pregunta, .ch-pedido-linea { font-size: 15px; }
  .ch-formulario { max-width: none; border-radius: 14px; }
  .ch-formulario-cabeza b { font-size: 15px; }
  .ch-formulario-cabeza p { font-size: 13.5px; }
  .ch-campo > span { font-size: 12.5px; }
  .ch-campo .campo { height: 44px; }
  .ch-campo-opciones button { height: 40px; font-size: 15px; padding: 0 14px; }
  .ch-formulario-pie .boton { height: 40px; font-size: 15px; }
  .ch-formulario-pie small { font-size: 12px; flex-basis: 100%; }
}
