/* =====================================================================
   style.css — 反応速度テスト ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   色は状態を背景で示しつつ、文言でも状態を併記（色覚配慮）。
   ===================================================================== */

.rt-progress {
  margin: 0 0 var(--sg-space-2, 8px);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sg-muted, #555);
}

/* 反応テスト領域（大きなターゲット） */
.rt-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 240px;
  padding: 24px 16px;
  border-radius: var(--sg-radius, 14px);
  border: 2px solid transparent;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  color: #fff;
  transition: background-color 0.06s linear;
}
.rt-target:focus-visible {
  outline: 3px solid var(--sg-accent, #3b5bdb);
  outline-offset: 3px;
}
.rt-target__main {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
}
.rt-target__sub {
  font-size: 0.95rem;
  opacity: 0.95;
}

/* 状態ごとの色 */
.rt-target.is-idle {
  background: #3b5bdb; /* 青: 開始待ち */
}
.rt-target.is-waiting {
  background: #c92a2a; /* 赤: まだ押さない */
}
.rt-target.is-go {
  background: #2b8a3e; /* 緑: 今すぐ */
}
.rt-target.is-early {
  background: #d9480f; /* 橙: フライング */
}
.rt-target.is-done {
  background: #364fc7; /* 濃青: 1試行結果 */
}
.rt-target.is-complete {
  background: #0b7285; /* 青緑: 全完了 */
}

.rt-actions {
  margin-top: var(--sg-space-3, 12px);
}

/* 今回のスコアの内訳 */
.rt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  margin-top: var(--sg-space-3, 12px);
  border-top: 1px solid var(--sg-border, #e5e7eb);
  padding-top: var(--sg-space-3, 12px);
}
.rt-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rt-stat__k {
  font-size: 0.78rem;
  color: var(--sg-muted, #777);
}
.rt-stat__v {
  font-size: 1.05rem;
  font-weight: 700;
}

/* 各試行の記録 */
.rt-log {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px 16px;
}
.rt-log-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--sg-border, #e5e7eb);
}
.rt-log-row__k {
  color: var(--sg-muted, #777);
  font-size: 0.9rem;
}
.rt-log-row__v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rt-log-row.is-best .rt-log-row__v {
  color: var(--sg-accent, #2b8a3e);
}
.rt-log-row.is-best .rt-log-row__v::after {
  content: " ★";
  font-size: 0.85em;
}

/* 目安表 */
.rt-guide__key {
  flex: 0 0 6.5em;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
