/* 참을성 테스트(Go/No-Go) 전용. 판은 밝은/어두운 화면 모두 짙은 바탕을 써서 초록 원 · 빨간 X 가 같은 대비로 보이게 한다. */
.gn {
  --gn-panel: #131822;
  --gn-panel-2: #1e2533;
  --gn-go: #1fd19b;
  --gn-nogo: #ff4d5e;
  margin-top: 22px;
}

.gn-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}
.gn-top p {
  margin: 0;
  color: var(--muted);
}
.gn-top span {
  font-size: 0.88rem;
  font-weight: 600;
}
.gn-top b {
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 800;
}
.gn-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 12px;
}
.gn-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.gn-stage {
  position: relative;
}
.gn-pad {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: clamp(280px, 46vh, 400px);
  border-radius: 26px;
  background: radial-gradient(120% 120% at 50% 0%, var(--gn-panel-2), var(--gn-panel));
  box-shadow: var(--shadow);
  color: #eef1f7;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.15s ease;
}
.gn-pad:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.gn-pad[data-tone='ok'] {
  box-shadow: inset 0 0 0 4px var(--gn-go), var(--shadow);
}
.gn-pad[data-tone='bad'] {
  box-shadow: inset 0 0 0 4px var(--gn-nogo), var(--shadow);
}
.gn-pad[data-tone='miss'] {
  box-shadow: inset 0 0 0 4px #f2b134, var(--shadow);
}

/* 자극: Go = 초록 원, No-Go = 빨간 네모 + 흰 X (색이 아니라 모양으로도 구분된다) */
.gn-stim {
  position: relative;
  width: clamp(120px, 38vw, 170px);
  height: clamp(120px, 38vw, 170px);
  display: grid;
  place-items: center;
}
.gn-stim.go::before {
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gn-go);
  box-shadow: 0 0 0 8px rgba(31, 209, 155, 0.18);
}
.gn-stim.nogo::before {
  content: '';
  width: 92%;
  height: 92%;
  border-radius: 22px;
  background: var(--gn-nogo);
  box-shadow: 0 0 0 8px rgba(255, 77, 94, 0.18);
}
.gn-stim.nogo::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 62%;
  height: 62%;
  background:
    linear-gradient(45deg, transparent calc(50% - 9px), #fff calc(50% - 9px), #fff calc(50% + 9px), transparent calc(50% + 9px)),
    linear-gradient(-45deg, transparent calc(50% - 9px), #fff calc(50% - 9px), #fff calc(50% + 9px), transparent calc(50% + 9px));
}
.gn-stim.fix::before {
  content: '+';
  font-size: 2.6rem;
  font-weight: 300;
  color: #8f9ab0;
  line-height: 1;
}
.gn-feedback {
  margin: 0;
  min-height: 1.6em;
  color: #cfd6e4;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gn-start {
  appearance: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  font: inherit;
  color: #fff;
  background: linear-gradient(160deg, rgba(5, 150, 105, 0.94), rgba(127, 29, 29, 0.94));
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gn-start[hidden] {
  display: none;
}
.gn-start:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}
.gn-start-icon {
  font-size: 2.6rem;
  line-height: 1;
}
.gn-start-title {
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.gn-start-sub {
  font-size: 1rem;
  opacity: 0.95;
  max-width: 24em;
}

/* 시작 전 안내: 두 모양 보기 */
.gn-legend {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.gn-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 700;
}
.gn-mini {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
}
.gn-mini.go {
  border-radius: 50%;
  background: var(--gn-go);
}
.gn-mini.nogo {
  border-radius: 6px;
  background: var(--gn-nogo);
}
.gn-mini.nogo::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
}

.gn-balance {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 14px auto 0;
  max-width: 30em;
}
.gn .mine-list time {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .gn-progress span,
  .gn-pad {
    transition: none;
  }
}
