The dropdown panel only closed through its own X button. Escape already
dismissed it, so the missing pointer equivalent left the panel stuck open
over the page after a stray tap.
Close it on any click landing outside the panel and outside the labels that
toggle it. Both early returns are load-bearing. A label forwards a synthetic
click to its checkbox, so without skipping the input the menu closes in the
same gesture that opened it. And without skipping the opener, opening then
closing with the hamburger leaves the panel open, because this handler and
the label's default action cancel each other out.
The fullscreen panel needs no special case. It covers the viewport, so
every click lands inside it and the handler stays inert.
The submenu panel carried both `pt-2` and `p-5`. Tailwind emits shorthand
utilities before their longhand counterparts, so `padding-top` resolved to
`0.5rem` while the other three sides stayed at `1.25rem`, regardless of the
order the classes appear in the markup. The first submenu entry sat flush
against the top edge.
This went unnoticed while the panel was translucent. v3 made it opaque, which
draws the edge and exposes the imbalance.
Drop `pt-2` so the panel keeps the uniform `p-5` it was styled for. No new
utility classes, so the compiled stylesheet is unchanged.