.bm-layout {
  display: grid;
  grid-template-columns: minmax(280px, 620px) 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

.bm-game {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bm-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
}

.bm-hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bm-hud-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bm-hud-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.bm-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.bm-canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #151a24;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  touch-action: none;
}

.bm-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 14, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.bm-banner.visible {
  opacity: 1;
}

.bm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 20, 0.78);
  border-radius: var(--radius);
  display: none;
  align-items: center;
  justify-content: center;
}

.bm-overlay.visible {
  display: flex;
}

.bm-overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  text-align: center;
}

.bm-overlay-card h3 {
  margin-bottom: 8px;
}

.bm-overlay-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.bm-touch-controls {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 4px;
}

.bm-dpad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(2, 44px);
  gap: 4px;
}

.bm-dpad-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: none;
}

.bm-dpad-up { grid-column: 2; grid-row: 1; }
.bm-dpad-left { grid-column: 1; grid-row: 2; }
.bm-dpad-right { grid-column: 3; grid-row: 2; }
.bm-dpad-down { grid-column: 2; grid-row: 2; }

.bm-bomb-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.6rem;
  cursor: pointer;
  touch-action: none;
}

.bm-leaderboard h3 {
  font-size: 1.1rem;
}

@media (max-width: 860px) {
  .bm-layout {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) {
  .bm-touch-controls {
    display: flex;
  }
}
