/* =====================================================================
   style.css — 英単語当て（ハングマン） ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる。
   色は正規のCSS変数（--sg-*）＋フォールバックでダーク対応。
   ===================================================================== */

/* 汎用の余白（共有CSSに無い段階のフォールバック） */
.sg-mt-3 { margin-top: var(--sg-space-3, 12px); }

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

/* ゴーストボタン（共有CSSに変種が無い場合の控えめボタン） */
.sg-btn--ghost {
  background: transparent;
  color: var(--sg-primary, #3b5bdb);
  border: 1px solid var(--sg-border, #d7dbe6);
}

/* ステータスバー */
.hg-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: var(--sg-space-3, 14px);
  font-size: 0.9rem;
  color: var(--sg-muted, #666);
}
.hg-status__item {
  background: var(--sg-surface-2, #f1f3f9);
  border: 1px solid var(--sg-border, #e2e6ee);
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}
.hg-lives {
  color: #e03131;
  letter-spacing: 2px;
  font-size: 1.05rem;
}

/* 伏せ字の英単語 */
.hg-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 var(--sg-space-3, 16px);
  min-height: 2.6em;
}
.hg-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 2em;
  font-size: 1.9rem;
  font-weight: 700;
  font-family: var(--sg-font-mono, ui-monospace, Menlo, Consolas, monospace);
  text-transform: uppercase;
  border-bottom: 3px solid var(--sg-border, #c4cbdb);
  color: var(--sg-fg, #1a1f2b);
}
.hg-cell.is-open {
  border-bottom-color: var(--sg-primary, #3b5bdb);
}

/* メッセージ（結果・ヒット/ミス） */
.hg-message {
  min-height: 1.6em;
  margin: 0 0 var(--sg-space-3, 12px);
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}
.hg-message.is-ok { color: #2f9e44; }
.hg-message.is-miss { color: #e8590c; }
.hg-message.is-win { color: #2f9e44; }
.hg-message.is-lose { color: #e03131; }

/* ヒントのボタン列 */
.hg-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hg-hint-btn { font-size: 0.9rem; padding: 6px 12px; }
.hg-hint-box {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sg-primary-soft, #eef2ff);
  border: 1px solid var(--sg-border, #e2e6ee);
}
.hg-hint-line {
  margin: 2px 0;
  font-size: 0.95rem;
  color: var(--sg-fg, #1a1f2b);
}

/* 画面キーボード */
.hg-keyboard {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin: var(--sg-space-3, 16px) 0 0;
}
@media (max-width: 480px) {
  .hg-keyboard { grid-template-columns: repeat(7, 1fr); gap: 5px; }
}
.hg-key {
  padding: 12px 0;
  font-size: 1.05rem;
  font-weight: 700;
  border: 1px solid var(--sg-border, #d7dbe6);
  border-radius: 10px;
  background: var(--sg-surface, #fff);
  color: var(--sg-fg, #1a1f2b);
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .05s;
}
/* モバイルはキーを大きめ・押しやすく */
@media (max-width: 480px) {
  .hg-key { padding: 14px 0; font-size: 1.1rem; }
}
.hg-key:hover:not(:disabled) {
  border-color: var(--sg-primary, #3b5bdb);
  background: var(--sg-primary-soft, #eef2ff);
}
.hg-key:active:not(:disabled) { transform: scale(0.96); }
.hg-key:disabled { cursor: default; opacity: 0.55; }
.hg-key.is-hit {
  border-color: #2f9e44;
  background: rgba(47, 158, 68, 0.14);
  color: #2f9e44;
  opacity: 1;
}
.hg-key.is-miss {
  border-color: #e03131;
  background: rgba(224, 49, 49, 0.12);
  color: #e03131;
  opacity: 1;
}

/* アクション行 */
.hg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: var(--sg-space-3, 18px);
}
