/* =====================================================================
   style.css — ブロックパズル ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる。
   色は正規の CSS 変数（--sg-…）+ フォールバックのみ使用（ダーク対応）。
   ===================================================================== */

/* 難易度選択 */
.sg-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: var(--sg-space-1, 4px);
}
.sg-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

/* ツールバー（リスタート + スコア） */
.sg-bp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sg-bp-actions {
  display: flex;
  gap: 8px;
}
.sg-bp-stats {
  display: flex;
  gap: 18px;
}
.sg-stat {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.sg-stat__label {
  font-size: 0.72rem;
  color: var(--sg-muted, #777);
}
.sg-stat__value {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sg-bp-status {
  margin-top: 10px;
  font-weight: 600;
  color: var(--sg-accent, #3b5bdb);
  min-height: 1.4em;
}

/* 盤面（10×10 CSSグリッド） */
.sg-bp-board-wrap {
  display: flex;
  justify-content: center;
}
.sg-bp-board {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 2px;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  padding: 6px;
  border-radius: 12px;
  background: var(--sg-surface-2, #eef1f6);
  border: 1px solid var(--sg-border, #e5e7eb);
  /* 盤面上のドラッグでページがスクロールしないように */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sg-bp-cell {
  border-radius: 4px;
  background: var(--sg-surface, #fff);
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.08);
}
.sg-bp-cell.is-filled {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
/* 置ける場所のプレビュー */
.sg-bp-cell.is-ok {
  background: var(--sg-primary-soft, #dbe4ff);
  box-shadow: inset 0 0 0 2px var(--sg-primary, #3b5bdb);
}
/* 置けない場所のプレビュー */
.sg-bp-cell.is-ng {
  background: rgba(224, 49, 49, 0.18);
  box-shadow: inset 0 0 0 2px #e03131;
}

/* トレイ（3個のピース） */
.sg-bp-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 16px auto 0;
}
.sg-bp-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  padding: 8px;
  border-radius: 12px;
  background: var(--sg-surface, #fff);
  border: 1px solid var(--sg-border, #e5e7eb);
  cursor: pointer;
  touch-action: none;
}
.sg-bp-slot.is-selected {
  border-color: var(--sg-primary, #3b5bdb);
  box-shadow: 0 0 0 2px var(--sg-primary-soft, #dbe4ff);
}
.sg-bp-slot.is-empty {
  cursor: default;
  opacity: 0.4;
}
.sg-bp-tray.is-over {
  opacity: 0.55;
  pointer-events: none;
}

/* ピースのミニ表示 */
.sg-bp-mini {
  display: grid;
  gap: 3px;
  width: 100%;
  max-width: 64px;
}
.sg-bp-minicell {
  aspect-ratio: 1 / 1;
  border-radius: 3px;
}
.sg-bp-minicell.is-on {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
