/* Hekatan Struct en el CELULAR (web pública: workspace/index.html → ../struct_movil.css; el APK la toma de ahí).
   Antes: pantalla partida a la mitad (vertical: modelo abajo y paneles arriba; horizontal: modelo a la izquierda) → el modelo nunca se veía completo.
   Ahora, como Excalidraw / tldraw: el modelo ocupa TODA la pantalla; los paneles salen como hoja inferior (☰) y la línea de comandos (⌨) solo si se piden.
   27-nov-2026 (Jorge: «sobresale y no se ve», A15 412×915): medido con getBoundingClientRect en vertical y horizontal → barra de arriba con
   7 botones fuera de la pantalla (Diseño…Franjas), barra de estado con SNAP/ORTO/POLAR/OSNAP fuera, línea de comandos con la caja de texto
   en x = 576 (fuera), botonera de cámara en x = −20, menús 4 px fuera, y el panel ☰ NO salía abajo: la hoja «hk-cad-hoja» de Struct
   (body.hk-cad #settings {top:30px!important}) tiene la MISMA especificidad y va después → ganaba. Por eso aquí todo va con «html body». */
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  html, body { overflow: hidden !important; max-width: 100vw !important; overscroll-behavior: none; }
  /* ── barra de arriba: 40 px (dedo) y se DESLIZA en horizontal, nada queda fuera ── */
  html body #hk-cad-tit { height: 40px !important; overflow-x: auto !important; overflow-y: hidden !important; flex-wrap: nowrap !important;
    gap: 6px !important; padding: 0 6px !important; padding-left: max(6px, env(safe-area-inset-left)) !important; padding-right: max(6px, env(safe-area-inset-right)) !important;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
  html body #hk-cad-tit::-webkit-scrollbar { display: none; }
  html body #hk-cad-tit > *, html body #hk-cad-tit .qa, html body #hk-cad-tit #hk-menus, html body #hk-cad-tit .der { flex: none !important; }
  html body #hk-cad-tit .der { margin-left: 4px !important; }
  html body #hk-cad-tit .qa button { width: 34px !important; height: 34px !important; font-size: 16px !important; }
  html body #hk-cad-tit button.piel, html body #hk-cad-tit #hk-menus button { min-height: 34px !important; font-size: 13px !important; }
  html body #hk-cad-tit .doc { display: none !important; }
  /* menús de la barra (Análisis, Diseño, Exportar, Fundamentos): dentro de la pantalla y con scroll propio */
  html body [id^="hk-"][id$="-menu"] { max-width: calc(100vw - 8px) !important; max-height: calc(100dvh - 48px) !important; overflow-y: auto !important; box-sizing: border-box !important; }

  /* ── el modelo, a pantalla completa debajo de la barra de 40 px ── */
  /* «html body» le gana también a la regla de Struct para modelos abiertos por enlace (html.hk-enlace #viewer { height: 50vh − 31px !important }) */
  html body #viewer, html.hk-enlace body #viewer { position: fixed !important; top: 40px !important; bottom: 0 !important; left: 0 !important; right: 0 !important; width: 100vw !important; height: calc(100dvh - 40px) !important; }
  html body #hk-ribbon-abrir { top: 46px !important; }

  /* ── barra de DIBUJO (selección, nudo, línea, polilínea, rectángulo…): Struct la ESCONDE en ≤ 600 px
     (barraRapida.ts: @media (max-width:600px){#hk-barra{display:none!important}}) → en vertical no se podía dibujar
     sin teclear (Jorge, 27-nov-2026: «ajústala a la pantalla del móvil»). Aquí va como tira deslizable de 44 px bajo la
     barra de arriba, a todo lo ancho, con botones de 36 px (dedo). En horizontal estaba en x = 545 con 196 px de ancho. */
  html body #hk-barra.visible, html body.hk-revit-on #hk-barra.visible { display: flex !important; position: fixed !important; top: 40px !important; left: 0 !important; right: 0 !important;
    width: 100vw !important; max-width: 100vw !important; height: 44px !important; box-sizing: border-box !important; padding: 4px 6px !important; gap: 4px !important;
    overflow-x: auto !important; overflow-y: hidden !important; flex-wrap: nowrap !important; touch-action: pan-x; border-radius: 0 !important; z-index: 96 !important;
    background: #0b1220 !important; border: none !important; border-bottom: 1px solid #1e293b !important; scrollbar-width: none; }
  html body #hk-barra::-webkit-scrollbar { display: none; }
  html body #hk-barra button { width: 36px !important; height: 36px !important; flex: none !important; border-radius: 8px !important; font-size: 12px !important; }
  html body #hk-barra button svg { width: 20px !important; height: 20px !important; }
  html body #hk-barra .sep { height: 26px !important; }
  /* UNA SOLA FILA arriba (30-nov-2026, Jorge: «en el celular manda el DIBUJO, no los menús»): struct_movil.js mete la barra de
     dibujo DENTRO de la barra de arriba (#hk-cad-tit) → una tira de 40 px que se desliza: herramientas primero, luego archivo/Menú/Análisis.
     Antes eran dos barras (40 + 44 px). */
  html body #hk-cad-tit > #hk-barra, html body.hk-revit-on #hk-cad-tit > #hk-barra { position: static !important; display: flex !important; flex: none !important;
    width: auto !important; max-width: none !important; height: 38px !important; padding: 0 4px 0 0 !important; margin: 0 !important; gap: 2px !important;
    overflow: visible !important; background: transparent !important; border: none !important; border-right: 1px solid #1e293b !important; border-radius: 0 !important;
    box-shadow: none !important; transform: none !important; z-index: auto !important; }
  html body #hk-cad-tit > #hk-barra button { width: 34px !important; height: 34px !important; }
  html body #hk-cad-tit > #hk-barra button svg { width: 18px !important; height: 18px !important; }
  /* «⚡ Acceso rápido»: tapaba la cruceta de la cámara (horizontal) → encima de ella */
  html body #hk-acceso-boton { left: 8px !important; right: auto !important; top: auto !important; bottom: 186px !important; font-size: 13px !important; padding: 6px 10px !important; }
  html body.hkm-cmd #hk-acceso-boton, html body.hkm-panel #hk-acceso-boton { display: none !important; }
  /* leyenda columna / viga / diagonal: en horizontal (> 700 px) salía grande EN MEDIO del modelo → fuera en el celular */
  html body #hk-leyenda-tipos { display: none !important; }

  /* ── panel ☰: hoja inferior en vertical, hoja lateral en horizontal; con scroll interno ── */
  html body:not(.hkm-panel) #settings, html body:not(.hkm-panel) #hk-pane-host { display: none !important; }
  html body.hkm-panel #hk-pane-host { display: none !important; }
  /* 📁 la hoja de EJEMPLOS Y MODELO (#hk-pane-host: menú «¿Con qué vas a trabajar?», ejemplos, parámetros), igual que la de ☰ */
  html body.hkm-pane.hkm-pane #hk-pane-host { display: block !important; position: fixed !important; top: auto !important; bottom: 26px !important; left: 0 !important;
    right: 0 !important; width: auto !important; max-width: 100vw !important; min-width: 0 !important; height: 40dvh !important; max-height: 40dvh !important;
    overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; transform: none !important; z-index: 450 !important;
    opacity: 1 !important; pointer-events: auto !important; border-radius: 14px 14px 0 0 !important; box-shadow: 0 -6px 24px #0008 !important;
    box-sizing: border-box !important; font-size: 13px !important; }
  html body.hkm-pane #hk-pane-host .tp-rotv, html body.hkm-pane #hk-pane-host .tp-dfwv { width: auto !important; max-width: 100% !important; }
  html body.hkm-pane #hk-nav-camara { display: none !important; }
  body.hkm-pane #hkm-fab { bottom: calc(40dvh + 36px); }
  html body.hkm-panel #settings { position: fixed !important; top: auto !important; bottom: 26px !important; left: 0 !important; right: 0 !important;
    width: auto !important; max-width: 100vw !important; min-width: 0 !important; height: 40dvh !important; max-height: 40dvh !important;
    overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; transform: none !important; z-index: 450 !important;
    opacity: 1 !important; pointer-events: auto !important;          /* en horizontal Struct lo «esconde» con estilo en línea: translateX(−115%), opacity 0, sin toques */
    border-radius: 14px 14px 0 0 !important; box-shadow: 0 -6px 24px #0008 !important; box-sizing: border-box !important;
    padding-bottom: env(safe-area-inset-bottom) !important; }
  /* con la línea de comandos abierta, la hoja termina ENCIMA de ella (si no, le tapaba las últimas filas) */
  html body.hkm-panel.hkm-cmd #settings { bottom: var(--hk-cmd-hueco, 66px) !important; height: calc(40dvh - 40px) !important; max-height: calc(40dvh - 40px) !important; }
  html body #settings .tp-rotv, html body #settings .tp-dfwv { width: auto !important; max-width: 100% !important; }

  /* ── línea de comandos: a todo lo ancho, el aviso largo ENVUELVE y la caja de texto queda en pantalla ── */
  html body:not(.hkm-cmd) #hk3-cmdline { display: none !important; }
  html body #hk3-cmdline { left: 0 !important; right: 0 !important; width: auto !important; max-width: 100vw !important; transform: none !important; box-sizing: border-box !important; }
  html body #hk3-cmdline > div:last-child { flex-wrap: wrap !important; row-gap: 3px !important; }
  html body #hk3-cmd-prompt { white-space: normal !important; flex: 1 1 calc(100% - 40px) !important; min-width: 0 !important; font-size: 11.5px !important; line-height: 1.25 !important; }
  html body #hk3-cmd-ops { white-space: normal !important; min-width: 0 !important; }
  html body #hk3-cmd-wrap { flex: 1 1 100% !important; min-width: 0 !important; }
  html body #hk3-cmd-input { width: 100% !important; height: 34px !important; font-size: 16px !important; }          /* 16 px: Android no hace zoom al enfocar */
  html body #hk3-cmd-hist { max-height: 40px !important; }

  /* ── barra de estado: se DESLIZA en horizontal (SNAP/ORTO/POLAR/OSNAP quedaban fuera) ── */
  html body #hk-statusbar { overflow-x: auto !important; overflow-y: hidden !important; flex-wrap: nowrap !important; scrollbar-width: none; max-width: 100vw !important; box-sizing: border-box !important; }
  html body #hk-statusbar::-webkit-scrollbar { display: none; }
  html body #hk-statusbar > * { flex: none !important; }
  html body #hk-statusbar-xyz { min-width: 0 !important; }
  html body #hk-statusbar-msg { flex: none !important; max-width: 60vw; }

  /* ── botonera de la cámara: Struct la pone a right:332px (sitio del panel derecho de escritorio) → en 412 px quedaba en x = −20 ── */
  html body #hk-nav-camara { left: 8px !important; right: auto !important; top: auto !important; bottom: 40px !important; }
  html body.hkm-cmd #hk-nav-camara { bottom: calc(var(--hk-cmd-hueco, 66px) + 10px) !important; }
  html body.hkm-panel #hk-nav-camara { display: none !important; }

  /* en el celular se DIBUJA en el Croquis; Struct queda para calcular y ver resultados → fuera lo que se encimaba sobre el modelo:
     cinta de Revit + panel Plantas/Alzados + burbuja «Modificar» (#hk-revit), «Cinta clásica», agente IA, grabar, gif, caja negra, secciones;
     y la ayuda de bienvenida, que habla de botones ⚙/🛠 que aquí no existen y tapaba el panel */
  #hk-revit, #hk-revit-toggle, #hk-agente-lanzador, #hk-agente-explicar, #hk-caja-negra-btn, #hk-grabar-btn, #hk-gif-btn, #hk-sec-btn, #hk-mobile-help,
  #hk-settings-toggle, #hk-pane-toggle { display: none !important; }          /* pestañas ⟩ ⟨ de los paneles de escritorio: aquí los abre ☰ */
  body:not(.hkm-panel) #hk-acceso { display: none !important; }          /* acceso rápido (Cargas, Dimensiones, Resultados): va con los paneles */
  html body.hkm-panel #hk-acceso { display: none !important; }           /* …y con el panel abierto se encimaba sobre él (en horizontal tapaba sus filas) */
  /* el aviso de estado del CAD tapaba la cruceta: arriba, bajo la barra de dibujo, y sin captar toques */
  html body #hk-cad-status { max-width: calc(100vw - 16px) !important; font-size: 11px !important; top: 46px !important; bottom: auto !important; left: 8px !important; right: auto !important; pointer-events: none !important; }
  /* leyendas, tablas y ventanas flotantes de Struct: nunca más anchas ni más altas que la pantalla */
  html body #legend { max-width: calc(100vw - 16px) !important; }
  html body #modal-results { max-width: 100vw !important; max-height: calc(100dvh - 50px) !important; box-sizing: border-box !important; }
  html body #hk-cota-tactil { max-width: calc(100vw - 8px) !important; }

  /* cotas automáticas (6 m, 3 m) y sus círculos: #hk-cotas-auto (z 120, en body) quedaba ENCIMA de la hoja ☰ porque #settings
     vive dentro de #viewer (z 1) → sus etiquetas y nudos se pintaban sobre las filas del panel (30-nov-2026, emulador) */
  html body.hkm-panel #hk-cotas-auto, html body.hkm-pane #hk-cotas-auto { display: none !important; }

  /* «📐 Diagrama 2D» (M, V, N del pórtico con sus valores): en el celular era una ventana de 381×562 con la cabecera más ancha
     que ella (el ✕ en x = 493, fuera) y con ☰/📁/⌨ y la hoja de ajustes encima. Jorge: «los RESULTADOS grandes, no los menús»
     → a pantalla completa bajo la barra de arriba, cabecera que envuelve, sin botones flotantes ni hojas (hkm-diag en struct_movil.js) */
  html body #hk-diagrama-2d { left: 0 !important; right: 0 !important; top: 40px !important; bottom: 26px !important; transform: none !important;
    width: 100vw !important; height: auto !important; max-height: none !important; border-radius: 0 !important; box-sizing: border-box !important; }
  html body #hk-diagrama-2d > div:first-child { flex-wrap: wrap !important; row-gap: 4px !important; gap: 6px !important; padding: 5px 8px !important; cursor: default !important; }
  html body #hk-diagrama-2d > div:first-child button { min-width: 36px !important; min-height: 32px !important; font-size: 15px !important; }
  html body #hk-diagrama-2d > svg { flex: 1 1 auto !important; height: auto !important; min-height: 0 !important; }
  /* «📈 Barra» (P, V2, M3 de la barra tocada): 165 px de ancho con gráficos de ~330 → medio fuera de la pantalla. Hoja inferior
     a todo lo ancho; el diagrama 2D se encoge arriba (hkm-barra) y sigue entero a la vista */
  html body #hk-diagrama-barra { left: 0 !important; right: 0 !important; width: 100vw !important; top: auto !important; bottom: 26px !important;
    max-height: 56dvh !important; overflow-y: auto !important; overflow-x: hidden !important; box-sizing: border-box !important; border-radius: 12px 12px 0 0 !important; }
  html body.hkm-barra #hk-diagrama-2d { bottom: calc(56dvh + 26px) !important; }
  body.hkm-diag #hkm-fab, body.hkm-diag #hk-nav-camara, body.hkm-diag #hk-acceso-boton { display: none !important; }

  /* ── botones flotantes ☰ y ⌨, abajo a la derecha, por encima de la barra de estado ── */
  #hkm-fab { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: calc(36px + env(safe-area-inset-bottom));
             z-index: 100000; display: flex; flex-direction: column; gap: 10px; }
  #hkm-fab button { width: 48px; height: 48px; border-radius: 50%; border: none; background: #1f3864; color: #fff; font-size: 22px; box-shadow: 0 3px 10px #0007; }
  #hkm-fab button.on { background: #0a84ff; }
  body.hkm-cmd #hkm-fab { bottom: calc(var(--hk-cmd-hueco, 66px) + 10px); }
  body.hkm-panel #hkm-fab { bottom: calc(40dvh + 36px); }
  body.hkm-panel.hkm-cmd #hkm-fab { bottom: calc(40dvh + var(--hk-cmd-hueco, 66px) - 30px); }
}
/* horizontal: la hoja va a la DERECHA (abajo solo cabían 4 filas) y los botones flotantes a su izquierda */
@media (max-height: 500px) and (orientation: landscape) {
  html body.hkm-pane.hkm-pane #hk-pane-host { top: 84px !important; bottom: 26px !important; left: auto !important; right: 0 !important;
    width: min(400px, 50vw) !important; height: auto !important; max-height: none !important; border-radius: 12px 0 0 0 !important; }
  body.hkm-pane #hkm-fab { right: calc(min(400px, 50vw) + 10px); bottom: calc(36px + env(safe-area-inset-bottom)); }
  html body.hkm-panel #settings, html body.hkm-panel.hkm-cmd #settings { top: 40px !important; bottom: 26px !important; left: auto !important; right: 0 !important;
    width: min(380px, 48vw) !important; height: auto !important; max-height: none !important; border-radius: 12px 0 0 0 !important;
    padding-right: env(safe-area-inset-right) !important; }
  html body.hkm-panel #hk3-cmdline { right: min(380px, 48vw) !important; }
  body.hkm-panel #hkm-fab, body.hkm-panel.hkm-cmd #hkm-fab { right: calc(min(380px, 48vw) + 10px); bottom: calc(36px + env(safe-area-inset-bottom)); }
  body.hkm-panel.hkm-cmd #hkm-fab { bottom: calc(var(--hk-cmd-hueco, 66px) + 10px); }
  #hkm-fab { flex-direction: row; }
}
@media (min-width: 601px) and (min-height: 501px) { #hkm-fab { display: none; } }

/* ── 1-dic-2026 (tras la Fase 2): el DIBUJO manda. Botones flotantes COMPACTOS y la cinta de Revit (Rejilla, Columna, Viga,
   Losa, Nivel, 3D) de vuelta en el celular SIN robar alto: sus botones entran al PRINCIPIO de la barra de arriba (que ya se
   desliza), su barra de opciones sale arriba solo cuando la herramienta la tiene, y del navegador de plantas solo ▼ ▲ y el
   nivel activo. Medido con tests/movil/encuadre_cotas.mjs e iso_movil.mjs. */
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  /* la cinta de Revit: visible otra vez (antes oculta entera), pero sin la caja que tapaba; ver struct_movil.js (hkmCinta) */
  html body #hk-revit { display: block !important; position: fixed !important; inset: 0 !important; pointer-events: none !important; z-index: 9000 !important; }
  html body.hkm-revit-off #hk-revit { display: none !important; }
  html body #hk-cad-tit > .rv-bar { position: static !important; display: flex !important; flex: none !important; gap: 1px !important; padding: 0 2px !important;
    margin: 0 4px 0 0 !important; border: none !important; border-right: 1px solid #1e3a4a !important; border-radius: 0 !important; box-shadow: none !important;
    background: transparent !important; pointer-events: auto !important; align-items: center !important; height: 38px !important; }
  html body #hk-cad-tit > .rv-bar .rv-b { min-width: 40px !important; height: 36px !important; padding: 1px 2px !important; font: 600 9px system-ui, sans-serif !important; color: #dbeafe; }
  html body #hk-cad-tit > .rv-bar .rv-b .ic { font-size: 15px !important; line-height: 16px !important; }
  html body #hk-cad-tit > .rv-bar .rv-sep { margin: 4px 2px !important; }
  html body.hkm-revit-off #hk-cad-tit > .rv-bar { display: none !important; }
  /* opciones de la herramienta (formulario de Rejilla, «En ejes», «Replicar nivel»): bajo la barra, envuelven, sin el texto largo */
  html body #hk-revit .rv-op { position: fixed !important; top: 42px !important; left: 4px !important; right: 4px !important; flex-wrap: wrap !important;
    white-space: normal !important; gap: 4px 6px !important; padding: 4px 6px !important; max-height: 40dvh !important; overflow-y: auto !important; font-size: 12px !important; }
  html body #hk-revit .rv-op > span.hkm-largo { display: none !important; }
  html body #hk-revit .rv-op input[type=text], html body #hk-revit .rv-op input[type=number] { height: 30px !important; font-size: 14px !important; }
  html body #hk-revit .rv-op button, html body #hk-revit .rv-op select { height: 32px !important; font-size: 13px !important; }
  /* plantas: solo ▼ ▲ y el nivel activo, arriba a la derecha */
  html body #hk-revit .rv-nav { position: fixed !important; right: 4px !important; left: auto !important; top: calc(44px + var(--hkm-op, 0px)) !important; width: 92px !important;
    padding: 3px !important; pointer-events: auto !important; }
  html body #hk-revit .rv-nav > :not(.rv-pisos):not(.rv-niv[data-z].on) { display: none !important; }
  html body #hk-revit .rv-nav .rv-pisos { margin: 0 0 2px !important; }
  html body #hk-revit .rv-nav .rv-pisos button { height: 30px !important; font-size: 15px !important; }
  html body #hk-revit .rv-nav .rv-niv { padding: 1px 3px !important; font-size: 10px !important; }
  html body #hk-revit .rv-nav .rv-niv .rv-x { display: none !important; }
  html body #hk-revit .rv-msg { display: none !important; }
  /* ⟳ 🔒 ↩ ↪: una FILA de botones de 34 px arriba a la izquierda (antes columna de 44 px: 194 px de alto sobre el dibujo) */
  html body #hk-tactil-botones { flex-direction: row !important; left: 4px !important; top: calc(44px + var(--hkm-op, 0px)) !important; gap: 4px !important; }
  html body #hk-tactil-botones button { width: 34px !important; height: 34px !important; font-size: 15px !important; border-radius: 8px !important; }
  /* cruceta de la cámara PLEGADA en un botón ✥ (2 dedos ya mueven y hacen zoom); se despliega encima de él */
  html body #hkm-cruceta { position: fixed; left: 6px; bottom: calc(32px + env(safe-area-inset-bottom)); z-index: 9500; width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid #1e3a4a; background: rgba(15,23,42,.92); color: #cdeefb; font: 600 18px system-ui, sans-serif; padding: 0; }
  html body #hkm-cruceta.on { background: #0e7490; border-color: #22d3ee; color: #fff; }
  html body:not(.hkm-cruceta) #hk-nav-camara { display: none !important; }
  html body #hk-nav-camara { grid-template-columns: repeat(3, 30px) !important; }
  html body #hk-nav-camara > * { width: 30px !important; height: 30px !important; }
  html body.hkm-teclado #hkm-cruceta, html body.hkm-diag #hkm-cruceta, html body.hkm-pane #hkm-cruceta, html body.hkm-panel #hkm-cruceta, html body.hk-ed-hoja #hkm-cruceta { display: none !important; }
  /* 📁 ☰ ⌨ algo más chicos */
  #hkm-fab { gap: 8px; }
  #hkm-fab button { width: 42px; height: 42px; font-size: 19px; }
}
/* en HORIZONTAL el alto es lo que falta: ⟳🔒↩↪ en COLUMNA a la izquierda y 📁☰⌨ en columna a la derecha → el modelo usa todo el alto */
@media (max-height: 500px) and (orientation: landscape) {
  html body #hk-tactil-botones { flex-direction: column !important; }
  html body #hkm-fab { flex-direction: column !important; }
}
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  /* «⚡ Acceso rápido» va con la cruceta: plegada ✥ = fuera (en horizontal quedaba sobre el dibujo) */
  html body:not(.hkm-cruceta) #hk-acceso-boton { display: none !important; }
}
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  /* fuera de #hk-revit los estilos de modoRevit.ts ya no la alcanzan: se repiten aquí (icono arriba, nombre abajo) */
  html body #hk-cad-tit > .rv-bar .rv-b { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
    background: transparent !important; border: 1px solid transparent !important; border-radius: 6px !important; box-shadow: none !important; cursor: pointer; }
  html body #hk-cad-tit > .rv-bar .rv-b .ta { display: none !important; }
  html body #hk-cad-tit > .rv-bar .rv-b.on { background: #0e7490 !important; border-color: #22d3ee !important; color: #fff !important; }
  html body #hk-cad-tit > .rv-bar .rv-sep { width: 1px !important; align-self: stretch !important; background: #1e3a4a !important; }
}
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  /* el aviso del CAD («Seleccioná un tool…») quedaba DEBAJO de la fila ⟳🔒↩↪ (APK, 1-dic-2026): va debajo de ella */
  html body #hk-cad-status { top: calc(86px + var(--hkm-op, 0px)) !important; }
}
@media (max-height: 500px) and (orientation: landscape) {
  html body #hk-cad-status { top: calc(46px + var(--hkm-op, 0px)) !important; left: 48px !important; max-width: calc(100vw - 170px) !important; }
}
/* ── 1-dic-2026, Jorge: «cuando está dividida la pantalla la plataforma debe verse completa del lado de arriba» ──
   teclado_movil.js encaja la plataforma en el hueco que deja la hoja; aquí se le quita lo que robaba sitio:
   · el aviso del CAD («🛠 CAD listo — seleccioná un tool. Inputs: …») ocupaba 3 líneas sobre la plataforma → UNA línea,
     y se apaga solo a los 5 s (vuelve con cada aviso nuevo; struct_movil.js, clase hkm-calla)
   · con una hoja abajo, 📁 ☰ ⌨ en FILA justo encima de ella (en columna robaban 142 px de alto al hueco) */
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  html body #hk-cad-status { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; padding: 3px 8px !important;
    line-height: 1.3 !important; transition: opacity .5s; }
  html body #hk-cad-status.hkm-calla { opacity: 0 !important; }
}
@media (max-width: 600px) and (orientation: portrait) {
  body.hkm-pane #hkm-fab, body.hkm-panel #hkm-fab { flex-direction: row; bottom: calc(40dvh + 32px); }
  body.hkm-panel.hkm-cmd #hkm-fab { bottom: calc(40dvh + var(--hk-cmd-hueco, 66px) - 30px); }
}
/* EDITAR con el dedo (1-dic-2026, Jorge: «si selecciono un vano se pueda editar»): la cota armada (luz de la viga, altura de
   piso) que sale al tocar la barra es un CAMPO GRANDE: se toca, se escribe la cifra y ✓/Enter */
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  html body.hk-ed-tactil .hk-ed-cota.armada { height: 44px !important; min-width: 86px !important; font-size: 20px !important; font-weight: 700 !important;
    border-width: 2px !important; z-index: 130 !important; }
}
/* ESCRIBIR UNA COTA (struct_movil.js): la hoja de propiedades y las demás cifras se apartan; la cota va a un campo grande fijo
   encima del teclado con su nombre; sin selección de texto ni menú de copiar en las cifras */
