.app .header { align-items: center; }

.status-box {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.status-box.win  { background: #6aaa64; color: #fff; border-color: transparent; }
.status-box.lose { background: var(--danger); color: #fff; border-color: transparent; }
.status-box.draw { background: var(--btn-bg); color: #fff; border-color: transparent; }
.status-box.thinking { opacity: 0.7; }

.board {
  position: relative;
  /* width and height are set explicitly by JS to avoid aspect-ratio timing issues */
  width: min(90vmin, 420px);
  background: #1565c0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  touch-action: manipulation;
  user-select: none;
  overflow: hidden;
}
body.dark .board { background: #0d3b6d; }

#canvas {
  display: block;
  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: 16px;
  z-index: 10;
  animation: fadein .3s 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;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
