/* =====================================================================
   style.css — スネークゲーム ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる。
   ===================================================================== */

/* 難易度選択 / チェックボックス */
.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-snake-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sg-snake-actions {
  display: flex;
  gap: 8px;
}
.sg-snake-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-snake-status {
  margin-top: 10px;
  font-weight: 600;
  color: var(--sg-accent, #3b5bdb);
}

/* 盤面（Canvas） */
.sg-board-wrap {
  display: flex;
  justify-content: center;
}
#board {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--sg-card-bg, #fff);
  border: 1px solid var(--sg-border, #e5e7eb);
  /* 盤面上のスワイプでページがスクロールしないように */
  touch-action: none;
}

/* 方向パッド（タップ操作） */
.sg-pad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 8px;
  justify-content: center;
  margin: 16px auto 0;
  touch-action: manipulation;
}
.sg-pad__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sg-border, #e5e7eb);
  border-radius: 10px;
  background: var(--sg-card-bg, #fff);
  color: var(--sg-fg, #222);
  font-size: 1.25rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.sg-pad__btn:active {
  background: var(--sg-accent, #3b5bdb);
  color: #fff;
}
.sg-pad__up    { grid-column: 2; grid-row: 1; }
.sg-pad__left  { grid-column: 1; grid-row: 2; }
.sg-pad__right { grid-column: 3; grid-row: 2; }
.sg-pad__down  { grid-column: 2; grid-row: 2; }
