Measure the popover in a hidden, out-of-flow state and position it in a layout effect, so opening it no longer grows the page for a frame. Centered (top/bottom) popovers are clamped to stay within the viewport. Also ignore /test and /.tmp. Co-Authored-By: Claude Opus 5.5 <[email protected]>