/**
 * board.css - 碁盤Canvasコンテナおよび検討UIパネルのライトテーマ・モバイル対応スタイル
 */

.board-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-wrapper {
  position: relative;
  width: min(100%, 100%);
  max-height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(110, 78, 28, 0.3);
  box-shadow: var(--shadow-board);
  touch-action: manipulation;
}

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

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(246, 242, 234, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text-main);
  z-index: 10;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(45, 106, 79, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 検討用：目数推移グラフと候補パネル（スマホでも盤面を広く保つコンパクト設計） */
.review-strip {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  height: 54px;
}

@media (min-height: 780px) {
  .chart-box {
    height: 66px;
  }
}

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

.candidate-chips,
.move-list-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.candidate-chips::-webkit-scrollbar,
.move-list-strip::-webkit-scrollbar {
  display: none;
}

.candidate-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.candidate-chip.selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.move-chip {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.move-chip.move-inacc {
  background: #fef3c7;
  border-color: rgba(196, 118, 22, 0.45);
  color: #9a5409;
}

.move-chip.move-blunder {
  background: #fee2e2;
  border-color: rgba(196, 69, 54, 0.5);
  color: #a82820;
}

.move-chip.active {
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
  border-color: transparent;
}
