/* Showroom v2. Los colores y fuentes se pisan desde datos/marca.json (variables en :root). */
:root {
  --fondo: #18181A;
  --superficie: #222225;
  --superficie-2: #2C2C30;
  --texto: #EEE9E1;
  --suave: #A59E94;
  --linea: #3A3A40;
  --acento: #C9A46A;
  --sobre-acento: #18181A;
  --f-titulos: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-texto: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --seg-top: env(safe-area-inset-top, 0px);
  --seg-bottom: env(safe-area-inset-bottom, 0px);
  --seg-left: env(safe-area-inset-left, 0px);
  --seg-right: env(safe-area-inset-right, 0px);
  --radio: 14px;
  --arriba: calc(var(--seg-top) + 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fondo); color: var(--texto); font-family: var(--f-texto); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior: none; }
#app { position: fixed; inset: 0; }
h1, h2, h3, p, dl, dd, table, blockquote, ul { margin: 0; }
button, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.suave { color: var(--suave); }
.chico { font-size: 13px; }
.sin-js, .error-carga { padding: 40px 24px; color: var(--suave); }
.error-carga p:first-child { color: var(--texto); font-size: 18px; margin-bottom: 8px; }

/* Rótulo fijo en todas las pantallas */
.rotulo { position: fixed; z-index: 90; top: calc(var(--seg-top) + 8px); left: calc(var(--seg-left) + 10px); margin: 0; padding: 4px 10px; font-size: 11px; letter-spacing: .02em; border-radius: 999px; background: rgba(24,24,26,.62); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; white-space: nowrap; }

.aviso { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--seg-bottom) + 90px); transform: translateX(-50%) translateY(10px); background: var(--superficie-2); border: 1px solid var(--linea); padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.aviso.visible { opacity: 1; transform: translateX(-50%); }

/* Distribución general */
.pantalla { position: absolute; inset: 0; display: block; }
.vista { position: absolute; inset: 0; overflow: hidden; background: var(--fondo); }
.lateral { display: none; }

.vidrio { background: rgba(24,24,26,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); color: var(--texto); }

/* Botones */
.bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 18px; border-radius: var(--radio); border: 1px solid var(--linea); background: var(--superficie-2); color: var(--texto); text-decoration: none; font-weight: 500; }
.bt svg { width: 22px; height: 22px; flex: none; }
.bt.ico { padding: 0; width: 44px; border-radius: 50%; }
.bt.vidrio { border-color: rgba(255,255,255,.14); }
.bt.acento { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.bt.llano { background: transparent; }
.bt.plano { background: transparent; border-color: transparent; }
.bt.grande { min-height: 52px; padding: 0 34px; font-size: 16px; }
.bt.ancho { width: 100%; }
.bt.pastilla { border-radius: 999px; min-height: 44px; }
.bt:disabled { opacity: .6; cursor: default; }
.bt:hover:not(:disabled) { filter: brightness(1.12); }

.atras { position: absolute; z-index: 30; left: calc(var(--seg-left) + 10px); top: var(--arriba); border-radius: 50%; padding: 0; width: 44px; }
.menu { position: absolute; z-index: 30; right: calc(var(--seg-right) + 10px); top: calc(var(--seg-top) + 6px); }

/* Entrada */
.entrada { background: var(--fondo); }
.entrada-fondo { position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, var(--superficie-2), var(--fondo)); }
.entrada-fondo img { width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.45); transform: scale(1.08); }
.entrada-cuerpo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.nombre-grande { font-family: var(--f-titulos); font-weight: 500; font-size: clamp(48px, 14vw, 84px); line-height: 1; letter-spacing: .01em; }
.bajada { max-width: 30ch; color: var(--texto); opacity: .9; font-size: 16px; }
.entrada .bt { margin-top: 14px; }

