/* Marktstau on top of Survivor's HerpDerp skin (../css/style.css): the HUD reuses Survivor's
   pieces as they are (#hud, #topbar wood tab, .slot boxes, .banner, .panel) and the shared
   Puddlehold menu. Jersey 10 is sharp only at 56/3 px or twice that. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #3a2210; }
canvas#game { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; cursor: pointer; }

/* no XP bar in this game, so the tab sits at the very top */
#topbar { top: env(safe-area-inset-top, 0px); }
#topbar .tb { display: flex; align-items: center; gap: 6px; }
/* pixel icons on the 9 x 8 heart grid, 3 CSS px per art pixel like Turmstapler */
#topbar img.ico, #hearts img, #stars img { width: 27px; height: 24px; image-rendering: pixelated; }
#hearts { gap: 2px; }
#topbar span#leftLbl { color: var(--muted); }
/* phones: the status tab sits left of the music and menu buttons, never under them */
@media (max-width: 640px) {
  #topbar { left: calc(8px + env(safe-area-inset-left, 0px)); transform: none; max-width: calc(100vw - 124px); }
}
@media (max-width: 340px) { #topbar { gap: 6px; } #topbar span#leftLbl { display: none; } }
#hud .banner { top: calc(env(safe-area-inset-top, 0px) + 60px); bottom: auto; white-space: nowrap; }

/* bottom row: restart, the level's stars so far, hint. Survivor's slot boxes as buttons. */
#bottom {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  display: flex; align-items: center; gap: 14px;
}
#stars { display: flex; gap: 4px; }
#hud .tool { pointer-events: auto; width: 48px; height: 48px; padding: 0; cursor: pointer; display: grid; place-items: center; }
#hud .tool img { width: 36px; height: 36px; image-rendering: pixelated; }
#hud .tool.off { filter: saturate(.3) brightness(.7); }
#hud .tool.evo { border-color: var(--gold); box-shadow: 0 0 6px var(--gold); }

#modal { z-index: 30; }
#modalStars img { height: 48px; }
.hbtns a.phm-btn { text-decoration: none; }
/* shown until the sheets are in, and while a late sheet is awaited (MS-02) */
#loading { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; pointer-events: none; }
#loading p { margin: 0; align-self: auto; text-align: center; }
/* the level's stars on a small wood tab, like the status bar */
#stars {
  background: var(--wood); border: 3px solid #2b1a0e; border-radius: 12px; padding: 4px 8px;
  box-shadow: 0 4px 0 rgba(0,0,0,.28), inset 0 2px 0 var(--wood-light);
}
