/* Classroom game styles are scoped so lesson activities keep their own layout. */
.word-game{--wg-purple:#683bb8;--wg-deep:#31205c;--wg-line:#dfd7ed;--wg-green:#176449;--wg-rose:#a3344c;width:100%;height:100%;max-width:1500px;min-height:0;display:flex;flex-direction:column;gap:10px;padding:20px 28px;background:#fff;border-radius:16px;color:#252044;outline:none;overflow:auto;overscroll-behavior:contain}
.word-game button{font:inherit;font-weight:700;min-height:48px;min-width:48px;padding:10px 16px;border:2px solid var(--wg-line);border-radius:12px;touch-action:manipulation;cursor:pointer;color:var(--wg-deep);background:#fff}
.word-game button:focus-visible{outline:4px solid #e4aa28;outline-offset:2px}
.word-game button:disabled{cursor:default;opacity:.48}
.word-game .wg-primary{background:var(--wg-purple);border-color:var(--wg-purple);color:#fff}
.word-game .wg-header{display:flex;justify-content:space-between;align-items:start;gap:18px;flex:none}
.word-game .wg-kicker{font-size:12px;line-height:1.3;letter-spacing:1.6px;text-transform:uppercase;font-weight:700;color:var(--wg-purple);margin:0 0 7px}
.word-game h2{font-size:clamp(24px,2.7vw,38px);line-height:1.1;letter-spacing:-.7px;color:var(--wg-deep);margin:0 0 8px}
.word-game .wg-instruction{font-size:clamp(14px,1.25vw,19px);line-height:1.4;margin:0;color:#666079}
.word-game .wg-header-controls{display:flex;align-items:center;gap:12px;flex:none}
.word-game .wg-progress{white-space:nowrap;font-weight:700;font-size:15px;color:var(--wg-purple);padding:9px 12px;background:#f3eefb;border-radius:20px}
.word-game .wg-restart{font-size:14px;white-space:nowrap}
.word-game .wg-body{flex:1;min-height:0;display:flex;align-items:stretch;justify-content:center}
.word-game .wg-round{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.2fr);width:100%;gap:25px;min-height:0}
.word-game .wg-picture{min-height:0;display:flex;align-items:center;justify-content:center;padding:15px;border:1px solid #ece7f5;background:#fbfaff;border-radius:18px}
.word-game .wg-picture img{width:100%;height:100%;max-height:100%;object-fit:contain;min-height:0;pointer-events:none;user-select:none}
.word-game .wg-puzzle{display:flex;flex-direction:column;justify-content:center;gap:20px;min-width:0;min-height:0}
.word-game .wg-letter-clue{display:flex;gap:15px;align-items:center;justify-content:center;min-width:0}
.word-game .wg-letter-clue>div{min-width:0;flex:1}
.word-game .wg-figure{width:95px;max-height:140px;flex:none;color:var(--wg-purple)}
.word-game .wg-chances{margin:0 0 12px;text-align:center;font-size:17px;color:#666079}
.word-game .wg-slots{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px;min-height:53px}
.word-game .wg-word-group{display:inline-flex;gap:5px;max-width:100%;flex-wrap:nowrap}
.word-game .wg-slot{display:inline-flex;align-items:center;justify-content:center;min-width:30px;width:clamp(30px,3.5vw,52px);height:clamp(39px,4.3vw,58px);border-bottom:4px solid var(--wg-purple);background:#f3eefb;border-radius:6px 6px 0 0;font-size:clamp(20px,2.5vw,34px);font-weight:700;color:var(--wg-deep)}
.word-game .wg-word-gap{width:17px;flex:none}.word-game .wg-punctuation{align-self:center;font-size:24px}.word-game .wg-revealed{background:#fff1df;border-color:#c0862c}
.word-game .wg-keyboard{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:7px;max-width:690px;width:100%;margin:auto}
.word-game .wg-keyboard .wg-key{padding:7px 0;min-width:0;font-size:clamp(19px,1.9vw,28px);min-height:48px}
.word-game .wg-letter-bank{display:flex;flex-wrap:wrap;gap:9px;justify-content:center}
.word-game .wg-letter-bank .wg-key{min-width:52px;min-height:56px;font-size:27px;background:var(--wg-deep);border-color:var(--wg-deep);color:#fff}
.word-game .wg-letter-bank .wg-key:disabled{background:#eeebf5;border-color:#eeebf5;color:#92889e;opacity:.65}
.word-game .wg-edit-tools{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.word-game .wg-edit-tools button{font-size:16px}
.word-game .wg-correct{color:var(--wg-green);border-color:var(--wg-green);background:#e9f7f0;opacity:1!important}
.word-game .wg-wrong{color:#8c3049;border-color:#d89aa9;background:#fff1f4;opacity:.72!important}
.word-game .wg-question{font-size:clamp(20px,2.1vw,30px);font-weight:700;color:var(--wg-deep);line-height:1.35;margin:0}
.word-game .wg-quiz-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.word-game .wg-quiz-options button{font-size:clamp(21px,2.6vw,37px);min-height:86px;overflow-wrap:anywhere}
.word-game .wg-quiz-options button span{display:block;font-size:15px;line-height:1.4}
.word-game .wg-memory{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;width:100%;min-height:0}
.word-game .wg-memory-card{min-width:0;min-height:0;position:relative;background:var(--wg-deep);border-color:var(--wg-deep);color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0;overflow:hidden;padding:10px;font-size:clamp(18px,2vw,29px);line-height:1.2}
.word-game .wg-memory-card:disabled{opacity:1}.word-game .wg-memory-card.wg-face-up{background:#f9f6fe;border-color:var(--wg-purple);color:var(--wg-deep)}
.word-game .wg-memory-card img{width:100%;height:100%;object-fit:contain;min-height:0;pointer-events:none;user-select:none}
.word-game .wg-card-back{font-size:clamp(30px,5vw,64px);line-height:1.2;color:#d9c5ff}.word-game .wg-memory-card small{font-size:14px;position:absolute;bottom:8px;right:11px;color:#d9c5ff}
.word-game .wg-memory-card.wg-matched{background:#eefaf4;border-color:var(--wg-green);color:var(--wg-green)}.word-game .wg-found{position:absolute;top:5px;right:7px;border-radius:50%;background:var(--wg-green);color:#fff;width:26px;height:26px;font-size:18px;line-height:26px}
.word-game .wg-footer{display:flex;justify-content:center;align-items:center;gap:15px;flex:none;min-height:48px}
.word-game .wg-feedback{margin:0;line-height:1.4;color:var(--wg-purple);font-size:clamp(15px,1.4vw,20px);font-weight:700;text-align:center;flex:1}
.word-game .wg-footer button{white-space:nowrap}.word-game .wg-finish{align-self:center;text-align:center;max-width:850px;min-height:0}.word-game .wg-star{font-size:75px;line-height:1;color:#e0a625}.word-game .wg-finish h3{font-size:clamp(28px,3vw,44px);color:var(--wg-deep);margin:12px 0}.word-game .wg-finish p{font-size:20px;line-height:1.4;margin:12px 0 20px}.word-game .wg-finish button{margin:8px 5px}.word-game .wg-review-words{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px 0}.word-game .wg-review-words span{padding:8px 16px;background:#f3eefb;color:var(--wg-purple);font-weight:700;border-radius:20px;font-size:21px}
@media(min-width:1600px) and (min-height:850px){.word-game{padding:25px 40px;gap:24px}.word-game .wg-keyboard .wg-key{min-height:64px}.word-game .wg-quiz-options button{min-height:110px}.word-game .wg-figure{width:125px;max-height:160px}}
@media(max-width:1050px){.word-game{padding:14px 18px;gap:10px}.word-game .wg-round{grid-template-columns:minmax(135px,.65fr) minmax(0,1.35fr);gap:18px}.word-game .wg-header-controls{gap:7px}.word-game .wg-progress{font-size:13px;padding:8px}.word-game .wg-figure{width:68px;max-height:102px}.word-game .wg-keyboard{gap:5px}.word-game .wg-puzzle{gap:15px}.word-game .wg-memory{gap:8px}}
@media(max-width:700px) and (orientation:portrait){.word-game{padding:12px;gap:8px}.word-game .wg-header{gap:8px}.word-game h2{font-size:23px;margin-bottom:5px}.word-game .wg-kicker{font-size:10px;margin-bottom:4px}.word-game .wg-instruction{font-size:13px}.word-game .wg-header-controls{flex-direction:column;gap:5px}.word-game .wg-restart{min-height:40px;font-size:12px;padding:6px 9px}.word-game .wg-round{grid-template-columns:1fr;grid-template-rows:minmax(75px,.7fr) minmax(0,1.3fr);gap:8px}.word-game .wg-picture{padding:5px}.word-game .wg-puzzle{gap:10px}.word-game .wg-figure{width:43px;max-height:67px}.word-game .wg-letter-clue{gap:6px}.word-game .wg-chances{font-size:13px;margin-bottom:5px}.word-game .wg-slot{min-width:25px;width:29px;height:35px;font-size:23px;border-bottom-width:3px}.word-game .wg-word-group{gap:3px}.word-game .wg-slots{gap:3px;min-height:36px}.word-game .wg-word-gap{width:9px}.word-game .wg-keyboard{gap:4px}.word-game .wg-keyboard .wg-key{min-height:42px;font-size:19px;padding:4px 0;border-radius:8px}.word-game .wg-letter-bank{gap:5px}.word-game .wg-letter-bank .wg-key{min-width:37px;min-height:43px;font-size:23px;padding:5px}.word-game .wg-edit-tools button{min-height:42px;padding:6px 12px;font-size:13px}.word-game .wg-footer{gap:8px;min-height:40px}.word-game .wg-feedback{font-size:13px}.word-game .wg-footer button{min-height:42px;font-size:13px;padding:6px 10px}.word-game .wg-memory{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:7px}.word-game .wg-memory-card{font-size:21px;padding:7px}.word-game .wg-quiz-options{gap:8px}.word-game .wg-quiz-options button{min-height:57px;font-size:23px;padding:8px}.word-game .wg-question{font-size:18px}.word-game .wg-finish p{font-size:17px}.word-game .wg-review-words{gap:6px;margin:10px 0}.word-game .wg-review-words span{font-size:17px;padding:6px 10px}.word-game .wg-star{font-size:48px}}
@media(max-height:650px) and (orientation:landscape){.word-game{padding:8px 14px;gap:5px}.word-game .wg-kicker{font-size:9px;margin-bottom:3px}.word-game h2{font-size:23px;margin-bottom:4px}.word-game .wg-instruction{font-size:12px}.word-game .wg-header{gap:12px}.word-game .wg-progress{font-size:12px}.word-game .wg-restart{min-height:37px;font-size:12px;padding:6px 9px}.word-game .wg-puzzle{gap:8px}.word-game .wg-figure{width:42px;max-height:62px}.word-game .wg-chances{font-size:12px;margin-bottom:4px}.word-game .wg-slot{min-width:24px;width:32px;height:33px;font-size:22px;border-bottom-width:3px}.word-game .wg-slots{min-height:34px;gap:3px}.word-game .wg-word-group{gap:3px}.word-game .wg-keyboard{gap:4px;max-width:540px}.word-game .wg-keyboard .wg-key{min-height:35px;height:35px;font-size:18px;padding:3px}.word-game .wg-letter-bank .wg-key{min-width:39px;min-height:41px;font-size:23px;padding:5px}.word-game .wg-letter-bank{gap:5px}.word-game .wg-edit-tools button{min-height:36px;padding:5px 10px;font-size:12px}.word-game .wg-picture{padding:5px}.word-game .wg-footer{min-height:36px;gap:8px}.word-game .wg-feedback{font-size:13px}.word-game .wg-footer button{min-height:36px;padding:5px 10px;font-size:13px}.word-game .wg-memory{gap:7px}.word-game .wg-memory-card{font-size:21px;padding:6px}.word-game .wg-question{font-size:19px}.word-game .wg-quiz-options{gap:8px}.word-game .wg-quiz-options button{min-height:53px;font-size:24px;padding:7px}.word-game .wg-quiz-options button span{font-size:11px}.word-game .wg-star{font-size:37px}.word-game .wg-finish h3{font-size:26px;margin:7px 0}.word-game .wg-finish p{font-size:16px;margin:6px 0}.word-game .wg-review-words{margin:8px 0;gap:6px}.word-game .wg-review-words span{font-size:16px;padding:5px 10px}.word-game .wg-finish button{min-height:37px;margin:5px;font-size:14px;padding:5px 13px}}
/* Tiny windows can scroll the complete game; no control is clipped or hidden. */
@media(max-height:440px) and (orientation:landscape){.word-game .wg-body{min-height:185px;flex:none}.word-game .wg-round{min-height:185px}.word-game.game-memory .wg-body{min-height:175px}}

@media(max-width:700px) and (orientation:portrait){.word-game.game-memory .wg-body{min-height:277px;flex-shrink:0}.word-game .wg-memory{grid-template-rows:repeat(4,minmax(64px,1fr))}}
@media(max-width:360px){.word-game .wg-memory-card{font-size:18px;overflow-wrap:anywhere}}