/* Portada */
.portada { background: #0e0e0f; }
.portada-fondo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.portada-fondo img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.42) saturate(1.1); transform: scale(1.15); transition: opacity .6s; }
.escenario { position: absolute; top: 0; bottom: 0; left: 50%; height: 100%; aspect-ratio: var(--prop, 9 / 16); transform: translateX(-50%); background: var(--superficie); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.escenario.girando { cursor: grabbing; }
/* Al tocar un piso, la cámara se acerca a su franja; al volver de la planta, se aleja. */
.escenario.acercando { transform: translateX(-50%) scale(2.6); opacity: 0; transition: transform .48s cubic-bezier(.55,0,.8,.3), opacity .3s ease-in .18s; }
.escenario.alejando { animation: aleja .6s cubic-bezier(.2,.7,.25,1) both; }
@keyframes aleja { from { transform: translateX(-50%) scale(2.6); opacity: 0; } 40% { opacity: 1; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.escenario::before { content: 'Cargando…'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--suave); }
.escenario .capa, .giro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.escenario .capa.visible { opacity: 1; z-index: 1; }
.escenario .capa.instantanea { transition: none; }
.giro-video { z-index: 3; }
/* Cuadro del giro: encima de la portada fija mientras la cámara se mueve. Sin fundido. */
.capa-cuadro { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; opacity: 0; pointer-events: none; }
.capa-cuadro.visible { opacity: 1; }
/* Cambio de horario: la imagen nueva entra de arriba hacia abajo (máscara) con un acercamiento leve. */
.escenario .capa.barriendo { z-index: 2;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 58%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 58%, transparent 100%);
  -webkit-mask-size: 100% 300%; mask-size: 100% 300%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: barre 1.5s cubic-bezier(.6,0,.3,1) both, acerca 1.5s cubic-bezier(.2,.6,.3,1) both; }
@keyframes barre { from { -webkit-mask-position: 0 100%; mask-position: 0 100%; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes acerca { from { transform: scale(1.045); } to { transform: scale(1); } }
/* Banda de luz que acompaña el borde del barrido. */
.barrido { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(to bottom, transparent 0%, transparent 44%, rgba(255,226,182,.42) 50%, transparent 56%, transparent 100%); background-size: 100% 300%; background-repeat: no-repeat; }
.barrido.activo { animation: luz 1.5s cubic-bezier(.6,0,.3,1) both; }
@keyframes luz { 0% { background-position: 0 100%; opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { background-position: 0 0; opacity: 0; } }
.giro-video.visible { opacity: 1; transition: opacity .2s; }
.franjas { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.escenario.girando .franjas, .escenario.acercando .franjas { display: none; }
.franjas-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.franja { pointer-events: auto; cursor: pointer; outline: none; }
.franja polygon { fill: rgba(255,255,255,.001); stroke: transparent; stroke-width: 1.5; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.franja:hover polygon, .franja:focus-visible polygon, .franja:active polygon { fill: rgba(201,164,106,.3); stroke: var(--acento); stroke-width: 2.5; }
.franja-etq { position: absolute; transform: translate(-50%, -50%); opacity: 0; transition: opacity .2s; font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: rgba(24,24,26,.78); border: 1px solid rgba(255,255,255,.22); white-space: nowrap; pointer-events: none; }
.franja-etq.ver { opacity: 1; }
.pista-giro { position: absolute; z-index: 20; left: 50%; top: calc(var(--seg-top) + 54px); transform: translateX(-50%); margin: 0; padding: 5px 14px; border-radius: 999px; font-size: 12px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.pista-giro.oculta { opacity: 0; }
.nombre-fijo { position: absolute; z-index: 20; top: calc(var(--seg-top) + 6px); left: 50%; transform: translateX(-50%); font-family: var(--f-titulos); font-size: 24px; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.6); pointer-events: none; }
.portada .menu { top: calc(var(--seg-top) + 6px); }

/* Barra de niveles */
.niveles { position: absolute; z-index: 20; right: calc(var(--seg-right) + 10px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; padding: 5px; border-radius: 999px; }
.nivel-bt { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; text-decoration: none; font-weight: 600; font-size: 14px; }
.nivel-bt.activo { background: var(--acento); color: var(--sobre-acento); }
.niveles.horizontal { top: calc(var(--seg-top) + 8px); left: 50%; right: auto; transform: translateX(-50%); flex-direction: row; }
.nivel-bt:hover:not(.activo) { background: rgba(255,255,255,.12); }

/* Controles inferiores de la portada */
.inferior { position: absolute; z-index: 20; left: calc(var(--seg-left) + 10px); right: calc(var(--seg-right) + 10px); bottom: calc(var(--seg-bottom) + 14px); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; pointer-events: none; }
.inferior > * { pointer-events: none; }
.inferior button { pointer-events: auto; }
.fila-abajo { display: flex; gap: 8px; width: 100%; justify-content: space-between; align-items: center; }
.fila-abajo .segmentos { pointer-events: auto; }
.girar span { white-space: nowrap; }
.segmentos { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px; }
.seg { min-height: 40px; min-width: 56px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--texto); font-weight: 500; }
.seg.activo { background: var(--acento); color: var(--sobre-acento); }

/* Nivel */
.nivel { background: var(--fondo); }
.planta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(100vw, calc(100dvh * var(--pw) / var(--ph))); aspect-ratio: var(--prop); isolation: isolate; }
.planta::before { content: 'Cargando…'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--suave); }
.planta.falta::before { content: 'Este plano todavía no está disponible.'; text-align: center; padding: 20px; }
.planta-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* Fondo de la planta: entorno aéreo detrás, difuminado y oscurecido hacia los bordes. */
.planta-fondo { position: absolute; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }
.planta-fondo.listo { opacity: 1; }
.planta-fondo img { width: 100%; height: 100%; object-fit: fill; filter: blur(3px) brightness(.36) saturate(.8); }
.orient { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; padding: 3px 10px; border-radius: 999px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--texto); background: rgba(24,24,26,.6); border: 1px solid rgba(255,255,255,.16); white-space: nowrap; pointer-events: none; }
/* fuera de la caja, en el espacio libre entre la planta y la barra de niveles o el pie */
.orient-arriba { top: -30px; }
.orient-abajo { bottom: -30px; }
.planta.entrando { animation: planta-entra .8s cubic-bezier(.2,.75,.25,1) both; }
.planta.saliendo { animation: planta-sale .38s cubic-bezier(.55,0,.8,.3) both; }
@keyframes planta-entra { from { transform: translate(-50%, -50%) perspective(1400px) rotateX(58deg) scale(.78); opacity: 0; } 35% { opacity: 1; } to { transform: translate(-50%, -50%) perspective(1400px) rotateX(0) scale(1); opacity: 1; } }
@keyframes planta-sale { from { transform: translate(-50%, -50%) perspective(1400px) rotateX(0) scale(1); opacity: 1; } to { transform: translate(-50%, -50%) perspective(1400px) rotateX(50deg) scale(.8); opacity: 0; } }
.unidad { position: absolute; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: transparent; overflow: hidden; }
.unidad { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.unidad:hover, .unidad:focus-visible, .unidad.elegida, .unidad.resaltada { border-color: var(--acento); border-width: 2px; box-shadow: 0 0 0 4px rgba(201,164,106,.18); }
.unidad.resaltada .capa-estado { opacity: .75; }
.capa-estado { position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .55; transition: opacity .2s; }
.sin-color .capa-estado { opacity: 0; }
.etq { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 2px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.etq b { font-family: var(--f-titulos); font-size: 30px; font-weight: 600; line-height: 1; }
.etq small { font-size: 12px; }
.sin-color .etq small { opacity: 0; }
.pie-nivel { position: absolute; z-index: 20; left: calc(var(--seg-left) + 10px); right: calc(var(--seg-right) + 64px); bottom: calc(var(--seg-bottom) + 12px); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; }
.pie-nivel > * { pointer-events: auto; }
.recorrido-nivel { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.recorrido-nivel .chips { max-width: 100%; }
.linea-nivel { margin: 0; padding: 6px 12px; border-radius: 12px; font-size: 13px; }
.fila-nivel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.interruptor .chip-sw { width: 30px; height: 18px; border-radius: 999px; background: var(--linea); position: relative; flex: none; }
.interruptor .chip-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--texto); transition: transform .2s; }
.interruptor.activo .chip-sw { background: var(--acento); }
.interruptor.activo .chip-sw::after { transform: translateX(12px); }
.leyenda { display: flex; gap: 10px; padding: 8px 12px; border-radius: 999px; font-size: 12px; }
.leyenda i, .estado i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.estado { display: inline-flex; align-items: center; font-size: 13px; }
/* Celular: en la planta, la barra de niveles va horizontal arriba y la planta queda entre la barra
   y el pie, para que ningún control tape las unidades (revisión 2026-11-20, a 375 × 812). */
@media (max-width: 899px) {
  .nivel { --alto-cab: calc(var(--seg-top) + 146px); --alto-pie: calc(var(--seg-bottom) + 178px); }
  .nivel .niveles { top: calc(var(--seg-top) + 62px); }
  .nivel .planta { top: calc(var(--alto-cab) + (100dvh - var(--alto-cab) - var(--alto-pie)) / 2);
    width: min(calc(100vw - 16px), calc((100dvh - var(--alto-cab) - var(--alto-pie)) * var(--pw) / var(--ph))); }
  .nivel .pie-nivel { right: calc(var(--seg-right) + 10px); }
  .nivel.con-360 { --alto-pie: calc(var(--seg-bottom) + 228px); } /* terraza: dos líneas de texto más los chips del 360 */
}

/* Tarjetas de unidad (panel lateral) */
.tarjeta-cuerpo { display: flex; flex-direction: column; gap: 5px; }
.tj-cab { display: flex; align-items: center; gap: 12px; }
.tj-cod { font-family: var(--f-titulos); font-size: 34px; font-weight: 600; line-height: 1; }
.tj-tipo { font-weight: 600; margin-top: 4px; }
.tj-sup { color: var(--acento); }
.acciones { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.acciones .bt { flex: 1 1 120px; }
.tj-lateral { padding: 16px; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--superficie-2); transition: border-color .2s, background .2s; }
.tj-lateral.resaltada { border-color: var(--acento); background: #323036; }

/* Unidad */
.unidad-cab { position: absolute; z-index: 30; top: var(--arriba); left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: center; }
.unidad-cab .atras, .unidad-cab .menu { top: 0; }
.unidad-titulo { font-size: 15px; }
.unidad-titulo b { font-family: var(--f-titulos); font-size: 24px; margin-right: 4px; }
.unidad-titulo span { color: var(--suave); }
.unidad-desliza { position: absolute; top: calc(var(--arriba) + 52px); left: 0; right: 0; bottom: calc(var(--seg-bottom) + 64px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.sec-axo { position: relative; height: 100%; min-height: 300px; display: flex; flex-direction: column; }
.axo-marco { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse 70% 55% at 50% 48%, #2a2a2f 0%, #202024 45%, var(--fondo) 80%); }
.axo-marco::after { content: ''; position: absolute; left: 22%; right: 22%; top: 58%; height: 12%; background: radial-gradient(ellipse at center, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 70%); filter: blur(8px); pointer-events: none; z-index: 0; }
.axo-chips { padding: 6px calc(var(--seg-left) + 10px) 0; }
.bajar-ficha { align-self: center; margin: 8px 0 6px; min-height: 36px; font-size: 13px; padding: 0 14px; }
.bajar-ficha svg { width: 18px; height: 18px; }
.sec-ficha { max-width: 680px; margin: 0 auto; padding: 8px 0 24px; }
.ficha-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); margin-top: 12px; }
.chips.envolver { flex-wrap: wrap; overflow: visible; }
.unidad-pie { position: absolute; z-index: 30; left: calc(var(--seg-left) + 10px); right: calc(var(--seg-right) + 10px); bottom: calc(var(--seg-bottom) + 8px); }
.axo-caja { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; width: 100%; height: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.axo-caja::before { content: 'Cargando…'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--suave); z-index: 0; }
.axo-caja.falta::before { content: 'La axonométrica todavía no está disponible.'; text-align: center; padding: 20px; }
.axo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.axo-img[hidden] { display: none; }
.arrastrable { cursor: grab; }
.pista { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; font-size: 13px; transition: opacity .3s; white-space: nowrap; z-index: 2; }
.pista.oculta { opacity: 0; }
/* Etiqueta de ambiente: punto dentro del ambiente, línea y nombre arriba (o abajo, alternando). */
.punto { position: absolute; width: 0; height: 0; z-index: 3; text-decoration: none; }
.punto[hidden] { display: none; }
.punto i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--acento); border: 3px solid rgba(24,24,26,.85); box-shadow: 0 0 0 5px rgba(201,164,106,.25); }
.punto-linea { position: absolute; left: -.5px; bottom: 9px; width: 1px; height: 26px; background: rgba(238,233,225,.75); }
.punto-nombre { position: absolute; left: 0; bottom: 35px; transform: translateX(-50%); padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; background: rgba(24,24,26,.82); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.punto.bajo .punto-linea { bottom: auto; top: 9px; }
.punto.bajo .punto-nombre { bottom: auto; top: 35px; }
.punto::before { content: ''; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; }
.punto:hover .punto-nombre, .punto:focus-visible .punto-nombre { background: var(--acento); color: var(--sobre-acento); border-color: var(--acento); }
@media (max-width: 899px) {
  .punto i { left: -7px; top: -7px; width: 14px; height: 14px; border-width: 2px; box-shadow: 0 0 0 4px rgba(201,164,106,.25); }
  .punto-linea { bottom: 7px; height: 18px; }
  .punto-nombre { bottom: 25px; padding: 3px 8px; font-size: 12px; }
  .punto.bajo .punto-linea { top: 7px; }
  .punto.bajo .punto-nombre { top: 25px; }
}

/* Chips de ambientes */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; background: rgba(24,24,26,.6); border: 1px solid rgba(255,255,255,.2); font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip.activo { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }

/* Ficha y galería */
.ficha { padding: 14px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.tabla { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 14px; }
.tabla td { padding: 8px 4px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla .num { white-space: nowrap; text-align: right; font-weight: 600; }
.tabla td.suave { font-size: 12px; }
.datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.datos dt { color: var(--suave); }
.datos dd { text-align: right; }
/* 360 */
.v360 { background: var(--fondo); }
.pano { position: absolute; inset: 0; }
.pano .pnlm-container { background: transparent !important; }
.pano .pnlm-load-box, .pano .pnlm-error-msg, .pano .pnlm-about-msg, .pano .pnlm-controls-container, .pano .pnlm-lbox { display: none !important; }
.cargando { position: absolute; inset: 0; display: grid; place-items: center; background: var(--fondo); color: var(--suave); z-index: 2; text-align: center; padding: 24px; transition: opacity .4s; }
.cargando.oculto { opacity: 0; pointer-events: none; }
.cargando.error { color: var(--texto); }
.v360 .atras { z-index: 10; }
.rotulo-360 { position: absolute; z-index: 10; top: var(--arriba); left: calc(var(--seg-left) + 62px); margin: 0; height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.giroscopio { position: absolute; z-index: 10; right: calc(var(--seg-right) + 10px); top: calc(var(--seg-top) + 6px); }
.giroscopio.activo { background: var(--acento); color: var(--sobre-acento); }
.abajo-360 { position: absolute; z-index: 10; left: calc(var(--seg-left) + 10px); right: calc(var(--seg-right) + 10px); bottom: calc(var(--seg-bottom) + 14px); }

/* Modales */
.modal { position: fixed; inset: 0; z-index: 110; background: rgba(8,8,9,.6); display: flex; align-items: flex-end; justify-content: center; }
.hoja { width: 100%; max-width: 520px; max-height: 85dvh; display: flex; flex-direction: column; background: var(--superficie); border: 1px solid var(--linea); border-radius: 22px 22px 0 0; padding: 14px 18px calc(var(--seg-bottom) + 18px); animation: sube .25s ease; }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hoja-cab h2 { font-family: var(--f-titulos); font-size: 28px; font-weight: 600; }
.hoja-cuerpo { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.hoja h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); margin-top: 8px; }
.creditos { padding-left: 18px; font-size: 12px; color: var(--suave); display: flex; flex-direction: column; gap: 6px; }
.mensaje { margin: 0; padding: 12px 14px; border-left: 3px solid var(--acento); background: var(--superficie-2); border-radius: 8px; }
.largo { font-size: 14px; }

/* Escritorio: imagen vertical al centro y panel de datos a la derecha */
@media (min-width: 900px) {
  .pantalla { display: grid; grid-template-columns: 380px 1fr; }
  .pantalla.sin-lateral { grid-template-columns: 1fr; }
  .vista { position: relative; inset: auto; min-height: 0; }
  .lateral { order: -1; display: flex; flex-direction: column; gap: 12px; padding: 70px 26px 28px; background: var(--superficie); border-right: 1px solid var(--linea); overflow-y: auto; }
  .lateral h2 { font-family: var(--f-titulos); font-size: 34px; font-weight: 600; line-height: 1.05; }
  /* planta entre la barra de niveles (arriba) y el pie, con lugar para los rótulos de orientación */
  .nivel { --alto-cab: calc(var(--seg-top) + 104px); --alto-pie: calc(var(--seg-bottom) + 100px); }
  .nivel .planta { top: calc(var(--alto-cab) + (100% - var(--alto-cab) - var(--alto-pie)) / 2);
    height: calc(100% - var(--alto-cab) - var(--alto-pie)); width: auto; }
  .solo-celular { display: none !important; }
  .rotulo { left: calc(var(--seg-left) + 26px); }
  .lateral .nombre-grande { font-size: 56px; }
  .lateral h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); margin-top: 14px; }
  .lista-niveles { display: flex; flex-direction: column; gap: 8px; }
  .lista-niveles .bt { justify-content: flex-start; }
  .vista.entrada { position: absolute; inset: 0; }
}
@media (min-width: 900px) {
  .pantalla:has(.entrada) { display: block; }
  .pantalla:has(.v360) { display: block; }
  .pantalla:has(.entrada) .vista, .pantalla:has(.v360) .vista { position: absolute; inset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Prototipo 3D de A (#/unidad/A/3d, BORRADOR del loop del 2026-11-21) */
.v3d { position: absolute; inset: 0; touch-action: none; background: radial-gradient(ellipse 70% 55% at 50% 48%, #2a2a2f 0%, #202024 45%, var(--fondo) 80%); }
.v3d canvas { display: block; width: 100%; height: 100%; }
.titulo-3d { margin: 0; font-size: 15px; color: var(--texto); }
.v3d-estado { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--suave); z-index: 2; }
.v3d-repetir { position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; }
@media (min-width: 900px) { .pantalla.p3d { display: block; } .pantalla.p3d .vista { position: absolute; inset: 0; } }
/* Botón discreto de alta calidad del 3D (Ulises, 2026-11-21): chico, en la esquina, casi transparente */
.v3d-hd { position: absolute; right: calc(12px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2; padding: 4px 8px; font-size: 11px; letter-spacing: .04em; opacity: .45; background: transparent; border: 1px solid currentColor; border-radius: 6px; color: var(--suave); }
.v3d-hd:hover, .v3d-hd.activo { opacity: .8; }
/* 3D dentro de la página de la unidad A: el arrastre vertical sigue bajando a la ficha */
.v3d.v3d-unidad { touch-action: pan-y; background: none; z-index: 1; }
.marco-3d .v3d-repetir { bottom: 64px; }
.marco-3d .v3d-hd { bottom: 70px; }
