/* UMAKU.ID v1.0.9.1.1 — desktop initial grid stability + mobile full-image correction
   Desktop: disable deferred card layout sizing that can cause first-paint horizontal overflow.
   Mobile: keep approved full-image catalogue/FIT behavior; zoom remains a bounded pan viewport. */
@media (min-width:721px){
  .card{content-visibility:visible;contain-intrinsic-size:none}
}

@media (max-width:720px){
  html,body{max-width:100%;overflow-x:hidden}
  .detail{max-width:100vw;overflow-x:hidden}
  .shell,.grid,.card,.card-media,.dhero,.titleline,.gallery,.image-pane,.detail-content{min-width:0;max-width:100%}
  .card h3,.dtitle{max-width:100%;overflow-wrap:anywhere;word-break:normal}

  /* Mobile catalogue: show the complete source image instead of forcing 4:3 crop. */
  .card-media{display:block}
  .card-media img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;transform:none!important}

  /* FIT on mobile is content-sized: the whole photo determines viewer height. */
  .image-pane{height:auto;min-height:0}
  .image-scroll.fit{position:relative;inset:auto;width:100%;height:auto;display:block;overflow:hidden}
  .image-scroll.fit .viewer-img{display:block;width:100%!important;height:auto!important;max-width:100%;max-height:none;object-fit:contain;margin:0 auto}

  /* Zoom keeps the approved bounded 2-axis pan viewport. */
  .image-scroll.zoom{position:relative;inset:auto;width:100%;height:68vw;min-height:280px;max-height:72vh;overflow:auto}

  /* Keep controls inside the visible phone width. */
  .zoom-toolbar{max-width:calc(100% - 12px)}
}
