html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0b0b18;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #f5f5f5;
  overflow: hidden;
}

#game {
  position: fixed;
  inset: 0;
  display: block;
  width: 100dvw;
  height: 100dvh;
}

#hud {
  position: fixed;
  top: 10px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 calc(24px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left));
  font-size: 14px;
  letter-spacing: 0.3px;
  mix-blend-mode: lighten;
  pointer-events: none;
  z-index: 10;
}

#hud .right {
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  padding-right: 0;
}

/* Music toggle button */
#music-toggle {
  pointer-events: auto;
  background: transparent;
  border: none;
  padding: 4px 8px;
  margin-left: 8px;
  font: 700 15px ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; /* match score */
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,0); /* off: fully transparent note */
  mix-blend-mode: normal; /* ensure black shows when on */
}
#music-toggle[aria-pressed="true"] {
  color: #000000; /* on: solid black */
}

/* Restart button (mobile-focused) */
#restart-btn {
  pointer-events: auto;
  background: transparent;
  border: none;
  padding: 4px 8px;
  margin-left: 8px;
  font: 700 15px ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height: 1;
  cursor: pointer;
  color: #000000; /* visible black symbol */
}

/* Minimal music consent toggle */
#music-consent {
  position: fixed;
  top: 42px;
  right: calc(16px + env(safe-area-inset-right));
  pointer-events: auto;
  font: 500 13px ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: rgba(245,245,245,0.85);
  background: transparent;
}
#music-consent[aria-hidden="true"] { display: none; }
#music-consent label { cursor: pointer; }
#music-consent input { accent-color: #000; vertical-align: middle; }

/* Game over overlay */
#game-over-overlay {
  position: fixed;
  inset: 0;
  display: none; /* toggled to flex when visible */
  align-items: center;
  justify-content: center;
  z-index: 20;
}
#game-over-overlay[aria-hidden="false"] {
  display: flex;
}
.overlay-restart {
  pointer-events: auto;
  font: 700 16px ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #000;
  background: rgba(245,242,232,0.95);
  border: 2px solid rgba(10,10,18,0.4);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
