/* =============================================================
   GAME: Block Puzzle
   ============================================================= */
.board-blocks { --cell: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; }
.bp-wrap { display: flex; align-items: flex-start; gap: 6px; }
.bp-side { display: flex; flex-direction: column; gap: 8px; width: calc(var(--cell) * 2.2 + 16px); }
.bp-box, .bp-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 4px 6px; border-radius: 10px;
  background: #0b1026; box-shadow: inset 0 0 0 1px rgba(0, 255, 208, .28);
}
.bp-box canvas { display: block; }
.bp-lbl { font: 700 .66rem var(--font-head, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bp-stat strong { font-size: 1.05rem; color: #7dffe6; font-variant-numeric: tabular-nums; line-height: 1.2; }
.bp-stage { position: relative; touch-action: none; }
.bp-canvas {
  display: block; border-radius: 6px; background: #070b1a;
  box-shadow: 0 0 0 2px #00ffd0, 0 0 26px rgba(0, 255, 208, .35);
}
.board-blocks:focus-visible .bp-canvas { box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(0, 255, 208, .5); }
.bp-msg {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 86%;
  padding: 10px 12px; border-radius: 12px; background: rgba(5, 8, 22, .86); color: #dffff8; font-weight: 700; font-size: .92rem; text-align: center;
  box-shadow: 0 0 0 1px rgba(0, 255, 208, .5); pointer-events: none;
}
.bp-msg[hidden] { display: none; }
.bp-pop {
  position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; opacity: 0;
  font: 800 1.4rem var(--font-head, system-ui); text-transform: uppercase; color: #fff; text-shadow: 0 0 14px #00ffd0, 0 0 30px #00ffd0;
}
.bp-pop.show { animation: bpPop .9s ease-out forwards; }
@keyframes bpPop { 0% { opacity: 0; transform: scale(.7); } 15% { opacity: 1; transform: scale(1.05); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .bp-pop.show { opacity: 1; } }
.bp-num { color: #7dffe6; font-variant-numeric: tabular-nums; }

/* on-screen buttons: phones and tablets only */
.bp-pad { display: none; grid-template-columns: repeat(6, 1fr); gap: 6px; width: min(100%, 420px); touch-action: none; }
.bp-key {
  display: grid; place-items: center; height: 54px; border: 0; border-radius: 14px; cursor: pointer; color: #7dffe6;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(0, 255, 208, .4), 0 4px 0 rgba(0, 0, 0, .35);
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.bp-key svg { width: 26px; height: 26px; }
.bp-key.down { background: #0f3b3a; transform: translateY(2px); box-shadow: inset 0 0 0 1px #00ffd0, 0 2px 0 rgba(0, 0, 0, .35); }
.bp-key-hard { color: #ff8fe9; box-shadow: inset 0 0 0 1px rgba(255, 79, 216, .45), 0 4px 0 rgba(0, 0, 0, .35); }
.bp-key-hold { color: #ffd23f; box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .4), 0 4px 0 rgba(0, 0, 0, .35); }
@media (pointer: coarse) { .bp-pad { display: grid; } }

/* hard drop: the field gives a little (off when motion is reduced) */
.bp-bump .bp-canvas { animation: bpBump .2s ease-out; }
@keyframes bpBump { 35% { translate: 0 3px; } }
