03 · Popover API + Anchor positioning
Tethered, with no positioning library
The popover lives in the top layer, light-dismisses on outside click or Esc, and uses position-area to stay attached to its button. Scroll so the button sits near the top of the screen — the popover flips itself.
Positioned with position-anchor and position-try-fallbacks: flip-block.