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

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

/* ツールバー（ボタン + 計測） */
.sg-hanoi-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.sg-hanoi-stats {
  margin-left: auto;
  display: flex;
  gap: 16px;
}
.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.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 杭の並び */
.sg-pegs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* 各杭（クリック可能なボタン） */
.sg-peg {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 210px;
  padding: 0 4px 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--sg-surface-2, #f0f2f7);
  cursor: pointer;
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.sg-peg:hover {
  background: var(--sg-surface-3, #e7eaf2);
}
.sg-peg:focus-visible {
  box-shadow: 0 0 0 3px var(--sg-accent, #3b5bdb);
}
.sg-peg.is-selected {
  border-color: var(--sg-accent, #3b5bdb);
  background: var(--sg-surface-3, #e7eaf2);
}
.sg-peg.is-target {
  border-color: #2f9e44;
  border-style: dashed;
}

/* 杭の棒 */
.sg-peg__rod {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: calc(100% - 22px);
  border-radius: 4px;
  background: var(--sg-muted, #b6bccb);
}
/* 台座 */
.sg-peg__base {
  width: 92%;
  height: 10px;
  border-radius: 5px;
  background: var(--sg-muted, #9aa2b5);
}
/* 円盤の積み（下寄せ） */
.sg-peg__stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding-bottom: 2px;
}

/* 円盤 */
.sg-disk {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(18px, 5vw, 26px);
  min-width: 26px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  user-select: none;
}

/* クリアメッセージ */
.sg-hanoi-msg {
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
  color: var(--sg-accent, #3b5bdb);
}

/* 状態通知（視覚的には控えめ） */
.sg-hanoi-status {
  margin-top: 8px;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--sg-muted, #555);
}
