/* Criterio: la constelación de referencias, técnicas y efectos, sus fichas y el brief. Fondo liso, hilos finos que se
   encienden en rojo (el único rojo de la pantalla), un color por categoría de técnica. */
:root { --hilo: #D7362A; }
:root[data-tema="oscuro"] { --hilo: #FF5B4F; }

.cr { padding: 24px 32px 28px; }
.cr-cab { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.cr-titulo h1 { margin: 0; font: 800 40px/1.05 var(--display); letter-spacing: -.022em; }
.cr-cuentas { margin: 6px 0 0; font-size: 13px; color: var(--suave); }
.cr-buscar { display: flex; gap: 8px; flex: 1 1 380px; max-width: 640px; margin-left: auto; }
.cr-buscar .entrada { flex: 1; min-width: 0; }
.cr-ver-filtros { display: none; }
.cr-brief-boton.on { box-shadow: inset 0 0 0 1.5px var(--amarillo); background: var(--elegido); }

.cr-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 16px 0 14px; }
.cr-filtro { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--tenue); }
.cr-filtro select { width: auto; min-width: 128px; max-width: 210px; padding: 7px 12px; font-size: 14px; }
.cr-tilde { display: inline-flex; align-items: center; gap: 7px; padding: 0 2px 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.cr-tilde input { width: 16px; height: 16px; accent-color: var(--tinta); }
.cr-limpiar, .cr-volver {
  padding: 0 0 9px; border: 0; background: none; color: var(--suave); font: 600 13.5px var(--display);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.cr-volver { padding: 0; margin: 0 0 12px; }
.cr-limpiar:hover, .cr-volver:hover { color: var(--tinta); }

/* El lienzo y la ficha, lado a lado en la compu */
.cr-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cr.con-ficha .cr-cuerpo { grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); }
.cr-lienzo, .cr-ficha { height: calc(100vh - 236px); min-height: 460px; border-radius: var(--radio-g); }
.cr-lienzo { position: relative; overflow: hidden; background: var(--fondo-2); box-shadow: inset 0 0 0 1px var(--linea); }
.cr-lienzo canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.cr-lienzo canvas.arrastrando { cursor: grabbing; }
.cr-zoom { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 4px; }
.cr-zoom button {
  width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--superficie); color: var(--tinta);
  box-shadow: inset 0 0 0 1px var(--linea-fuerte); font: 600 18px/1 var(--display); cursor: pointer;
}
.cr-zoom button:hover { box-shadow: inset 0 0 0 1.5px var(--borde-vivo); }
/* El botón 2D / 3D (dice a qué modo pasa), apenas separado del zoom */
.cr-zoom .cr-modo { margin-top: 4px; font: 800 12px/1 var(--display); letter-spacing: .02em; }
/* En 3D, dos lienzos acompañan al de WebGL (transparente): abajo los hilos encendidos, arriba los rótulos. No se tocan:
   los clicks van al del medio */
.cr-lienzo canvas.cr-3d { position: relative; }
.cr-lienzo canvas.cr-hilos-3d, .cr-lienzo canvas.cr-rotulos-3d { position: absolute; inset: 0; pointer-events: none; }
.cr-leyenda {
  position: absolute; left: 12px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 24px);
  margin: 0; padding: 6px 10px; list-style: none; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--suave);
  background: color-mix(in srgb, var(--fondo) 84%, transparent); pointer-events: none;
}
.cr-punto { display: inline-block; flex: none; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--c); }

