/* =====================================================================
   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-lo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sg-lo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sg-lo-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-board-wrap {
  display: flex;
  justify-content: center;
}
.sg-lo-board {
  --sg-n: 5;
  display: grid;
  grid-template-columns: repeat(var(--sg-n), 1fr);
  gap: 6px;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  padding: 8px;
  border-radius: 14px;
  background: var(--sg-border, #d7dbe6);
}

/* 各ライト（ボタン） */
.sg-light {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--sg-border, #c4c9d6);
  border-radius: 10px;
  /* 消灯：暗いマス */
  background: var(--sg-surface-2, #2b2f3a);
  color: #cfd4e0;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  min-height: 0;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.06s ease;
}
.sg-light:hover {
  filter: brightness(1.08);
}
.sg-light:active {
  transform: scale(0.95);
}
.sg-light:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--sg-accent, #3b5bdb);
}

/* 点灯：明るく光る（色だけでなく●マークでも判別可能） */
.sg-light.is-on {
  background: var(--sg-accent, #ffd43b);
  border-color: #f0b90a;
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.65) inset,
    0 0 6px rgba(255, 212, 59, 0.45);
}
.sg-light__mark {
  font-size: clamp(0.9rem, 5vw, 1.5rem);
  line-height: 1;
  color: #7a5a00;
  pointer-events: none;
}
.sg-light.is-on .sg-light__mark {
  color: #6b4e00;
}

/* 解答表示：押すべきマスの ×印 */
.sg-light.is-hint {
  outline: 2px dashed var(--sg-danger, #e03131);
  outline-offset: -4px;
}
.sg-light__hint {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: clamp(0.7rem, 3.5vw, 1rem);
  font-weight: 800;
  color: var(--sg-danger, #e03131);
  pointer-events: none;
}

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

/* ベスト早見表 */
.sg-chart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.sg-chart-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--sg-border, #e5e7eb);
}
.sg-chart-row__key {
  flex: 0 0 3.2em;
  font-weight: 600;
}
.sg-chart-row__val {
  flex: 1 1 auto;
  color: var(--sg-muted, #555);
  font-variant-numeric: tabular-nums;
}
