/* ── El modo observador (croquis-visor.js) ─────────────────────────────
   Siempre oscuro con acento lima (el de Equipo VDH), también adentro de la
   administración. El local, en cambio, es cálido: piso de madera, muebles de
   nogal con la mercadería a la vista, paredes claras bajas y luz pareja. */
.cv {
  --cv-bg: #0E1116; --cv-panel: #151A21; --cv-panel-2: #1B212A; --cv-linea: rgba(255, 255, 255, .08);
  --cv-texto: #F4F5F7; --cv-suave: #8B94A3; --cv-lima: #C6F432; --cv-sobre-lima: #0E1116;
  --cv-nogal: #6A4A36; --cv-nogal-luz: #8A6449; --cv-nogal-osc: #4A3224; --cv-muro: #E7E2DA; --cv-muro-luz: #F3EFE9;
  position: fixed; inset: 0; z-index: 15; display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--cv-bg); color: var(--cv-texto); font: 15px/1.4 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.cv button { font: inherit; color: inherit; }
.cv [hidden] { display: none !important; }

/* Arriba */
.cv-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: max(12px, env(safe-area-inset-top)) 16px 10px; }
.cv-volver { min-height: 44px; padding: 0 14px 0 6px; border: 0; background: none; color: var(--cv-suave); font-weight: 700; cursor: pointer; }
.cv-volver:hover { color: var(--cv-texto); }
.cv-titulo { display: grid; line-height: 1.15; margin-right: auto; }
.cv-titulo small { color: var(--cv-lima); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cv-titulo b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.cv-cab-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-seg { display: inline-flex; padding: 3px; border-radius: 13px; background: var(--cv-panel-2); }
.cv-seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--cv-suave); font-weight: 800; cursor: pointer; }
.cv-seg button[aria-pressed="true"] { background: var(--cv-texto); color: var(--cv-bg); }
.cv-chico { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--cv-panel-2); font-weight: 800; cursor: pointer; }
.cv-chico:hover { background: #232A35; }
.cv-lima, .cv-chico.cv-lima { background: var(--cv-lima); color: var(--cv-sobre-lima); }
.cv-lima:hover { background: #D4FA5E; }
.cv button:focus-visible, .cv-caja:focus-visible { outline: 2px solid var(--cv-lima); outline-offset: 2px; }

/* El cuerpo: la maqueta y el panel (al costado en la computadora, abajo en el celular) */
.cv-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.cv-escena { position: relative; overflow: hidden; min-height: 0; touch-action: none; background: radial-gradient(ellipse 80% 70% at 50% 42%, #1C232D 0%, var(--cv-bg) 72%); }
.cv-zoom { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.cv-zoom.cv-gesto { transition: none; }
.cv-zoom-acc { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cv-redondo { width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(27, 33, 42, .92); color: var(--cv-texto); font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.cv-redondo:hover { background: #232A35; }
.cv-camara { position: absolute; inset: 0; perspective: 1700px; perspective-origin: 50% 38%; }
/* Con un módulo abierto, la maqueta queda quieta detrás (la oscurece el fondo de la ficha): animarla costaría cada cuadro. */
.cv-escena.cv-detras { pointer-events: none; }
.cv-mundo { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d;
  transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--s, 1)) rotateX(var(--incl, 54deg)) rotateZ(var(--giro, 0deg));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.cv-cargando, .cv-vacio { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; color: var(--cv-suave); }
.cv-panel { min-height: 0; overflow: auto; padding: 16px; background: var(--cv-panel); display: grid; align-content: start; gap: 14px; }
@media (max-width: 899px) {
  .cv-cuerpo { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  /* El encabezado, en un solo renglón de controles. */
  .cv-cab { gap: 8px 10px; padding-bottom: 6px; }
  .cv-cab-acc { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
  .cv-cab-acc .cv-seg button { min-height: 38px; padding: 0 9px; font-size: 13.5px; }
  .cv-cab-acc .cv-chico { min-height: 38px; padding: 0 12px; font-size: 13.5px; }
  .cv-panel { max-height: 36vh; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .cv-titulo b { font-size: 18px; }
}

/* El piso y lo que no es mueble */
.cv-piso { position: absolute; border-radius: 2px;
  /* Cerámica clara en placas grandes, con luces cálidas de techo (como la foto de referencia). */
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 236, 200, .55), transparent 22%),
    radial-gradient(circle at 70% 22%, rgba(255, 236, 200, .55), transparent 22%),
    radial-gradient(circle at 30% 60%, rgba(255, 236, 200, .45), transparent 22%),
    radial-gradient(circle at 70% 60%, rgba(255, 236, 200, .45), transparent 22%),
    radial-gradient(ellipse 60% 30% at 50% 100%, rgba(255, 246, 225, .6), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 255, 255, .55) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(255, 255, 255, .55) 47px 48px),
    #DCC6A6;
  box-shadow: inset 0 0 40px rgba(70, 45, 20, .32); }
.cv-vereda { position: absolute; border-radius: 0 0 10px 10px;
  background: repeating-linear-gradient(90deg, transparent 0 29px, rgba(255, 255, 255, .06) 29px 30px), repeating-linear-gradient(0deg, transparent 0 29px, rgba(255, 255, 255, .06) 29px 30px), #2A2F37; }
.cv-vereda.cv-frente-galeria, .cv-vereda.cv-frente-shopping {
  background: linear-gradient(180deg, rgba(255, 255, 255, .4), transparent 55%), repeating-linear-gradient(90deg, transparent 0 59px, rgba(0, 0, 0, .07) 59px 60px), #C9CDD2; }
.cv-vereda.cv-frente-galeria span, .cv-vereda.cv-frente-shopping span { color: rgba(30, 34, 40, .5); }
.cv-vereda span { position: absolute; right: 18px; bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
/* La entrada y lo que va sobre el piso (la puerta del depósito, la base de un maniquí): el mismo dibujo del mapa. */
.cv-entrada, .cv-piso-pieza { position: absolute; transform: translateZ(1px); transform-style: preserve-3d; --alto: 0px; }
.cv-svg, .cv-merca { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.cv-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.cv-hueco { position: absolute; border-radius: 6px; border: 2px dashed rgba(70, 44, 22, .45); transform: translateZ(1px); }

/* Las cajas con volumen */
.cv-caja { position: absolute; transform-style: preserve-3d; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.cv-cara, .cv-tapa { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.cv-cara { background: var(--cv-nogal); }
.cv-s { transform-origin: 50% 100%; transform: rotateX(-90deg); background: #7B5741; }
.cv-n { transform-origin: 50% 0; transform: rotateX(90deg); background: var(--cv-nogal-osc); }
.cv-e { transform-origin: 100% 50%; transform: rotateY(90deg); background: #644532; }
.cv-o { transform-origin: 0 50%; transform: rotateY(-90deg); background: #644532; }
.cv-tapa { inset: 0; transform: translateZ(var(--alto)); background: linear-gradient(135deg, #8F6849, #73513A); border-radius: 3px; box-shadow: inset 0 0 0 2px rgba(50, 32, 20, .6); }
.cv-halo { position: absolute; inset: -4px; border-radius: 8px; background: transparent; border: 2px solid var(--halo, #6E7684); opacity: .95;
  box-shadow: 0 0 8px 2px var(--halo, #6E7684), 0 0 22px 6px var(--halo, #6E7684);
  box-shadow: 0 0 8px 2px var(--halo, #6E7684), 0 0 24px 7px color-mix(in srgb, var(--halo, #6E7684) 55%, transparent), inset 0 0 10px 1px color-mix(in srgb, var(--halo, #6E7684) 45%, transparent);
  transform: translateZ(.5px); transition: opacity .2s; }
.cv-foto-cara { position: absolute; left: 50%; top: 50%; background: #2A2F37 center / cover no-repeat; border: 2px solid var(--cv-nogal-osc); border-radius: 2px; }
.cv-foto-tapa { left: 3px; top: 3px; right: 3px; bottom: 3px; transform: none; opacity: 0; transition: opacity .3s; }
/* La foto arriba, sólo en los del frente (su cara al salón no se ve); los demás muestran su ropa arriba y la foto en el frente. */
.cv-mod.foto-lista.foto-arriba .cv-foto-tapa { opacity: 1; }
/* Sin foto: la cara del frente lisa, con una camarita. */
.cv-mod.sin-foto .cv-frente .cv-foto-cara, .cv-mod.foto-no .cv-frente .cv-foto-cara {
  background: repeating-linear-gradient(135deg, #2C323C 0 6px, #262B34 6px 12px); }
.cv-mod.sin-foto .cv-frente .cv-foto-cara::after, .cv-mod.foto-no .cv-frente .cv-foto-cara::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 11px; translate: -50% -50%; border: 2px solid rgba(255, 255, 255, .45); border-radius: 3px; }
.cv-mod { cursor: pointer; }
.cv-mod:hover, .cv-mod:focus-visible, .cv-mod.cv-tocado { transform: translateZ(9px); }
/* La base: el color (del vendedor, del estado o de la antigüedad) al pie de la cara que mira al salón. */
.cv-mod .cv-frente::after { content: ""; position: absolute; background: var(--halo, #6E7684); box-shadow: 0 0 10px 2px var(--halo, #6E7684), inset 0 0 0 1px rgba(255, 255, 255, .45); transition: background-color .3s; }
.cv-mod .cv-s.cv-frente::after { left: 0; right: 0; bottom: 0; height: 5px; }
.cv-mod .cv-n.cv-frente::after { left: 0; right: 0; top: 0; height: 5px; }
.cv-mod .cv-e.cv-frente::after { top: 0; bottom: 0; right: 0; width: 5px; }
.cv-mod .cv-o.cv-frente::after { top: 0; bottom: 0; left: 0; width: 5px; }
.cv-mod:hover .cv-halo, .cv-mod:focus-visible .cv-halo { opacity: 1; }
.cv-mod:hover .cv-tapa, .cv-mod:hover .cv-cara { filter: brightness(1.14); }
/* Las paredes gris oliva de los locales, con una luz que baja del techo. */
.cv-muro .cv-cara { background: linear-gradient(0deg, #4B4D44, #5E6056 70%, #6A6C61); }
.cv-muro .cv-tapa { background: #2B2C27; box-shadow: none; }
.cv-muro .cv-halo, .cv-fijo .cv-halo { display: none; }
.cv-vidrio .cv-cara { background: rgba(150, 205, 240, .28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.cv-vidrio .cv-tapa { background: #2B2D32; }
.cv-fijo .cv-cara { background: #555C67; }
.cv-fijo .cv-tapa { background: none; box-shadow: none; }

/* El rótulo: el número (y qué hay) parado, de frente a quien mira */
/* El número se puede tocar: abre SU módulo (aunque quede dibujado encima del de al lado). */
.cv-rotulo { position: absolute; left: 50%; top: 50%; display: grid; justify-items: center; gap: 1px; cursor: pointer;
  transform: translate(-50%, -50%) translateZ(calc(var(--alto) + 12px)) rotateZ(calc(var(--giro, 0deg) * -1)) rotateX(calc(var(--incl, 54deg) * -1)) scale(var(--zc, 1)); }
.cv-rotulo b { position: relative; min-width: 26px; height: 26px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: rgba(14, 17, 22, .9);
  border: 2px solid var(--halo, #6E7684); color: #F4F5F7; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cv-rotulo span { max-width: 120px; padding: 1px 7px; border-radius: 6px; background: rgba(14, 17, 22, .78); color: #F4F5F7; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-plano .cv-rotulo { transform: translate(-50%, -50%) translateZ(calc(var(--alto) + 2px)) rotateZ(calc(var(--giro, 0deg) * -1)) scale(var(--zc, 1)); }

.cv-rotulo b.vieja::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #F5B84B; box-shadow: 0 0 0 2px #0E1116; }
.cv-halo, .cv-rotulo b { transition: background-color .3s, border-color .3s, box-shadow .3s, opacity .2s; }

/* Resaltar a alguien: lo suyo se levanta y brilla; lo demás queda atenuado. (La opacidad va en cada cara: en la caja
   entera aplanaría el volumen.) */
.cv-apagado .cv-cara, .cv-apagado .cv-tapa, .cv-apagado .cv-rotulo { opacity: .22; }
.cv-apagado .cv-halo { opacity: 0; }
.cv-cara, .cv-tapa, .cv-rotulo { transition: opacity .25s; }
.cv-mod.cv-resaltado { transform: translateZ(12px); }
.cv-mod.cv-resaltado .cv-halo { opacity: 1; inset: -9px; }

/* En el celular, con la maqueta chica, los nombres se tapan: se leen al acercarla (y en la ficha del módulo). */
.cv-nombres-ocultos .cv-rotulo span { display: none; }
/* El croquis sin armar: un aviso arriba. Sin módulos: sin controles ni panel. */
.cv-aviso { position: absolute; left: 12px; right: 12px; top: 10px; margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(245, 184, 75, .16); color: #FFE2B0; font-size: 13.5px; font-weight: 700; z-index: 1; }
.cv-sin-modulos .cv-cab-acc, .cv-sin-modulos .cv-zoom-acc, .cv-sin-modulos .cv-panel { display: none; }
.cv-sin-modulos .cv-cuerpo { grid-template-columns: minmax(0, 1fr); }

/* Modo liviano: sin sombras, sin desenfoques ni texturas (para teléfonos lentos) */
.cv-liviano .cv-halo { box-shadow: none; inset: -3px; opacity: .7; }
.cv-liviano .cv-piso { background: #C8A37D; box-shadow: none; }
.cv-liviano .cv-n, .cv-liviano .cv-cara:not(.cv-frente) { background: var(--cv-nogal); }
.cv-liviano .cv-escena { background: var(--cv-bg); }
.cv-liviano .cv-mod:hover .cv-tapa, .cv-liviano .cv-mod:hover .cv-cara { filter: none; }

/* El panel */
.cv-interruptor { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--cv-panel-2); text-align: left; cursor: pointer; }
.cv-interruptor span { font-weight: 800; }
.cv-interruptor small { grid-column: 1; color: var(--cv-suave); font-size: 12.5px; }
.cv-interruptor::after { content: ""; grid-row: 1 / 3; grid-column: 2; width: 42px; height: 24px; border-radius: 999px; background: #39414D; box-shadow: inset -18px 0 0 3px #39414D, inset -18px 0 0 6px #8B94A3; transition: box-shadow .2s, background-color .2s; }
.cv-interruptor[aria-pressed="true"]::after { background: var(--cv-lima); box-shadow: inset 18px 0 0 3px var(--cv-lima), inset 18px 0 0 6px var(--cv-sobre-lima); }
.cv-ayuda { margin: 0; color: var(--cv-suave); font-size: 14px; }

.cv-rotulo-sec { margin: 0 0 -6px; color: var(--cv-suave); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cv-vistas { display: flex; width: 100%; }
.cv-vistas button { flex: 1 1 0; padding: 0 8px; font-size: 13.5px; }
.cv-ley { display: grid; gap: 4px; }
.cv-ley-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 12px; background: none; font-size: 14.5px; text-align: left; cursor: pointer; transition: background-color .2s, opacity .2s; }
.cv-ley-item:hover { background: var(--cv-panel-2); }
.cv-ley-item[aria-pressed="true"] { background: var(--cv-panel-2); box-shadow: inset 0 0 0 2px var(--cv-lima); }
.cv-ley:has([aria-pressed="true"]) .cv-ley-item[aria-pressed="false"] { opacity: .55; }
.cv-ver-todos { justify-self: start; min-height: 38px; }
.cv-ley-item i { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.cv-ley-item b { font-weight: 700; }
.cv-ley-item small { margin-left: auto; color: var(--cv-suave); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cv-punto-viejo { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #F5B84B; vertical-align: 1px; margin-right: 2px; }
.cv-sec summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 40px; color: var(--cv-suave); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cv-sec summary::-webkit-details-marker { display: none; }
.cv-sec summary::after { content: "+"; font-size: 18px; color: var(--cv-suave); }
.cv-sec[open] summary::after { content: "–"; }
@media (max-width: 899px) {
  .cv-panel { gap: 10px; }
  .cv-ley { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .cv-ley-item { width: auto; min-height: 38px; padding: 2px 12px; background: var(--cv-panel-2); border-radius: 999px; font-size: 13.5px; }
  .cv-ley-item small { margin-left: 2px; }
}

/* La vista de frente de un módulo */
.cv-ficha-fondo { position: fixed; inset: 0; z-index: 2; background: rgba(5, 7, 10, .74); }
.cv-ficha { position: fixed; z-index: 3; inset: 0; margin: auto; width: min(900px, calc(100% - 40px)); height: fit-content; max-height: calc(100% - 40px); overflow: auto;
  background: var(--cv-panel); border-radius: 22px; box-shadow: 0 30px 90px rgba(0, 0, 0, .65); transform-origin: 50% 50%; overscroll-behavior: contain; }
@media (max-width: 639px) { .cv-ficha { width: 100%; max-height: 100%; height: 100%; border-radius: 0; } }
.cv-ficha-cab { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 18px 10px 20px; background: var(--cv-panel); box-shadow: 0 10px 14px -12px rgba(0, 0, 0, .6); }
.cv-ficha-cab small { color: var(--cv-suave); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cv-ficha-cab h2 { margin: 2px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.cv-nombre { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--cv-texto); }
.cv-que-et { color: var(--cv-suave); font-weight: 700; }
.cv-que-linea { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 0; }
.cv-que { color: var(--cv-lima); font-weight: 800; }
.cv-que:empty { display: none; }
.cv-que-ia { color: var(--cv-suave); font-size: 12px; font-weight: 600; }
.cv-que-sug { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 0; color: var(--cv-suave); font-size: 14px; }
.cv-que-sug b { color: var(--cv-texto); }
.cv-enlace { min-height: 32px; padding: 0; border: 0; background: none; color: var(--cv-suave); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cv-enlace:hover { color: var(--cv-texto); }
.cv-que-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cv-que-form input, .cv-sugerencia textarea { min-height: 46px; padding: 10px 14px; border: 1px solid var(--cv-linea); border-radius: 14px; background: var(--cv-panel-2); color: var(--cv-texto); font: inherit; outline: none; }
.cv-que-form input { flex: 1 1 200px; }
.cv-que-form input:focus, .cv-sugerencia textarea:focus { border-color: var(--cv-lima); }
.cv-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-sugerencia { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--cv-panel-2); }
.cv-sugerencia h3 { margin: 0; font-size: 16px; font-weight: 800; }
.cv-sugerencia textarea { width: 100%; resize: vertical; background: var(--cv-bg); }
.cv-plazo { display: flex; }
.cv-plazo button { flex: 1 1 0; padding: 0 6px; font-size: 13.5px; }
.cv-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14.5px; cursor: pointer; }
.cv-check input { width: 20px; height: 20px; accent-color: var(--cv-lima); }
.cv-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-ok { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(91, 214, 138, .14); color: #CFF7DD; font-weight: 700; }
.cv-cerrar { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--cv-panel-2); font-size: 26px; line-height: 1; cursor: pointer; }
.cv-cerrar:hover { background: #232A35; }
.cv-ficha-cuerpo { display: grid; gap: 16px; padding: 4px 20px calc(22px + env(safe-area-inset-bottom)); }
/* En la PC, las fotos a la izquierda y los datos, lo de la IA y "Dejar sugerencia" a la derecha (sin desplazar). */
@media (min-width: 900px) {
  .cv-ficha-cuerpo { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; column-gap: 22px; }
  .cv-ficha-cuerpo > .cv-fotos { grid-column: 1; grid-row: 1 / span 8; }
  .cv-ficha-cuerpo > :not(.cv-fotos) { grid-column: 2; }
}
.cv-fotos { display: grid; gap: 12px; }
.cv-fotos.con-ref { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.cv-fotos.amplia-ahora, .cv-fotos.amplia-ref { grid-template-columns: minmax(0, 1fr); }
.cv-fotos.amplia-ahora .cv-ref, .cv-fotos.amplia-ref .cv-ahora { display: none; }
.cv-fotos.con-ref .cv-foto-img { cursor: zoom-in; }
.cv-fotos.amplia-ahora .cv-foto-img, .cv-fotos.amplia-ref .cv-foto-img { cursor: zoom-out; }
.cv-ref figcaption b { color: var(--cv-lima); font-weight: 800; }
.cv-ahora.cv-antes .cv-foto-img { box-shadow: 0 0 0 3px #F5B84B; }
.cv-historia { display: grid; gap: 4px; margin-top: 2px; }
.cv-hist-tit { font-size: 13px; font-weight: 800; color: var(--cv-suave); }
.cv-historia input[type="range"] { width: 100%; height: 30px; margin: 0; accent-color: var(--cv-lima); cursor: pointer; }
.cv-hist-marcas { display: flex; justify-content: space-between; color: var(--cv-suave); font-size: 12px; font-weight: 700; }
.cv-foto { margin: 0; display: grid; gap: 6px; min-width: 0; }
.cv-foto-img { width: 100%; aspect-ratio: 3 / 4; max-height: 62vh; border-radius: 16px; background: #0A0C10 center / contain no-repeat; }
.cv-foto-img.cv-foto-falla { display: grid; place-items: center; color: var(--cv-suave); }
.cv-foto figcaption { color: var(--cv-suave); font-size: 13.5px; font-weight: 600; }
.cv-sin-foto { display: grid; justify-items: center; gap: 10px; padding: 34px 18px; border-radius: 18px; background: var(--cv-panel-2); text-align: center; }
.cv-sin-foto p { margin: 0; color: var(--cv-suave); }
.cv-sin-foto p b { color: var(--cv-texto); font-size: 16px; }
.cv-sin-foto-ico { width: 58px; height: 42px; border: 3px solid var(--cv-suave); border-radius: 10px; position: relative; }
.cv-sin-foto-ico::before { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; translate: -50% -50%; border: 3px solid var(--cv-suave); border-radius: 50%; }
.cv-sin-foto-ico::after { content: ""; position: absolute; left: 10px; top: -9px; width: 16px; height: 6px; border-radius: 3px 3px 0 0; background: var(--cv-suave); }
.cv-boton { min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--cv-panel-2); font-weight: 800; cursor: pointer; }
.cv-boton:disabled { opacity: .6; cursor: default; }
.cv-boton.cv-lima { background: var(--cv-lima); color: var(--cv-sobre-lima); }
.cv-boton.cv-lima:hover:not(:disabled) { background: #D4FA5E; }
.cv .cv-cerrar { font-size: 26px; }
.cv .cv-redondo { font-size: 24px; }
.cv-datos { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-datos > span { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--cv-panel-2); font-size: 14px; font-weight: 700; }
.cv-persona i { width: 12px; height: 12px; border-radius: 50%; }
.cv-nivel.nivel-impecable { background: var(--cv-lima); color: var(--cv-sobre-lima); }
.cv-nivel.nivel-bien { background: #2E6B47; color: #E9FFF1; }
.cv-nivel.nivel-a_mejorar { background: #6B5422; color: #FFF1D6; }
.cv-nivel.nivel-fuera_de_estandar { background: #7A2E2E; color: #FFE5E5; }
.cv-ia h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.cv-ia ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cv-ia li { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; }
.cv-grav { flex: none; padding: 2px 8px; border-radius: 6px; background: #4A4220; color: #FFE9A8; font-size: 12px; font-weight: 800; }
.cv-grav.mal { background: #5A2626; color: #FFD2D2; }
.cv-gris { margin: 0; color: var(--cv-suave); font-size: 14px; }
.cv-comentario { margin: 8px 0 0; font-style: italic; color: var(--cv-texto); }
@media (prefers-reduced-motion: reduce) {
  .cv-mundo, .cv-caja, .cv-camara, .cv-foto-img, .cv-halo, .cv-foto-tapa, .cv-zoom { transition: none; }
}

/* ── Las piezas con volumen (14/10: "más parecido a la foto"). Van al final: ganan sobre el modo liviano. ── */
.cv-rotulo-pieza { cursor: default; pointer-events: none; }
.cv-rotulo-pieza span { font-size: 10.5px; background: rgba(14, 17, 22, .74); }
.cv-pz-probador .cv-cara { background: #EEE8DF; }
.cv-pz-probador[data-frente="s"] .cv-s, .cv-pz-probador[data-frente="n"] .cv-n { background: repeating-linear-gradient(90deg, #8E3B30 0 4px, #A84C3E 4px 8px); }
.cv-pz-probador[data-frente="e"] .cv-e, .cv-pz-probador[data-frente="o"] .cv-o { background: repeating-linear-gradient(180deg, #8E3B30 0 4px, #A84C3E 4px 8px); }
.cv-pz-caja .cv-cara { background: #5E4130; }
.cv-pz-mesa .cv-cara { background: #6A4A36; }
.cv-pz-perchero .cv-cara { background: repeating-linear-gradient(90deg, #2F5BB7 0 4px, rgba(0, 0, 0, .35) 4px 5px, #C9573A 5px 9px, rgba(0, 0, 0, .35) 9px 10px, #E0A93B 10px 14px, rgba(0, 0, 0, .35) 14px 15px, #F3F0EA 15px 19px, rgba(0, 0, 0, .35) 19px 20px); }
.cv-pz-perchero .cv-e, .cv-pz-perchero .cv-o { background: repeating-linear-gradient(180deg, #2F5BB7 0 4px, rgba(0, 0, 0, .35) 4px 5px, #C9573A 5px 9px, rgba(0, 0, 0, .35) 9px 10px, #E0A93B 10px 14px, rgba(0, 0, 0, .35) 14px 15px, #F3F0EA 15px 19px, rgba(0, 0, 0, .35) 19px 20px); }
.cv-pz-columna .cv-cara { background: #D5D0C8; }
.cv-pz-columna .cv-e, .cv-pz-columna .cv-o { background: #C4BEB5; }
.cv-pz-espejo .cv-cara { background: linear-gradient(160deg, #E4F3FA, #A9C9D9 60%, #C9E2EE); box-shadow: inset 0 0 0 2px #C9CED4; }
.cv-pz-banco .cv-cara { background: #5E3826; }
.cv-pz-otro .cv-cara { background: #555C67; }
.cv-pz-maceta .cv-cara { background: #A0583C; }
.cv-pz-maceta .cv-tapa { background: #4A2E22; }
.cv-pz-escalon .cv-cara { background: #CFC8BC; }
.cv-pz-escalon .cv-tapa { background: #E8E2D8; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cv-hoja { position: absolute; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #86C783 0, #4E9A57 38%, #2F6B3C 75%, #24532F 100%); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.cv-parado { position: absolute; transform-origin: 50% 100%; transform: rotateZ(calc(var(--giro, 0deg) * -1)) rotateX(-90deg); pointer-events: none; }
.cv-parado svg { display: block; width: 100%; height: 100%; }
/* Desde arriba, el maniquí parado no se ve (queda de canto): se ve el dibujo del piso. Inclinado, el dibujo del piso sobra. */
.cv-maniqui-piso { opacity: 0; transition: opacity .3s; }
.cv-plano .cv-maniqui-piso { opacity: 1; }
.cv-plano .cv-parado { opacity: 0; }
.cv-piso-dep { background: repeating-linear-gradient(90deg, transparent 0 95px, rgba(0, 0, 0, .12) 95px 96px), repeating-linear-gradient(0deg, transparent 0 95px, rgba(0, 0, 0, .12) 95px 96px),
  radial-gradient(ellipse at 50% 40%, #C3BEB6, #A8A39B); box-shadow: inset 0 0 40px rgba(0, 0, 0, .3); }

/* ── Como la foto (14/10): piso de cemento, y "Desde arriba" con perspectiva (se ven las paredes por dentro y el frente
   de cada módulo, con su foto). ── */
.cv-piso { background:
    radial-gradient(circle at 30% 22%, rgba(255, 238, 205, .32), transparent 24%),
    radial-gradient(circle at 70% 22%, rgba(255, 238, 205, .32), transparent 24%),
    radial-gradient(circle at 30% 62%, rgba(255, 238, 205, .28), transparent 24%),
    radial-gradient(circle at 70% 62%, rgba(255, 238, 205, .28), transparent 24%),
    url("croquis-img/textura-cemento.webp") 0 0 / 150px 150px, #9C9A95;
  box-shadow: inset 0 0 50px rgba(20, 18, 14, .35); }
.cv-piso-dep { background: linear-gradient(rgba(43, 42, 38, .18), rgba(43, 42, 38, .18)), url("croquis-img/textura-cemento.webp") 0 0 / 150px 150px, #8E8C87; }
.cv-liviano .cv-piso { background: #9C9A95; }
.cv-plano .cv-camara { perspective: 780px; perspective-origin: 50% calc(50% - 29px); }
.cv-copa { transform: translateZ(30px); }

/* ── Girar y recorrer (14/10) ── */
.cv-zoom-acc { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 24px); }
.cv-recorrer { position: absolute; left: 12px; right: 12px; bottom: 70px; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 18px;
  background: rgba(14, 17, 22, .9); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); max-width: 560px; margin: 0 auto; }
.cv-parada { flex: 1; min-width: 0; display: grid; text-align: center; line-height: 1.2; }
.cv-parada small { color: var(--cv-lima); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cv-parada b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-recorriendo #cvRecorrer { display: none; }
.cv-vidriera .cv-cara { background: #7B5741; }
@media (max-width: 899px) { .cv-recorrer { bottom: 66px; } .cv-zoom-acc .cv-chico { min-height: 40px; padding: 0 12px; } }
.cv-pz-mesalisa .cv-cara { background: #6A4A36; }

/* ── Manejarlo con el mouse: arrastrar gira, la rueda acerca, el clic derecho mueve ── */
/* Sin seleccionar texto: un doble clic dejaba seleccionado "Exhibidor 2" y el próximo arrastre lo agarraba (el navegador
   arrastraba el texto y cortaba el giro). */
.cv-escena { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.cv-escena:active { cursor: grabbing; }
.cv-escena .cv-mod { cursor: pointer; }
/* Las marcas invisibles del piso: con ellas se mide dónde cae cada punto en la pantalla. */
.cv-marca { position: absolute; width: 2px; height: 2px; margin: -1px 0 0 -1px; visibility: hidden; pointer-events: none; }
.cv-ayuda-raton { position: absolute; left: 14px; bottom: 20px; margin: 0; max-width: calc(100% - 420px); color: rgba(244, 245, 247, .55); font-size: 12.5px; font-weight: 600; line-height: 1.45; pointer-events: none; }
.cv-ayuda-raton b { color: rgba(244, 245, 247, .82); font-weight: 800; }
.cv-recorriendo .cv-ayuda-raton, .cv-sin-modulos .cv-ayuda-raton { display: none; }
/* Sólo con mouse y con lugar al lado de los botones. */
@media not all and (hover: hover) and (pointer: fine) { .cv-ayuda-raton { display: none; } }
@media (max-width: 1099px) { .cv-ayuda-raton { display: none; } }

/* La foto al pasar el mouse por un módulo: vertical, como el módulo de verdad. */
.cv-previa { position: absolute; z-index: 4; width: 220px; display: grid; gap: 8px; padding: 8px; border-radius: 16px; background: rgba(21, 26, 33, .97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07); pointer-events: none; }
.cv-previa-foto { width: 100%; aspect-ratio: 3 / 4; border-radius: 11px; background: #0A0C10 center / contain no-repeat; }
.cv-previa-foto.sin { aspect-ratio: 3 / 2; display: grid; place-items: center; background: repeating-linear-gradient(135deg, #2C323C 0 6px, #262B34 6px 12px); }
.cv-previa-foto.sin span, .cv-previa-foto.cv-foto-falla { color: var(--cv-suave); font-size: 13px; font-weight: 700; }
.cv-previa-foto.cv-foto-falla { display: grid; place-items: center; text-align: center; padding: 12px; }
.cv-previa-txt { display: grid; gap: 2px; padding: 0 4px 2px; min-width: 0; }
.cv-previa-txt b { font-size: 15px; font-weight: 800; }
.cv-previa-txt span { color: var(--cv-lima); font-size: 13.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-previa-txt small { display: flex; align-items: center; gap: 6px; color: var(--cv-suave); font-size: 12.5px; font-weight: 600; }
.cv-previa-txt small i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.cv-previa-txt em { color: var(--cv-suave); font-size: 11.5px; font-style: normal; opacity: .8; }
@media (prefers-reduced-motion: no-preference) { .cv-previa:not([hidden]) { animation: cv-previa .16s ease-out; } }
@keyframes cv-previa { from { opacity: 0; transform: translateY(4px); } }

/* ── El local en 3D (croquis3d.js): va arriba; la maqueta de siempre no se arma ── */
.cv-modo-3d #cvZoom { display: none; }
.cv-3d { position: absolute; inset: 0; }
.cv-3d canvas { display: block; touch-action: none; outline: none; }
.cv-caminando .cv-escena, .cv-caminando .cv-escena:active { cursor: crosshair; }
/* En 3D la ayuda va arriba (abajo están los botones, con Caminar); con el aviso de "ubicados a ojo", debajo de él. */
.cv-modo-3d .cv-ayuda-raton { top: 14px; bottom: auto; max-width: calc(100% - 28px); text-shadow: 0 1px 6px rgba(0, 0, 0, .85); }
.cv-modo-3d .cv-escena:has(.cv-aviso) .cv-ayuda-raton { top: 66px; }
/* Los números de los módulos, de frente a quien mira (los dibuja el 3D en HTML: se leen nítidos). */
/* isolation: el 3D le pone un z-index a cada número (de 1 a ~30, por distancia); sin su propio contexto de apilado
   competían con la ficha del módulo (z-index 3) y quedaban encima de la foto (Mauricio, 15/10, en el Módulo 20). */
.c3-etiquetas { position: absolute; inset: 0; overflow: hidden; pointer-events: none; isolation: isolate; }
.c3-rotulo { display: grid; justify-items: center; transition: opacity .2s; }
.c3-rotulo b { position: relative; min-width: 26px; height: 26px; padding: 0 7px; box-sizing: border-box; display: grid; place-items: center; border-radius: 999px;
  background: rgba(14, 17, 22, .9); border: 2px solid; color: var(--cv-texto); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; transition: transform .15s, background-color .15s; }
.c3-rotulo b.vieja::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #F5B84B; box-shadow: 0 0 0 2px #0E1116; }
.c3-rotulo.encima b { transform: scale(1.18); background: var(--cv-texto); color: var(--cv-bg); }
.c3-rotulo.resaltado b { transform: scale(1.1); }
.c3-rotulo.apagado { opacity: .28; }
/* En el celular el local se ve chico: los números, más chicos, para que no tapen los muebles (Mauricio, 15/10). También
   con el celular acostado, que deja el 3D muy bajito. */
@media (max-width: 639px), (max-height: 480px) {
  .c3-rotulo b { min-width: 20px; height: 20px; padding: 0 5px; border-width: 1.5px; font-size: 11px; }
  .c3-rotulo b.vieja::after { top: -3px; right: -3px; width: 8px; height: 8px; }
}
#cvCaminar[aria-pressed="true"] { background: var(--cv-texto); color: var(--cv-bg); }
.cv-sec .cv-interruptor + .cv-interruptor { margin-top: 8px; }
/* Al pasar por una puerta: un fundido a negro cortito. */
.cv-fundido { position: absolute; inset: 0; z-index: 5; background: #000; opacity: 0; pointer-events: none; transition: opacity .32s ease; }
.cv-fundido.negro { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cv-fundido, .c3-rotulo, .c3-rotulo b { transition: none; } }

/* Liquidación (SQL 125): el interruptor chico en la ficha del módulo, o la etiqueta para quien no lo puede cambiar. */
.cv-ficha-cab .cv-liq { width: auto; max-width: 420px; min-height: 0; margin-top: 10px; padding: 8px 12px; }
.cv-ficha-cab .cv-liq small { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.cv-ficha-cab .cv-liq:disabled { opacity: .6; cursor: progress; }
.cv-liq-et { display: inline-block; margin: 8px 0 0; padding: 4px 10px; border-radius: 999px; background: rgba(245, 184, 75, .16); color: #FFE2B0; font-size: 13px; font-weight: 800; }

/* Fotos horizontales (el teléfono acostado): en la ficha y al pasar el mouse, el recuadro ancho; en la cara del módulo,
   la foto entera (sin cortarle los costados). */
.cv-foto-img.cv-horizontal, .cv-previa-foto.cv-horizontal { aspect-ratio: 4 / 3; }
.cv-previa:has(.cv-horizontal) { width: 300px; }
.cv-foto-cara.cv-horizontal { background-size: contain; }

/* Modo mira: el puntito del medio (sin flecha del mouse); apuntando a algo, un aro lima y, si es una puerta, a dónde va. */
.cv-mira { position: absolute; left: 50%; top: 50%; z-index: 3; display: none; place-items: center; transform: translate(-50%, -50%); pointer-events: none; }
.cv-mirando .cv-mira { display: grid; }
.cv-mira i { width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .55); transition: width .12s, height .12s, background-color .12s; }
.cv-mira.sobre i { width: 18px; height: 18px; background: rgba(198, 244, 50, .18); border: 3px solid var(--cv-lima); box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 14px rgba(198, 244, 50, .55); }
.cv-mira span { position: absolute; top: calc(100% + 10px); white-space: nowrap; padding: 4px 10px; border-radius: 9px; background: rgba(14, 17, 22, .88); color: var(--cv-texto); font-size: 12.5px; font-weight: 800; }
.cv-mira span:empty { display: none; }
.cv-mirando .cv-escena, .cv-mirando .cv-escena:active { cursor: none; }
#cvMira[aria-pressed="true"] { background: var(--cv-texto); color: var(--cv-bg); }
/* Sensibilidad del mouse (Ajustes de la vista). */
.cv-sens { display: grid; gap: 6px; margin-bottom: 10px; }
.cv-sens > span { color: var(--cv-suave); font-size: 12.5px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .cv-mira i { transition: none; } }
