.score-box.black {
  background: #1a1410;
  color: #fff;
  border-color: #1a1410;
}
.score-box.black .score-label { color: rgba(255,255,255,0.7); }
.score-box.white {
  background: #fff;
  color: #1a1410;
  border-color: #d8d2c5;
}
.score-box.white .score-label { color: rgba(0,0,0,0.55); }
body.dark .score-box.white {
  background: #3a3530;
  color: #f5ece0;
  border-color: #504840;
}
body.dark .score-box.white .score-label { color: rgba(240, 230, 220, 0.65); }

.board {
  position: relative;
  width: min(90vmin, 480px);
  height: min(90vmin, 480px);
  background: #2c5a2c;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(44, 90, 44, 0.4), var(--shadow-md);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
}
body.dark .board { background: #1f3f1f; }

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  animation: fadein .25s ease-in-out;
}
.overlay[hidden] { display: none; }
.overlay-text {
  font-size: clamp(36px, 8vmin, 56px);
  font-weight: 800;
  color: var(--text-strong);
  text-align: center;
}
.overlay-sub {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
