/* Matching (matching/index.php): the words in a narrower column beside their clues, each a button; a picked one is
   outlined, a matched pair green with the same number, a wrong try flashes red. The page header, bar and done box are the
   shared play-page pieces (.ec-play-* in css/ui.css, .ec-ag-done from the anagram game's look, repeated here). */
.ec-mt { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px 22px; align-items: start; }
.ec .ec-mt-h { margin: 0 0 8px; font: 700 13px "Lato", sans-serif; letter-spacing: .5px; text-transform: uppercase; color: var(--ec-ink-2); }
.ec-mt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ec-mt-item { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid var(--ec-line); border-radius: 12px;
	background: var(--ec-surface); color: var(--ec-ink); text-align: left; font: 16px/1.35 "Lato", sans-serif; cursor: pointer; transition: background-color .15s, border-color .15s; }
.ec-mt-item.is-term { font: 600 19px/1.3 "Poppins", "Lato", sans-serif; }
.ec-mt-item:hover:not(:disabled) { border-color: var(--t-ink); }
.ec-mt-item:focus-visible { outline: 3px solid var(--ec-focus); outline-offset: 2px; }
.ec-mt-item[aria-pressed="true"] { border-color: var(--t-ink); background: var(--t-bg); box-shadow: 0 0 0 2px var(--t-ink) inset; }
.ec-mt-item.is-matched { border-color: #9fd3a3; background: var(--ec-green-soft); color: var(--ec-green-ink); cursor: default; }
.ec-mt-item.is-wrong { border-color: #e39a97; background: #fbeaea; animation: ec-mt-shake .35s; }
.ec-mt-n { flex: none; display: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ec-green); color: #fff; font: 700 14px "Lato", sans-serif; }
.ec-mt-item.is-matched .ec-mt-n { display: grid; }
@keyframes ec-mt-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .ec-mt-item.is-wrong { animation: none; } }
/* the round's done box, as on the anagram game */
.ec-ag-done { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; margin-top: 18px; padding: 16px;
	border-radius: 14px; background: var(--ec-green-soft); border: 1px solid #9fd3a3; }
.ec-ag-done[hidden] { display: none; }
.ec-ag-done p { margin: 0; font: 600 20px "Rubik", "Lato", sans-serif; color: var(--ec-green-ink); text-align: center; }
.ec-ag-done .fa-star { color: #d99a00; }
@media (max-width: 575px) {
	.ec-mt { gap: 10px; }
	.ec-mt-item { padding: 8px 10px; font-size: 15px; min-height: 48px; }
	.ec-mt-item.is-term { font-size: 16px; }
}
.ec-mt-item.is-pic { padding: 6px; justify-content: flex-start; }
.ec-mt-pic { display: block; max-width: 100%; max-height: 120px; border-radius: 8px; object-fit: contain; }
@media (max-width: 575px) { .ec-mt-pic { max-height: 90px; } }
.ec-mt-item.is-pic > span:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
