Death overlay no longer covers the settings menu

The death overlay sat at z-index 100 while the settings menu sat at
z-index 60, so a player who died and then opened the menu (or whose
respawn timing overlapped with opening the menu) would see the red
death curtain on top of every settings widget. Worse, the overlay
also applies `backdrop-filter: blur(2px)` which would have tinted the
menu visibly even if z-order had been fixed differently.

Fix: a single CSS rule
  body.menu-open #death { display: none; }
makes the menu and death overlays mutually exclusive whenever the
menu is open. The death overlay returns immediately when the menu is
closed (assuming the player is still dead). Verified live in the
running browser via the test harness:

  body.dead alone           → death visible (display: flex)
  body.dead + body.menu-open → death hidden  (display: none)
  body.menu-open removed     → death visible again

No JS changes needed — purely a stylesheet fix.
This commit is contained in:
Maximus Gorog 2026-05-24 12:07:15 -06:00
parent 5effb79f0a
commit 3187b9ca07

View file

@ -381,6 +381,12 @@
z-index: 100;
}
body.dead #death { display: flex; }
/* Settings menu always wins over the death overlay — when the player
pops the menu they need to interact with sliders / respawn /
settings, not stare at a red death curtain. The z-index alone
wouldn't be enough because the death overlay also has a
backdrop-filter that visibly tints anything underneath. */
body.menu-open #death { display: none; }
#death h1 {
font-size: 64px;
margin: 0;