/* V3.121: keep panoramic UI inside the usable viewport, without clipping scrollable content. */
html,body{max-width:100%;overflow-x:clip}
.fxv2-main,.fxv2-world,.fxv2-hybrid,.fxv2-sheet-panel{min-width:0;max-width:100%;box-sizing:border-box}
.fxv2-sheet-panel :is(img,video){max-width:100%;height:auto}
.fxv2-sheet-panel iframe{max-width:100%;min-width:0}
.fxv2-sheet-panel :is(p,h1,h2,h3,a){overflow-wrap:break-word}
@media(max-width:760px){
 .fxv2-menu-shell{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px)}
 .fxv2-sheet-panel{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
 .fxv2-sheet-panel :is(button,a,input,select,textarea){touch-action:manipulation}
}
@media(max-height:480px) and (orientation:landscape){
 .fxv2-menu-shell{max-height:calc(100dvh - 8px);overflow-y:auto}
 .fxv2-sheet-panel{max-height:calc(100dvh - var(--v2-header-height, 0px) - var(--v2-footer-height, 0px));overflow-y:auto}
}
@media(prefers-reduced-motion:reduce){.fxv2-menu-shell,.fxv2-sheet-panel{scroll-behavior:auto}}

/* V3.122: pointer gestures stay on the panorama, not on native controls. */
.fxv2-world canvas, [data-fxv330-film-gesture]{touch-action:none;user-select:none;-webkit-user-select:none}
.fxv2-sheet-panel :is(a,button,input,textarea,select,[contenteditable="true"]){touch-action:manipulation}
@media (max-width:760px){
 .fxv2-sheet-panel iframe{display:block;max-width:100%}
 .fxv2-sheet-panel :is(pre,code){max-width:100%;overflow-x:auto}
}
