/* BOUNCE — flat, high-contrast, pixel-crisp. No external assets. */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  --s: 4;
  --hud: #e8e8e8;
  background: #06080a;
  color: var(--hud);
  font-family: "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: none;
}
#shell { display: flex; align-items: center; justify-content: center; }
#stage {
  position: relative;
  width: calc(128px * var(--s));
  height: calc(128px * var(--s) + 34px);
  background: #000;
  box-shadow: 0 0 0 2px #000, 0 0 34px rgba(0, 0, 0, .6);
}
#world {
  display: block;
  width: calc(128px * var(--s));
  height: calc(128px * var(--s));
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
}
/* HUD lives BELOW the 16x16 world viewport: it never hides a map row. */
#hud {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 34px;
  display: flex; align-items: center; gap: calc(6px * 1);
  padding: 0 10px;
  background: #000;
  border-top: 2px solid rgba(255, 255, 255, .18);
  font-size: 13px; letter-spacing: 1px;
  user-select: none;
}
#hud .grp { display: inline-flex; align-items: center; }
#hud .lab { color: rgba(255, 255, 255, .45); }
#hud .lab b { color: var(--hud); font-weight: 700; margin-left: 4px; }
#hud .ball {
  width: 9px; height: 9px; border-radius: 50%;
  background: #e8352e; border: 1px solid #4a0a08;
  margin-right: 4px; display: inline-block;
}
#hud .ball.off { background: transparent; border-color: rgba(232, 53, 46, .35); }
#hud .ring {
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid #ffd740; display: inline-block; margin-right: 4px;
}
#hud .scr { margin-left: auto; color: var(--hud); font-weight: 700; }

#overlay {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .68);
  text-align: center;
}
#overlay.on { display: flex; }
#overlay .card { padding: 8px 10px; }
#overlay h1 {
  font-size: 30px; margin: 0 0 2px; letter-spacing: 6px; color: #fff;
  text-shadow: 3px 3px 0 #a01d18;
}
#overlay h2 { font-size: 19px; margin: 0 0 6px; letter-spacing: 3px; color: #fff; }
#overlay .sub { margin: 0 0 14px; font-size: 10px; letter-spacing: 3px; color: rgba(255, 255, 255, .5); }
#overlay .press { font-size: 12px; letter-spacing: 2px; color: #ffd740; margin: 10px 0 0; min-height: 14px; }
#overlay .hint { font-size: 8px; letter-spacing: 1px; color: rgba(255, 255, 255, .55); margin: 14px 0 0; }
#overlay .score { font-size: 14px; letter-spacing: 2px; color: #fff; margin: 4px 0 0; }
#overlay .card.bad h2 { color: #ff6b6b; }
#overlay .card.good h1 { color: #ffe066; text-shadow: 3px 3px 0 #6b4a00; }
canvas { outline: none; }
