/* =====================================================================
   style.css — 記憶力テスト ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   状態は色 + アイコン + 文言の3点で示し、色だけに依存しない（色覚配慮）。
   ===================================================================== */

/* モード切替 */
.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;
}

/* テスト進行エリア */
.mt-stage {
  border-left: 6px solid var(--sg-border, #e5e7eb);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.mt-stage.is-showing {
  border-left-color: #3b5bdb;
  background: var(--sg-accent-weak, #eef2ff);
}
.mt-stage.is-input {
  border-left-color: #b45309;
  background: var(--sg-warn-weak, #fef6e7);
}
.mt-stage.is-correct {
  border-left-color: #15803d;
  background: var(--sg-ok-weak, #eafaef);
}
.mt-stage.is-incorrect {
  border-left-color: #b91c1c;
  background: var(--sg-danger-weak, #fdeceb);
}

.sg-result__label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt-status-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* 記憶する数字列の大表示 */
.mt-seq {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.4rem, 12vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  padding: 12px 0 4px;
  word-break: break-all;
}

/* 残り時間バー */
.mt-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--sg-border, #e5e7eb);
  overflow: hidden;
  margin: 4px 0 2px;
}
.mt-progress__bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: #3b5bdb;
}

/* 入力フォーム */
#answer-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.mt-answer-label {
  flex: 1 1 100%;
}
.mt-answer-input {
  flex: 1 1 auto;
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  text-align: center;
}
.mt-answer-btn {
  flex: 0 0 auto;
}

/* 結果の内訳 */
.mt-reveal {
  margin-top: 10px;
}
.mt-reveal__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0;
}
.mt-reveal__label {
  flex: 0 0 6.5em;
  color: var(--sg-muted, #777);
  font-size: 0.9rem;
}
.mt-reveal__code {
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  word-break: break-all;
}
.mt-reveal__score {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2px 0 8px;
}
.mt-reveal__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #15803d;
  border: 1px solid #15803d;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.mt-actions {
  margin-top: 12px;
}

/* 記録スタッツ */
.mt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.mt-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border: 1px solid var(--sg-border, #e5e7eb);
  border-radius: 10px;
  text-align: center;
}
.mt-stat__label {
  font-size: 0.8rem;
  color: var(--sg-muted, #777);
}
.mt-stat__value {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 遊び方リスト */
.mt-tips {
  margin: 0 0 6px;
  padding-left: 1.2em;
  line-height: 1.75;
}
.mt-tips li {
  margin: 4px 0;
}

@media (max-width: 420px) {
  .mt-stats {
    grid-template-columns: 1fr;
  }
}
