/* r12b: мобильная Art — предпросмотр с результатом целиком помещается в экран */
@media (max-width:999px){
  body.art-r12 #image .grid>div:first-child,body.art-r12 #image .grid>div:first-child>.panel,body.art-r12 #image .preview{min-width:0;max-width:100%;box-sizing:border-box}
  body.art-r12 #image .preview{overflow:hidden}
  body.art-r12 #image .preview>img{max-width:100%!important;width:auto;height:auto;object-fit:contain}
  body.art-r12 .r12-tools{box-sizing:border-box;max-width:100%}
}
@media (max-width:650px){
  body.art-r12 #image.r12-has-result>.heading{display:none}
  body.art-r12 #image.r12-has-result .preview{min-height:0;height:auto}
  /* высота картинки = видимый экран минус шапка, метки, панель действий, подпись и нижняя навигация */
  body.art-r12 #image .preview>img{margin-top:40px;max-height:max(180px,calc(100vh - 340px))!important}
  @supports (height:100svh){
    body.art-r12 #image .preview>img{max-height:max(180px,calc(100svh - 340px - env(safe-area-inset-bottom,0px)))!important}
  }
}
