.bj-game-panel {
  max-width: min(52rem, 100%);
  margin: 0 auto;
}
.bj-canvas-wrap {
  position: relative;
  margin: 0.75rem auto;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 6px solid #5c3d1e;
  box-shadow:
    inset 0 0 0 3px #8b5a2b,
    0 4px 0 #2a1c0d,
    0 16px 44px rgba(0, 0, 0, 0.5);
  background: linear-gradient(165deg, #3d2810, #1a1208);
  user-select: none;
}
.bj-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  border-radius: 10px;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.06);
}
.bj-canvas-wrap::after {
  content: "🎱";
  position: absolute;
  bottom: 0.55rem;
  left: 0.65rem;
  z-index: 2;
  font-size: 1rem;
  opacity: 0.3;
  pointer-events: none;
}
.bj-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
.bj-canvas.aiming {
  cursor: grabbing;
}
.bj-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.5rem 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  background: linear-gradient(180deg, rgba(13, 107, 66, 0.15), transparent);
  border: 1px solid rgba(13, 107, 66, 0.3);
  border-radius: 12px;
}
.bj-hud strong {
  color: var(--accent2, #3dd68c);
}
.bj-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0;
}
.bj-score-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.bj-score-chip.active {
  border-color: var(--accent);
  background: rgba(91, 141, 239, 0.12);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.28);
  transform: scale(1.03);
}
.bj-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.5rem 0;
}
.bj-mode-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color 0.15s, background 0.15s;
}
.bj-mode-row label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(91, 141, 239, 0.1);
}
.bj-status-banner {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}
.bj-status-banner.your-turn {
  background: linear-gradient(135deg, rgba(61, 214, 140, 0.18), rgba(61, 214, 140, 0.06));
  border: 1px solid rgba(61, 214, 140, 0.45);
  box-shadow: 0 0 20px rgba(61, 214, 140, 0.12);
}
.bj-status-banner.waiting {
  background: rgba(91, 141, 239, 0.1);
  border: 1px solid rgba(91, 141, 239, 0.3);
}
.bj-status-banner.foul {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.18), rgba(231, 76, 60, 0.06));
  border: 1px solid rgba(231, 76, 60, 0.4);
  box-shadow: 0 0 16px rgba(231, 76, 60, 0.1);
}
.bj-rules-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(13, 107, 66, 0.08);
  border-left: 3px solid rgba(13, 107, 66, 0.45);
}

@media (min-width: 1400px) {
  .bj-game-panel {
    max-width: min(58rem, 100%);
  }
  .bj-hud,
  .bj-status-banner {
    font-size: 1rem;
  }
}
