/* Reaction time test — tool-specific UI. Layout chrome comes from shared.css. */

.rt-stage { max-width: 720px; margin: 0 auto; }

/* ── Reaction pad ── */
.rt-pad {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 360px; padding: 24px;
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface2));
  cursor: pointer; user-select: none; -webkit-user-select: none;
  text-align: center; transition: background-color .08s ease, border-color .08s ease;
  outline: none; color: var(--text);
}
.rt-pad:focus-visible { box-shadow: 0 0 0 4px var(--accent-bg); }

/* States driven by the engine on .rt-stage */
[data-reaction].is-wait  .rt-pad { background: #b91c1c; border-color: #991b1b; color: #fff; }
[data-reaction].is-ready .rt-pad { background: #059669; border-color: #047857; color: #fff; }
[data-reaction].is-early .rt-pad { background: #d97706; border-color: #b45309; color: #fff; }
[data-reaction].is-shown .rt-pad { background: linear-gradient(180deg, var(--surface), var(--accent-bg)); border-color: var(--accent-light); }

.rt-big {
  font-family: 'Orbitron', var(--mono); font-weight: 900;
  font-size: clamp(2.6rem, 12vw, 5rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rt-msg { font-size: 1.35rem; font-weight: 700; }
.rt-sub { font-size: 1rem; font-weight: 600; opacity: .92; }

/* ── Per-round chips ── */
.rt-rounds {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  min-height: 0; margin: 16px 0 0;
}
.rt-round-chip {
  font-family: 'Orbitron', var(--mono); font-weight: 700; font-size: .85rem;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.rt-round-chip.best { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-light); }

/* ── Result card ── */
.rt-result {
  margin-top: 18px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.rt-result-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.rt-result-head h2 { font-size: 1.15rem; margin: 0; }
.rt-rank {
  font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--accent);
}
.rt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rt-stat {
  background: var(--surface2); border-radius: var(--radius); padding: 12px 8px; text-align: center;
}
.rt-stat .v { font-family: 'Orbitron', var(--mono); font-weight: 700; font-size: 1.4rem; color: var(--text); font-variant-numeric: tabular-nums; }
.rt-stat .k { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.rt-best { margin-top: 12px; text-align: center; font-size: .9rem; color: var(--muted); }
.rt-best strong { color: var(--teal-dark); }
.rt-result .btn-row { justify-content: center; margin-top: 14px; }

/* ── In-tool mode switcher ── */
.rt-modes {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 0;
}
.rt-mode-link {
  font-size: .85rem; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.rt-mode-link:hover { border-color: var(--accent-light); color: var(--accent); text-decoration: none; }
.rt-mode-link[aria-current="page"] { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-light); }
