/* 타자 속도 테스트 전용 */
.ty-opts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin: 22px 0 14px;
}
.ty-opts .rounds {
  margin: 0;
}

.ty-board {
  padding: 18px;
  scroll-margin-top: 72px;
  transition: border-color 0.15s ease;
}
.ty-board[data-state='go'] {
  border-color: var(--brand);
}

.ty-live {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}
.ty-live b {
  color: var(--ink);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}
.ty-live .linkish {
  margin-left: auto;
  padding: 4px 0;
}
.ty-board .timebar {
  margin-top: 10px;
}

.ty-target {
  margin: 14px 0 10px;
  padding: 14px 16px;
  min-height: 3.4em;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  cursor: text;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ty-target span {
  border-radius: 3px;
}
.ty-target .t-ok {
  color: var(--go);
}
.ty-target .t-bad,
.ty-target .t-extra {
  color: var(--wait);
  background: color-mix(in srgb, var(--wait) 18%, transparent);
  text-decoration: underline wavy;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.ty-target .t-held {
  color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand);
}
.ty-target .t-cur {
  box-shadow: inset 0 -3px 0 var(--brand);
}
.ty-board[data-state='go'] .t-cur {
  animation: ty-blink 1s steps(2, start) infinite;
}
@keyframes ty-blink {
  50% {
    box-shadow: inset 0 -3px 0 transparent;
  }
}

.ty-form {
  margin: 0;
}
.ty-input {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: max(16px, clamp(1.1rem, 4.4vw, 1.3rem));
  font-weight: 600;
}
.ty-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.ty-input:disabled {
  opacity: 0.6;
}
.ty-input::placeholder {
  color: var(--muted);
  font-weight: 500;
  opacity: 0.8;
}

.ty-next {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ty-next b {
  font-weight: 700;
  margin-right: 6px;
}
.ty-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.5em;
}

@media (prefers-reduced-motion: reduce) {
  .ty-board[data-state='go'] .t-cur {
    animation: none;
  }
}
