/* Game Lab: Match It. A clue card rides a conveyor belt; tiles below. Same family and themes as the memory game. */
@font-face { font-family: 'DX Letters'; src: url('../../assets/fonts/dx-letters-bold.woff2') format('woff2'); font-weight: 700; font-display: block; }
.lm { --outline: #26324a; --bar: rgba(255,255,255,.8); --txt: #1c2b3d;
	position: relative; overflow: hidden; border-radius: 26px; max-width: 1000px; margin: 0 auto; min-height: 560px; padding: 0 0 72px; isolation: isolate;
	font-family: var(--dx-font-heading, 'Lexend', system-ui, sans-serif); color: var(--txt); box-shadow: 0 10px 30px rgba(28,43,61,.18); }
.lm--night { --bar: rgba(20,26,50,.6); --txt: #fff; }
.lm:fullscreen { max-width: none; border-radius: 0; }
.lm-scene { position: absolute; inset: 0; z-index: -1; } .lm-scene svg { width: 100%; height: 100%; display: block; }
.lm-scene::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.25); } .lm--night .lm-scene::after { background: rgba(0,0,0,.05); }
.lm-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .7rem 1rem; margin: .75rem; border-radius: 18px; background: var(--bar); backdrop-filter: blur(4px); }
.lm-timer { font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.lm-status { text-align: center; font-size: clamp(1rem, .8rem + 1vw, 1.45rem); font-weight: 800; }
.lm-status--warn { color: #c23b3b; } .lm--night .lm-status--warn { color: #ffb4a8; } .lm-status--good { color: #1f7a4a; } .lm--night .lm-status--good { color: #9ff0c4; }
.lm-count { font-size: clamp(1rem, .9rem + .8vw, 1.4rem); font-weight: 800; color: #1f7a4a; background: #e7f6ee; padding: .15rem .7rem; border-radius: 999px; white-space: nowrap; }
/* the conveyor belt */
.lm-belt { position: relative; height: clamp(190px, 26vw, 250px); margin: .4rem 0 1rem; overflow: hidden; }
.lm-belt__track { position: absolute; left: 0; right: 0; bottom: 22px; height: 26px; border-top: 3px solid var(--outline); border-bottom: 3px solid var(--outline);
	background: repeating-linear-gradient(90deg, #5c6b80 0 18px, #74849a 18px 36px); }
.lm-belt.is-moving .lm-belt__track { animation: lm-roll .35s linear infinite; }
.lm-belt__rollers { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: space-around; }
.lm-belt__rollers span { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle, #cfd6de 0 30%, #8994a3 31% 60%, #26324a 61%); }
.lm-belt.is-moving .lm-belt__rollers span { animation: lm-spin .35s linear infinite; }
.lm-clue { position: absolute; left: 0; right: 0; bottom: 50px; margin: 0 auto; width: min(80%, 540px); min-height: clamp(96px, 13vw, 140px);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: .9rem 1.4rem;
	background: #fffaf0; border: 4px solid var(--outline); border-radius: 20px; box-shadow: 0 6px 0 var(--outline), 0 12px 20px rgba(0,0,0,.15); color: #1c2b3d; text-align: center; }
.lm-clue.is-right { background: #e9fbf1; border-color: #1f7a4a; box-shadow: 0 6px 0 #1f7a4a; }
.lm-clue__word { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); line-height: 1.1; }
.lm-clue__word b { color: #c0475a; }
.lm-clue__meaning { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem); line-height: 1.15; }
.lm-clue__answer { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); color: #fff; background: #2fa36b; border-radius: 12px; padding: .1em .6em; animation: lm-drop .35s cubic-bezier(.34,1.56,.64,1); }
.lm-clue__whole { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.5rem, 1rem + 1.8vw, 2.2rem); color: #1f7a4a; line-height: 1.1; animation: lm-drop .4s cubic-bezier(.34,1.56,.64,1) .15s backwards; }
.lm-blank { display: inline-block; min-width: 1.6em; height: 1.15em; margin: 0 .06em; vertical-align: -.12em; border: 3px dashed #9fb4c9; border-radius: 10px; background: rgba(175,205,239,.2); }
.lm-blank.is-filled { border: 3px solid #1f7a4a; background: #bfeccf; color: #1f7a4a; min-width: 0; height: auto; padding: 0 .08em; animation: lm-drop .35s cubic-bezier(.34,1.56,.64,1); }
/* tiles */
.lm-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 14px); padding: 0 clamp(.8rem, 3vw, 2rem); }
.lm-tiles--few { grid-template-columns: repeat(auto-fit, minmax(130px, 200px)); justify-content: center; }
.lm-tile { touch-action: none; user-select: none; -webkit-user-select: none; position: relative; font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.15rem, .8rem + 1.2vw, 1.8rem); line-height: 1.1; color: #fff; min-height: clamp(58px, 7vw, 72px); padding: .3em .4em;
	border-radius: 16px; border: 3px solid var(--outline); background: linear-gradient(180deg, #3aa6a0, #1b7f7a); box-shadow: 0 5px 0 var(--outline); cursor: pointer; text-shadow: 0 1px 1px rgba(0,0,0,.25); overflow-wrap: anywhere; transition: transform .12s, opacity .25s; }
.lm-tiles--few .lm-tile { font-size: clamp(1.5rem, 1rem + 2vw, 2.4rem); min-height: 80px; background: linear-gradient(180deg, #e3a02a, #c98314); }
.lm-tile:hover:not(:disabled) { transform: translateY(-3px); }
.lm-tile:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f, 0 5px 0 var(--outline); }
.lm-tile.is-right { background: linear-gradient(180deg, #4fc58a, #2a9a61); border-color: #1f7a4a; box-shadow: 0 5px 0 #1f7a4a; }
.lm-tile.is-wrong { background: linear-gradient(180deg, #ef7b73, #d64545); border-color: #a52f2f; box-shadow: 0 5px 0 #a52f2f; }
.lm-tile.is-lifted { opacity: .35; }
.lm-tile--ghost { position: fixed; z-index: 99999; pointer-events: none; transform: rotate(-3deg) scale(1.06); box-shadow: 0 10px 0 #26324a, 0 18px 30px rgba(0,0,0,.25); }
.lm-clue.is-over { background: #fff4d6; box-shadow: 0 0 0 5px #f2b01e, 0 6px 0 var(--outline); }
.lm-clue.is-shown { background: #fff6f4; border-color: #c23b3b; box-shadow: 0 6px 0 #c23b3b; }
.lm-stars { margin: .2rem 0 0; font-size: 2.2rem; color: #f2b01e; letter-spacing: .1em; }
.lm-lboard__score { min-width: 3em; text-align: right; font-weight: 800; color: #1f7a4a; }
.lm-mark { position: absolute; top: -14px; right: -10px; z-index: 3; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 3px solid #fff; color: #fff; font-size: 1.4rem; font-weight: 900; box-shadow: 0 3px 8px rgba(0,0,0,.3); animation: lm-markpop .9s cubic-bezier(.34,1.56,.64,1) forwards; font-family: system-ui, sans-serif; text-shadow: none; }
.lm-mark--right { background: #2fa36b; } .lm-mark--wrong { background: #d64545; }
.lm-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; } .lm-spacer { flex: 1; }
.lm-ctl { width: 48px; height: 48px; border-radius: 14px; border: 3px solid var(--outline); background: rgba(255,255,255,.92); font-size: 1.35rem; cursor: pointer; box-shadow: 0 3px 0 var(--outline); }
.lm-ctl:active, .lm-btn:active, .lm-tile:active:not(:disabled) { transform: translateY(2px); }
.lm-ctl:focus-visible, .lm-btn:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lm-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(28,43,61,.3); backdrop-filter: blur(2px); padding: 1rem; overflow: auto; } .lm-overlay[hidden] { display: none; }
.lm-card { background: #fff; color: #1c2b3d; border: 4px solid #26324a; border-radius: 26px; box-shadow: 0 8px 0 #26324a, 0 18px 40px rgba(0,0,0,.25); padding: 1.4rem 1.8rem; text-align: center; max-width: 460px; width: 100%; animation: lm-pop .45s cubic-bezier(.34,1.56,.64,1); }
.lm-card__kicker { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c0475a; }
.lm-card__title { margin: .3rem 0 .3rem; font-size: 1.5rem; } .lm-card__goal { margin: 0 0 .5rem; font-weight: 800; color: #17706f; } .lm-card__text { margin: 0 0 1rem; color: #3b4a5c; font-family: var(--dx-font-body, inherit); }
.lm-time { font-size: 2.8rem; font-weight: 800; margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.lm-btn { font: inherit; font-weight: 800; font-size: 1.25rem; margin-top: 1rem; padding: .7rem 2.4rem; border-radius: 999px; border: 3px solid #26324a; background: #2fa36b; color: #fff; cursor: pointer; box-shadow: 0 5px 0 #1f6f48; }
.lm-btn--small { font-size: 1rem; margin: 0; padding: .45rem 1.2rem; }
.lm-initials label { display: block; font-weight: 700; margin-bottom: .35rem; } .lm-initials > div { display: flex; gap: .5rem; justify-content: center; }
.lm-initials input { font: inherit; font-weight: 800; font-size: 1.3rem; width: 5.5em; text-align: center; text-transform: uppercase; letter-spacing: .15em; padding: .35rem .5rem; border: 3px solid #26324a; border-radius: 12px; }
.lm-initials__note { margin: .4rem 0 0; font-size: .85rem; color: #566273; font-family: var(--dx-font-body, inherit); }
.lm-lboard__title { margin: 1rem 0 .3rem; font-weight: 800; }
.lm-lboard { list-style: none; counter-reset: r; margin: 0 auto; padding: 0; max-width: 260px; text-align: left; }
.lm-lboard li { counter-increment: r; display: flex; gap: .6rem; padding: .25rem .6rem; border-radius: 10px; font-variant-numeric: tabular-nums; }
.lm-lboard li::before { content: counter(r) "."; width: 1.6em; color: #566273; font-weight: 700; } .lm-lboard li.is-me { background: #fff4d6; font-weight: 800; }
.lm-lboard__who { flex: 1; font-weight: 800; letter-spacing: .1em; }
.lm-confetti { position: absolute; top: 0; z-index: 6; border-radius: 2px; pointer-events: none; }
@keyframes lm-roll { from { background-position: 0 0; } to { background-position: 36px 0; } }
@keyframes lm-spin { to { transform: rotate(360deg); } }
@keyframes lm-pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
@keyframes lm-drop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes lm-markpop { 0% { transform: scale(0); opacity: 0; } 25% { transform: scale(1.2); opacity: 1; } 40% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 640px) { .lm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lm-top { margin: .6rem .5rem; padding: .5rem .7rem; } .lm-clue { width: 90%; padding: .7rem .8rem; } .lm-belt { height: 170px; } }
@media (prefers-reduced-motion: reduce) { .lm *, .lm { animation: none !important; transition: none !important; } }

/* Picture kind (Pre-Level letter sounds): a big original picture on the card, letters in an alphabet grid */
.lm--picture .lm-belt { height: clamp(220px, 30vw, 270px); }
.lm-pic svg { width: clamp(96px, 13vw, 130px); height: clamp(96px, 13vw, 130px); display: block; }
.lm-pic__word { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); color: #1c2b3d; }
.lm-pic__note { font-size: .9rem; font-weight: 700; color: #c0475a; }
.lm--picture .lm-clue { flex-direction: row; flex-wrap: wrap; gap: .4rem 1rem; }
.lm-tiles--alpha { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.lm-tiles--alpha .lm-tile { min-height: 54px; font-size: clamp(1.2rem, .9rem + 1vw, 1.7rem); background: linear-gradient(180deg, #3aa6a0, #1b7f7a); padding: .2em .1em; }
.lm-tiles--alpha .lm-tile[data-v="Aa"], .lm-tiles--alpha .lm-tile[data-v="Ee"], .lm-tiles--alpha .lm-tile[data-v="Ii"], .lm-tiles--alpha .lm-tile[data-v="Oo"], .lm-tiles--alpha .lm-tile[data-v="Uu"] { background: linear-gradient(180deg, #e3a02a, #c98314); }
.lm-tiles--alpha .lm-tile.is-right { background: linear-gradient(180deg, #4fc58a, #2a9a61); }
.lm-tiles--alpha .lm-tile.is-wrong { background: linear-gradient(180deg, #ef7b73, #d64545); }
.lm-opt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .2rem .45rem; margin: 0 0 .2rem; font-size: .95rem; line-height: 1.3; font-weight: 700; color: #3b4a5c; cursor: pointer; }
.lm-opt input { width: 20px; height: 20px; accent-color: #17706f; }
.lm-opt span { font-weight: 400; color: #566273; }
@media (max-width: 640px) { .lm-tiles--alpha { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; } .lm-tiles--alpha .lm-tile { min-height: 46px; font-size: 1.15rem; } }
