/* Spellmaster pilot UX refinement — focus on the active learning step.
   The existing illustrated library remains on the landing screen; lessons are calm
   and do not force a learner to scroll past decoration before each answer.
*/
@media(max-width:1024px){
 body.lesson-active main{padding:5px 10px 25px!important}
 body.lesson-active main>header{padding:5px 4px 7px!important;min-height:54px}
 body.lesson-active main>header .brand-art{width:160px!important;height:auto!important}
 body.lesson-active main>header .muted{font-size:10px!important}
 body.lesson-active main>.hero{display:none!important}
 body.lesson-active .sm-path,
 body.lesson-active .sm-character,
 body.lesson-active .sm-side{display:none!important}
 body.lesson-active .sm-layout{display:block!important}
 body.lesson-active #app.panel{margin:6px 0 12px!important;padding:15px 14px 18px!important;border-width:4px!important;min-height:0!important}
 body.lesson-active #app.panel:before{display:none!important}
 body.lesson-active #app .eyebrow{font-size:11px!important}
 body.lesson-active #app h2{font-size:clamp(22px,5vw,27px)!important;margin:8px 0!important}
 body.lesson-active #app .progress{height:8px!important;margin:8px 0 13px!important}
 body.lesson-active #app p{margin:6px 0 11px!important;line-height:1.45!important}
 body.lesson-active #app .actions{margin:9px 0!important;gap:8px!important}
 body.lesson-active #app .actions button{min-height:48px!important}
 body.lesson-active #app input#answer{margin:5px 0 8px!important;font-size:25px!important;min-height:59px!important}
 body.lesson-active #app label[for=answer]{margin:7px 0 1px!important}
 body.lesson-active #app .voice-options{margin:10px 0 0}
 body.lesson-active #app .voice-options summary{cursor:pointer;color:#57438c;font-size:13px;padding:7px 2px;font-weight:750}
 body.lesson-active #app .voice{margin:5px 0!important;padding:9px!important}
 body.lesson-active #app .status{font-size:12px!important;min-height:18px!important}
 body.lesson-active #app .word-group-row{margin:9px 0!important}
 body.lesson-active #app .word-group-row .spelling-row{margin:0!important}
 body.lesson-active #app .word-group-change{display:none!important}
 body.lesson-active #app .tip{padding:11px!important;margin:10px 0!important}
 body.lesson-active #app .tip p{font-size:15px!important}
 body.lesson-active #app .chunk-workshop{padding:10px!important;margin:10px 0!important}
 body.lesson-active #app .chunk-head p{font-size:14px!important}
 body.lesson-active #app .chunk-head strong{font-size:16px!important}
 body.lesson-active main>.footer{display:none}
}
@media(max-width:600px){
 body.lesson-active #app .actions:last-child{
  position:sticky;bottom:0;z-index:12;
  margin-top:10px!important;padding:9px 4px calc(9px + env(safe-area-inset-bottom));
  background:#fff5e4;border-top:1px solid #ddc6a2;border-radius:12px;
  box-shadow:0 -5px 20px #50346519;
 }
 body.lesson-active #app .actions:last-child button:first-child{background:linear-gradient(#ffe18a,#f1b84d)!important;color:#452d56!important}
 body.lesson-active #app .actions:last-child button:not(:first-child){background:transparent!important;color:#604577!important;box-shadow:none!important;border:1px solid #ceb5d5}
 body.lesson-active #app .actions:last-child button{flex:1 1 auto!important}
 body.lesson-active #app .actions:last-child button:last-child{font-size:13px!important}
 body.lesson-active #app .spelling-row span{font-size:23px!important;padding:9px 12px!important}
}
@media(min-width:1025px){
 body.lesson-active .sm-character .sm-avatar-card{min-height:100px}
 body.lesson-active .sm-character .sm-avatar-illustration{height:95px}
 body.lesson-active .sm-side{opacity:.86}
 body.lesson-active #app .voice-options summary{cursor:pointer}
}

