/* M13.5 · Responsive compartido PC / tablet / móvil */
:root{--ci-touch-target:44px}

/* La barra estable M13.4.2 se compacta sin desarmarse. */
@media (max-width:1500px){
  .cih-brand-copy strong{max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cih-title{min-width:260px}
  .cih-control span{font-size:11px}
}
@media (max-width:1199px){
  body:not(.ci-mobile) .cih-header{gap:5px;padding-inline:6px}
  body:not(.ci-mobile) .cih-brand-copy span{display:none}
  body:not(.ci-mobile) .cih-brand-copy strong{max-width:92px}
  body:not(.ci-mobile) .cih-title{min-width:190px}
  body:not(.ci-mobile) .cih-title small{font-size:8px}
  body:not(.ci-mobile) .cih-control{min-height:38px;padding-inline:9px}
  body:not(.ci-mobile) .cih-secondary-label{display:none}
  body:not(.ci-mobile) .magnet-panel{width:230px}
}

/* Móvil real usa /m/, pero si alguien abre index/pcfull en ancho chico no se rompe. */
@media (max-width:767px){
  body:not(.ci-mobile) .cih-header{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:nowrap}
  body:not(.ci-mobile) .cih-header::-webkit-scrollbar{display:none}
  body:not(.ci-mobile) .cih-brand{min-width:54px}
  body:not(.ci-mobile) .cih-brand-copy{display:none}
  body:not(.ci-mobile) .cih-title{min-width:170px;max-width:45vw}
  body:not(.ci-mobile) .cih-control{min-width:var(--ci-touch-target);min-height:var(--ci-touch-target)}
  body:not(.ci-mobile) .workspace{min-width:0}
}

/* Controles táctiles: no depender de hover ni targets pequeños. */
@media (pointer:coarse){
  button,.tool,.top-menu-trigger,.glyph-action{min-height:var(--ci-touch-target)}
  input[type="checkbox"]{min-width:20px;min-height:20px}
}


/* M13.5.1 · fallback real si la shell PC queda abierta en ancho móvil.
   No escala una PC de 980 px: deja que el documento mida el viewport. */
@media (max-width:767px){
  html,body,#app{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
  body:not(.ci-mobile) .workspace{width:100%!important;min-width:0!important}
}
