.tool-workbench.reaction-test-mounted {
  width: min(1280px, calc(100vw - 72px)) !important;
  max-width: 1280px !important;
}

.reaction-test-page {
  overflow: auto !important;
}

.reaction-test-mounted,
.reaction-test-mounted * {
  box-sizing: border-box;
}

#reactionTestMount {
  color: #081631;
}

.reaction-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  margin-top: 18px;
}

.reaction-arena-card,
.reaction-stats-card,
.reaction-guide article {
  border: 1px solid rgba(188, 207, 242, 0.82);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 58px rgba(35, 75, 145, 0.1);
}

.reaction-arena-card {
  padding: 22px;
}

.reaction-mode-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: #f1f6ff;
}

.reaction-mode-tabs button {
  height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #49648e;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}

.reaction-mode-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #176dff, #7464ff);
  box-shadow: 0 12px 26px rgba(42, 101, 232, 0.2);
}

.reaction-pad {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 390px;
  margin-top: 18px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  padding: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.26), transparent 30%),
    linear-gradient(135deg, #2d6fff, #7b5cff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 24px 62px rgba(30, 86, 220, 0.24);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.reaction-pad::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: translate(48%, -40%);
}

.reaction-pad.waiting {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #ff6a52, #e54a5e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 24px 62px rgba(224, 75, 70, 0.2);
}

.reaction-pad.ready {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #15c780, #13a86d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 24px 62px rgba(20, 178, 114, 0.24);
}

.reaction-pad.falseStart {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #2d3446, #0e1729);
}

.reaction-pad:hover {
  transform: translateY(-1px);
}

.reaction-pad small,
.reaction-pad strong,
.reaction-pad span {
  position: relative;
  z-index: 1;
}

.reaction-pad small {
  align-self: end;
  opacity: 0.82;
  font-size: 14px;
  font-weight: 760;
}

.reaction-pad strong {
  align-self: center;
  font-size: clamp(54px, 8vw, 96px);
  line-height: 1;
  letter-spacing: 0;
}

.reaction-pad span {
  align-self: start;
  max-width: 520px;
  opacity: 0.9;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.6;
}

.reaction-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.reaction-controls button {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  padding: 0 16px;
  color: #31527f;
  background: #eef5ff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.reaction-controls button:first-child {
  color: #fff;
  background: linear-gradient(135deg, #176dff, #705fff);
  box-shadow: 0 14px 30px rgba(42, 101, 232, 0.18);
}

.reaction-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.reaction-controls button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(31, 76, 154, 0.13);
}

.reaction-key-tip {
  margin: 12px 0 0;
  color: #6b7e9f;
  font-size: 13px;
  font-weight: 680;
}

.reaction-stats-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.reaction-grade {
  min-height: 160px;
  border-radius: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at 90% 12%, rgba(107, 93, 255, 0.18), transparent 34%),
    linear-gradient(145deg, #f7fbff, #fff);
}

.reaction-grade span,
.reaction-stat-grid span,
.reaction-history div span {
  color: #62749a;
  font-size: 12px;
  font-weight: 740;
}

.reaction-grade strong {
  display: block;
  margin-top: 10px;
  color: #081631;
  font-size: 42px;
  line-height: 1;
}

.reaction-grade p {
  margin: 12px 0 0;
  color: #5e7196;
  font-size: 13px;
  line-height: 1.65;
}

.reaction-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reaction-stat-grid article {
  min-height: 86px;
  border-radius: 18px;
  padding: 14px;
  background: #f5f8ff;
}

.reaction-stat-grid strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
  color: #0c1938;
  font-size: 30px;
  line-height: 1;
}

.reaction-stat-grid small {
  color: #6f82a4;
  font-size: 12px;
}

.reaction-history {
  border-radius: 20px;
  padding: 16px;
  background: #fbfdff;
}

.reaction-history div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reaction-history h2 {
  margin: 0;
  color: #081631;
  font-size: 18px;
}

.reaction-history ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.reaction-history li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 68px;
  gap: 10px;
  align-items: center;
  color: #4d6388;
  font-size: 12px;
  font-weight: 760;
}

.reaction-history li.empty {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: #f2f6ff;
  text-align: center;
}

.reaction-history li i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #176dff, #7b61ff);
}

.reaction-history li.bad i {
  background: linear-gradient(90deg, #ff725c, #ff4d6d);
}

.reaction-history li b {
  color: #102346;
  text-align: right;
}

.reaction-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.reaction-guide article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.reaction-guide b {
  color: #0b1737;
  font-size: 15px;
}

.reaction-guide span {
  color: #667798;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .tool-workbench.reaction-test-mounted {
    width: min(100% - 28px, 1280px) !important;
  }

  .reaction-layout,
  .reaction-guide {
    grid-template-columns: 1fr;
  }

  .reaction-pad {
    min-height: 310px;
  }
}
