/* 단어 기억력 테스트 판. 공통 판 모양(.mem · .mem-board · .mem-cover)은 memory.css 를 같이 쓰고,
   여기서는 주황 바탕 · 큰 낱말 · 두 답 단추만 정한다. 판은 늘 진한 바탕 + 흰 글자라 밝은/어두운 화면에서 같은 대비다. */
.mem.vm {
  --mem-bg: #c2410c;
  --vm-ok: #138a4d;
}

.vm-board {
  min-height: clamp(320px, 52vh, 420px);
}
.vm-show {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.vm-count {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0.85;
}
.vm-word {
  margin: 6px 0 0;
  max-width: 100%;
  font-size: clamp(2.6rem, 13vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}
.vm-word.pop {
  animation: vm-pop 0.18s ease-out;
}
@keyframes vm-pop {
  from {
    opacity: 0.2;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.vm-feedback {
  margin: 0;
  min-height: 1.6em;
  font-weight: 800;
  font-size: 0.98rem;
  text-align: center;
}
.vm-feedback[data-tone='bad'] {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: #fff;
  color: #a1202c;
}
.vm-feedback[data-tone='ok'] {
  opacity: 0.9;
}

.vm-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(100%, 460px);
  margin-top: 6px;
}
.vm-ans {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  padding: 10px 8px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #6b2306;
  font: inherit;
  font-weight: 800;
  font-size: clamp(1rem, 4.4vw, 1.15rem);
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.08s ease;
}
.vm-ans:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.vm-ans:disabled {
  cursor: default;
  opacity: 0.7;
}
.vm-ans-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9a4a22;
}
.vm-ans kbd {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  background: #ffe8dc;
  color: #6b2306;
}
.vm-ans.hit {
  animation: vm-hit 0.22s ease-out;
}
.vm-ans.miss {
  animation: vm-miss 1s ease-out;
}
@keyframes vm-miss {
  0%,
  80% {
    background: #ffd5d9;
    color: #a1202c;
  }
}
@keyframes vm-hit {
  50% {
    background: #d6f5e2;
    color: var(--vm-ok);
  }
}
.vm-ans:focus-visible {
  outline: 3px solid #ffd34d;
  outline-offset: 2px;
}
/* 키 안내는 마우스가 있는 기기에서만 보인다 */
@media (hover: none) {
  .vm-ans kbd {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vm-word.pop,
  .vm-ans.hit {
    animation: none;
  }
}