@media (max-width: 600px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  html body.hkm-escribe-cota #hk-ed-props { display: none !important; }
  html body .hk-ed-cota { -webkit-touch-callout: none !important; -webkit-tap-highlight-color: transparent; }
  html body.hkm-escribe-cota .hk-ed-cota:not(.hkm-cota-fija) { visibility: hidden !important; }
  html body .hk-ed-cota.hkm-cota-fija { position: fixed !important; left: 50% !important; top: auto !important; bottom: 12px !important;
    transform: translateX(-50%) !important; width: 190px !important; min-width: 190px !important; height: 54px !important; font: 700 26px Consolas, monospace !important;
    text-align: center !important; z-index: 100001 !important; display: block !important; visibility: visible !important; border-width: 3px !important;
    border-color: #fbbf24 !important; background: #0b1220 !important; color: #fff7d6 !important; box-shadow: 0 4px 18px #000a !important; }
  html body .hk-ed-cota.hkm-cota-fija::placeholder { color: #94a3b8; }
  #hkm-cota-rotulo { display: none; }
  html body.hkm-escribe-cota #hkm-cota-rotulo { display: block; position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 100001;
    background: rgba(11,18,32,.95); color: #fde68a; border: 1px solid #b45309; border-radius: 8px; padding: 4px 10px; font: 600 13px system-ui, sans-serif;
    white-space: nowrap; pointer-events: none; }
}
