:root { --bg: #fff3d6; --panel: #ffe0a3; --ink: #5a3a1a; --accent: #ff7043; --frame: #c68642; --board: #fff8e8; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: system-ui, sans-serif; overflow: hidden; touch-action: none; }
#app { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 8px 16px; gap: 8px; }

game-hud { width: 100%; max-width: 420px; display: flex; justify-content: space-between; align-items: center; }
.stat { background: var(--panel); border-radius: 12px; padding: 4px 12px; text-align: center; min-width: 80px; }
.stat small { display: block; font-size: 11px; opacity: 0.7; }
.stat b { display: block; font-size: 20px; min-height: 30px; line-height: 30px; }

#stage { position: relative; width: min(100%, calc((100dvh - 110px) * 420 / 640)); aspect-ratio: 420 / 640; }
game-board { display: block; width: 100%; height: 100%; }
game-board canvas { display: block; width: 100%; height: 100%; background: var(--board);
  border: 4px solid var(--frame); border-radius: 12px; }

mute-button { position: absolute; top: 12px; right: 12px; z-index: 1; }
mute-button button { background: var(--panel); border: 0; border-radius: 50%; width: 36px; height: 36px;
  font-size: 18px; cursor: pointer; }

game-over-panel { z-index: 2; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; background: rgba(90, 58, 26, 0.75); color: #fff; border-radius: 12px; }
game-over-panel[hidden] { display: none; }
game-over-panel button { background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 28px; font-size: 18px; font-weight: 700; cursor: pointer; }
