/* ANALYTICS keeps the existing HUD column; its mobile hand inspector may
   use the whole visible HOME stage, including letterboxed viewports. */
@media (max-width:920px) and (max-height:500px) and (orientation:landscape),
       (max-width:600px) and (orientation:portrait) {
  #profile-v2-root .profile-v2-shell > .profile-v2-analysis-view {
    position:relative;
    min-width:0;
    max-width:100%;
  }
  #profile-v2-root .profile-v2-shell .profile-v2-analysis-body {
    min-width:0;
    max-width:100%;
    overflow-x:hidden;
  }
  #profile-v2-root .profile-v2-shell .profile-v2-range-view.is-detail-open {
    position:static;
  }
  #profile-v2-root .profile-v2-shell .profile-v2-range-view.is-detail-open::before {
    position:fixed;
    inset:auto;
    left:calc((100vw - min(var(--profile-v2-home-width,100vw),100vw)) / 2);
    top:calc((100dvh - min(var(--profile-v2-home-height,100dvh),100dvh)) / 2);
    width:min(var(--profile-v2-home-width,100vw),100vw);
    height:min(var(--profile-v2-home-height,100dvh),100dvh);
  }
  #profile-v2-root .profile-v2-shell .profile-v2-analysis-view .profile-v2-range-view.is-detail-open .profile-v2-range-details:not(.is-placeholder) {
    --inspect-home-width:min(var(--profile-v2-home-width,100vw),100vw);
    --inspect-home-height:min(var(--profile-v2-home-height,100dvh),100dvh);
    --inspect-left-gap:max(8px,env(safe-area-inset-left));
    --inspect-right-gap:max(8px,env(safe-area-inset-right));
    --inspect-top-gap:max(6px,env(safe-area-inset-top));
    --inspect-bottom-gap:max(6px,env(safe-area-inset-bottom));
    position:fixed;
    inset:auto;
    left:calc((100vw - var(--inspect-home-width)) / 2 + var(--inspect-left-gap));
    top:calc((100dvh - var(--inspect-home-height)) / 2 + var(--inspect-top-gap));
    width:calc(var(--inspect-home-width) - var(--inspect-left-gap) - var(--inspect-right-gap));
    max-width:none;
    height:calc(var(--inspect-home-height) - var(--inspect-top-gap) - var(--inspect-bottom-gap));
    max-height:none;
    box-sizing:border-box;
    min-width:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    touch-action:pan-y;
    overflow-wrap:anywhere;
  }
}