/* Landing is still an adventure, but its first action must be easy to find. */
#app .quick-play{display:none}
@media(max-width:600px){
 body:not(.lesson-active) #app .quick-play{display:flex!important;width:100%;min-height:62px!important;justify-content:center;margin:0 0 15px;font-size:20px!important}
 body:not(.lesson-active) #app .play-now:not(.quick-play){display:none!important}
 body:not(.lesson-active) .sm-path{padding:6px 9px!important;margin:5px 0!important}
 body:not(.lesson-active) .sm-character .sm-avatar-card{min-height:70px!important}
 body:not(.lesson-active) .sm-avatar-illustration{width:57px!important;height:57px!important}
 body:not(.lesson-active) .hero{margin:5px 0!important;padding:9px 13px!important}
 body:not(.lesson-active) .hero p{display:none!important}
 body.needs-profile main>.hero,body.needs-profile .sm-path,body.needs-profile .sm-character{display:none!important}
 body.needs-profile #app .start-layout{display:flex!important;flex-direction:column}
 body.needs-profile #app .start-layout>.profile-panel{order:-1;width:100%}
 body.needs-profile #app .start-layout>section:first-child{order:1}
 body.needs-profile #app .start-layout>section:first-child .next-chapter,
 body.needs-profile #app .start-layout>section:first-child .start-desc,
 body.needs-profile #app .start-layout>section:first-child .actions{display:none!important}
}

/* Learning-first landing page: the guided adventure is the primary activity. */
#app .next-chapter{align-items:flex-start!important;gap:16px}
#app .chapter-content{flex:1;min-width:0}
#app .chapter-content h3{margin:4px 0 7px!important}
#app .chapter-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:16px}
#app .chapter-actions .play-now.quick-play{
 display:inline-flex!important;width:auto;min-height:58px!important;margin:0!important;
 padding:14px 21px!important;font-size:19px!important;letter-spacing:0;
}
#app .chapter-actions .play-icon{width:31px;height:31px;font-size:17px}
#app .chapter-listen{min-height:48px!important;padding:9px 12px!important}
#app .chapter-setup-hint{margin-top:12px;color:#614b83;font-weight:750}
#app .sprint-feature{
 margin:23px 0 15px;padding:21px 22px;border-radius:20px;
 border:2px solid #d7c4ed;background:linear-gradient(135deg,#f7efff,#fffaf0);
}
#app .sprint-feature h3{font-family:var(--font-display)!important;font-size:clamp(23px,2.5vw,29px);margin:6px 0 10px;color:#46336f}
#app .sprint-feature p{font-size:16px;line-height:1.55;margin:0 0 15px;color:#554b67}
#app .sprint-start{
 display:inline-flex;min-height:48px;align-items:center;justify-content:center;
 border-radius:13px;background:#eee3ff;color:#493382;font-weight:900;
 padding:11px 18px;text-decoration:none;border:2px solid #d3b9ed;
}
#app .sprint-start:focus-visible{outline:4px solid #f4ba48;outline-offset:3px}
#app .assessment-entry{padding:7px 3px 16px}
#app .assessment-entry a{display:inline-block;font-weight:850;color:#5940a1}
#app .assessment-entry p{margin:6px 0 0!important}
@media(max-width:600px){
 body:not(.lesson-active) #app .next-chapter{gap:10px!important;padding:16px!important}
 body:not(.lesson-active) #app .chapter-actions{flex-direction:column;align-items:stretch;gap:9px}
 body:not(.lesson-active) #app .chapter-actions .quick-play{width:100%!important;min-height:62px!important}
 body:not(.lesson-active) #app .chapter-listen{width:100%!important}
 body:not(.lesson-active) #app .sprint-feature{padding:17px 15px;margin:19px 0 12px}
 body:not(.lesson-active) #app .sprint-start{width:100%}
}

/* On small screens let the chapter begin immediately, rather than putting
   welcome prose and character decoration ahead of the main action. */
@media(max-width:600px){
 body:not(.lesson-active):not(.needs-profile) .sm-character{order:2!important}
 body:not(.lesson-active):not(.needs-profile) #app.panel{order:0!important}
 body:not(.lesson-active):not(.needs-profile) #app .start-layout>section:first-child{display:flex;flex-direction:column}
 body:not(.lesson-active):not(.needs-profile) #app .start-layout>section:first-child>.next-chapter{order:-2}
 body:not(.lesson-active):not(.needs-profile) #app .start-layout>section:first-child>.start-kicker,
 body:not(.lesson-active):not(.needs-profile) #app .start-layout>section:first-child>h2,
 body:not(.lesson-active):not(.needs-profile) #app .start-layout>section:first-child>.start-desc{display:none!important}
 body:not(.lesson-active):not(.needs-profile) #app .next-chapter{margin:2px 0 9px!important}
}
