/* ============================================================================
 * Exportación — aspecto (1.1.0: imagen animada por casilla y tema claro)
 * ----------------------------------------------------------------------------
 * Mismo lenguaje visual que Presupuesto y Evaluar5 (neón cian sobre azul
 * profundo). Se repiten las variables --e4-* para que acompañe la paleta.
 * ========================================================================== */

.zmc-expo-modal {
  --e4-cyan: #38e7ff;
  --e4-magenta: #ff43d7;
  --e4-verde: #37f5a8;
  --e4-ambar: #ffc857;
  position: fixed;
  inset: 0;
  /* Igual que Presupuesto: por encima de la ventana del modelo (9999). */
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 22%, rgba(21, 120, 196, .28), transparent 38%), rgba(0, 2, 12, .86);
  backdrop-filter: blur(14px);
}
.zmc-expo-modal[hidden] { display: none; }

.zmc-expo-shell {
  display: flex;
  flex-direction: column;
  width: min(1180px, 96vw);
  height: min(880px, 94vh);
  overflow: hidden;
  border: 1px solid rgba(72, 226, 255, .46);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(3, 8, 30, .98), rgba(5, 26, 49, .97));
  box-shadow: 0 0 70px rgba(47, 160, 255, .38), inset 0 0 50px rgba(31, 222, 255, .05);
  color: #cfe9ff;
}
.zmc-expo-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(69, 224, 255, .24);
  background: linear-gradient(90deg, rgba(14, 31, 78, .9), rgba(10, 52, 87, .72));
}
.zmc-expo-header p {
  margin: 0;
  color: var(--e4-cyan);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .16em;
}
.zmc-expo-header h3 { margin: 2px 0 0; color: #effdff; font-size: 1rem; }
.zmc-expo-sello { color: #7fb4cc; font-size: .62rem; font-weight: 700; }

.zmc-expo-cuerpo { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 18px 24px; }
.zmc-expo-intro { margin: 0 0 14px; color: #9fc4dd; font-size: .7rem; line-height: 1.5; }
.zmc-expo-intro b { color: #effdff; }

.zmc-expo-grupo { margin-bottom: 18px; }
.zmc-expo-grupo > h4 {
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(69, 224, 255, .2);
  color: #effdff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.zmc-expo-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }

.zmc-expo-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(56, 231, 255, .26);
  border-left: 3px solid var(--e4-cyan);
  border-radius: 10px;
  background: rgba(6, 20, 52, .72);
}
.zmc-expo-item.es-off { border-left-color: #4b5f75; opacity: .62; }
.zmc-expo-item b { display: block; color: #effdff; font-size: .74rem; }
.zmc-expo-item small { display: block; margin-top: 2px; color: #9bc6dc; font-size: .62rem; line-height: 1.4; }
.zmc-expo-item.es-off small { color: #ffc857; }
.zmc-expo-acciones { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.zmc-expo-item select,
.zmc-expo-clave input {
  padding: 5px 8px;
  color: #effdff;
  font: inherit;
  font-size: .68rem;
  background: rgba(2, 9, 29, .9);
  border: 1px solid rgba(56, 231, 255, .35);
  border-radius: 6px;
}
.zmc-expo-btn {
  padding: 6px 12px;
  color: #02121f;
  font: inherit;
  font-size: .66rem;
  font-weight: 800;
  background: var(--e4-cyan);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.zmc-expo-btn:hover { filter: brightness(1.12); }
.zmc-expo-btn:disabled { color: #8aa3b8; background: #24384d; cursor: not-allowed; filter: none; }
.zmc-expo-btn.es-sec { color: #cfe9ff; background: transparent; border: 1px solid rgba(56, 231, 255, .45); }

.zmc-expo-estado {
  min-height: 1.2em;
  margin: 0 0 12px;
  color: #9fc4dd;
  font-size: .66rem;
}
.zmc-expo-estado.es-bien { color: var(--e4-verde); }
.zmc-expo-estado.es-mal { color: #ff8a8a; }
.zmc-expo-estado.es-trabajando { color: var(--e4-cyan); }

/* ── Pedido de contraseña ──────────────────────────────────────────────────── */
.zmc-expo-clave {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}
.zmc-expo-clave h4 { margin: 0; color: #effdff; font-size: .95rem; }
.zmc-expo-clave p { margin: 0; max-width: 420px; color: #9fc4dd; font-size: .7rem; line-height: 1.5; }
.zmc-expo-clave form { display: flex; gap: 8px; }
.zmc-expo-clave input { width: 220px; padding: 8px 10px; font-size: .8rem; }
.zmc-expo-clave .zmc-expo-btn { padding: 8px 16px; font-size: .74rem; }

/* ============================================================================
 * 1.1.0 · Imagen animada en cada casilla (exportacion-visual.js)
 * ----------------------------------------------------------------------------
 * exportacion-visual.js mete un .zxv-img al principio de cada .zmc-expo-item:
 * un SVG de lo que se baja + el rótulo del formato. Todo lo que se mueve está
 * acá y se apaga con prefers-reduced-motion. Tema claro con las variables del
 * sitio (html[data-theme="light"]).
 * ========================================================================== */

.zmc-expo-modal { --zxv-fondo: rgba(4, 14, 40, .9); }

.zmc-expo-item.zxv-item {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 8px 10px;
  padding: 10px 12px 12px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.zmc-expo-item.zxv-item::after {          /* barrido de luz al pasar el mouse */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .07) 50%, transparent 65%);
  transform: translateX(-100%);
  pointer-events: none;
}
.zmc-expo-item.zxv-item:not(.es-off):hover,
.zmc-expo-item.zxv-item:not(.es-off):focus-within {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--zxv-borde-izq, #38e7ff) 60%, transparent);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35), 0 0 18px color-mix(in srgb, var(--zxv-borde-izq, #38e7ff) 18%, transparent);
}
.zmc-expo-item.zxv-item:not(.es-off):hover::after { animation: zxv-barrido .9s ease; }
@keyframes zxv-barrido { to { transform: translateX(100%); } }

/* Entrada escalonada (solo al abrir) */
.zmc-expo-item.zxv-entra { animation: zxv-entra .5s cubic-bezier(.2, .8, .3, 1.2) both; animation-delay: calc(var(--zxv-i, 0) * 45ms); }
@keyframes zxv-entra { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.zmc-expo-item.es-off.zxv-entra { animation-name: zxv-entra-off; }
@keyframes zxv-entra-off { from { opacity: 0; transform: translateY(10px); } to { opacity: .62; } }

.zmc-expo-modal.zxv-on .zmc-expo-lista { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.zmc-expo-item.zxv-item .zmc-expo-acciones { justify-content: flex-start; flex-wrap: nowrap; }
.zmc-expo-item.zxv-item .zmc-expo-acciones select { flex: 1 1 0; min-width: 0; }
.zmc-expo-item.zxv-item[style*="grid-column"] .zmc-expo-acciones { flex-wrap: wrap; }
/* Las filas de los dibujos guardados (varios botones) siguen a lo ancho */
.zmc-expo-item.zxv-item[style*="grid-column"] { grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; }
.zmc-expo-item.zxv-item[style*="grid-column"] .zmc-expo-acciones { justify-content: flex-end; }
.zmc-expo-item.zxv-item[style*="grid-column"] .zxv-img { grid-column: 1; height: 64px; }
.zmc-expo-item.zxv-item[style*="grid-column"] .zxv-img svg { height: 56px; }

/* ── El recuadro de la imagen ───────────────────────────────────────────── */
.zxv-img {
  --zxv-c: #38e7ff;
  position: relative;
  grid-column: 1 / -1;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--zxv-c);
  border: 1px solid color-mix(in srgb, var(--zxv-c) 35%, transparent);
  border-radius: 9px;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--zxv-c) 22%, transparent), transparent 70%),
    linear-gradient(0deg, color-mix(in srgb, var(--zxv-c) 8%, transparent) 1px, transparent 1px) 0 0 / 100% 8px,
    linear-gradient(90deg, color-mix(in srgb, var(--zxv-c) 8%, transparent) 1px, transparent 1px) 0 0 / 8px 100%,
    var(--zxv-fondo);
  overflow: hidden;
  contain: layout paint;
}
.zxv-img svg { width: auto; height: 74px; overflow: visible; }
.zxv-c-cian    { --zxv-c: #38e7ff; }
.zxv-c-magenta { --zxv-c: #ff5fe0; }
.zxv-c-verde   { --zxv-c: #37f5a8; }
.zxv-c-ambar   { --zxv-c: #ffc857; }
.zxv-c-fuego   { --zxv-c: #ff8a3d; }
.zxv-c-rojo    { --zxv-c: #ff6b81; }
.zxv-c-violeta { --zxv-c: #a98bff; }
.zxv-c-tierra  { --zxv-c: #d9a066; }
/* El filete izquierdo de la casilla toma el color de su imagen */
.zmc-expo-item.zxv-item:not(.es-off) { border-left-color: var(--zxv-borde-izq, var(--e4-cyan)); }
.zmc-expo-item.zxv-item:has(.zxv-c-magenta) { --zxv-borde-izq: #ff5fe0; }
.zmc-expo-item.zxv-item:has(.zxv-c-verde)   { --zxv-borde-izq: #37f5a8; }
.zmc-expo-item.zxv-item:has(.zxv-c-ambar)   { --zxv-borde-izq: #ffc857; }
.zmc-expo-item.zxv-item:has(.zxv-c-fuego)   { --zxv-borde-izq: #ff8a3d; }
.zmc-expo-item.zxv-item:has(.zxv-c-rojo)    { --zxv-borde-izq: #ff6b81; }
.zmc-expo-item.zxv-item:has(.zxv-c-violeta) { --zxv-borde-izq: #a98bff; }
.zmc-expo-item.zxv-item:has(.zxv-c-tierra)  { --zxv-borde-izq: #d9a066; }

/* Trazos base */
.zxv-trazo, .zxv-trazo *, .zxv-hoja, .zxv-tapa, .zxv-pagina, .zxv-esfera, .zxv-traza, .zxv-laser, .zxv-temblor,
.zxv-corriente path, .zxv-sello circle, .zxv-sello path {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.zxv-hoja, .zxv-tapa, .zxv-pagina { fill: color-mix(in srgb, currentColor 12%, transparent); }
.zxv-sello circle { fill: color-mix(in srgb, currentColor 25%, transparent); }
.zxv-relleno, .zxv-relleno *, .zxv-rayo, .zxv-llama, .zxv-columnas rect, .zxv-barras rect, .zxv-chispas path, .zxv-remolino circle, .zxv-sol circle {
  fill: currentColor; stroke: none;
}
.zxv-tenue { opacity: .45; }
.zxv-capa { fill: currentColor; opacity: var(--o, .3); }
.zxv-plano { fill: color-mix(in srgb, currentColor 30%, transparent); stroke: currentColor; stroke-width: 1.6; }
.zxv-radar { fill: color-mix(in srgb, currentColor 35%, transparent); stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.zxv-signo { fill: currentColor; font: 900 13px/1 system-ui, sans-serif; text-anchor: middle; }

/* Rótulo del formato (PDF, DXF, GLB…) */
.zxv-fmt {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 5px;
  color: #02121f;
  font: 900 .5rem/1.4 system-ui, sans-serif;
  letter-spacing: .06em;
  background: var(--zxv-c);
  border-radius: 4px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--zxv-c) 60%, transparent);
}
.zxv-fmt[hidden] { display: none; }
.zxv-fmt.zxv-cambia { animation: zxv-voltea .45s ease; }
@keyframes zxv-voltea { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }

/* ── Movimiento de cada imagen ─────────────────────────────────────────────
 * Lento en reposo, más vivo con el mouse encima (--zxv-v multiplica la
 * duración). */
.zxv-img { --zxv-v: 1; }
.zmc-expo-item:hover .zxv-img, .zmc-expo-item:focus-within .zxv-img { --zxv-v: .55; }
.zxv-img svg * { transform-box: fill-box; }

/* Se escribe / se dibuja: memoria, sección, planta, presupuesto, dibujo */
.zxv-escribe path, .zxv-escribe.zxv-uno {
  --l: 60;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: zxv-escribe calc(4.5s * var(--zxv-v)) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * .25s);
}
.zxv-escribe.zxv-uno { --l: 130; stroke-dasharray: 130; stroke-dashoffset: 130; }
@keyframes zxv-escribe { 0% { stroke-dashoffset: var(--l); opacity: 1; } 35%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.zxv-sello { transform-origin: center; animation: zxv-sello calc(4.5s * var(--zxv-v)) ease infinite; }
@keyframes zxv-sello { 0%, 38% { transform: scale(0); opacity: 0; } 48% { transform: scale(1.25); opacity: 1; } 55%, 85% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

/* Fuego */
.zxv-llama { transform-origin: 50% 100%; animation: zxv-llama calc(1.1s * var(--zxv-v)) ease-in-out infinite alternate; animation-delay: calc(var(--d, 0) * -.35s); }
@keyframes zxv-llama { from { transform: scaleY(.8) skewX(-4deg); opacity: .75; } to { transform: scaleY(1.12) skewX(4deg); opacity: 1; } }
.zxv-fuego .zxv-relleno { animation: zxv-calor calc(1.2s * var(--zxv-v)) ease-in-out infinite alternate; }

/* 3D: el deformado oscila; el sin deformar gira */
.zxv-vaiven { transform-origin: 50% 100%; animation: zxv-vaiven calc(2.6s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-vaiven { from { transform: skewX(7deg); } to { transform: skewX(-7deg); } }
.zxv-gira { transform-origin: 50% 50%; animation: zxv-gira calc(5s * var(--zxv-v)) ease-in-out infinite; }
@keyframes zxv-gira { 0%, 100% { transform: scaleX(1); } 25% { transform: scaleX(.35); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(-.35); } }

/* Corte 3D: el plano recorre el pórtico; sección: el láser barre */
.zxv-plano { animation: zxv-plano calc(3.6s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-plano { from { transform: translateX(-14px); } to { transform: translateX(16px); } }
.zxv-laser { stroke-dasharray: 3 3; opacity: .8; animation: zxv-laser calc(3.2s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-laser { from { transform: translateX(4px); } to { transform: translateX(62px); } }

/* Planta: las columnas aparecen una por una; el lápiz dibuja */
.zxv-columnas rect { transform-origin: center; animation: zxv-asoma calc(4.5s * var(--zxv-v)) ease infinite; animation-delay: calc(var(--d, 0) * .18s); }
@keyframes zxv-asoma { 0%, 25% { transform: scale(0); } 35% { transform: scale(1.4); } 42%, 85% { transform: scale(1); } 100% { transform: scale(0); } }
.zxv-lapiz { animation: zxv-lapiz calc(4.5s * var(--zxv-v)) ease-in-out infinite; }
@keyframes zxv-lapiz { 0% { transform: translate(-36px, 0); } 25% { transform: translate(-36px, -22px); } 45% { transform: translate(-18px, -22px); } 60% { transform: translate(-18px, -12px); } 80%, 100% { transform: translate(0, 0); } }

/* Viento y túnel: líneas de corriente que corren */
.zxv-corriente path { stroke-dasharray: 7 5; animation: zxv-corre calc(1.4s * var(--zxv-v)) linear infinite; animation-delay: calc(var(--d, 0) * -.3s); }
@keyframes zxv-corre { to { stroke-dashoffset: -24; } }
.zxv-viento .zxv-hoja { transform-origin: 50% 100%; animation: zxv-empuja calc(2.2s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-empuja { to { transform: skewX(-4deg); } }
.zxv-remolino { transform-origin: 56px 28px; transform-box: view-box !important; animation: zxv-remolino calc(1.6s * var(--zxv-v)) linear infinite; }
@keyframes zxv-remolino { to { transform: rotate(360deg); } }

/* Sismo */
.zxv-sacude { transform-origin: 50% 100%; animation: zxv-sacude calc(.9s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-sacude { 0% { transform: translateX(-2px) skewX(4deg); } 100% { transform: translateX(2px) skewX(-4deg); } }
.zxv-temblor { animation: zxv-temblor calc(.45s * var(--zxv-v)) linear infinite alternate; }
@keyframes zxv-temblor { to { transform: translateX(2px); } }
.zxv-ondas path { transform-origin: center; animation: zxv-onda calc(1.2s * var(--zxv-v)) ease-out infinite; animation-delay: calc(var(--d, 0) * .3s); }
@keyframes zxv-onda { from { opacity: 0; transform: scale(.6); } 50% { opacity: 1; } to { opacity: 0; transform: scale(1.3); } }

/* Sismo dinámico: el registro se va dibujando */
.zxv-traza { stroke-dasharray: 220; stroke-dashoffset: 220; animation: zxv-traza calc(3.2s * var(--zxv-v)) linear infinite; }
@keyframes zxv-traza { 70%, 100% { stroke-dashoffset: 0; } }

/* Rayos: destello + esfera rodante */
.zxv-rayo { animation: zxv-rayo calc(2.8s * var(--zxv-v)) ease-out infinite; }
@keyframes zxv-rayo { 0%, 55% { opacity: 0; } 58% { opacity: 1; } 62% { opacity: .2; } 66%, 80% { opacity: 1; } 100% { opacity: 0; } }
.zxv-esfera { stroke-dasharray: 3 3; animation: zxv-corre calc(2s * var(--zxv-v)) linear infinite; }
.zxv-rayos .zxv-nube { animation: zxv-nube calc(2.8s * var(--zxv-v)) ease-out infinite; }
@keyframes zxv-nube { 0%, 55%, 72%, 100% { opacity: .55; } 58% { opacity: 1; } }

/* Suelo: la zapata asienta */
.zxv-asienta { animation: zxv-asienta calc(2.8s * var(--zxv-v)) ease-in-out infinite; }
@keyframes zxv-asienta { 0%, 20% { transform: translateY(-3px); } 60%, 100% { transform: translateY(2px); } }
.zxv-flechas path { animation: zxv-flecha calc(1.4s * var(--zxv-v)) ease-in infinite; animation-delay: calc(var(--d, 0) * .3s); }
@keyframes zxv-flecha { from { transform: translateY(-4px); opacity: 0; } 50% { opacity: 1; } to { transform: translateY(4px); opacity: 0; } }

/* Evaluar y comparador */
.zxv-radar { transform-origin: 40px 29px; transform-box: view-box !important; animation: zxv-radar calc(2.6s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-radar { from { transform: scale(.7) rotate(-6deg); } to { transform: scale(1.04) rotate(4deg); } }
.zxv-barras rect { transform-origin: 50% 100%; animation: zxv-barra calc(2.4s * var(--zxv-v)) ease-in-out infinite alternate; animation-delay: calc(var(--d, 0) * -.45s); opacity: .85; }
@keyframes zxv-barra { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

/* Presupuesto: cae una moneda a la pila */
.zxv-moneda { animation: zxv-moneda calc(2.4s * var(--zxv-v)) cubic-bezier(.5, 0, .7, 1) infinite; }
@keyframes zxv-moneda { 0% { transform: translateY(-14px); opacity: 0; } 15% { opacity: 1; } 70% { transform: translateY(6px); opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
.zxv-signo { animation: zxv-late calc(2.4s * var(--zxv-v)) ease-in-out infinite; transform-origin: center; }
@keyframes zxv-late { 50% { transform: scale(1.25); } }

/* Clima: el sol gira, el calor late */
.zxv-sol { transform-origin: 20px 16px; transform-box: view-box !important; animation: zxv-remolino calc(9s * var(--zxv-v)) linear infinite; }
.zxv-calor { animation: zxv-calor calc(2.4s * var(--zxv-v)) ease-in-out infinite alternate; }
@keyframes zxv-calor { to { opacity: .4; } }

/* Apunte: pasa la página */
.zxv-pagina { transform-origin: 40px 30px; transform-box: view-box !important; animation: zxv-pagina calc(3.2s * var(--zxv-v)) ease-in-out infinite; }
@keyframes zxv-pagina { 0%, 20% { transform: scaleX(1); opacity: 1; } 60%, 100% { transform: scaleX(-1); opacity: .15; } }

/* ZMC: la caja se abre y salen chispas (la IA) */
.zxv-tapa { animation: zxv-tapa calc(2.6s * var(--zxv-v)) ease-in-out infinite; }
@keyframes zxv-tapa { 0%, 30%, 100% { transform: translateY(0); } 50%, 70% { transform: translateY(-7px) rotate(-5deg); } }
.zxv-chispas path { transform-origin: center; animation: zxv-chispa calc(2.6s * var(--zxv-v)) ease-in-out infinite; animation-delay: calc(var(--d, 0) * .4s); }
@keyframes zxv-chispa { 0%, 100% { transform: scale(.2); opacity: .2; } 50% { transform: scale(1); opacity: 1; } }

/* Genérico */
.zxv-baja { animation: zxv-baja calc(1.6s * var(--zxv-v)) ease-in-out infinite; }
@keyframes zxv-baja { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

/* ── Al exportar: baja una flecha; después tilde o sacudón ─────────────────── */
.zxv-ok { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.zmc-expo-item.zxv-bajando .zxv-img::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  border: 7px solid transparent;
  border-top: 10px solid var(--zxv-c);
  transform: translateX(-50%);
  animation: zxv-cae .7s ease-in infinite;
  filter: drop-shadow(0 0 4px var(--zxv-c));
}
@keyframes zxv-cae { from { top: -12px; opacity: 0; } 40% { opacity: 1; } to { top: 100%; opacity: 0; } }
.zmc-expo-item.zxv-bajando .zxv-img svg { opacity: .35; }
.zmc-expo-item.zxv-listo .zxv-ok {
  display: flex;
  background: color-mix(in srgb, #37f5a8 22%, transparent);
  animation: zxv-entra .35s ease both;
}
.zmc-expo-item.zxv-listo .zxv-ok::before {
  content: "";
  width: 22px;
  height: 12px;
  border-left: 3px solid #37f5a8;
  border-bottom: 3px solid #37f5a8;
  transform: rotate(-45deg) translate(2px, -2px);
}
.zmc-expo-item.zxv-error { animation: zxv-error .45s ease; }
@keyframes zxv-error { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* Solo se mueve lo que está a la vista: exportacion-visual.js pone .zxv-vivo
 * con un IntersectionObserver. El resto queda en pausa (no repinta). */
.zxv-img:not(.zxv-vivo) * { animation-play-state: paused !important; }

/* Casilla apagada: imagen quieta y en gris */
.zmc-expo-item.es-off .zxv-img { filter: grayscale(1); opacity: .7; }
.zmc-expo-item.es-off .zxv-img * { animation-play-state: paused !important; }

/* Encabezado de cada grupo: una luz que corre por la raya */
.zmc-expo-modal.zxv-on .zmc-expo-grupo > h4 { position: relative; }
.zmc-expo-modal.zxv-on .zmc-expo-grupo > h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--e4-cyan), transparent);
  animation: zxv-linea 4s ease-in-out infinite alternate;
}
@keyframes zxv-linea { to { left: calc(100% - 64px); } }

/* ── «Todo junto»: la tarjeta final que arma el .zip ───────────────────────── */
.zxv-todo .zxv-todo-caja {
  grid-template-columns: 150px minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
  border-left-color: var(--e4-cyan);
  background: linear-gradient(120deg, rgba(10, 52, 87, .85), rgba(6, 20, 52, .85));
  box-shadow: 0 0 22px rgba(56, 231, 255, .12);
}
.zxv-todo .zxv-todo-caja .zxv-img { grid-column: 1; height: 78px; }
.zxv-todo .zxv-todo-caja .zxv-img svg { height: 70px; }
.zxv-todo .zxv-todo-caja b { font-size: .8rem; }
.zxv-btn-todo { padding: 9px 16px; font-size: .74rem; }
.zxv-caen path { animation: zxv-caen calc(2.4s * var(--zxv-v)) cubic-bezier(.5, 0, .8, 1) infinite; animation-delay: calc(var(--d, 0) * .45s); }
@keyframes zxv-caen { 0% { transform: translateY(-6px); opacity: 0; } 15% { opacity: 1; } 60% { transform: translateY(26px); opacity: 1; } 75%, 100% { transform: translateY(30px); opacity: 0; } }
.zxv-zip .zxv-tapa { animation-duration: calc(2.4s * var(--zxv-v)); }
.zxv-todo-caja.zxv-bajando .zxv-img svg { opacity: 1; }
.zxv-todo-caja.zxv-bajando .zxv-img { --zxv-v: .45; }
.zxv-progreso { margin-top: 8px; }
.zxv-barra { height: 6px; border-radius: 99px; background: rgba(56, 231, 255, .14); overflow: hidden; }
.zxv-barra i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #38e7ff, #37f5a8);
  transition: width .4s ease;
}
.zxv-paso { margin-top: 4px; }
.zxv-paso.es-bien { color: #37f5a8 !important; }
.zxv-paso.es-mal { color: #ff8a8a !important; }
html[data-theme="light"] .zxv-todo .zxv-todo-caja { background: var(--card-bg, #fff); box-shadow: 0 4px 16px var(--card-shadow, rgba(15, 23, 42, .08)); }
html[data-theme="light"] .zxv-barra { background: #e4e7ec; }
html[data-theme="light"] .zxv-barra i { background: linear-gradient(90deg, #0891b2, #059669); }
html[data-theme="light"] .zxv-paso.es-bien { color: #047857 !important; }
html[data-theme="light"] .zxv-paso.es-mal { color: #b42318 !important; }

/* ── Logo arriba; créditos y deslinde abajo de todo ───────────────────────── */
.zmc-expo-modal.zxv-on .zmc-expo-header { grid-template-columns: auto 1fr auto auto; }
.zxv-logo { display: block; line-height: 0; }
.zxv-logo img { display: block; width: auto; height: 34px; filter: drop-shadow(0 0 10px rgba(56, 231, 255, .35)); }
.zxv-pie {
  flex: 0 0 auto;
  padding: 8px 18px 10px;
  border-top: 1px solid rgba(69, 224, 255, .24);
  background: linear-gradient(90deg, rgba(14, 31, 78, .9), rgba(10, 52, 87, .72));
  font-size: .6rem;
  line-height: 1.45;
  color: #9fc4dd;
}
.zxv-pie p { margin: 0; }
.zxv-pie strong { color: #effdff; }
.zxv-pie .zxv-deslinde { margin-top: 3px; color: #ffc857; }
html[data-theme="light"] .zxv-pie {
  background: var(--card-bg, #fff);
  border-top-color: var(--card-border, rgba(99, 102, 241, .16));
  color: var(--text-muted, #475467);
}
html[data-theme="light"] .zxv-pie strong { color: var(--text-heading, #1d2939); }
html[data-theme="light"] .zxv-pie .zxv-deslinde { color: #b45309; }
html[data-theme="light"] .zxv-logo img { filter: none; }

/* ── Celular ─────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .zmc-expo-shell { width: 100vw; height: 100dvh; border-radius: 0; }
  .zmc-expo-header { padding: 10px 12px; }
  .zmc-expo-header .zmc-expo-sello { display: none; }   /* lo tapa la ✕ */
  .zmc-expo-modal.zxv-on .zmc-expo-header { grid-template-columns: auto 1fr auto; gap: 10px; }
  .zxv-logo img { height: 24px; }
  .zxv-pie { padding: 6px 12px 8px; font-size: .56rem; }
  .zxv-todo .zxv-todo-caja { grid-template-columns: 76px minmax(0, 1fr); }
  .zxv-todo .zxv-todo-caja .zxv-img { height: 60px; }
  .zxv-todo .zxv-todo-caja .zxv-img svg { height: 52px; }
  .zxv-todo .zxv-todo-caja .zmc-expo-acciones { grid-column: 1 / -1; }
  .zxv-btn-todo { flex: 1 1 auto; }
  .zmc-expo-cuerpo { padding: 12px 12px 20px; }
  .zmc-expo-lista { grid-template-columns: 1fr; }
  .zmc-expo-item.zxv-item, .zmc-expo-item.zxv-item[style*="grid-column"] { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .zmc-expo-item.zxv-item .zxv-img { grid-column: 1; height: 60px; }
  .zmc-expo-item.zxv-item .zxv-img svg { height: 52px; }
  .zmc-expo-item.zxv-item .zmc-expo-acciones { grid-column: 1 / -1; }
  .zmc-expo-item.zxv-item .zmc-expo-acciones select { flex: 1 1 auto; }
}

/* ── Tema claro (variables del sitio) ─────────────────────────────────────── */
html[data-theme="light"] .zmc-expo-modal {
  --e4-cyan: #0891b2;
  --zxv-fondo: #f8fafc;
  background: rgba(15, 23, 42, .55);
}
html[data-theme="light"] .zmc-expo-shell {
  color: var(--text-main, #101828);
  background: var(--bg-body, #f6f7fb);
  border-color: var(--card-border, rgba(99, 102, 241, .16));
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
html[data-theme="light"] .zmc-expo-header {
  background: var(--card-bg, #fff);
  border-bottom-color: var(--card-border, rgba(99, 102, 241, .16));
}
html[data-theme="light"] .zmc-expo-header h3,
html[data-theme="light"] .zmc-expo-grupo > h4,
html[data-theme="light"] .zmc-expo-item b,
html[data-theme="light"] .zmc-expo-intro b,
html[data-theme="light"] .zmc-expo-clave h4 { color: var(--text-heading, var(--text-main, #101828)); }
html[data-theme="light"] .zmc-expo-sello,
html[data-theme="light"] .zmc-expo-intro,
html[data-theme="light"] .zmc-expo-item small,
html[data-theme="light"] .zmc-expo-clave p,
html[data-theme="light"] .zmc-expo-estado { color: var(--text-muted, #475467); }
html[data-theme="light"] .zmc-expo-item.es-off small { color: #b45309; }
html[data-theme="light"] .zmc-expo-grupo > h4 { border-bottom-color: var(--card-border, rgba(99, 102, 241, .16)); }
html[data-theme="light"] .zmc-expo-item {
  background: var(--card-bg, #fff);
  border-color: var(--card-border, rgba(99, 102, 241, .16));
  box-shadow: 0 2px 8px var(--card-shadow, rgba(15, 23, 42, .08));
}
html[data-theme="light"] .zmc-expo-item.zxv-item:not(.es-off):hover,
html[data-theme="light"] .zmc-expo-item.zxv-item:not(.es-off):focus-within {
  box-shadow: 0 10px 24px var(--card-shadow-hover, rgba(79, 70, 229, .18));
}
html[data-theme="light"] .zmc-expo-item.zxv-item::after { background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); }
html[data-theme="light"] .zmc-expo-item select,
html[data-theme="light"] .zmc-expo-clave input {
  color: var(--text-main, #101828);
  background: #fff;
  border-color: var(--card-border, rgba(99, 102, 241, .3));
}
html[data-theme="light"] .zmc-expo-btn { color: #fff; }
html[data-theme="light"] .zmc-expo-btn.es-sec { color: var(--text-main, #101828); }
html[data-theme="light"] .zmc-expo-btn:disabled { color: #98a2b3; background: #e4e7ec; }
html[data-theme="light"] .zmc-expo-estado.es-bien { color: #047857; }
html[data-theme="light"] .zmc-expo-estado.es-trabajando { color: #0e7490; }
html[data-theme="light"] .zmc-expo-estado.es-mal { color: #b42318; }
/* En claro los acentos neón no se leen sobre blanco: versiones más oscuras */
html[data-theme="light"] .zxv-c-cian    { --zxv-c: #0891b2; }
html[data-theme="light"] .zxv-c-magenta { --zxv-c: #c026d3; }
html[data-theme="light"] .zxv-c-verde   { --zxv-c: #059669; }
html[data-theme="light"] .zxv-c-ambar   { --zxv-c: #d97706; }
html[data-theme="light"] .zxv-c-fuego   { --zxv-c: #ea580c; }
html[data-theme="light"] .zxv-c-rojo    { --zxv-c: #e11d48; }
html[data-theme="light"] .zxv-c-violeta { --zxv-c: #7c3aed; }
html[data-theme="light"] .zxv-c-tierra  { --zxv-c: #a16207; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-cian)    { --zxv-borde-izq: #0891b2; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-magenta) { --zxv-borde-izq: #c026d3; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-verde)   { --zxv-borde-izq: #059669; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-ambar)   { --zxv-borde-izq: #d97706; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-fuego)   { --zxv-borde-izq: #ea580c; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-rojo)    { --zxv-borde-izq: #e11d48; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-violeta) { --zxv-borde-izq: #7c3aed; }
html[data-theme="light"] .zmc-expo-item.zxv-item:has(.zxv-c-tierra)  { --zxv-borde-izq: #a16207; }
html[data-theme="light"] .zxv-fmt { color: #fff; box-shadow: none; }

/* ── Con «reducir movimiento» del sistema ──────────────────────────────────
 * Windows con «Efectos de animación» apagado ya lo informa así, y entonces el
 * panel quedaría quieto. Se apaga lo que mueve la TARJETA (entrada, elevación,
 * barrido, sacudón, la luz del título); las imágenes siguen, más lentas y
 * dentro de su recuadro de 80 px. */
@media (prefers-reduced-motion: reduce) {
  .zxv-img { --zxv-v: 1.8; }
  .zmc-expo-item:hover .zxv-img, .zmc-expo-item:focus-within .zxv-img { --zxv-v: 1.2; }
  .zmc-expo-item.zxv-item, .zmc-expo-item.zxv-item::after,
  .zmc-expo-modal.zxv-on .zmc-expo-grupo > h4::after, .zxv-fmt.zxv-cambia {
    animation: none !important;
    transition: none !important;
  }
  .zmc-expo-item.zxv-item:not(.es-off):hover { transform: none; }
}
