/* =====================================================================
   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-tg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sg-tg-actions {
  display: flex;
  gap: 8px;
}
.sg-tg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 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-tg-lives {
  color: var(--sg-danger, #e03131);
  letter-spacing: 1px;
}
.sg-tg-status {
  margin-top: 10px;
  font-weight: 600;
  color: var(--sg-accent, #3b5bdb);
}

/* プレイ領域 */
.sg-field-wrap {
  display: flex;
  justify-content: center;
}
.sg-tg-field {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 58vh;
  min-height: 320px;
  max-height: 460px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--sg-card-bg, #fff);
  border: 1px solid var(--sg-border, #e5e7eb);
  /* 領域内のスワイプでページがスクロールしないように */
  touch-action: manipulation;
}
/* 地面ライン */
.sg-tg-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--sg-danger, #e03131);
  opacity: 0.55;
}

/* 落ちてくる単語 */
.tw-word {
  position: absolute;
  transform: translate(-4px, -100%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--sg-surface-2, #f1f3f9);
  border: 1px solid var(--sg-border, #e5e7eb);
  white-space: nowrap;
  box-shadow: var(--sg-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.08));
}
.tw-word.is-active {
  border-color: var(--sg-accent, #3b5bdb);
  box-shadow: 0 0 0 2px var(--sg-accent-soft, rgba(59, 91, 219, 0.25));
}
.tw-label {
  font-size: 0.8rem;
  color: var(--sg-muted, #777);
  line-height: 1.2;
}
.tw-type {
  font-family: var(--sg-font-mono, ui-monospace, Menlo, Consolas, monospace);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--sg-fg, #222);
}
.tw-done {
  color: var(--sg-accent, #3b5bdb);
}
.tw-next {
  color: var(--sg-danger, #e03131);
  text-decoration: underline;
}

/* 入力欄 */
.sg-tg-input {
  display: block;
  width: 100%;
  margin: 14px auto 0;
  padding: 12px 14px;
  font-size: 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--sg-border, #e5e7eb);
  background: var(--sg-card-bg, #fff);
  color: var(--sg-fg, #222);
  box-sizing: border-box;
}
.sg-tg-input:focus {
  outline: 2px solid var(--sg-accent, #3b5bdb);
  outline-offset: 1px;
}
