How it works: Shuffle pairs, render cards with hidden values in data-val. Track two active flips; if equal, mark matched, else flip back after a short delay.
data-val
Learning outcomes: state machines, attribute APIs, shuffling, conditional UI.