/* V0.15 — late, scoped overrides for accessible portal presentation. */
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-items:stretch}
body.kxe-adventure .ksp-lesson-actions > [hidden]{display:none!important}
body.kxe-adventure .ksp-lesson-actions > :is(.kxe-lesson-normal,.kxe-lesson-hardcore){grid-column:1/-1;margin:0;display:flex;min-width:0}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .ks-button{width:100%;min-height:44px;white-space:normal;line-height:1.3;text-align:center;justify-content:center}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .kxe-lesson-faq{grid-column:2}body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .kxe-lesson-dyk{grid-column:1;grid-row:auto}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .ksp-quiz-start[data-ksp-normal-attempted=true] .ks-button:not(.kxe-stretched-link):not(.kxe-power-trigger){background:#21594b!important;color:#edfff4!important;border-color:#8ae8b9!important;box-shadow:0 3px 0 #123d33!important;flex-direction:row;flex-wrap:wrap;gap:6px 10px}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .ksp-quiz-start[data-ksp-normal-attempted=true] .ks-button:hover{background:#2b6e5c!important;color:#fff!important}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .kxe-practice-label{font-size:11px;background:#153f37;color:#edfff4;border-radius:999px;padding:3px 8px;font-weight:700}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .ksp-hc-form[data-ksp-hardcore-attempts][data-kxe-attempt-tone=available] .ks-button:not(:disabled):not(.kxe-stretched-link):not(.kxe-power-trigger){background:#523681!important;color:#fff3c4!important;border-color:#b99be9!important}
body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .ksp-hc-form .ks-button:disabled:not(.kxe-stretched-link):not(.kxe-power-trigger){background:#403950!important;color:#e8e1f1!important;border-color:#82738f!important;box-shadow:none!important;opacity:1!important;cursor:not-allowed}
/* Distinct selected teacher, independent of assigned galaxy hue. */
body.kxe-adventure.kxe-living .kxe-teacher-carousel .ksp-teacher-card[aria-current=true],body.kxe-adventure .ksp-teacher-strip .ksp-teacher-card[aria-current=true]{background:linear-gradient(145deg,#ffdf89,#eebc53)!important;color:#291749!important;border-color:#fff0bd!important;box-shadow:inset 0 0 0 2px #fff0bd,0 5px 0 #9c651c,0 0 22px #ffd06166!important}
body.kxe-adventure .ksp-teacher-strip .ksp-teacher-card[aria-current=true] :is(strong,.kxe-teacher-status){color:#291749!important;text-shadow:none!important}
body.kxe-adventure .ksp-teacher-strip .ksp-teacher-card[aria-current=true] .kxe-teacher-status{background:#30205f;color:#fff3bf!important;padding:5px 10px;border-radius:999px}
body.kxe-adventure .ksp-teacher-strip .ksp-teacher-card[aria-current=true] .kxe-teacher-status:before{content:'✓ ';}
/* Terminal state never repeats earlier answer reviews; active feedback stays intact. */
body.kxe-adventure .ksp-hc:is([data-ksp-hardcore-state=lost],[data-ksp-hardcore-state=won],[data-ksp-hardcore-state=cashed],[data-ksp-hardcore-state=timeout],[data-ksp-hardcore-state=exhausted]) :is([data-ksp-answer-correct],[data-ksp-question-purchase]){display:none!important}
.kxe-terminal-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:12px;margin-top:auto;padding-top:10px}
.kxe-terminal-actions>form{margin:0;display:flex;flex:0 1 210px}.kxe-terminal-actions>form button,.kxe-terminal-actions>a{width:100%;min-height:44px;text-align:center;justify-content:center}.kxe-terminal-actions>a{flex:0 1 210px;box-sizing:border-box}.kxe-run-status{color:#d9fff0;font-size:clamp(10px,1vw,12px);font-weight:700;line-height:1.3;text-align:center}.kxe-normal-lessons{justify-self:start}
/* Login: bound the artwork, not the form; a longer signup can scroll normally. */
body.kxe-adventure .ks-hero-grid{min-height:0;padding:clamp(16px,2.4vw,36px);align-items:center;gap:clamp(20px,4vw,62px)}
body.kxe-adventure .ks-hero-grid h1{font-size:clamp(38px,5.3vw,72px);margin:12px 0 16px;line-height:1.02}
body.kxe-adventure .ks-hero-grid .ks-lead{font-size:clamp(16px,1.7vw,22px);line-height:1.4;margin:0 0 14px}
body.kxe-adventure .ks-hero-grid .kxe-login-scene{max-height:clamp(120px,30vh,290px);margin-top:14px}
body.kxe-adventure .ks-hero-grid .kxe-login-art{width:100%;height:clamp(120px,30vh,290px);object-fit:cover;object-position:50% 42%;display:block}
body.kxe-adventure .ks-hero-grid .ks-access{align-self:center;padding:clamp(20px,3vw,38px);min-width:0;margin:0;width:100%;box-sizing:border-box}
body.kxe-adventure .ks-access>p,body.kxe-adventure .ks-access .ksp-register>p{color:#e4d8fa!important;line-height:1.5}
body.kxe-adventure .ks-access .ksp-register summary{color:#fff3bd!important;background:#38216f!important}
@media(min-width:761px){body.kxe-adventure .ks-hero-grid{min-height:min(600px,calc(100svh - 100px));grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr)}body.kxe-adventure .ks-hero-grid:has(.ksp-register[open]){align-items:start}}
@media(max-width:760px){body.kxe-adventure .ks-hero-grid{grid-template-columns:minmax(0,1fr);gap:16px}body.kxe-adventure .ks-hero-grid>div:first-child{order:2}body.kxe-adventure .ks-hero-grid .ks-access{order:1}body.kxe-adventure .ks-hero-grid h1{font-size:clamp(36px,8vw,54px)}}

body.kxe-adventure #ksp-shell #ksp-screen .ksp-lesson-actions .ksp-hc-form[data-kxe-attempt-tone=unknown] .ks-button:not(:disabled){background:#493b69!important;color:#fff!important;border-color:#b8a9d8!important}
