/* Nemo V2 Fold/mobile stability override.
   Keep the room stage in normal document flow; never allocate it from the
   leftover height after analysis controls and tile catalog are laid out. */
@media (max-width:1100px){
  html:has(body.designer-active),
  body.designer-active{overflow-x:hidden;overflow-y:auto;height:auto;min-height:100%;}
  .designer-mode{
    height:auto!important;
    min-height:calc(100dvh - 66px);
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    grid-template-areas:"room" "catalog"!important;
    align-content:start;
    overflow:visible!important;
  }
  .designer-mode .workspace{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:8px 10px 22px;
  }
  .designer-mode .editor,
  .designer-mode .result{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .designer-mode .canvas-shell{
    display:grid;
    place-items:center;
    width:100%;
    height:auto!important;
    min-height:clamp(230px,68vw,560px)!important;
    max-height:none!important;
    aspect-ratio:4 / 3;
    overflow:hidden;
  }
  .designer-mode .canvas-shell canvas{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
  }
  .designer-mode .products{
    grid-area:catalog;
    height:auto!important;
    min-height:154px;
    max-height:none!important;
    overflow-x:auto;
    overflow-y:hidden;
  }
}
@media (min-width:901px) and (max-width:1100px){
  .designer-mode .canvas-shell{min-height:clamp(300px,52vw,560px)!important;}
}
@media (max-width:1100px){
  body.designer-active.fold-resizing .canvas-shell,
  body.designer-active.fold-resizing .result-stage{
    height:auto!important;
    min-height:clamp(230px,68vw,560px)!important;
    aspect-ratio:4 / 3;
  }
}