.cr-ficha {
  position: relative; overflow: auto; overscroll-behavior: contain; padding: 22px 22px 30px;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea), var(--sombra);
}
.cr-cerrar {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: none; color: var(--suave); font: 400 24px/1 var(--display); cursor: pointer;
}
.cr-cerrar:hover { color: var(--tinta); background: var(--elegido); }
.cr-rotulo { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; margin: 0 0 6px; padding-right: 36px; font-size: 13.5px; font-weight: 600; color: var(--suave); }
.cr-ficha h2 { margin: 0 0 12px; padding-right: 30px; font: 800 26px/1.15 var(--display); letter-spacing: -.022em; overflow-wrap: anywhere; }
.cr-ficha h3 { margin: 22px 0 8px; font: 700 15px var(--display); letter-spacing: -.004em; }
.cr-ficha h3 .mono { margin-left: 4px; font-size: 13px; color: var(--tenue); }
.cr-texto { margin: 0; font-size: 15px; line-height: 1.5; }
.cr-motor { padding: 12px 14px; border-radius: 12px; background: var(--fondo-2); box-shadow: inset 0 0 0 1px var(--linea); font-size: 14.5px; }
.cr-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.cr-estado .boton { padding: 8px 16px; font-size: 14px; }
.cr-sello { padding: 3px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linea-fuerte); color: var(--suave); font: 700 12.5px var(--display); white-space: nowrap; }
.cr-sello.canon { background: var(--tinta); color: var(--fondo); box-shadow: none; }

/* Los hilos rojos de la ficha de técnica: del punto de la técnica a cada cosa que la toca */
.cr-hilos { position: relative; margin-top: 30px; }
.cr-hilos > :not(svg):not(.cr-nudo) { position: relative; z-index: 1; }
.cr-hilos h3 { display: inline-block; padding-right: 8px; background: var(--superficie); }
.cr-hilos-svg { position: absolute; top: 0; left: 0; z-index: 0; overflow: visible; pointer-events: none; }
.cr-hilos-svg path { fill: none; stroke: var(--hilo); stroke-width: 1.1; opacity: .7; }
.cr-nudo {
  position: absolute; top: -14px; left: 50%; z-index: 2; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 3px var(--superficie), 0 0 0 4.5px var(--hilo);
}
.cr-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.cr-tarjeta {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 12px;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea-fuerte); color: var(--tinta); text-align: left; cursor: pointer;
  transition: box-shadow .2s ease, transform .2s var(--resorte);
}
.cr-tarjeta:hover { box-shadow: inset 0 0 0 1.5px var(--hilo); transform: translateY(-1px); }
.cr-tarjeta img, .cr-sin-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--fondo-2); }
.cr-tarjeta-pie { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 6px 8px; font-size: 12px; font-weight: 600; }
.cr-tarjeta-pie > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-peso { display: inline-flex; flex: none; gap: 3px; }
.cr-peso i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.2px var(--hilo); }
.cr-peso i.on { background: var(--hilo); }
.cr-si { position: absolute; top: 6px; right: 6px; padding: 1px 7px; border-radius: 999px; background: var(--amarillo); color: var(--onyx); font: 700 11px var(--display); }
/* La red de la referencia (solo Pinterest): un punto chiquito con su inicial, arriba a la izquierda de la tarjeta. */
.cr-red {
  display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--tinta); color: var(--superficie); box-shadow: 0 0 0 1.5px var(--superficie); font: 800 9.5px/1 var(--display);
}
.cr-tarjeta .cr-red { position: absolute; top: 6px; left: 6px; }
.cr-rotulo .cr-red { margin-right: 3px; box-shadow: none; }
.cr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cr-chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--superficie);
  box-shadow: inset 0 0 0 1px var(--linea-fuerte); color: var(--tinta); font: 600 13.5px var(--display); cursor: pointer;
}
button.cr-chip:hover { box-shadow: inset 0 0 0 1.5px var(--hilo); }
.cr-chip-efecto { font: 800 14.5px var(--fraunces); }
.cr-relacion { margin-left: 6px; color: var(--tenue); font-size: 12px; font-weight: 500; }
.cr-lista { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.cr-lista button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--linea);
  background: none; color: var(--tinta); font: 600 14.5px var(--display); text-align: left; cursor: pointer;
}
.cr-lista button:hover { background: var(--fondo-2); }
.cr-lista button > span:nth-child(2) { flex: 1; }
.cr-por-hilo { color: var(--tenue); font-size: 12px; font-weight: 500; }

