/* Vocabulary match: words on the left, meanings on the right, one shared
   row height so every pair lines up. Sizes are in em so projector mode
   can scale them with its text-size buttons. */
.vm { --vm-emerald: #1D6A4E; --vm-emerald-bg: #E4F1EA; --vm-ruby: #9E3B35; --vm-ruby-bg: #F7E4E1; max-width: 1100px; margin: 0 auto; }
.vm-grid { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.5fr); grid-auto-rows: minmax(3.4em, auto); gap: 0.6em 1.2em; }
.vm-w, .vm-d {
  position: relative; display: flex; align-items: center; gap: 0.7em; width: 100%; margin: 0; text-align: left; cursor: pointer;
  padding: 0.45em 1em 0.45em 0.5em; border: 0; border-radius: 0.8em; color: var(--navy); font: inherit;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF8 100%);
  box-shadow: 0 0 0 1px rgba(201, 161, 74, 0.35), 0 0.25em 0.7em rgba(11, 31, 58, 0.05);
  transition: box-shadow 0.2s, background 0.25s, transform 0.15s, opacity 0.25s;
}
.vm-w:hover:not([disabled]), .vm-d:hover:not([disabled]) { box-shadow: 0 0 0 1px var(--gold), 0 0.4em 1em rgba(11, 31, 58, 0.1); transform: translateY(-1px); }
.vm-w[aria-pressed="true"], .vm-d[aria-pressed="true"] { background: #FBF3DF; box-shadow: 0 0 0 2px var(--gold), 0 0 0 0.35em rgba(231, 200, 120, 0.25); }
.vm-n, .vm-pairno {
  flex: none; display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95em; line-height: 1; color: var(--navy);
  background: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #F6ECD4 60%, #E9D9B4 100%);
  box-shadow: 0 0 0 1px var(--gold), inset 0 -2px 4px rgba(142, 106, 34, 0.14);
}
.vm-pairno:empty { background: none; box-shadow: inset 0 0 0 1px rgba(201, 161, 74, 0.35); }
.vm-word { font-family: var(--font-display); font-weight: 600; font-size: 1.3em; line-height: 1.1; }
.vm-def { display: flex; flex-direction: column; gap: 0.2em; font-size: 0.86em; line-height: 1.4; }
.vm-ar { font-family: var(--font-ar); font-size: 1.15em; color: #8E6A22; text-align: right; }
.vm-ar[hidden] { display: none; }
[aria-pressed="true"] .vm-n, [aria-pressed="true"] .vm-pairno { background: var(--gold-leaf); box-shadow: 0 0 0 1px #A87E2A; }

/* a correct pair */
.vm-w.ok, .vm-d.ok { cursor: default; background: var(--vm-emerald-bg); box-shadow: 0 0 0 1.5px var(--vm-emerald); transform: none; }
.vm-w.ok .vm-n, .vm-d.ok .vm-pairno { background: var(--vm-emerald); color: #fff; box-shadow: 0 0 0 1px var(--vm-emerald), 0 0 0 0.25em rgba(29, 106, 78, 0.15); }
.vm-w.ok .vm-word { color: #123F2F; }
/* a wrong try */
.vm-w.no, .vm-d.no { background: var(--vm-ruby-bg); box-shadow: 0 0 0 1.5px var(--vm-ruby); }
@media (prefers-reduced-motion: no-preference) {
  .vm-w.no, .vm-d.no { animation: vm-shake 0.4s; }
  @keyframes vm-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
  .vm-w.ok:not(.seen), .vm-d.ok:not(.seen) { animation: vm-ok 0.5s cubic-bezier(.2, 1.3, .4, 1); }
  @keyframes vm-ok { 0% { transform: scale(0.97); } 60% { transform: scale(1.02); } 100% { transform: none; } }
  .vm.revealed .vm-w, .vm.revealed .vm-d { animation: none; }
}
.vm.complete .vm-grid { filter: drop-shadow(0 0 1.2em rgba(241, 213, 138, 0.35)); }
.vm-done { margin: 1em 0 0; text-align: center; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.15em; color: var(--vm-emerald); }
@media (max-width: 640px) {
  .vm-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 0.5em 0.6em; }
  .vm-w, .vm-d { padding: 0.4em 0.6em 0.4em 0.4em; gap: 0.45em; }
  .vm-word { font-size: 1.1em; }
  .vm-def { font-size: 0.8em; }
}
.vm-def { flex: 1; min-width: 0; }
.vm-word { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) {
  .vm-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .vm-pairno:empty { display: none; }
  .vm-n, .vm-pairno { width: 1.6em; height: 1.6em; font-size: 0.85em; }
  .vm-word { font-size: 1em; }
}
