/* Learning extends the Final 21 palette, typography, panels and playful controls. */
.final21-learning a{color:var(--ink)}.final21-learning header a{text-decoration:none}.final21-learning .tabs{flex-wrap:wrap}.final21-learning .tab,.final21-learning .go,.final21-learning .btn{display:inline-block;text-decoration:none}
.final21-learning main{padding-top:14px}.final21-learning main>div>h1{font-size:1.8rem;margin:8px 0 16px}.eyebrow{color:var(--mute);font-weight:800}.final21-learning .panel{margin-bottom:16px}.profile-picker{display:flex;align-items:center;justify-content:space-between;gap:16px}.profile-picker label{margin:0;min-width:min(320px,100%)}.profile-picker details{cursor:pointer}.learning-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.daily{background:var(--panel)}.daily>strong{font-size:1.3rem}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.final21-learning button:not(.hb){border:2px solid var(--line);background:var(--panel);color:var(--ink);border-radius:999px;padding:8px 18px;font:800 1rem 'Baloo 2','Baloo 2 Fallback','Segoe UI',sans-serif;cursor:pointer}.final21-learning #suggested-begin,.final21-learning #begin-customer,.final21-learning [data-customer-lesson]:not(:disabled){background:linear-gradient(110deg,#ff4f91,#ff8866);color:white;border:0;box-shadow:0 4px 0 #c43768}.final21-learning button:disabled{opacity:.5;cursor:default}.lesson-row{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.lesson-row .info{flex:1;min-width:0}.lesson-row strong,.lesson-row small{display:block}.lesson-row small{color:var(--mute)}.status-chip{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--bg);color:var(--mute);font-size:.85rem;margin:6px 0}.number{font-weight:800;font-size:1.4rem}.final21-learning footer{padding:20px;text-align:center;color:var(--mute)}.final21-learning footer span,.final21-learning footer a{margin:6px;display:inline-block}
body.learning-mode>header,body.learning-mode>footer,body.learning-mode>.preview-label{display:none!important}
body.learning-mode{background:#c9f2dc;color:#1b2a41}body.learning-mode #learning-root,body.learning-mode #sample-player,body.learning-mode #classroom-root,#f21-player{position:fixed;inset:0;z-index:1000;overflow:auto;background:#c9f2dc;color:#1b2a41;padding:18px 12px;box-sizing:border-box}
.learning-mode .study-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;max-width:960px;margin:0 auto 10px;font-weight:800}.learning-mode progress{display:block;width:min(960px,100%);height:10px;margin:0 auto;accent-color:#ff5c8a}.learning-mode .study-card,#f21-player .study-card{background:none;border:0;box-shadow:none;max-width:960px;margin:14px auto;text-align:center;padding:0}.learning-mode .study-card>.eyebrow{color:#14633f}.learning-mode .study-card>h2{font-size:clamp(1.6rem,4vw,2.6rem);margin:12px}.learning-mode .card{--u:3px;width:min(320px,68vw);margin:12px auto;box-shadow:0 22px 44px -14px #0005}.learning-mode .study-card .card .e{font-size:calc(var(--u)*8.5)}
.learning-mode button,#f21-player button{border:3px solid #000!important;background:#fff!important;color:#000!important;border-radius:20px!important;padding:10px 18px!important;font-family:'Baloo 2','Baloo 2 Fallback','Segoe UI',sans-serif!important;font-weight:800!important;box-shadow:0 4px 0 #0002;margin:5px;cursor:pointer}.learning-mode button:active{transform:translateY(2px)}.learning-mode .options{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.learning-mode .options button{min-width:150px;font-size:1.3rem}.learning-mode .choice-emoji{display:block;font-size:64px}.learning-mode .choice-image{max-width:150px;max-height:150px;display:block}.learning-mode .choice-correct{background:#b8f2c8!important}.learning-mode .choice-incorrect{background:#ffd0d0!important}.learning-mode .sound-prompt{font-size:90px}.learning-mode .success{max-width:760px;margin:8vh auto;background:white;border:3px solid #000;border-radius:22px;padding:24px;text-align:center}.learning-mode #player-feedback{font-size:1.25rem;font-weight:800}.learning-mode .study-card .card img{max-width:100%;max-height:100%}.learning-mode #card-meaning p{margin:4px}.learning-mode .context-sentence{font-size:1.15rem}
.learning-mode .card{width:min(320px,68vw,calc((100dvh - 340px)*.75));--u:2.8px}
.learning-mode .pick-card{border:0!important;background:none!important;box-shadow:none!important;padding:0!important;min-width:0!important;flex:0 1 220px}.learning-mode .pick-card .card{width:100%;max-width:220px;aspect-ratio:3/4;--u:2px;animation:pop .35s ease-out;margin:8px auto}.learning-mode .pick-card.choice-correct{transform:scale(1.06);background:none!important}.learning-mode .pick-card.choice-correct .card{box-shadow:0 0 0 5px #35ad58}.learning-mode .choice-incorrect{animation:shk .4s}.learning-mode .options>.wbtn{font-size:1.4rem}.learning-mode .actions{justify-content:center}.lesson-trophy{font-size:4rem;animation:pop .4s ease-out}.learning-mode .study-toolbar{flex-wrap:wrap}.learning-mode .study-card .card{animation:pop .35s ease-out}
.learning-mode #f21-player .options{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.learning-mode #f21-player .actions{justify-content:center}.learning-mode .options>.wbtn{flex:0 1 auto}.learning-mode #f21-player .study-card .card{max-width:100%}
.learning-mode #f21-player button.pick-card{border:0!important;background:none!important;box-shadow:none!important;padding:0!important}
@media(max-width:700px){.learning-mode .pick-card{flex:1 1 28%;max-width:32%;margin:2px!important}.learning-mode .pick-card .card{--u:1px;min-width:0}.learning-mode .pick-card .pic{font-size:clamp(38px,14vw,80px)}}
@media(prefers-reduced-motion:reduce){.learning-mode *{animation:none!important;transition:none!important}}
@media(max-width:700px){.learning-columns{grid-template-columns:1fr}.profile-picker{align-items:stretch;flex-direction:column}.lesson-row{flex-wrap:wrap}.learning-mode .study-toolbar{font-size:.85rem}.learning-mode .options{gap:4px}.learning-mode .options button{min-width:90px;max-width:100%;font-size:1rem}.learning-mode .card{width:min(260px,65vw,calc((100dvh - 340px)*.75));--u:2.6px}.final21-learning header{gap:10px}.final21-learning header h1{width:100%}}
/* A calm play space, with clear colours for listening, flipping and moving on. */
body.learning-mode,body.learning-mode #learning-root,body.learning-mode #sample-player,body.learning-mode #classroom-root,body.learning-mode #f21-player{
 background:radial-gradient(ellipse at 8% 12%,#fff7c7 0,transparent 32%),radial-gradient(ellipse at 95% 85%,#e3ddff 0,transparent 35%),linear-gradient(145deg,#e8fbf2,#e4f4ff 65%,#fff0f5)!important;color:#203a51!important;
}
body.learning-mode #learning-root,body.learning-mode #sample-player,body.learning-mode #classroom-root,body.learning-mode #f21-player{padding:20px 16px 28px!important}
body.learning-mode .study-toolbar{max-width:880px;background:#ffffffb8;border:1px solid #ffffff;border-radius:24px;padding:8px 14px;box-shadow:0 8px 28px #3459780b;gap:8px}
body.learning-mode .study-toolbar>span{margin-left:auto;color:#48677e;font-size:1rem}
body.learning-mode button,body.learning-mode #f21-player button{border:2px solid #c6dce8!important;background:#fff!important;color:#23445b!important;box-shadow:0 4px 0 #b8cddc70!important;border-radius:20px!important;padding:12px 20px!important;transition:transform .15s,box-shadow .15s;font-size:1.1rem}
body.learning-mode button:active{transform:translateY(3px)}
body.learning-mode #player-back,body.learning-mode #player-mute{font-size:.95rem!important;padding:9px 14px!important;border-color:transparent!important;box-shadow:none!important;background:transparent!important}
body.learning-mode progress{max-width:850px;height:12px;border:0;border-radius:999px;overflow:hidden;margin:18px auto 12px;background:#cbdfe8;accent-color:#ff719a}
body.learning-mode progress::-webkit-progress-bar{background:#cbdfe8;border-radius:999px}
body.learning-mode progress::-webkit-progress-value{background:linear-gradient(90deg,#ff8cab,#ffbf82);border-radius:999px;transition:width .3s}
body.learning-mode .study-card{max-width:880px!important;margin:16px auto!important}
body.learning-mode .study-card>.eyebrow{display:inline-block;color:#48677e!important;background:#ffffffb0;border-radius:999px;padding:6px 18px;font-weight:600;font-size:1rem}
body.learning-mode .study-card .card{border-width:3px;box-shadow:0 15px 32px #3b766529,0 0 0 8px #ffffffb8;border-radius:28px;animation:study-arrive .35s ease-out}
body.learning-mode #reveal-card{background:#eee7ff!important;border-color:#cbbce9!important;color:#64459b!important;box-shadow:0 4px 0 #cbbce980!important}
body.learning-mode #player-listen{background:#e0f3ff!important;border-color:#a7d4ee!important;color:#276789!important;box-shadow:0 4px 0 #a7d4ee80!important}
body.learning-mode #player-answers.actions button,body.learning-mode #player-home{background:linear-gradient(110deg,#ff719b,#ff9b77)!important;border-color:#f26a8d!important;color:#fff!important;box-shadow:0 5px 0 #d6577b!important;min-width:210px}
body.learning-mode .options .wbtn{border-color:#b9d5e4!important;min-height:64px}
body.learning-mode .options .choice-correct{background:#c6f2d9!important;border-color:#54b980!important}
body.learning-mode .options .choice-incorrect{background:#ffe2e5!important;border-color:#e899a6!important}
body.learning-mode .success{border:2px solid #d0e3ed;border-radius:32px;box-shadow:0 18px 50px #41667c18;color:#23445b;padding:28px}
@keyframes study-arrive{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:600px){body.learning-mode #learning-root,body.learning-mode #sample-player,body.learning-mode #classroom-root,body.learning-mode #f21-player{padding:12px 10px 20px!important}body.learning-mode .study-toolbar{padding:6px;border-radius:18px}body.learning-mode .study-toolbar>span{width:100%;text-align:center;margin:2px 0 4px;font-size:.9rem}body.learning-mode .study-toolbar #player-back{margin-left:auto}body.learning-mode .study-card .card{width:min(280px,70vw,calc((100dvh - 340px)*.75))}body.learning-mode button{padding:10px 14px!important;font-size:1rem!important}body.learning-mode #player-answers.actions button{min-width:185px}}
@media(prefers-reduced-motion:reduce){body.learning-mode .study-card .card{animation:none}body.learning-mode button,body.learning-mode progress::-webkit-progress-value{transition:none}}
body.learning-mode #reveal-card,body.learning-mode #player-listen,body.learning-mode #player-mute,body.learning-mode #player-back{width:54px;height:54px;padding:8px!important;display:inline-flex;align-items:center;justify-content:center;font-size:1.5rem!important;border-radius:50%!important}
body.learning-mode .study-toolbar>span{font-variant-numeric:tabular-nums}
/* Keep every exercise in the viewport, with stable space for answers and feedback. */
body.learning-mode{overflow:hidden!important}
body.learning-mode .compact-player{height:100dvh;box-sizing:border-box;overflow:hidden!important;display:grid!important;grid-template-rows:60px 8px minmax(0,1fr);gap:10px;padding:12px max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-bottom))!important}
body.learning-mode .compact-player>.study-toolbar{width:min(880px,100%);box-sizing:border-box;height:60px;margin:0 auto;padding:4px 10px}
body.learning-mode .compact-player>.study-toolbar>span{width:auto!important;margin-left:auto!important}
body.learning-mode .compact-player>progress{width:min(850px,100%);height:8px;margin:0 auto!important}
body.learning-mode .compact-player>.study-card{width:min(880px,100%);height:100%;min-height:0;box-sizing:border-box;margin:0 auto!important;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:30px minmax(0,1fr) 48px 80px 54px;gap:6px;align-items:center;justify-items:center;position:relative}
body.learning-mode .compact-player .study-card>.eyebrow{grid-column:1/-1;grid-row:1;font-size:.9rem;padding:3px 12px;margin:0;max-width:100%;box-sizing:border-box}
body.learning-mode .compact-player .study-card>.card,body.learning-mode .compact-player #study-design-card,body.learning-mode .compact-player .study-card>h2,body.learning-mode .compact-player .sound-prompt{grid-column:1/-1;grid-row:2;min-height:0;max-height:100%;margin:0!important}
body.learning-mode .compact-player #study-design-card{height:100%;width:100%;display:flex;justify-content:center;align-items:center}
body.learning-mode .compact-player .study-card>.card,body.learning-mode .compact-player #study-design-card>.card{height:100%!important;width:auto!important;max-width:min(300px,70vw);aspect-ratio:3/4;box-sizing:border-box;margin:0!important;--u:clamp(1px, .32vh, 2.5px);animation:none!important}
body.learning-mode .compact-player .study-card>.card .pic{font-size:clamp(50px,20vh,150px)}
body.learning-mode .compact-player #reveal-card{grid-column:1;grid-row:3;justify-self:end;margin:0 6px!important}
body.learning-mode .compact-player #player-listen{grid-column:2;grid-row:3;justify-self:start;margin:0 6px!important}
body.learning-mode .compact-player .study-card:not(:has(#reveal-card:not([hidden]))) #player-listen{grid-column:1/-1;justify-self:center}
body.learning-mode .compact-player #reveal-card,body.learning-mode .compact-player #player-listen{width:44px;height:44px;font-size:1.25rem!important}
body.learning-mode .compact-player #player-answers{grid-column:1/-1;grid-row:4;position:relative;width:100%;height:80px;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:nowrap}
body.learning-mode .compact-player #player-answers button{margin:0!important;min-width:0;max-width:100%;font-size:clamp(.95rem,2.3vw,1.3rem)!important;padding:10px 16px!important}
body.learning-mode .compact-player #player-answers .wbtn{flex:0 1 220px;min-height:54px}
body.learning-mode .compact-player #player-answers .pick-card{flex:0 1 120px;max-width:30%;height:78px}
body.learning-mode .compact-player #player-answers .pick-card .card{height:74px;width:100%;aspect-ratio:auto;--u:1px;box-shadow:none;margin:0;min-width:0}
body.learning-mode .compact-player #player-answers .pick-card .pic{font-size:48px}
body.learning-mode .compact-player #player-answers.options>button:not([data-choice]){position:absolute;right:0;top:88px;height:44px}
body.learning-mode .compact-player #player-feedback{grid-column:1/-1;grid-row:5;width:100%;padding-right:140px;box-sizing:border-box;font-size:.95rem;margin:0;max-height:54px;overflow:auto;text-align:center}
body.learning-mode .compact-player #card-meaning:not([hidden]){position:absolute;top:34px;left:10%;right:10%;background:#fffef2;border-radius:18px;padding:12px;max-height:35%;overflow:auto;z-index:2}
body.learning-mode .compact-player #show-text{position:absolute;top:35px;right:0;font-size:.85rem!important}
body.learning-mode .compact-player #audio-text:not([hidden]){position:absolute;top:90px;left:0;right:0;background:#fffef2;border-radius:16px;padding:8px;z-index:2}
body.learning-mode .compact-player .match-pair{position:absolute;top:36px;background:#fff;border-radius:14px;padding:6px 14px;margin:0}
body.learning-mode .compact-player:has(>.success),body.learning-mode .compact-player:has(>.panel){display:block!important;overflow:auto!important}
@media(max-height:520px){body.learning-mode .compact-player{grid-template-rows:44px 6px minmax(0,1fr);gap:5px;padding:6px 12px!important}body.learning-mode .compact-player>.study-toolbar{height:44px}body.learning-mode .compact-player>.study-card{grid-template-rows:22px minmax(0,1fr) 40px 60px 40px;gap:3px}body.learning-mode .compact-player #player-answers{height:60px}body.learning-mode .compact-player #player-answers.options>button:not([data-choice]){top:62px;height:36px}body.learning-mode .compact-player #player-answers .pick-card,body.learning-mode .compact-player #player-answers .pick-card .card{height:56px}}
body.learning-mode .compact-player [hidden]{display:none!important}
body.learning-mode .compact-player .study-card .designed-card{overflow:hidden}
body.learning-mode .compact-player .study-card>.card .w{font-size:clamp(20px,4vh,30px)}
body.learning-mode .compact-player .card[role=button]{cursor:pointer;touch-action:manipulation}
body.learning-mode .compact-player .card[role=button]:focus-visible{outline:3px solid #8156c5;outline-offset:5px}
body.learning-mode .practice-home{height:calc(100dvh - 40px);max-width:880px;margin:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center}
body.learning-mode .practice-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:min(600px,100%)}
body.learning-mode .practice-toolbar{display:flex;align-items:center;justify-content:space-between;width:100%;height:54px}
body.learning-mode .practice-stage{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;font-size:70px}
body.learning-mode .practice-stage>.card{height:100%;width:auto;max-width:280px;aspect-ratio:3/4;cursor:pointer;--u:2px}
body.learning-mode .practice-options{display:flex;gap:12px;align-items:center;justify-content:center;width:100%;height:110px}
body.learning-mode .practice-options button{min-width:0;max-width:30%;margin:0!important}
body.learning-mode .practice-options .card{width:100px;height:85px;aspect-ratio:auto;--u:1px;margin:0;box-shadow:none}
body.learning-mode .practice-options .card .pic{font-size:50px}
@media(max-width:500px){body.learning-mode .practice-menu{grid-template-columns:1fr}body.learning-mode .practice-options button{padding:8px!important}body.learning-mode .practice-options .card{width:75px}}
/* Final 21 study interface, including account lessons. */
body.learning-mode .final21-study{background:#e3d9ff!important;color:#1b2130!important}
body.learning-mode .final21-study.compact-player{grid-template-rows:64px 0 minmax(0,1fr);gap:6px;padding:10px 16px!important}
body.learning-mode .final21-study>.study-toolbar{max-width:none;width:100%;background:none;border:0;border-radius:0;box-shadow:none;padding:0}
body.learning-mode .final21-study>progress{visibility:hidden;height:0}
body.learning-mode .final21-study .study-modes,body.learning-mode .final21-study .practice-modes{display:flex;gap:6px;align-items:center}
body.learning-mode .final21-study button{background:#fff!important;color:#000!important;border:3px solid #000!important;box-shadow:none!important;font-weight:800}
body.learning-mode .final21-study .study-modes button,body.learning-mode .final21-study .practice-modes button{width:58px;height:58px;border-radius:50%!important;padding:4px!important;margin:0!important;font-size:1.65rem!important}
body.learning-mode .final21-study button[aria-pressed=true]{background:#ffda45!important}
body.learning-mode .final21-study #player-mute{display:none!important}
body.learning-mode .final21-study #player-back{margin-left:auto!important;width:auto;height:58px;font-size:1rem!important;border-radius:999px!important;background:#f8f4ff!important;border-color:#50495b!important;padding:10px 18px!important}
body.learning-mode .final21-study .study-toolbar>span{position:absolute;top:82px;right:20px;font-size:.85rem;opacity:.65}
body.learning-mode .final21-study>.study-card{width:min(1400px,100%);grid-template-rows:24px minmax(0,1fr) 64px 66px 38px;gap:5px}
body.learning-mode .final21-study .study-card>.eyebrow{background:none;font-size:.9rem}
body.learning-mode .final21-study .study-card>.card,body.learning-mode .final21-study #study-design-card>.card{max-width:390px;box-shadow:0 14px 25px #0002;border:4px solid var(--fg);border-radius:32px}
body.learning-mode .final21-study #reveal-card,body.learning-mode .final21-study #player-listen{width:62px;height:62px;background:#fff!important;border:3px solid #000!important;box-shadow:none!important;font-size:1.6rem!important}
body.learning-mode .final21-study #player-answers.actions button{background:white!important;color:black!important;border-color:black!important;box-shadow:none!important;border-radius:999px!important}
body.learning-mode .final21-study .study-card:has(.pick-card) #player-answers{grid-row:2;height:100%;align-items:stretch;gap:14px}
body.learning-mode .final21-study .study-card:has(.pick-card) .sound-prompt{display:none}
body.learning-mode .final21-study #player-answers .pick-card{height:100%;max-width:32%;flex:1 1 0;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
body.learning-mode .final21-study #player-answers .pick-card .card{width:100%;height:100%;aspect-ratio:3/4;--u:clamp(1px,.5vh,4px);border:4px solid var(--fg);border-radius:32px;box-shadow:0 14px 25px #0002}
body.learning-mode .final21-study #player-answers .pick-card:nth-child(1) .card{--cb:#ffd9c2!important;--fg:#a8481a!important}
body.learning-mode .final21-study #player-answers .pick-card:nth-child(2) .card{--cb:#ffd3e3!important;--fg:#a8245a!important}
body.learning-mode .final21-study #player-answers .pick-card:nth-child(3) .card{--cb:#e3d9ff!important;--fg:#553aad!important}
body.learning-mode .final21-study #player-answers .pick-card .pic{font-size:clamp(60px,20vw,210px)}
body.learning-mode .final21-study .practice-home{height:calc(100dvh - 24px);max-width:1400px}
body.learning-mode .final21-study .practice-toolbar{height:64px;flex-shrink:0}
body.learning-mode .final21-study .practice-toolbar #practice-exit{margin-left:auto}
body.learning-mode .final21-study .practice-toolbar>span{font-size:.85rem}
body.learning-mode .final21-study .practice-options{height:96px;flex-shrink:0}
body.learning-mode .final21-study .practice-stage>.card{max-width:390px}
@media(max-width:600px){body.learning-mode .final21-study .study-modes button,body.learning-mode .final21-study .practice-modes button{width:40px;height:40px;font-size:1.2rem!important}body.learning-mode .final21-study #player-back{height:42px;font-size:.85rem!important;padding:6px 10px!important}body.learning-mode .final21-study>.study-card{grid-template-rows:24px minmax(0,1fr) 50px 58px 38px}body.learning-mode .final21-study #reveal-card,body.learning-mode .final21-study #player-listen{width:46px;height:46px}body.learning-mode .final21-study #player-answers .pick-card .card{border-radius:20px}body.learning-mode .final21-study #player-answers .pick-card .pic{font-size:clamp(50px,19vw,100px)}}
body.learning-mode .mini-game{height:calc(100dvh - 40px);max-width:900px;margin:auto;display:grid;grid-template-rows:60px minmax(60px,1fr) minmax(160px,2fr) 40px;gap:12px;text-align:center}
body.learning-mode .mini-game header{display:flex;align-items:center;gap:12px;background:none;border:0;padding:0;margin:0}
body.learning-mode .mini-game h2{font-size:clamp(1.1rem,3vw,1.6rem);margin:auto}
body.learning-mode .mini-prompt{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:1.5rem;gap:12px}
body.learning-mode .mini-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-content:center;min-height:0}
body.learning-mode .mini-board button{min-height:70px;margin:0;font-size:clamp(1rem,3vw,1.5rem)!important;background:#fff9e4!important;border-color:#e2cf99!important}
body.learning-mode .mini-board button:disabled{opacity:.55}
body.learning-mode .mini-board .word-bubble{border-radius:999px!important;background:linear-gradient(145deg,#ffe5f1,#dedbff)!important;border-color:#c8b3e8!important;min-height:90px}
body.learning-mode .spell-slots{font-size:clamp(1.3rem,5vw,2.2rem);letter-spacing:.18em}
@media(max-width:500px){body.learning-mode .mini-board{gap:8px}body.learning-mode .mini-game{grid-template-rows:54px minmax(50px,1fr) minmax(160px,2fr) 40px}body.learning-mode .mini-board button{padding:8px!important}}
/* Compact spelling tiles rather than full-width form buttons. */
body.learning-mode .mini-game[data-game=spell]{max-width:760px;grid-template-rows:54px minmax(0,1fr) auto 36px;gap:16px;padding:0 16px 20px;box-sizing:border-box}
body.learning-mode .mini-game[data-game=spell] header{background:transparent;box-shadow:none;border-radius:0;justify-content:space-between}
body.learning-mode .mini-game[data-game=spell] header h2{font-size:1.3rem;font-weight:700}
body.learning-mode .mini-game[data-game=spell] .mini-prompt{gap:20px;justify-content:center}
body.learning-mode .spell-hint{display:flex;flex-direction:column;align-items:center;gap:8px}
body.learning-mode .spell-hint .card{width:150px;height:155px;aspect-ratio:auto;margin:0;border:2px solid #b3d9cb;border-radius:28px;background:#ffffffb8;box-shadow:0 10px 25px #50786812;--u:2px}
body.learning-mode .spell-hint .pic{font-size:95px;padding:8px}
body.learning-mode .spell-hint small{font-size:1rem;color:#527080;font-weight:500}
body.learning-mode .spell-slots{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;letter-spacing:0}
body.learning-mode .spell-slots span{width:52px;height:58px;border:2px dashed #c5c4dc;border-radius:14px;background:#ffffff9c;display:flex;align-items:center;justify-content:center;font-size:1.7rem;font-weight:700;box-sizing:border-box}
body.learning-mode .spell-slots .filled{background:#dcf5e9;border:2px solid #a0d9bd;color:#23754f}
body.learning-mode .spell-slots .current{border:2px solid #a38ace;background:#f3ecff;box-shadow:0 0 0 3px #a38ace18}
body.learning-mode .mini-game[data-game=spell] .mini-board{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;max-width:600px;width:100%;margin:auto;padding:16px 0}
body.learning-mode .mini-game[data-game=spell] .mini-board button{flex:0 0 58px;width:58px;height:62px;min-height:0;margin:0!important;padding:0!important;border-radius:16px!important;background:#fff!important;border:2px solid #c5dce8!important;box-shadow:0 5px 0 #bad0dd70!important;font-size:1.7rem!important;font-weight:700;color:#294a61!important}
body.learning-mode .mini-game[data-game=spell] .mini-board button:nth-child(3n+2){background:#fff3cd!important;border-color:#ead393!important}
body.learning-mode .mini-game[data-game=spell] .mini-board button:nth-child(3n){background:#eee7ff!important;border-color:#ccbde9!important}
body.learning-mode .mini-game[data-game=spell] .mini-board .letter-used{opacity:.18!important;box-shadow:none!important}
@media(max-height:550px){body.learning-mode .spell-hint .card{width:92px;height:92px}body.learning-mode .spell-hint .pic{font-size:60px}body.learning-mode .mini-game[data-game=spell] .mini-prompt{gap:10px}body.learning-mode .spell-slots span{width:38px;height:42px}body.learning-mode .mini-game[data-game=spell] .mini-board button{flex-basis:44px;width:44px;height:46px}}
@media(max-width:500px){body.learning-mode .spell-slots{gap:5px}body.learning-mode .spell-slots span{width:clamp(25px,7.5vw,42px);height:46px;font-size:1.3rem}body.learning-mode .mini-game[data-game=spell] .mini-board{gap:10px}}
body.learning-mode .mini-game[data-game=memory]{max-width:760px;grid-template-rows:54px 48px minmax(0,1fr) 36px;padding:0 16px 20px;box-sizing:border-box;gap:14px}
body.learning-mode .mini-game[data-game=memory] header{background:none;box-shadow:none;border-radius:0}
body.learning-mode .mini-game[data-game=memory] h2{font-size:1.3rem}
body.learning-mode .mini-game[data-game=memory] .mini-prompt{font-size:1.05rem;color:#527080}
body.learning-mode .mini-game[data-game=memory] .mini-board{grid-template-columns:repeat(3,minmax(0,145px));justify-content:center;align-content:center;gap:16px}
body.learning-mode .mini-game[data-game=memory] .memory-tile{height:140px;min-height:0;padding:10px!important;background:#e7ddfa!important;border:2px solid #c4afe3!important;border-radius:22px!important;box-shadow:0 5px 0 #bda4dc55!important;color:#9572c5!important;font-size:2rem!important;display:flex;align-items:center;justify-content:center;overflow:hidden}
body.learning-mode .mini-game[data-game=memory] .memory-tile.tile-open{background:#fff!important;color:#25485e!important;border-color:#bdd8e3!important}
body.learning-mode .mini-game[data-game=memory] .memory-tile .card{width:100%;height:100%;aspect-ratio:auto;margin:0;border:0;background:transparent;box-shadow:none;--u:1px}
body.learning-mode .mini-game[data-game=memory] .memory-tile .pic{font-size:85px;padding:0}
body.learning-mode .mini-game[data-game=memory] .memory-tile.tile-matched{opacity:1;background:#dcf5e9!important;border-color:#86c9a6!important}
@media(max-width:500px),(max-height:550px){body.learning-mode .mini-game[data-game=memory] .mini-board{grid-template-columns:repeat(3,minmax(0,105px));gap:10px}body.learning-mode .mini-game[data-game=memory] .memory-tile{height:100px;font-size:1.3rem!important}body.learning-mode .mini-game[data-game=memory] .memory-tile .pic{font-size:60px}}
body.learning-mode .mini-game[data-game=bubble]{max-width:760px;grid-template-rows:54px 64px minmax(0,1fr) 38px;gap:12px;padding:0 16px 16px;box-sizing:border-box}
body.learning-mode .mini-game[data-game=bubble] header{background:none;box-shadow:none}
body.learning-mode .mini-game[data-game=bubble] h2{font-size:1.3rem}
body.learning-mode .mini-game[data-game=bubble] .mini-board{grid-template-columns:repeat(2,minmax(0,200px));grid-template-rows:repeat(2,minmax(0,190px));justify-content:center;align-content:center;gap:20px 38px;position:relative}
body.learning-mode .mini-game[data-game=bubble] .word-bubble{width:100%;height:100%;min-height:0;border-radius:50%!important;border:2px solid #c2a6df!important;background:radial-gradient(circle at 28% 22%,#fff 0,#ffffff90 10%,#ffffff00 30%),linear-gradient(145deg,#fce0f0,#d9d1ff)!important;box-shadow:inset -8px -10px 20px #ab8ad929,0 8px 16px #8e77ae18!important;font-size:clamp(1rem,3vw,1.7rem)!important;position:relative;color:#4b416f!important;animation:bubble-float 3s ease-in-out infinite;padding:16px!important;overflow-wrap:anywhere}
body.learning-mode .mini-game[data-game=bubble] .word-bubble:nth-child(2){background:radial-gradient(circle at 28% 22%,#fff,#ffffff00 30%),linear-gradient(145deg,#fff3c7,#ffd1a5)!important;animation-delay:-.7s}
body.learning-mode .mini-game[data-game=bubble] .word-bubble:nth-child(3){background:radial-gradient(circle at 28% 22%,#fff,#ffffff00 30%),linear-gradient(145deg,#d8f6ec,#bfe5ff)!important;animation-delay:-1.4s}
body.learning-mode .mini-game[data-game=bubble] .word-bubble:nth-child(4){animation-delay:-2s}
body.learning-mode .mini-game[data-game=bubble] .bubble-pop{animation:bubble-pop .4s ease-out forwards!important;opacity:1!important}
body.learning-mode .mini-game[data-game=bubble] .bubble-wrong{animation:bubble-wrong .3s ease-out!important}
body.learning-mode .bubble-burst{position:absolute;inset:0;pointer-events:none;display:flex;align-items:center;justify-content:center}
body.learning-mode .bubble-burst i{position:absolute;width:9px;height:9px;background:var(--spark);border-radius:50%;animation:bubble-spark .8s ease-out forwards}
@keyframes bubble-float{50%{transform:translateY(-7px)}}
@keyframes bubble-pop{30%{transform:scale(1.13)}100%{transform:scale(.4);opacity:0}}
@keyframes bubble-spark{to{transform:translate(var(--dx),var(--dy));opacity:0}}
@keyframes bubble-wrong{25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}
@media(max-width:500px),(max-height:600px){body.learning-mode .mini-game[data-game=bubble] .mini-board{grid-template-columns:repeat(2,minmax(0,140px));grid-template-rows:repeat(2,minmax(0,130px));gap:12px 22px}}
@media(prefers-reduced-motion:reduce){body.learning-mode .word-bubble,body.learning-mode .bubble-burst i{animation:none!important}body.learning-mode .mini-game[data-game=bubble] .bubble-pop{visibility:hidden}}
body.learning-mode .mini-game:is([data-game=bubble-see],[data-game=scene],[data-game=sentence-build],[data-game=sentence-gap],[data-game=treasure],[data-game=chest]){max-width:820px;grid-template-rows:54px minmax(80px,1fr) minmax(100px,1fr) 36px;padding:0 16px 16px;box-sizing:border-box}
body.learning-mode .mini-game header{box-shadow:none!important;background:none!important;border:0!important}
body.learning-mode .mini-game .mini-prompt>.card{width:150px;height:150px;aspect-ratio:auto;margin:0;--u:1.5px;border-radius:24px;box-shadow:none}
body.learning-mode .mini-game .mini-prompt>.card .pic{font-size:90px}
body.learning-mode .mini-game[data-game=bubble-see] .mini-board{grid-template-columns:repeat(4,minmax(0,140px));justify-content:center;gap:12px}
body.learning-mode .mini-game[data-game=bubble-see] .word-bubble{aspect-ratio:1;border-radius:50%!important;min-height:0;background:radial-gradient(circle at 25% 20%,white,transparent 40%),#e3d6ff!important}
body.learning-mode .mini-game .object-scene{grid-template-columns:repeat(4,minmax(0,1fr));background:linear-gradient(#ddf3ff 65%,#d0eccd 65%);border-radius:28px;padding:20px;gap:12px}
body.learning-mode .mini-game .object-scene button{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
body.learning-mode .mini-game .object-scene .card{width:100%;height:120px;aspect-ratio:auto;margin:0;border:0;background:transparent;box-shadow:none;--u:1px}
body.learning-mode .mini-game .object-scene .pic{font-size:80px}
body.learning-mode .sentence-slots{border-radius:16px;background:#ffffffb8;padding:12px 16px;font-size:clamp(1rem,3vw,1.4rem)}
body.learning-mode .mini-game[data-game=sentence-build] .mini-board{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
body.learning-mode .mini-game[data-game=sentence-build] .mini-board button{min-height:48px;padding:8px 18px!important}
body.learning-mode .reward-chest{font-size:80px!important;background:none!important;border:0!important;box-shadow:none!important}
body.learning-mode .mini-game[data-game=chest] .mini-board{display:flex;justify-content:center}
body.learning-mode .chest-open{background:#fff0a8!important;transform:scale(1.05)}
@media(max-width:500px){body.learning-mode .mini-game[data-game=bubble-see] .mini-board,body.learning-mode .mini-game .object-scene{grid-template-columns:repeat(2,minmax(0,1fr))}body.learning-mode .mini-game .object-scene .card{height:80px}body.learning-mode .mini-game .object-scene .pic{font-size:55px}}
.class-invite>summary{cursor:pointer;font-weight:800}.class-dates{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:18px 0}.class-dates label{display:flex;flex-direction:column;gap:8px}.teacher-table{width:100%;border-collapse:collapse;text-align:left}.teacher-table th,.teacher-table td{padding:16px 12px;border-bottom:1px solid #49607a;vertical-align:top}.teacher-table td small{display:block;margin-top:8px}.teacher-table td:last-child button{margin:4px}.table-wrap{overflow:auto}.teacher-table{min-width:650px}@media(max-width:650px){.class-dates{grid-template-columns:1fr}}
.print-studio-tools{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px}.print-studio-tools label{display:flex;flex-direction:column;gap:8px}.print-studio-tools p{grid-column:1/-1;margin:0}.print-studio-tools [hidden]{display:none!important}#sheet .card{max-width:100%;overflow:hidden}#sheet .page{box-sizing:border-box}@media(max-width:700px){.print-studio-tools{grid-template-columns:1fr}}
.topic-roadmap{margin:12px 0 22px;padding:16px;border:1px solid #49607a;border-radius:18px}.topic-roadmap>summary{cursor:pointer;font-weight:800}.roadmap-content h3{margin:20px 0 10px}.roadmap-content .lesson-row{padding:12px 0}
.review-invitation{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(115deg,#29314e,#233d53)!important;border-color:#657bbb!important}.review-invitation h2{margin:0 0 8px}.review-invitation p{margin:0}.review-big{font:inherit!important;font-size:30px!important;font-weight:800!important;min-height:88px;min-width:240px;border-radius:28px!important;background:linear-gradient(120deg,#ffe58c,#ffbe70)!important;color:#3e305c!important;border:2px solid #ffdf8f!important;box-shadow:0 6px 0 #bb7d48!important;padding:18px 34px!important}.review-big:hover{filter:brightness(1.06)}.review-big:active{transform:translateY(3px);box-shadow:0 3px 0 #bb7d48!important}@media(max-width:600px){.review-invitation{flex-direction:column;align-items:stretch}.review-big{width:100%;font-size:27px!important}}
.review-big{font-size:22px!important;min-height:60px;min-width:0;border-radius:999px!important;padding:12px 24px!important;box-shadow:0 4px 0 #bb7d48!important}@media(max-width:600px){.review-big{width:auto;align-self:flex-start;font-size:22px!important}}
.role-header nav>a.btn,.role-header nav>a.btn:visited{color:var(--ink);text-decoration:none}
.account-profile input::placeholder,#f21-name::placeholder{font-weight:400!important;opacity:1;color:var(--mute,#8492a6)}

.speaking-practice{margin-top:1rem;text-align:left;border:1px solid var(--line,#354861);border-radius:16px;padding:1rem}.speaking-practice summary{cursor:pointer;font:inherit;font-weight:700}.speaking-body{display:grid;gap:.75rem;padding-top:1rem}.speaking-body p{margin:0}.speaking-body label{display:grid;gap:.5rem;font:inherit}.speaking-body select,.speaking-body button{font:inherit}.speaking-body .actions{display:flex;flex-wrap:wrap;gap:.5rem}.speaking-result{display:grid;gap:.75rem;overflow-wrap:anywhere}.speaking-result[hidden]{display:none}.speaking-score{font-weight:700}.speech-match{color:#136b43;background:#dbf5e6;border-radius:4px;padding:2px 4px}.speech-mismatch{color:#a21d37;background:#ffe2e7;text-decoration:underline;text-decoration-thickness:2px;border-radius:4px;padding:2px 4px}.speaking-body audio{max-width:100%;width:100%}.speaking-body .muted{font:inherit;color:inherit;opacity:.85}

body.learning-mode .study-toolbar>.speaking-practice{margin:0;padding:0;border:0;max-width:100%;font:inherit}body.learning-mode .speaking-practice>summary{padding:8px 12px;border:1px solid #8da6bf;border-radius:16px;background:#fff;list-style:none}body.learning-mode .speaking-practice[open]{position:fixed;inset:24px max(16px,calc((100vw - 700px)/2));z-index:1100;background:#fffef6;color:#1b2a41;border:2px solid #8da6bf;border-radius:20px;padding:16px;overflow:auto;box-shadow:0 0 0 100vmax #16233688}body.learning-mode .speaking-practice[open]>summary{position:sticky;top:0;background:#fffef6;z-index:1}body.learning-mode .speaking-body label{width:100%;box-sizing:border-box}body.learning-mode .speaking-body select{width:100%;min-width:0;padding:10px;border-radius:12px;background:white;color:#1b2a41;border:1px solid #8da6bf}

.speaking-progress-row{padding:16px 0;border-top:1px solid var(--line,#8da6bf)}.speaking-progress-row p{margin:8px 0}.speaking-saved{font-weight:700}.speaking-practice>summary{cursor:pointer;padding:8px 12px;border:1px solid #8da6bf;border-radius:16px;background:#fff;color:#1b2a41;list-style:none;font:inherit;font-weight:700}.speaking-practice[open]{position:fixed;inset:24px max(16px,calc((100vw - 700px)/2));z-index:1100;background:#fffef6;color:#1b2a41;border:2px solid #8da6bf;border-radius:20px;padding:16px;overflow:auto;box-shadow:0 0 0 100vmax #16233688;box-sizing:border-box}.speaking-practice[open]>summary{position:sticky;top:0;background:#fffef6;z-index:1}.speaking-body select{width:100%;min-width:0;padding:10px;border-radius:12px;background:white;color:#1b2a41;border:1px solid #8da6bf}.kbar>.speaking-practice:not([open]),.mini-game header>.speaking-practice:not([open]){margin:0;padding:0;border:0}.speaking-body .actions button{font:inherit;min-height:44px;padding:10px 16px;border:1px solid #8da6bf;border-radius:16px;background:#fff;color:#1b2a41}.speaking-body label{flex:0 0 auto!important;min-width:0}.speaking-practice[open] .speaking-body{font:inherit}.mini-game header{flex-wrap:wrap}#kid .kbar{flex-wrap:wrap}.speaking-body .speaking-target{overflow-wrap:anywhere}

/* Guest study uses its own player, above the inactive account dashboard. */
body.learning-mode:has(#sample-player) #learning-root{display:none!important}

/* Frosted Glassmorphism Card Stage: seamlessly melts into meadow while framing the card */
.lesson-open-scene,
body.learning-mode .journey-activity .study-card,
.quiz-suite {
  position: relative !important;
  width: min(520px, 92%) !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  background: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border-radius: 32px !important;
  border: 2.5px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 16px 40px rgba(35, 75, 62, 0.12), inset 0 2px 4px rgba(255, 255, 255, 0.8) !important;
  padding: clamp(16px, 2.2dvh, 24px) clamp(16px, 2.4vw, 28px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(10px, 1.4dvh, 16px) !important;
  text-align: center !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}

body.learning-mode .lesson-open-scene h2,
body.learning-mode .journey-activity .study-card > .eyebrow {
  font-size: clamp(17px, 1.6vw, 22px) !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  color: #1e5c46 !important;
  background: rgba(220, 245, 232, 0.9) !important;
  border: 1px solid rgba(167, 243, 208, 0.8) !important;
  padding: 4px 18px !important;
  border-radius: 20px !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1) !important;
}

body.learning-mode .journey-activity .study-card > h2 {
  font-size: clamp(24px, 2.8vw, 36px) !important;
  margin: 6px 0 12px !important;
  line-height: 1.25 !important;
  color: #1e3a34;
  white-space: normal;
  word-break: keep-all;
}

/* Single-row Action Buttons: NO wrapping, always on 1 clean row */
.lesson-open-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 440px !important;
  margin-top: 4px !important;
}
body.learning-mode .lesson-open-actions button {
  font-size: clamp(16px, 1.4vw, 20px) !important;
  font-weight: 800 !important;
  min-height: 48px !important;
  border-radius: 16px !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  border: none !important;
  box-shadow: 0 4px 0 rgba(0,0,0,0.14), 0 6px 12px rgba(0,0,0,0.08) !important;
  transition: transform .1s ease, box-shadow .1s ease !important;
}
body.learning-mode .lesson-open-actions button:active {
  transform: translateY(2px) !important;
  box-shadow: 0 2px 0 rgba(0,0,0,0.14), 0 3px 6px rgba(0,0,0,0.08) !important;
}
body.learning-mode .lesson-open-actions button[aria-label="Quay lại"] {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  padding: 0 !important;
  flex: 0 0 44px !important;
}
body.learning-mode .lesson-open-actions button:not([aria-label="Quay lại"]):not(.journey-next) {
  flex: 1 1 auto !important;
  min-width: 110px !important;
}
body.learning-mode .lesson-open-actions button.journey-next {
  flex: 1 1 auto !important;
  min-width: 100px !important;
  background: #1e5c46 !important;
  color: #ffffff !important;
}

/* Card frame: adaptive width that hugs sentence, crystal glow gradient */
.lesson-open-scene,
body.learning-mode .journey-activity .study-card,
.quiz-suite {
  width: fit-content !important;
  min-width: min(360px, 92%) !important;
  max-width: min(580px, 94%) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(245, 255, 250, 0.82) 50%, rgba(254, 252, 232, 0.78) 100%) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-radius: 32px !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 18px 46px rgba(35, 75, 62, 0.12), 0 0 24px rgba(255, 255, 255, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.9) !important;
}

/* Ghép cặp: Phonics color preservation */
.journey-player .quiz-suite .pair-found {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2) !important;
}
.journey-player .quiz-suite .pair-found .fc-ph-c {
  color: #dc2626 !important;
  font-weight: 800 !important;
}
.journey-player .quiz-suite .pair-found .fc-ph-v {
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}
.journey-player .quiz-suite .pair-found .fc-ph-r {
  color: #7c3aed !important;
  font-weight: 800 !important;
}
.journey-player .quiz-suite .pair-found :is(.fc-ph-silent, .fc-ph-split-e) {
  color: #94a3b8 !important;
}

/* Multi-gap solved sentence */
body.learning-mode .journey-player .quiz-suite .gap-sentence.gap-solved {
  font-size: clamp(26px, 2.6vw, 38px) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  padding: 10px 16px !important;
}

/* Assembly solved line */
body.learning-mode .journey-player .quiz-suite.child-assembly .quiz-built-answer.assembly-correct {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: clamp(26px, 2.6vw, 38px) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  padding: 12px 16px !important;
  margin: 6px 0 !important;
  width: 100% !important;
}

/* Stimulus grammar spans never inherit giant font sizes */
.quiz-stimulus .role-subj,
.quiz-stimulus .role-verb,
.quiz-stimulus .role-aux,
.quiz-stimulus .role-obj,
.quiz-stimulus .role-mod,
.quiz-stimulus .fc-ph {
  font-size: 1em !important;
}

/* =========================================================================
   UNIVERSAL MAGICAL CARD THEME FOR ALL STUDY CARDS & QUIZZES
   ========================================================================= */
.lesson-open-scene,
.lesson-flashcards,
.study-card,
.practice-card,
.quiz-suite,
.mini-game,
.recall-stage,
body.learning-mode .journey-activity .study-card,
body.learning-mode .journey-player .study-card,
body.learning-mode .study-card,
body.learning-mode .lesson-open-scene,
body.learning-mode .lesson-flashcards,
body.learning-mode .panel.quiz-suite,
body.learning-mode .journey-player .quiz-suite,
body.learning-mode .journey-activity .success.child-completion,
body.learning-mode .journey-activity .panel {
  position: relative !important;
  width: fit-content !important;
  min-width: min(360px, 92%) !important;
  max-width: min(580px, 94%) !important;
  margin: 0 auto !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(245, 255, 250, 0.82) 50%, rgba(254, 252, 232, 0.78) 100%) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-radius: 32px !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 18px 46px rgba(35, 75, 62, 0.12), 0 0 24px rgba(255, 255, 255, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.9) !important;
  box-sizing: border-box !important;
}

/* Eliminate opaque white boxes inside the card so artwork floats on the glass stage */
body.learning-mode .journey-activity .study-card > .card,
body.learning-mode .journey-activity #study-design-card > .card,
body.learning-mode .journey-activity .study-card .card,
body.learning-mode .journey-activity .lesson-open-scene .card,
body.learning-mode .journey-activity .lesson-flashcard-face .card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Spot word instant feedback styling */
.listen-word-sentence button.word-correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
  transform: scale(1.05);
}
.listen-word-sentence button.word-incorrect {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  animation: wordShake 0.4s ease;
}
@keyframes wordShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* === TO MAU CHUAN apptienganh: dong bo voi src/phonics-grammar-colors.css, kiem tra bang src/visual-hierarchy.test.mjs === */
/* Màu âm vị (từ) và vai ngữ pháp (câu) apptienganh, đi cùng visual-hierarchy.mjs.
   Bảng màu do chủ dự án chốt, KHÔNG đổi màu. Cách hiển thị chủ dự án duyệt 28/10/2026 (đề xuất 2):
   - Từ: chỉ có màu và khung trọng âm. Không vạch dưới, không gạch chấm, không cung nối.
   - Chữ không đọc thành tiếng (k của knife, b của lamb, e cuối của cake/have) đều màu xám #94a3b8.
   - Câu: gạch dưới chỉ ở đuôi ngữ pháp (chữ s, -ing, -ed). Không đánh dấu từ trọng tâm.
   Lý do sư phạm: mỗi kênh nhìn chỉ mang một nghĩa (nguyên tắc báo hiệu, dư thừa của Mayer); trẻ chưa học
   "magic e" không hiểu cung nối, và chữ e tô xanh dễ bị đọc thành âm "e".
   Không để CSS disabled/opacity của nút đè các màu này thành một màu. */

/* ---------- Từ: âm vị ---------- */
.fc-word{display:inline-block;white-space:nowrap;line-height:1.15}
.fc-ph{display:inline-block}
.fc-ph-c{color:#dc2626;font-weight:700}
.fc-ph-v{color:#1d4ed8;font-weight:800}
.fc-ph-r{color:#7c3aed;font-weight:800}
/* Chữ không đọc thành tiếng: màu xám của bảng màu, không giảm opacity để vẫn đọc được. */
.fc-ph-silent,.fc-ph-split-e{color:#94a3b8;font-weight:700}
/* Trọng âm: nền vàng cho cả âm tiết, chữ bên trong giữ màu âm vị. */
.fc-syl.fc-ph-stress{display:inline-block;background:#fef3c7;box-shadow:inset 0 0 0 .07em #f59e0b;border-radius:.28em;padding:0 .06em;color:inherit}
/* Các lớp sau vẫn được sinh ra (fc-ph-multi, fc-ph-vowel-team, fc-split) để dành cho bài phonics riêng,
   nhưng màn học thường không hiện gì thêm. Đặt lại để đè CSS cũ của app nếu còn sót. */
.fc-ph-multi,.fc-ph-vowel-team{background:none;box-shadow:none;padding:0;border:0}
.fc-split{display:inline}

/* ---------- Câu: vai ngữ pháp (Colourful Semantics) ---------- */
.role-subj{color:#1d4ed8;font-weight:800}
.role-aux{color:#7c3aed;font-weight:800}
.role-verb{color:#ea580c;font-weight:800}
.role-obj{color:#059669;font-weight:800}
.role-mod{color:#6366f1;font-weight:800}
/* Lời chào, cảm ơn, liên từ nối mệnh đề, từ tượng thanh: không có vai, giữ màu chữ thường. */
.role-none{color:inherit;font-weight:700}

/* Từ trọng tâm: không đánh dấu trên màn học (lớp gram-key vẫn có trong HTML). */
.gram-key{border:0;background:none;box-shadow:none;padding:0}

/* Đuôi ngữ pháp, chỉ gạch đúng phần đuôi: chữ s (cam khi ở động từ số ít, xanh lục khi ở danh từ số nhiều), -ing lượn sóng, -ed chấm. */
.gram-sfx-s{text-decoration:underline .1em solid;text-underline-offset:.16em}
.gram-agree-singular .gram-sfx-s{text-decoration-color:#ea580c}
.gram-agree-plural .gram-sfx-s{text-decoration-color:#059669}
.gram-sfx-ing{text-decoration:underline .08em wavy currentColor;text-underline-offset:.16em}
.gram-sfx-ed{text-decoration:underline .1em dotted currentColor;text-underline-offset:.16em}
/* === HET TO MAU CHUAN === */