/* La ficha de referencia: los cuadros grandes, con flechas */
.cr-visor { position: relative; margin: 0; overflow: hidden; border-radius: 12px; background: #000; }
.cr-visor:focus-visible { outline-offset: 3px; border-radius: 12px; }
.cr-visor img { display: block; width: 100%; max-height: 54vh; object-fit: contain; }
.cr-visor figcaption { position: absolute; left: 10px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(28, 28, 28, .72); color: #F4F1EC; font-size: 12px; }
.cr-flecha {
  position: absolute; top: 50%; width: 36px; height: 36px; border: 0; border-radius: 50%; translate: 0 -50%;
  background: rgba(28, 28, 28, .62); color: #F4F1EC; font: 400 24px/1 var(--display); cursor: pointer;
}
.cr-flecha.izq { left: 8px; }
.cr-flecha.der { right: 8px; }
.cr-flecha:disabled { opacity: .2; cursor: default; }
.cr-tira { display: flex; gap: 6px; margin: 8px 0 0; padding: 2px 2px 6px; overflow-x: auto; list-style: none; scrollbar-width: thin; }
.cr-tira button {
  flex: none; width: 54px; height: 40px; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: var(--fondo-2);
  box-shadow: inset 0 0 0 1px var(--linea); opacity: .55; cursor: pointer; transition: opacity .2s ease;
}
.cr-tira button:hover { opacity: .85; }
.cr-tira button.on { opacity: 1; box-shadow: 0 0 0 2px var(--hilo); }
.cr-tira img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Un pin quieto: la imagen entera (alta, como son los pines), y tocarla la abre a pantalla completa. */
.cr-pin {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 12px;
  background: var(--fondo-2); box-shadow: inset 0 0 0 1px var(--linea); cursor: zoom-in;
}
.cr-pin img { display: block; width: 100%; max-height: 54vh; object-fit: contain; }
.cr-pin-lupa {
  position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(28, 28, 28, .62); color: #F4F1EC; font: 400 17px/1 var(--display); transition: transform .2s var(--resorte);
}
.cr-pin:hover .cr-pin-lupa { transform: scale(1.08); }
.cr-lupa {
  width: min(96vw, 1100px); max-width: none; height: 94vh; max-height: none; margin: auto; padding: 0; border: 0;
  background: transparent; color: #F4F1EC; overflow: hidden;
}
.cr-lupa[open] { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cr-lupa::backdrop { background: rgba(1, 10, 5, .86); }
.cr-lupa img { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; border-radius: 8px; cursor: zoom-out; }
.cr-lupa-pie { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; padding-bottom: 6px; }
.cr-lupa-pie a { color: #F4F1EC; font-weight: 600; text-underline-offset: 3px; }
/* Sobre el fondo oscuro de la lupa, el botón va claro en los dos temas. */
.cr-lupa-pie .boton-sec { background: transparent; color: #F4F1EC; box-shadow: inset 0 0 0 1.5px rgba(244, 241, 236, .55); }
.cr-lupa-pie .boton-sec:hover { box-shadow: inset 0 0 0 1.5px #F4F1EC; }
.cr-pin-datos { margin: 12px 0 0; }
.cr-tablero { margin: 0 0 6px; font: 700 15px var(--display); }
.cr-pin-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }
.cr-pin-links .cr-link { margin-left: 0; }
.cr-afuera { color: var(--suave); overflow-wrap: anywhere; }
.cr-marca { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.cr-marcar {
  min-width: 64px; padding: 8px 16px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1.5px var(--linea-fuerte);
  color: var(--tinta); font: 700 14px var(--display); cursor: pointer; transition: background-color .2s ease, box-shadow .2s ease;
}
.cr-marcar:hover { box-shadow: inset 0 0 0 1.5px var(--borde-vivo); }
.cr-marcar.si.on { background: var(--amarillo); color: var(--onyx); box-shadow: none; }
.cr-marcar.no.on { background: var(--tinta); color: var(--fondo); box-shadow: none; }
.cr-link { margin-left: auto; color: var(--tinta); font-weight: 600; text-underline-offset: 3px; }
.cr-nota { display: flex; flex-direction: column; gap: 6px; font: 700 15px var(--display); }
.cr-nota textarea { min-height: 78px; resize: vertical; overflow: hidden; font-size: 15px; }
.cr-nota-estado { margin-left: 6px; color: var(--tenue); font: 500 12.5px var(--display); }

/* «Elegir para un brief» */
.cr-brief {
  position: sticky; bottom: 12px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px;
  padding: 10px 14px; border-radius: var(--radio-g); background: var(--superficie-alta); box-shadow: inset 0 0 0 1.5px var(--amarillo), var(--sombra-alta);
}
.cr-brief[hidden] { display: none; }
.cr-brief-chips { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cr-brief-chips .cr-chip button { margin-left: 6px; padding: 0 2px; border: 0; background: none; color: var(--suave); font-size: 17px; line-height: 1; cursor: pointer; }
.cr-brief-ayuda { color: var(--suave); font-size: 14px; }
.cr-brief-cuenta { color: var(--suave); font-size: 13px; }

.cr-vacio { max-width: 720px; }
.cr-vacio h1 { margin: 0 0 12px; font: 800 40px/1.05 var(--display); }
.cr-vacio code { font: 400 13.5px var(--mono); overflow-wrap: anywhere; }

/* En el celular: todo en una columna, el lienzo alto, la ficha sube como una hoja desde abajo. */
@media (max-width: 900px) {
  /* La barra del brief queda fija abajo y la hoja de la ficha sube arriba de ella (app la mide: --alto-brief). */
  .cr-brief { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 45; margin: 0; }
  .cr.con-brief { padding-bottom: calc(var(--alto-brief, 72px) + 12px); }
  .cr.con-brief .cr-ficha { bottom: calc(var(--alto-brief, 72px) + 16px); max-height: calc(80vh - var(--alto-brief, 72px)); border-radius: 20px; }
  .cr.con-ficha .cr-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .cr-ficha {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: auto; min-height: 0; max-height: 80vh;
    padding: 20px 16px 28px; border-radius: 20px 20px 0 0; box-shadow: inset 0 1px 0 var(--linea), 0 -20px 44px -18px rgba(0, 0, 0, .5);
  }
}
@media (max-width: 700px) {
  .cr { padding: 16px 16px 20px; }
  .cr-titulo h1, .cr-vacio h1 { font-size: 30px; }
  .cr-buscar { flex-basis: 100%; max-width: none; margin-left: 0; }
  .cr-buscar .boton { padding: 10px 15px; }
  .cr-ver-filtros { display: inline-flex; }
  .cr-ver-filtros, .cr-brief-boton { flex: 1 1 auto; }
  .cr-filtros { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
  .cr.filtros-abiertos .cr-filtros { display: grid; }
  .cr-cab { gap: 12px 8px; }
  .cr-filtro select { width: 100%; min-width: 0; max-width: none; }
  .cr-tilde { padding-bottom: 2px; }
  .cr-limpiar { grid-column: 1 / -1; justify-self: start; padding-bottom: 0; }
  .cr-lienzo { height: 64vh; min-height: 340px; }
  .cr-leyenda { font-size: 11px; gap: 2px 10px; padding: 5px 8px; }
  .cr-ficha h2 { font-size: 23px; }
  .cr-brief-chips { flex-basis: 100%; }
  .cr-brief .boton { margin-left: auto; }
}

/* ---- Novedades de la rutina diaria ---- */
.cr-novedades-boton.on { box-shadow: inset 0 0 0 1.5px var(--tinta); background: var(--elegido); }
.cr-novedades-n {
  display: inline-block; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px;
  background: var(--amarillo); color: var(--onyx); font: 800 11px/18px var(--display); text-align: center;
}
.cr-novedades-caja { margin: 0 0 16px; }
.cr-novedades-caja[hidden] { display: none; }
.cr-novedades {
  padding: 16px 18px 14px; border-radius: var(--radio-g); background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea), var(--sombra);
}
.cr-corridas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 22px; }
.cr-corrida h3 { margin: 0; font: 800 19px/1.2 var(--fraunces); }
.cr-corrida h3::first-letter { text-transform: uppercase; }
.cr-corrida-datos { margin: 4px 0 10px; color: var(--suave); font-size: 13.5px; }
.cr-grilla-novedades { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.cr-grilla-novedades .cr-tarjeta-pie { padding: 4px 6px; font-size: 11px; }
.cr-afuera-lista { margin-top: 8px; font-size: 13px; color: var(--suave); }
.cr-afuera-lista summary { cursor: pointer; font-weight: 600; }
.cr-afuera-lista ul { margin: 6px 0 0; padding-left: 18px; }
.cr-afuera-lista li { margin: 2px 0; }
.cr-novedades-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linea); }
.cr-novedades-pie p { margin: 0; max-width: 62ch; color: var(--tenue); font-size: 13px; line-height: 1.45; }
.cr-cupo { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--suave); }
.cr-cupo select { width: auto; padding: 5px 10px; font-size: 14px; }
/* «nueva»: lo que trajo la rutina en los últimos 7 días. En la tarjeta, abajo a la izquierda de la imagen; en la ficha, en línea. */
.cr-nueva {
  position: absolute; left: 6px; bottom: 32px; padding: 1px 7px; border-radius: 999px; background: var(--amarillo); color: var(--onyx);
  font: 700 10.5px/1.5 var(--display); letter-spacing: .01em;
}
.cr-grilla-novedades .cr-nueva { bottom: 26px; }
.cr-nueva.en-linea { position: static; margin-right: 8px; }
.cr-de-rutina { display: flex; flex-wrap: wrap; align-items: center; margin: -4px 0 12px; color: var(--suave); font-size: 13.5px; }
@media (max-width: 700px) {
  .cr-novedades-boton { flex: 1 1 100%; }
  .cr-novedades { padding: 14px 14px 12px; }
  .cr-corridas { grid-template-columns: 1fr; }
  .cr-grilla-novedades { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Las fuentes de la rutina (plegadas en la tira de novedades): pausar, activar o aprobar. */
.cr-fuentes { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linea); }
.cr-fuentes summary { cursor: pointer; font: 700 14px var(--display); }
.cr-fuentes-lista { display: flex; flex-direction: column; margin: 10px 0 0; padding: 0; list-style: none; max-height: 340px; overflow: auto; }
.cr-fuente { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 2px; border-bottom: 1px solid var(--linea); }
.cr-fuente.apagada .cr-fuente-nombre { color: var(--tenue); }
.cr-fuente-nombre { display: block; font: 600 14px var(--display); }
.cr-fuente-datos { display: block; margin-top: 2px; color: var(--tenue); font-size: 12px; }
.cr-fuente-acciones { display: flex; gap: 6px; }
.cr-fuente-acciones .boton, .cr-fuente-acciones .boton-sec { padding: 5px 12px; font-size: 13px; }

/* ---- Criterio → reels de prueba: la cola de «Probar en reel», el botón de la ficha, «Usada en» y «Lista para canon» ---- */
.cr-cola-boton.on { box-shadow: inset 0 0 0 1.5px var(--tinta); background: var(--elegido); }
.cr-cola-caja { margin: 0 0 14px; }
.cr-cola-caja[hidden] { display: none; }
.cr-cola {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: var(--radio-g);
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
}
.cr-cola .consigna { margin: 0; font-size: 13.5px; }
.cr-cola-titulo { display: flex; align-items: baseline; gap: 6px; margin: 0; font: 700 14px var(--display); white-space: nowrap; }
.cr-cola-titulo .mono { color: var(--tenue); font-size: 12.5px; }
.cr-cola-ayuda { color: var(--tenue); font: 500 12px var(--display); }
.cr-cola-lista { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cr-cola-item { display: flex; align-items: center; border-radius: 999px; background: var(--fondo-2); box-shadow: inset 0 0 0 1px var(--linea-fuerte); }
.cr-cola-abrir {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 4px; border: 0; background: none; color: var(--tinta);
  font: 600 13px var(--display); text-align: left; cursor: pointer;
}
.cr-cola-abrir img, .cr-cola-abrir .cr-sin-img { width: 30px; height: 30px; flex: none; border-radius: 50%; object-fit: cover; aspect-ratio: 1; }
.cr-cola-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cr-cola-texto > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.cr-cola-texto small { color: var(--tenue); font-size: 11.5px; font-weight: 500; }
.cr-cola-sacar {
  width: 30px; height: 30px; margin-right: 2px; border: 0; border-radius: 50%; background: none; color: var(--suave);
  font: 400 19px/1 var(--display); cursor: pointer;
}
.cr-cola-item:hover { box-shadow: inset 0 0 0 1.5px var(--hilo); }
.cr-cola-sacar:hover { color: var(--tinta); background: var(--elegido); }

.cr-probar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 16px; }
.cr-probar .boton, .cr-probar .boton-sec { padding: 8px 16px; font-size: 14px; }
.cr-en-cola { box-shadow: inset 0 0 0 1.5px var(--verde); }
.cr-probar-ayuda { color: var(--tenue); font-size: 12.5px; }

.cr-lista-canon {
  margin: -6px 0 16px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45;
  background: color-mix(in srgb, var(--verde) 12%, var(--superficie)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--verde) 45%, transparent);
}
.cr-lista-canon b { color: var(--verde); }
.cr-lista-canon a, .cr-uso-cab a { color: var(--tinta); font-weight: 600; text-underline-offset: 3px; }

.cr-usada { margin: 0 0 8px; }
.cr-usada h3 { margin-top: 4px; }
.cr-usos { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cr-uso { padding: 10px 12px; border-radius: 12px; background: var(--fondo-2); box-shadow: inset 0 0 0 1px var(--linea); }
.cr-uso.despego { box-shadow: inset 3px 0 0 var(--verde), inset 0 0 0 1px var(--linea); }
.cr-uso-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin: 0; font-size: 14px; }
.cr-uso-cab .mono { color: var(--tenue); font-size: 12px; }
.cr-uso-que { margin: 4px 0 0; color: var(--suave); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.cr-vars { margin: 8px 0 0; padding: 0; list-style: none; }
.cr-var {
  display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 4px 0;
  border-top: 1px solid var(--linea); font-size: 13px;
}
.cr-var a, .cr-var > .mono { font-size: 12.5px; color: var(--tinta); }
.cr-var-numeros { color: var(--suave); font-variant-numeric: tabular-nums; }
.cr-veredicto { font: 700 12px var(--display); white-space: nowrap; color: var(--tenue); }
.cr-veredicto.despego { color: var(--verde); }
.cr-veredicto.arriba { color: var(--tinta); }
.cr-veredicto.sin { font-weight: 500; font-style: normal; font-weight: 800; }
@media (max-width: 700px) {
  /* «Para probar» y «Novedades» comparten la fila. */
  .cr-cola-boton, .cr-novedades-boton { flex: 1 1 40%; }
  .cr-cola { padding: 10px 12px; }
  .cr-cola-titulo { flex-basis: 100%; }
  .cr-cola-lista { flex-direction: column; flex-wrap: nowrap; width: 100%; }
  .cr-cola-item { border-radius: 14px; }
  .cr-cola-abrir { flex: 1; }
  .cr-cola-texto > span { max-width: none; }
}

/* ==== «Elegir» tipo Tinder (componentes/elegir.js, 02/11/2026): bloque propio, todo empieza con .el ====
   Una tarjeta por vez sobre el fondo de la pantalla; se tiñe verde (sí), rojo (no) o amarillo (probar en reel) mientras
   se arrastra, con el rótulo del gesto. El botón «Elegir · N» va al lado del título de Criterio. */
html.el-abierto, html.el-abierto body { overflow: hidden; }
/* Con el modo abierto, la constelación de abajo no se ve: se apaga (el 3D deja de girar) y al salir la pantalla se arma de nuevo. */
html.el-abierto .cr-cuerpo { display: none; }
.cr-titulo:has(.el-abrir) { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 14px; }
.cr-titulo:has(.el-abrir) .cr-cuentas { grid-column: 1 / -1; }
.cr-titulo .el-abrir { grid-row: 1; grid-column: 2; justify-self: start; }
.el-abrir { padding: 9px 18px; font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.el {
  --el-si: var(--verde); --el-no: var(--fucsia); --el-probar: var(--amarillo);
  position: fixed; inset: 0; z-index: 48; display: grid; grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr); gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
  background: var(--fondo); color: var(--tinta); outline: none; touch-action: manipulation; animation: el-entra .22s var(--suelta);
}
.el-arriba, .el-mesa, .el-abajo { width: 100%; max-width: 520px; margin: 0 auto; }
.el-arriba { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.el-x {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--superficie); color: var(--tinta);
  box-shadow: inset 0 0 0 1px var(--linea-fuerte); font: 400 26px/1 var(--display); cursor: pointer;
}
.el-x:hover { box-shadow: inset 0 0 0 1.5px var(--borde-vivo); }
.el-contador { margin: 0; color: var(--suave); font-size: 14px; font-variant-numeric: tabular-nums; }
.el-deshacer { white-space: nowrap; }
.el-mesa { position: relative; min-height: 0; }
.el-pila { position: absolute; inset: 0; }

.el-tarjeta {
  --fuerza: 0; position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radio-g); background: var(--superficie-alta); box-shadow: inset 0 0 0 1px var(--linea), var(--sombra-alta);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.el-tarjeta:not(.atras) { touch-action: none; cursor: grab; will-change: transform; }
.el-tarjeta.arrastrando { cursor: grabbing; }
.el-tarjeta.atras { transform: translateY(10px) scale(.95); opacity: .65; pointer-events: none; }
/* El tinte: crece con la fuerza del arrastre (0 a 1, lleno en el umbral). */
.el-tarjeta::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: var(--el-tinte, transparent); opacity: calc(var(--fuerza) * .32);
}
.el-tarjeta[data-hacia="si"] { --el-tinte: var(--el-si); }
.el-tarjeta[data-hacia="no"] { --el-tinte: var(--el-no); }
.el-tarjeta[data-hacia="probar"] { --el-tinte: var(--el-probar); }
.el-foto { position: relative; display: grid; flex: 1; min-height: 0; place-items: center; overflow: hidden; background: var(--fondo-2); }
.el-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.el-sin-img { color: var(--tenue); font-size: 14px; }
.el-cuadros {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(28, 28, 28, .62); color: #F4F1EC; font-size: 11px;
}
.el-sello {
  position: absolute; top: 18px; z-index: 2; padding: 6px 14px; border: 3px solid currentColor; border-radius: 12px;
  background: var(--superficie-alta); font: 800 26px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; opacity: 0;
}
.el-sello.si { left: 18px; color: var(--el-si); rotate: -10deg; }
.el-sello.no { right: 18px; color: var(--el-no); rotate: 10deg; }
.el-sello.probar { top: auto; bottom: 22px; left: 50%; translate: -50% 0; border-color: var(--el-probar); background: var(--el-probar); color: var(--onyx); }
.el-tarjeta[data-hacia="si"] .el-sello.si, .el-tarjeta[data-hacia="no"] .el-sello.no,
.el-tarjeta[data-hacia="probar"] .el-sello.probar { opacity: calc(.2 + var(--fuerza) * .8); }
.el-pie { padding: 10px 14px 12px; border-top: 1px solid var(--linea); }
.el-quien, .el-desc { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.el-quien { color: var(--suave); font-size: 14px; }
.el-quien b { color: var(--tinta); font-weight: 700; }
.el-desc { margin-top: 3px; color: var(--tenue); font-size: 13.5px; }

.el-abajo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.el-nota-caja { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.el-nota-boton {
  padding: 4px 8px; border: 0; background: none; color: var(--suave); font: 600 14px var(--display);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.el-nota-boton:hover, .el-nota-boton.on { color: var(--tinta); }
.el-nota { min-height: 0; resize: none; font-size: 16px; }
.el-nota[hidden] { display: none; }
.el-botones { display: flex; align-items: center; justify-content: center; gap: 22px; }
.el-b {
  --c: var(--tinta); width: 64px; height: 64px; border: 0; border-radius: 50%; background: var(--superficie); color: var(--c);
  box-shadow: inset 0 0 0 2px var(--c), var(--sombra-alta); font: 700 28px/1 var(--display); cursor: pointer;
  transition: transform .18s var(--resorte), background-color .15s ease, color .15s ease;
}
.el-b.si { --c: var(--el-si); }
.el-b.no { --c: var(--el-no); }
.el-b.probar { --c: var(--el-probar); width: 52px; height: 52px; background: var(--el-probar); color: var(--onyx); font-size: 22px; }
.el-b.si:hover, .el-b.no:hover { background: var(--c); color: var(--fondo); }
.el-b:hover { transform: scale(1.06); }
.el-b:active { transform: scale(.94); }

.el.terminada .el-abajo { visibility: hidden; }
.el-resumen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.el-resumen h2 { margin: 0; font: 800 36px/1.05 var(--display); letter-spacing: -.02em; }
.el-resumen p { max-width: 36ch; margin: 0; color: var(--suave); }
.el-cuentas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.el-cuentas span { padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px currentColor; font: 700 16px var(--display); font-variant-numeric: tabular-nums; }
.el-cuentas .si { color: var(--el-si); }
.el-cuentas .no { color: var(--el-no); }
.el-cuentas .probar { background: var(--el-probar); color: var(--onyx); box-shadow: none; }

/* El movimiento: el resorte corto al soltar debajo del umbral, la salida volando, la de abajo que sube y la que vuelve. */
.el-tarjeta.resorte { transition: transform .3s var(--resorte); }
.el-tarjeta.resorte::after { transition: opacity .3s ease; }
.el-tarjeta.vuela { pointer-events: none; transition: transform .38s cubic-bezier(.3, .6, .4, 1), opacity .38s ease-in; }
.el-tarjeta.sube { animation: el-sube .22s var(--suelta); }
.el-tarjeta.vuelve.desde-si { animation: el-vuelve-si .3s var(--suelta); }
.el-tarjeta.vuelve.desde-no { animation: el-vuelve-no .3s var(--suelta); }
.el-tarjeta.vuelve.desde-probar { animation: el-vuelve-probar .3s var(--suelta); }
@keyframes el-entra { from { opacity: 0; transform: translateY(12px); } }
@keyframes el-sube { from { opacity: .65; transform: translateY(10px) scale(.95); } }
@keyframes el-vuelve-si { from { opacity: 0; transform: translateX(110%) rotate(14deg); } }
@keyframes el-vuelve-no { from { opacity: 0; transform: translateX(-110%) rotate(-14deg); } }
@keyframes el-vuelve-probar { from { opacity: 0; transform: translateY(-90%); } }
/* Sin movimiento: sin inclinación (lo hace el componente), salidas cortas y sin entradas. */
@media (prefers-reduced-motion: reduce) {
  .el, .el-tarjeta.sube, .el-tarjeta.vuelve { animation: none; }
  .el-tarjeta.vuela { transition: opacity .15s linear; }
  .el-tarjeta.resorte { transition: transform .12s ease-out; }
}
@media (max-width: 700px) {
  .el { gap: 10px; padding-right: 12px; padding-left: 12px; }
  .el-sello { font-size: 22px; }
  .el-b { width: 60px; height: 60px; }
  .el-b.probar { width: 50px; height: 50px; }
}
