.games-welcome{display:flex;justify-content:space-between;align-items:center;gap:35px;padding:12px 0 32px}.games-welcome h1{font-size:38px;letter-spacing:-.035em;margin:0 0 16px;line-height:1.2}.games-welcome h1 span{color:var(--blue)}.games-welcome p{font-size:14px;color:var(--muted);max-width:60ch;margin:0}.games-welcome-art{position:relative;width:200px;height:150px;flex:none}.games-welcome-art span{position:absolute;display:grid;place-items:center;font-weight:800;font-size:44px;border-radius:22px;width:94px;height:105px;background:#d4eefa;color:#2457a0;transform:rotate(-12deg);left:8px;top:15px}.games-welcome-art span:nth-child(2){left:86px;top:42px;background:#ffe5bd;color:#a75d27;transform:rotate(14deg)}.games-welcome-art span:last-child{width:40px;height:40px;left:135px;top:-8px;background:none;color:#f1ad41;transform:rotate(10deg);font-size:45px}
.game-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.play-card.game-tile{display:flex;flex-direction:column;align-items:stretch;position:relative;overflow:hidden;text-align:left;padding:23px;background:#fff;border:0;border-radius:22px;box-shadow:0 8px 28px #213c6810;min-width:0;color:var(--ink);transition:box-shadow 180ms,background-color 180ms}.play-card.game-tile:hover{background:#fff;box-shadow:0 13px 32px #213c6820}.play-card-copy>b{font-size:23px;font-weight:800;display:block;margin-bottom:10px;letter-spacing:-.025em}.play-card-copy>small{font-size:13px;line-height:1.6;display:block;color:#61708c;max-width:42ch;min-height:42px}.play-card .play-card-action{display:flex;justify-content:space-between;align-items:center;margin-top:17px;font-size:12px;font-weight:800;color:var(--blue)}.play-card .play-card-action .ui-icon{width:17px;height:17px}.game-gallery>.mode-speed{grid-column:span 2;display:grid;grid-template-columns:1fr 1.05fr;gap:12px 24px;align-items:center;background:#eeefff}.game-gallery>.mode-speed:hover{background:#e9ebff}.game-gallery>.mode-speed .game-art{grid-column:2;grid-row:1/3;margin:0;height:240px}.game-gallery>.mode-speed .play-card-copy>b{font-size:33px}.game-gallery>.mode-speed .play-card-action{align-self:end}.games-flow-note{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted);margin:28px 0 0}
.game-art{position:relative;overflow:hidden;border-radius:16px;min-height:140px;height:174px;display:block;margin-top:20px;isolation:isolate}.game-art i{font-style:normal;position:absolute;display:block}.art-flash{background:#cdf2e7}.art-quiz{background:#ffe0cf}.art-match{background:#fff0b0}.art-writing{background:#cdeeff}.art-speed{background:#27215d}.mini-card{width:100px;height:122px;border-radius:14px;background:white;box-shadow:0 8px 0 #152f5c15;display:flex!important;align-items:center;justify-content:center;flex-direction:column;padding:13px;gap:8px;top:25px;left:calc(50% - 50px);font-weight:800}.mini-card b{font-size:26px;line-height:1.2}.mini-card span{font-size:12px;color:#647391}.card-back{transform:translateX(-25px) rotate(-15deg);background:#5c81e4}.card-front{transform:translateX(17px) rotate(8deg)}.art-star{font-size:35px;line-height:1;color:#ffca50}.star-a{left:12%;top:20%}.star-b{right:12%;bottom:14%;font-size:27px;color:#4978c1}.quiz-dot{width:66px;height:66px;background:#e58282;color:white;border-radius:50%;font-size:42px;line-height:66px;text-align:center;top:22px;left:25%;transform:rotate(-10deg)}.mini-answer{background:white;border-radius:12px;padding:10px 20px;font-size:22px;font-weight:800;box-shadow:0 7px 0 #ac63591c}.answer-a{left:12%;top:89px;transform:rotate(-7deg)}.answer-b{right:13%;top:70px;transform:rotate(10deg);color:#238666}.mini-answer b{color:#238666;margin-left:15px}.match-a{left:14%;top:24px;transform:rotate(-10deg);height:105px;width:105px;background:#6859d5;color:white}.match-b{left:auto;right:13%;top:44px;transform:rotate(10deg);height:105px;width:115px}.match-b b{font-size:16px;line-height:1.45;text-align:center}.match-b span{font-size:24px;color:#238666}.mini-notebook{width:118px;height:137px;background:white;left:calc(50% - 62px);top:18px;transform:rotate(-8deg);border-radius:8px;box-shadow:-8px 0 0 #5787ce;padding:25px 18px}.mini-notebook b{font-size:26px;color:#395c9b}.mini-notebook span{display:block;border-bottom:3px solid #d7e6fb;margin-top:15px}.mini-pencil{height:125px;width:18px;background:#f2b95b;top:24px;left:67%;transform:rotate(24deg);border-radius:3px;box-shadow:inset -5px 0 0 #d18b34}.mini-pencil:after{content:'';position:absolute;bottom:-16px;border-left:9px solid transparent;border-right:9px solid transparent;border-top:16px solid #556682}.mini-asteroid{border-radius:43% 57% 48% 52%;background:#6360cf;color:#edeaff;text-align:center;display:grid!important;place-items:center;width:78px;height:78px;font-size:29px;font-weight:800;border:2px solid #aaa7ff}.asteroid-a{left:17%;top:18%;transform:rotate(-12deg)}.asteroid-b{right:14%;top:35%;width:63px;height:63px;transform:rotate(16deg)}.mini-blaster{width:72px;height:72px;background:#65e3bb;border:7px solid #2fb2a5;border-radius:50%;bottom:-8px;left:calc(50% - 36px);transform:rotate(-18deg)}.mini-blaster:before{content:'';position:absolute;left:22px;top:-28px;width:17px;height:32px;background:#afcbe7;border:4px solid #6d8eb1;border-radius:5px}.mini-blaster b{display:block;text-align:center;line-height:58px;font-size:26px;color:#176371}.mini-laser{width:5px;height:28px;left:48%;top:40%;background:#ffe884;border-radius:6px;transform:rotate(-20deg)}.art-speed .star-a{color:#b9c0ff;left:73%;top:10%;font-size:20px}
.game-tiles .play-card.compact{padding:17px;border-radius:16px;border:1px solid var(--border);box-shadow:none}.play-card.compact .play-card-copy>b{font-size:17px;margin-bottom:7px}.play-card.compact .play-card-copy>small{font-size:12px;min-height:36px}.play-card.compact .game-art{height:120px;min-height:120px;margin-top:12px}.compact .mini-card{scale:.75;transform-origin:center top;top:13px}.compact .mini-notebook,.compact .mini-pencil{scale:.75;transform-origin:center top;top:14px}.compact .mini-answer{scale:.8}.compact .quiz-dot{scale:.7;top:5px}.compact .answer-a{top:69px}.compact .answer-b{top:54px}.compact .mini-asteroid{scale:.8;transform-origin:top center}.compact .mini-blaster{scale:.8;transform-origin:center bottom}.play-card.compact .play-card-action{font-size:11px;margin-top:11px}
.game-source-heading{display:flex;align-items:center;gap:25px;margin:14px 0 28px}.game-source-heading .game-art{width:155px;height:125px;min-height:125px;margin:0;flex:none}.game-source-heading .mini-card,.game-source-heading .mini-asteroid{scale:.7;transform-origin:top center}.game-source-heading .mini-blaster{scale:.7;transform-origin:bottom center}.game-source-heading .mini-answer{scale:.7}.game-source-heading .mini-notebook,.game-source-heading .mini-pencil{scale:.7;transform-origin:top center}.game-source-heading h1{font-size:30px;margin:0 0 10px}.game-source-heading p{font-size:14px;color:var(--muted);margin:0 0 8px}.game-source-heading>div>span{font-size:12px;color:var(--blue);font-weight:700}.game-source-panel{max-width:900px}.source-tabs{display:flex;gap:10px;border-bottom:1px solid var(--border);padding-bottom:15px}.source-tabs button{border:1px solid var(--border);background:white;border-radius:10px;padding:12px 18px;font-size:13px;font-weight:700;display:flex;gap:9px;align-items:center}.source-tabs button.selected{background:var(--blue);border-color:var(--blue);color:white}.source-books{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.source-books button{padding:9px 15px;border:1px solid var(--border);border-radius:9px;background:white;font-size:13px;font-weight:800;min-width:48px}.source-books button.selected{background:#e5ecff;border-color:#7695e0;color:#234db9}.source-class-name{font-size:13px;color:var(--muted);margin:22px 0}.source-search{max-width:480px;margin:20px 0}.source-unit-list{display:grid;gap:12px}.source-unit{display:flex;align-items:center;gap:17px;padding:19px 22px;border:1px solid #dbe1ef;border-radius:14px;background:white;text-align:left;width:100%}.source-unit:hover{border-color:#a8bde8;background:#fbfcff}.source-unit.selected{border-color:#456bd2;background:#eef3ff}.source-unit-icon{width:44px;height:48px;display:grid;place-items:center;border-radius:12px;color:#2e8eaf;background:#e9f7fb;flex:none}.source-unit>span:nth-child(2){flex:1;min-width:0}.source-unit strong{display:block;font-size:15px;line-height:1.45;margin-bottom:5px}.source-unit small{font-size:12px;color:var(--muted)}.source-unit-check{display:grid;place-items:center;width:26px;height:26px;border:1px solid #b9c6df;border-radius:50%;color:transparent;flex:none}.source-unit.selected .source-unit-check{background:var(--blue);color:white;border-color:var(--blue)}.source-unit-check .ui-icon{width:16px;height:16px}.source-link{margin:24px 0;padding:20px 0;border-top:1px solid var(--border)}.source-link form{margin-top:17px;display:flex;align-items:flex-end;gap:12px}.source-link form .field{flex:1;margin:0}.source-link .btn{flex:none;min-height:45px}.source-confirm{position:sticky;bottom:0;margin:22px -16px -16px;padding:18px 16px;background:#f7f9fcf5;border-top:1px solid #d4dff1;display:flex;align-items:center;justify-content:space-between;gap:20px;z-index:10}.source-confirm>div{min-width:0}.source-confirm span{font-size:11px;color:var(--blue);font-weight:800;display:block}.source-confirm strong{font-size:14px;display:block;margin:3px 0;overflow-wrap:anywhere}.source-confirm small{font-size:12px;color:var(--muted)}.source-confirm>.btn{flex:none}
.game-play-header{background:#fff;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:15px 28px;gap:20px;position:relative;z-index:3}.game-play-header>div{min-width:0;display:flex;gap:12px;align-items:center}.game-play-header strong{font-size:18px;white-space:nowrap}.game-play-header .ui-icon{color:var(--blue)}.game-play-header p{font-size:12px;color:var(--muted);margin:0;max-width:65ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-play-header button{flex:none}.play-room{min-height:calc(100dvh - 80px);padding:28px 32px 42px;background:#f2f5ff}.play-room[data-mode="flash"]{background:#eaf7f3}.play-room[data-mode="match"]{background:#f5f1fb}.play-room[data-mode="quiz"]{background:#fff5e9}.play-room[data-mode="writing"]{background:#edf6ff}.play-room .study-frame,.play-room .quiz-box{max-width:980px;margin:0 auto}.play-room .quiz-box{max-width:740px}.play-room .flash{background:#fff;border:0;border-radius:24px;box-shadow:0 12px 30px #21534a10;min-height:410px}.play-room .flash h2{font-size:38px}.play-room .flash p{color:#647b75}.play-room .quiz-box>.panel{border:0;border-radius:24px;box-shadow:0 12px 30px #8260340d;padding:30px}.play-room .option{border-radius:15px;min-height:72px;font-size:15px;background:#fffaf3}.play-room .option.correct{background:#dcf7e8;border-color:#3d9675}.play-room .option.wrong{background:#ffe3df;border-color:#d37470}.play-room .question{font-size:26px;line-height:1.55}.play-room .match-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;max-width:1150px;margin:20px auto}.play-room .match-tile{position:relative;overflow:hidden;isolation:isolate;min-height:155px;border-radius:19px;border:2px solid #dce0ee;font-size:22px;background:#fff;box-shadow:0 8px 22px #2723490b;padding:20px;display:grid;place-items:center}.match-tile .match-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.22;z-index:-1}.match-tile .match-word{overflow-wrap:anywhere;line-height:1.5}.match-tile[data-side="vi"] .match-word{font-size:17px}.play-room .match-tile.chosen{border-color:#7c67da;background:#ede9ff}.play-room .match-tile.done{opacity:0;visibility:hidden;pointer-events:none}.play-room .match-tile.nope{border-color:#dc777c;background:#ffe8e6;animation:match-wrong 220ms ease}.match-status{max-width:1150px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:15px}.match-status strong{font-size:25px;color:#6d52c1;font-variant-numeric:tabular-nums}.match-status span{font-size:13px;color:#6b6890}.game-help{text-align:center;margin:18px auto;font-size:12px;color:var(--muted)}.game-help a{margin-left:15px}.game-result-head{max-width:980px;margin:25px auto 22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.game-result-head h1{font-size:30px;margin:0 0 8px}.game-result-head p{font-size:13px;color:var(--muted);margin:0}.round-metrics{max-width:980px;margin:0 auto 28px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.round-metrics>div{padding:18px;background:#fff;border:1px solid var(--border);border-radius:14px}.round-metrics strong{font-size:28px;display:block;color:var(--blue);font-variant-numeric:tabular-nums}.round-metrics span{font-size:12px;color:var(--muted)}.learning-reflection{max-width:980px;margin:0 auto 30px}.learning-reflection>h2{font-size:23px;margin:28px 0 17px}.progress-overview{display:grid;grid-template-columns:210px minmax(0,1fr);align-items:center;gap:42px;padding:28px 0}.knowledge-donut{width:190px;height:190px;border-radius:50%;background:conic-gradient(var(--progress-stops));display:grid;place-items:center}.knowledge-donut>div{width:146px;height:146px;border-radius:50%;background:var(--bg);display:flex;align-items:center;justify-content:center;flex-direction:column}.knowledge-donut strong{font-size:39px;line-height:1.2}.knowledge-donut span{font-size:12px;color:var(--muted)}.knowledge-bars{display:grid;gap:20px}.knowledge-bar{display:grid;grid-template-columns:110px 45px 1fr;gap:16px;align-items:center;font-size:13px}.knowledge-bar strong{text-align:right;font-variant-numeric:tabular-nums}.knowledge-bar>i{background:#e8edf4;border-radius:7px;height:10px;overflow:hidden}.knowledge-bar>i>span{height:100%;display:block;background:var(--group-color);width:var(--group-width);border-radius:7px}.reflection-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.knowledge-group{border-top:1px solid var(--border);padding:18px 0}.knowledge-group summary{display:flex;align-items:center;gap:14px;list-style:none;font-size:16px}.knowledge-group summary::after{content:'⌄';margin-left:auto;font-size:20px;color:var(--muted)}.knowledge-group summary>span{min-width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--group-color);color:#23324b;font-size:17px}.knowledge-group[open] summary{margin-bottom:20px}.learning-word-list{display:grid;gap:0}.learning-word{display:flex;gap:16px;align-items:center;border-bottom:1px solid #e9edf4;padding:15px 0}.learning-word:last-child{border-bottom:0}.learning-word>div{flex:1;min-width:0}.learning-word strong{font-size:19px;font-weight:700}.learning-word p{margin:4px 0;font-size:13px;color:#53667e;white-space:pre-wrap}.learning-word small{font-size:12px;color:var(--muted);display:block}.learning-word .mistake-note{color:#a34349;font-size:12px}.round-mistakes{background:#fff;border:1px solid #e1e6ef;border-radius:16px;padding:22px;margin:24px 0}.round-mistakes h3{font-size:18px;margin:0 0 15px}.result-local-note{font-size:12px;color:var(--muted);line-height:1.8}.mastery-definition{font-size:12px;color:var(--muted);margin:18px 0}
@keyframes match-wrong{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@media(max-width:1000px){.game-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.game-gallery>.mode-speed{grid-column:span 2}.games-welcome h1{font-size:33px}.play-room .match-tile{min-height:145px;font-size:20px}.play-room .match-grid{gap:13px}.game-play-header p{max-width:45ch}}
@media(max-width:760px){.games-welcome-art{display:none}.games-welcome{padding-top:4px}.games-welcome h1{font-size:31px}.game-gallery{gap:15px}.play-card.game-tile{padding:20px;border-radius:18px}.play-card-copy>b{font-size:21px}.game-gallery>.mode-speed{gap:15px}.game-gallery>.mode-speed .game-art{height:200px;min-height:200px}.game-gallery>.mode-speed .play-card-copy>b{font-size:29px}.games-flow-note{font-size:12px}.game-source-heading{gap:17px}.game-source-heading .game-art{width:110px;height:105px;min-height:105px}.game-source-heading h1{font-size:26px}.game-source-heading p{font-size:13px}.source-tabs button{font-size:12px;padding:10px 13px;flex:1;justify-content:center}.source-unit{padding:16px;gap:12px}.source-unit strong{font-size:14px}.source-confirm{bottom:75px;gap:14px;margin-bottom:0}.source-confirm small{font-size:11px}.source-confirm strong{font-size:12px}.source-confirm>.btn{font-size:12px;padding:12px}.source-link form{display:block}.source-link form .btn{margin-top:12px}.source-books{gap:6px}.source-books button{min-width:43px;padding:8px 11px}.game-play-header{padding:13px 17px;gap:12px}.game-play-header>div{gap:8px}.game-play-header strong{font-size:16px}.game-play-header p{max-width:28ch;font-size:11px}.game-play-header .btn{font-size:11px;padding:8px 11px}.play-room{padding:23px 18px 35px}.play-room .match-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.play-room .match-tile{min-height:138px;padding:12px;font-size:21px;border-radius:16px}.match-tile[data-side="vi"] .match-word{font-size:14px}.play-room .quiz-box>.panel{padding:23px}.play-room .flash{padding:23px}.play-room .flash h2{font-size:30px}.play-room .question{font-size:22px}.round-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.round-metrics strong{font-size:26px}.game-result-head{align-items:flex-start;flex-direction:column;gap:15px}.game-result-head h1{font-size:26px}.progress-overview{gap:24px;grid-template-columns:160px minmax(0,1fr)}.knowledge-donut{width:150px;height:150px}.knowledge-donut>div{width:116px;height:116px}.knowledge-donut strong{font-size:31px}.knowledge-bar{grid-template-columns:90px 35px 1fr;gap:10px;font-size:12px}.learning-word{gap:10px}.learning-word .btn{font-size:11px;padding:8px}.round-mistakes{padding:18px}.knowledge-group summary{font-size:14px}}
@media(max-width:500px){.game-gallery{grid-template-columns:1fr}.game-gallery>.mode-speed{grid-column:auto;display:flex}.game-gallery>.mode-speed .game-art{height:180px;min-height:180px;order:0;margin-top:10px}.game-gallery>.mode-speed .play-card-action{width:100%}.play-card-copy>small{min-height:0}.game-art{height:175px}.play-card.game-tile{padding:21px}.game-source-heading .game-art{width:85px;height:100px;min-height:100px}.game-source-heading p{font-size:12px}.source-unit-icon{width:35px;height:42px}.source-confirm{align-items:stretch;flex-direction:column;gap:12px;padding:14px 16px;bottom:75px}.source-confirm>.btn{width:100%}.source-confirm strong{font-size:13px}.source-confirm small{display:none}.game-play-header p{max-width:190px}.game-play-header>div{flex-wrap:wrap;gap:4px 8px}.play-room .match-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.play-room .match-tile{min-height:125px}.play-room .option{min-height:63px;font-size:14px}.progress-overview{grid-template-columns:1fr;gap:26px;padding:20px 0}.knowledge-donut{margin:auto}.knowledge-bars{gap:17px}.knowledge-bar{grid-template-columns:110px 40px 1fr}.reflection-actions>.btn{flex:1}.game-tiles .play-card.compact .play-card-copy>small{min-height:0}.game-tiles .play-card.compact{padding:15px}.play-card.compact .game-art{height:115px}.game-result-head .actions{width:100%}.game-result-head .actions .btn{font-size:12px}.learning-word{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.play-card.game-tile{transition:none}.play-room .match-tile.nope{animation:none}}

.play-room .match-tile.matched-now{border-color:#398f75;background:#d9f5e8;animation:match-found 320ms ease-out forwards}.match-tile.matched-now::after{content:"✓";position:absolute;right:12px;top:8px;color:#24694e;font-size:22px;font-weight:800}@keyframes match-found{0%,45%{opacity:1;scale:1}100%{opacity:0;scale:.91}}@media(prefers-reduced-motion:reduce){.play-room .match-tile.matched-now{animation:none;opacity:.55}}

/* Vocabulary photographs are cues; text stays readable over every photo. */
.match-tile .match-photo{opacity:.68}.match-tile:has(.match-photo) .match-word{background:#fffffff0;border-radius:10px;padding:8px 12px;color:#243047;box-shadow:0 3px 10px #17223d12}.learning-word>.learning-word-photo{width:96px;height:76px;flex:0 0 96px;margin:0;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:#edf2f8}.learning-word-photo img{width:100%;height:76px;object-fit:contain;display:block}.learning-word-photo>span{font-size:34px}.learning-word-photo .photo-unavailable{min-height:0;padding:5px;font-size:10px}
@media(max-width:600px){.learning-word>.learning-word-photo{width:68px;height:62px;flex-basis:68px}.learning-word-photo img{height:62px}.match-tile:has(.match-photo) .match-word{padding:6px 8px}}
