/* Chat interno: lista de chats + conversación (reemplaza al chat de pestañas).
   Todas las clases empiezan con "cx-" para no chocar con el resto del sistema.
   El visor de imágenes en grande (.chat-lightbox) sigue en style.css. */

.cx-widget {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1000;
  font-family: inherit;
}

.cx-i {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cx-i-grande { width: 26px; height: 26px; }

/* ---------- Botón flotante ---------- */
.cx-fab {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--azul);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px rgba(13, 148, 136, 0.6);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cx-fab:hover { transform: scale(1.06); background: var(--azul-oscuro); }

.cx-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--rojo);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gris-fondo);
}

/* ---------- Panel ---------- */
.cx-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 360px;
  height: min(440px, calc(100vh - 120px));
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--gris-borde);
  box-shadow: 0 24px 60px -12px rgba(16, 24, 40, 0.28), 0 4px 12px rgba(16, 24, 40, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  animation: cx-aparecer 0.18s ease;
}

@keyframes cx-aparecer {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.cx-vista {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.cx-panes { position: absolute; inset: 0; pointer-events: none; }
.cx-conv { transform: translateX(100%); opacity: 0; pointer-events: none; }
.cx-panel.en-conv .cx-vista-lista { transform: translateX(-24%); opacity: 0; pointer-events: none; }
.cx-panel.en-conv .cx-conv { transform: none; opacity: 1; pointer-events: auto; }

.cx-enc { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.cx-enc h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.03em; flex: 1; }

.cx-icbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  color: #475467;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.cx-icbtn:hover { background: #f2f5f7; color: var(--texto); }
.cx-icbtn.cx-marca { background: var(--azul-suave); color: var(--azul-oscuro); }
.cx-icbtn.cx-marca:hover { background: #d9f7f2; }

.cx-buscar {
  margin: 0 16px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f5f8;
  border-radius: 12px;
  padding: 0 12px;
  height: 40px;
  color: #98a2b3;
}
.cx-buscar input {
  border: 0;
  background: none;
  outline: 0;
  box-shadow: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--texto);
  flex: 1;
  min-width: 0;
  padding: 0;
  min-height: 0;
  height: auto;
}
.cx-buscar input:focus { box-shadow: none; border: 0; }

/* ---------- Lista ---------- */
.cx-lista { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.cx-lista h4 {
  margin: 12px 10px 4px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #98a2b3;
  font-weight: 600;
}
.cx-vacio { text-align: center; color: #98a2b3; padding: 30px 14px; font-size: 0.88rem; line-height: 1.5; }

.cx-item {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 14px;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background-color 0.12s ease;
}
.cx-item:hover { background: #f6f8fa; }
.cx-item-mid { flex: 1; min-width: 0; }
.cx-item-fila1, .cx-item-fila2 { display: flex; justify-content: space-between; gap: 8px; }
.cx-item-fila1 { align-items: baseline; }
.cx-item-fila2 { align-items: center; margin-top: 2px; }
.cx-item-nombre { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-item-hora { font-size: 0.72rem; color: var(--texto-suave); flex-shrink: 0; }
.cx-item-prev { font-size: 0.82rem; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-item.cx-nuevo .cx-item-prev { color: #344054; font-weight: 500; }
.cx-item.cx-nuevo .cx-item-hora { color: var(--azul-oscuro); font-weight: 600; }
.cx-cuenta {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--azul);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 6px;
  flex-shrink: 0;
}

.cx-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.86rem;
  flex-shrink: 0;
}
.cx-av-sm { width: 36px; height: 36px; font-size: 0.76rem; }
.cx-av.cx-grupo { border-radius: 14px; }
.cx-av .cx-i { width: 20px; height: 20px; }
.cx-c0 { background: #d9f4f0; color: #0f766e; }
.cx-c1 { background: #dbeafe; color: #1d4ed8; }
.cx-c2 { background: #fef3c7; color: #92400e; }
.cx-c3 { background: #ede9fe; color: #5b21b6; }
.cx-c4 { background: #fee2e2; color: #9f1239; }

/* ---------- Ocultar una conversación de Recientes ---------- */
.cx-fila {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.cx-fila .cx-item {
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  background: #fff;
  transition: transform 0.2s ease, background-color 0.12s ease;
}
.cx-fila .cx-item:hover { background: #f6f8fa; }
.cx-fila-accion {
  overflow: hidden;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 92px;
  border: 0;
  background: #64748b;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.cx-fila-accion > * { position: relative; }

/* Mientras el deslizamiento se mantiene, el botón se va llenando de rojo:
   al llegar al final la conversación se oculta sola. */
.cx-fila-accion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #dc2626;
  transform: scaleX(0);
  transform-origin: left center;
}
.cx-fila.cargando .cx-fila-accion::before {
  animation: cx-llenar var(--hold-ms, 1200ms) linear forwards;
}
@keyframes cx-llenar {
  to { transform: scaleX(1); }
}

.cx-aviso {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: #1d2939;
  color: #fff;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: 0 10px 24px -8px rgba(16, 24, 40, 0.5);
  z-index: 9;
  white-space: nowrap;
}
.cx-aviso button {
  border: 0;
  background: none;
  color: #5eead4;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

/* ---------- Nuevo chat (hoja que sube) ---------- */
.cx-hoja {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 8;
}
.cx-hoja.cx-ver { opacity: 1; pointer-events: auto; }
.cx-hoja-int {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 86%;
  background: #fff;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cx-hoja.cx-ver .cx-hoja-int { transform: none; }
.cx-hoja-int .cx-enc { padding-bottom: 6px; }

/* ---------- Conversación ---------- */
.cx-enc-conv {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 8px;
  border-bottom: 1px solid var(--gris-borde);
}
.cx-tit { flex: 1; min-width: 0; line-height: 1.25; }
.cx-tit b { font-size: 0.95rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-tit small { font-size: 0.76rem; color: var(--texto-suave); }

/* Franja de chats anclados (Chat general + los que se abrieron o escribieron) */
.cx-avisos {
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  position: relative;
  background: #eef5fb;
  border-bottom: 1px solid var(--gris-borde);
  scrollbar-width: none;
}
.cx-avisos::-webkit-scrollbar { display: none; }
.cx-aviso-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--gris-borde);
  background: #fff;
  border-radius: 999px;
  animation: cx-aviso-entra 0.2s ease-out;
}
.cx-aviso-chip:hover { border-color: var(--azul); }
.cx-aviso-chip.con-nuevos { border-color: var(--azul); background: #f0fbf9; animation: cx-aviso-nuevo 1.6s ease-out 1; }
.cx-aviso-chip.con-nuevos .cx-aviso-nombre { color: #0b5a54; }
@keyframes cx-aviso-nuevo { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(20, 184, 166, 0); } }
.cx-aviso-chip.activo { background: var(--azul-oscuro); border-color: var(--azul-oscuro); }
.cx-aviso-chip.activo .cx-aviso-btn { color: #fff; }
.cx-aviso-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 3px 8px 3px 3px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--azul-oscuro);
  cursor: pointer;
}
.cx-aviso-chip.general .cx-aviso-btn { padding-right: 10px; }
.cx-aviso-chip:has(.cx-aviso-x) .cx-aviso-btn { padding-right: 4px; }
.cx-aviso-btn .cx-av-sm { width: 24px; height: 24px; font-size: 0.62rem; }
.cx-aviso-btn .cx-av .cx-i { width: 14px; height: 14px; }
.cx-aviso-nombre { max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-aviso-btn .cx-cuenta { min-width: 18px; height: 18px; font-size: 0.68rem; }
.cx-aviso-x {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 3px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--texto-suave);
  cursor: pointer;
  padding: 0;
}
.cx-aviso-x .cx-i { width: 12px; height: 12px; }
.cx-aviso-x:hover { background: #fee2e2; color: #b42318; }
.cx-aviso-chip.activo .cx-aviso-x { color: #cfe0f1; }
.cx-aviso-chip.activo .cx-aviso-x:hover { background: rgba(255,255,255,0.2); color: #fff; }
@keyframes cx-aviso-entra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.cx-busqueda { display: flex; align-items: center; padding: 8px 8px 0 0; background: #fff; }
.cx-busqueda .cx-buscar { flex: 1; margin: 0 4px 8px 12px; }
.cx-cargar-ant { justify-content: center; padding: 8px; background: #f7f9fb; }
.cx-cargar-ant-btn {
  border: 1px solid var(--gris-borde);
  background: #fff;
  color: var(--azul-oscuro);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}
.cx-cargar-ant-btn:disabled { opacity: 0.6; cursor: default; }

.cx-msgs {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #f7f9fb;
}

.cx-dia {
  align-self: center;
  margin: 10px 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #667085;
  background: #eceff3;
  border-radius: 999px;
  padding: 3px 12px;
}

.cx-m {
  max-width: 82%;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.cx-m.otro { align-self: flex-start; }
.cx-m.mio { align-self: flex-end; align-items: flex-end; }
.cx-quien { font-size: 0.75rem; font-weight: 700; color: var(--azul-oscuro); margin: 8px 0 2px 12px; }
.cx-msgs[data-tipo="directo"] .cx-quien,
.cx-m.cont .cx-quien { display: none; }

.cx-burbuja {
  position: relative;
  padding: 8px 12px 6px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.cx-m.otro .cx-burbuja { background: #fff; border: 1px solid var(--gris-borde); border-top-left-radius: 6px; }
.cx-m.mio .cx-burbuja { background: var(--azul); color: #fff; border-top-right-radius: 6px; }
.cx-m.otro.cont .cx-burbuja { border-top-left-radius: 16px; }
.cx-m.mio.cont .cx-burbuja { border-top-right-radius: 16px; }

.cx-cuerpo { display: block; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.cx-cuerpo mark { background: #fde68a; color: var(--texto); border-radius: 3px; padding: 0 0.1rem; }
.cx-enlace { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cx-m.otro .cx-enlace { color: var(--azul-oscuro); }
.cx-editado { font-size: 0.68rem; opacity: 0.75; margin-left: 0.3rem; }
.cx-eliminado { display: block; font-style: italic; opacity: 0.75; }
.cx-pie { display: flex; justify-content: flex-end; align-items: center; font-size: 0.66rem; margin-top: 2px; opacity: 0.72; }
.cx-visto { align-self: flex-end; font-size: 0.7rem; color: var(--texto-suave); margin: 2px 4px 6px; }

.cx-cita {
  border-left: 3px solid var(--azul);
  background: rgba(13, 148, 136, 0.08);
  border-radius: 8px;
  padding: 5px 9px;
  margin: 0 0 6px;
  font-size: 0.78rem;
  cursor: pointer;
}
.cx-m.mio .cx-cita { border-left-color: #fff; background: rgba(255, 255, 255, 0.18); }
.cx-cita b { display: block; font-size: 0.72rem; }
.cx-cita span { display: block; overflow-wrap: anywhere; }

.cx-imagen {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
  margin: 0 0 4px;
  cursor: zoom-in;
  object-fit: cover;
}
.cx-adjunto {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 24, 40, 0.05);
  border-radius: 12px;
  padding: 8px 10px;
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cx-m.mio .cx-adjunto { background: rgba(255, 255, 255, 0.18); }
.cx-adjunto:hover { text-decoration: underline; }

/* Barrita de acciones (responder / editar / eliminar): sale al COSTADO de la
   burbuja, centrada en su alto, del lado donde hay espacio libre (a la
   derecha en los mensajes de otros, a la izquierda en los tuyos). Así no tapa
   el nombre de quien escribió ni el texto. Los mensajes tuyos son un poco más
   angostos para que siempre quepan los tres botones. */
.cx-m.mio { max-width: 74%; }
.cx-acciones {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  box-shadow: 0 6px 16px -6px rgba(16, 24, 40, 0.28);
  padding: 2px;
  gap: 1px;
  z-index: 3;
}
.cx-m.otro .cx-acciones { left: calc(100% + 6px); }
.cx-m.mio .cx-acciones { right: calc(100% + 6px); }
/* Puente invisible sobre el espacio entre la burbuja y la barra, para que al
   llevar el mouse hacia ella no se esconda. */
.cx-acciones::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
}
.cx-m.otro .cx-acciones::before { right: 100%; }
.cx-m.mio .cx-acciones::before { left: 100%; }
.cx-m:hover .cx-acciones, .cx-m.abierto .cx-acciones { display: flex; }
.cx-acciones button {
  width: 26px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  color: #475467;
  cursor: pointer;
}
.cx-acciones button:hover { background: #f2f5f7; color: var(--texto); }
.cx-acciones .cx-peligro:hover { background: #fff1f3; color: var(--rojo); }

.cx-m.cx-resaltado .cx-burbuja { animation: cx-flash 1.2s ease; }
@keyframes cx-flash {
  0% { box-shadow: 0 0 0 3px #fbbf24; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Edición en el lugar */
.cx-edicion { width: min(280px, 70vw); }
.cx-edicion textarea { width: 100%; min-height: 64px; border-radius: 10px; font-size: 0.9rem; }
.cx-edicion-acciones { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.cx-edicion-acciones button {
  border: 0;
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: #eef1f5;
  color: #344054;
}
.cx-edicion-acciones button:first-child { background: var(--azul); color: #fff; }
.cx-edicion-acciones button:disabled { opacity: 0.6; cursor: default; }

.cx-irfinal {
  position: absolute;
  right: 16px;
  bottom: 84px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--gris-borde);
  box-shadow: 0 6px 16px -4px rgba(16, 24, 40, 0.25);
  place-items: center;
  color: #475467;
  cursor: pointer;
  z-index: 2;
}

/* ---------- Escribir ---------- */
.cx-resp {
  align-items: center;
  gap: 8px;
  margin: 0 12px;
  padding: 8px 4px 8px 12px;
  background: var(--azul-suave);
  border-left: 3px solid var(--azul);
  border-radius: 10px 10px 0 0;
  font-size: 0.78rem;
}
.cx-resp-info { flex: 1; min-width: 0; line-height: 1.3; }
.cx-resp-autor { display: block; color: var(--azul-oscuro); font-size: 0.72rem; }
.cx-resp-texto { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475467; }
.cx-resp-cancelar, .cx-archivo-prev-quitar { width: 28px; height: 28px; }

.cx-archivo-prev {
  align-items: center;
  gap: 8px;
  margin: 0 12px;
  padding: 6px 4px 6px 12px;
  background: #f3f5f8;
  border-radius: 10px 10px 0 0;
  font-size: 0.78rem;
  color: #475467;
}
.cx-archivo-prev-texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.cx-escribir {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--gris-borde);
  background: #fff;
  position: relative;
}
.cx-caja {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  background: #f3f5f8;
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 4px 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.cx-caja:focus-within { background: #fff; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12); }
.cx-caja .cx-icbtn { width: 34px; height: 34px; border-radius: 50%; }
.cx-texto {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: 0;
  box-shadow: none;
  resize: none;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 8px 6px;
  max-height: 110px;
  min-height: 36px;
  height: 36px;
  color: var(--texto);
}
.cx-texto:focus { border: 0; box-shadow: none; }
.cx-enviar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--azul);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 10px -2px rgba(13, 148, 136, 0.5);
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.cx-enviar:hover { background: var(--azul-oscuro); transform: scale(1.05); }
.cx-enviar:disabled { background: #cfd5dd; box-shadow: none; transform: none; cursor: default; }

.cx-emojis {
  position: absolute;
  left: 12px;
  bottom: 68px;
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: 16px;
  box-shadow: 0 16px 36px -10px rgba(16, 24, 40, 0.3);
  padding: 8px;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  width: 300px;
  max-width: calc(100% - 24px);
  z-index: 4;
}
.cx-emojis button {
  font-size: 1.25rem;
  height: 34px;
  border-radius: 8px;
  border: 0;
  background: none;
  cursor: pointer;
}
.cx-emojis button:hover { background: #f2f5f7; }

/* Se activa al arrastrar un archivo sobre el chat */
.cx-conv.cx-arrastrando { outline: 3px dashed var(--azul); outline-offset: -6px; }

/* ---------- Celular / iPad vertical: pantalla completa ---------- */
@media (max-width: 820px) {
  .cx-widget { right: 1rem; bottom: 1rem; }
  .cx-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
    animation: none;
  }
  .cx-enc { padding-top: max(16px, env(safe-area-inset-top)); }
  .cx-enc-conv { padding-top: max(12px, env(safe-area-inset-top)); }
  .cx-escribir { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .cx-m { max-width: 88%; }
  .cx-burbuja, .cx-texto { font-size: 1rem; }
  .cx-widget.cx-abierto .cx-fab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-vista, .cx-hoja, .cx-hoja-int, .cx-panel { transition: none !important; animation: none !important; }
}
