/* Content-first layouts; shared category rails stay below the fixed app header. */
.page-categories{position:sticky;top:var(--app-header-size,74px);z-index:35;background:#faf8f1f5;backdrop-filter:blur(12px);padding:8px 0;margin-bottom:18px;border-bottom:1px solid #e8e5d9;min-width:0}
body .page-categories>:is(.category-rail,.feature-tabs,.course-stages){margin:0;padding:3px 2px}
.page-categories>:is(nav,div)+:is(nav,div){margin-top:6px!important}
.section-heading,.feature-heading{margin-bottom:20px!important}
.section-heading h2,.feature-heading h2{font-size:clamp(23px,2.5vw,30px)!important;line-height:1.4}
.section-heading .eyebrow,.feature-heading .eyebrow{display:none}
.section-heading p,.feature-heading p{line-height:1.7}
.adventure-hero{display:grid;grid-template-columns:1fr 1.3fr;align-items:center;gap:28px;padding:32px;text-align:left;border:1px solid #dce3ce;border-radius:26px;background:linear-gradient(130deg,#edf2df,#fbf8e9)}
.adventure-cover{display:flex;align-items:center;justify-content:center;min-width:0}
.adventure-cover .adventure-art{max-width:260px;width:100%;margin:0!important}
.adventure-copy{min-width:0}.adventure-copy h2{font-size:clamp(27px,4vw,42px);margin:10px 0 14px}.adventure-copy .eyebrow{font-size:11px}.adventure-next{font-size:14px;line-height:1.7;color:#738262}
.adventure-copy .continue-button{margin:20px 0 0;min-width:0;width:100%;max-width:360px;font-size:17px;min-height:52px}.adventure-copy .text-button{margin-top:5px}
body .trail-steps{display:flex;gap:12px;margin:18px 0;justify-content:flex-start}
body .trail-steps>span{background:none!important;width:auto;height:auto;display:flex;flex-direction:column;gap:6px;align-items:center;box-shadow:none;color:#889279}
.trail-steps b{display:grid;place-items:center;width:30px;height:30px;background:#e1e4d4;border-radius:50%;font-size:13px}.trail-steps small{font-size:11px;white-space:nowrap}.trail-steps .done b{background:#8ca571;color:white}.trail-steps .current b{background:#fffdf7;box-shadow:0 0 0 2px #8ca571;color:#627e4e}
.explore-main,.explore-tools{display:grid;gap:16px;min-width:0}.explore-main{grid-template-columns:repeat(3,minmax(0,1fr))}.explore-main .explore-card{padding:24px;text-align:left;min-height:200px}.explore-main .explore-card>span{font-size:44px}.explore-main .explore-card h3{font-size:23px;margin:16px 0 8px}.explore-main .explore-card p{font-size:14px;line-height:1.7;margin:0}
.section-caption{font-size:17px;margin:26px 0 14px;color:#6e7b60}.explore-tools{grid-template-columns:repeat(5,minmax(0,1fr))}.explore-tools .explore-card{padding:18px 14px;min-height:140px;text-align:left}.explore-tools .explore-card>span{font-size:28px}.explore-tools .explore-card h3{font-size:16px;margin:12px 0 7px}.explore-tools .explore-card p{font-size:12px;line-height:1.6;margin:0}
.library-trigger{display:none}.foundation-layout{display:grid!important;grid-template-columns:260px minmax(0,1fr)!important;grid-template-areas:'library player';align-items:start;gap:22px}.foundation-player{grid-area:player;min-width:0;scroll-margin-top:calc(var(--app-header-size,74px) + var(--category-height,110px) + 16px)}
dialog.foundation-library{grid-area:library;position:sticky;top:calc(var(--app-header-size,74px) + var(--category-height,110px) + 18px);inset-inline:auto;width:100%;max-width:none;max-height:calc(100dvh - var(--app-header-size,74px) - var(--category-height,110px) - 110px);margin:0;padding:15px;border:1px solid #e5dfd0;border-radius:20px;background:#fffdf7;color:inherit;overflow:auto;min-width:0}
.foundation-library .section-title{position:sticky;top:-15px;background:#fffdf7;padding:12px 0;margin-bottom:12px;z-index:1;flex-wrap:wrap}.foundation-library .section-title h3{font-size:15px;margin:0}.foundation-library .section-title>span{font-size:11px}.foundation-library .section-title button{display:none}
body .foundation-unit-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.foundation-unit-grid .foundation-unit{padding:10px 3px;min-height:72px;border-radius:12px}.foundation-unit-grid .foundation-unit strong{font-size:17px}body .foundation-unit-grid.words{grid-template-columns:repeat(auto-fit,minmax(min(110px,100%),1fr))}.foundation-unit-grid.words .foundation-unit{min-height:110px}.foundation-unit-grid.words .foundation-unit strong{font-size:13px;overflow-wrap:normal;word-break:normal}.foundation-unit-grid .foundation-unit small{font-size:10px}.foundation-unit-grid .foundation-unit>span:first-child{font-size:29px}.foundation-unit-grid .word-ipa{font-size:11px}.source-note{font-size:11px;line-height:1.8}
.unit-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px;border-bottom:1px solid #eee9de;color:#889475;font-size:12px}.unit-pagination button{min-height:44px;padding:8px}.foundation-hero{padding:22px!important;min-height:0!important}.foundation-picture{margin:16px auto!important;font-size:90px!important}.foundation-picture.words{font-size:85px!important}.foundation-hero h2{font-size:29px!important;margin:10px 0!important;overflow-wrap:anywhere}.foundation-hero h2 .word-ipa{font-size:17px}.foundation-audio-actions{gap:6px!important}.foundation-audio-actions .continue-button{width:auto;min-width:180px;margin:8px auto}.foundation-practice{padding:20px!important;border-top:1px solid #eee8dc}.foundation-practice>p{font-size:12px;line-height:1.7}.foundation-practice .record-button{background:#f1ecf7;color:#80669f;box-shadow:none;border:1px solid #dcd0eb;margin-top:10px}.foundation-practice .record-button[data-state=listening]{background:#c67d76;color:white}.foundation-practice .text-button,.foundation-audio-actions .text-button{min-height:44px}
.scene-catalog-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:22px;align-items:start}.scene-overview{padding:26px;background:#edf2e2;border:1px solid #dce5cf;border-radius:22px;text-align:center;position:sticky;top:calc(var(--app-header-size,74px) + var(--category-height,110px) + 18px)}.scene-overview>span{font-size:64px}.scene-overview h3{font-size:25px;margin:15px 0}.scene-overview p{font-size:13px;line-height:1.8;color:#869077}.scene-overview small{display:block;margin-top:14px;color:#879077;font-size:11px}.scene-overview .continue-button{min-width:0;width:100%}
body .scene-task-list{display:flex;flex-direction:column;gap:12px;margin:0}.scene-task-list .game-card{display:grid;grid-template-columns:26px 44px minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:5px 12px;padding:18px;min-height:100px;text-align:left;border-radius:18px}.scene-task-list .game-number{position:static;grid-column:1;grid-row:1/3;font-size:12px;color:#a4ab97}.scene-task-list .game-emoji{grid-column:2;grid-row:1/3;font-size:34px;margin:0}.scene-task-list strong{grid-column:3;font-size:17px;margin:0}.scene-task-list small{grid-column:3;font-size:12px;line-height:1.6;margin:0}.scene-task-list .game-start{grid-column:4;grid-row:1/3;font-size:11px;margin:0;white-space:nowrap}
body .book-shelf{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.book-shelf .book-cover{padding:14px;min-height:0}.book-shelf .book-cover-art{height:135px!important;min-height:0!important;margin:8px 0!important}.book-shelf .book-cover h3{font-size:16px;margin:12px 0 6px;line-height:1.5}.book-shelf .book-cover p{font-size:12px;margin:0 0 7px;line-height:1.5}.book-shelf .book-reading-status{font-size:11px;line-height:1.6}.book-grade{font-size:11px!important}.reading-level-note{font-size:12px;line-height:1.8;color:#939681}.reading-level-heading{padding:14px 0!important;margin-bottom:12px!important}.reading-level-heading h3{font-size:19px!important}.reading-level-heading p{font-size:13px!important}.reading-level-heading small{font-size:11px!important}
.continue-reading{display:flex;align-items:center;gap:15px;width:100%;padding:17px 20px;background:#edf2e1;border:1px solid #dae3c9;border-radius:18px;text-align:left;margin:0 0 14px}.continue-reading>span{font-size:32px}.continue-reading>div{flex:1;min-width:0}.continue-reading strong{display:block;font-size:16px;margin:5px 0}.continue-reading small,.continue-reading p{font-size:11px;color:#859176;margin:0}.continue-reading>b{font-size:12px;color:#6c8459;white-space:nowrap}.reader-info,.setting-help{font-size:12px;color:#8c937c;line-height:1.8}.reader-info summary,.setting-help summary{cursor:pointer;min-height:44px;padding:10px 0}.reader-info{margin:0 0 8px}.reader-info p{margin:4px 0}.reader-modes{position:sticky;top:var(--app-header-size,74px);z-index:30;background:#faf8f1f5;backdrop-filter:blur(12px);padding:8px 0!important}
.parent-playback-setting>p:first-child{font-size:12px;color:#909780}.parent-playback-setting .speed-control{display:flex;align-items:center;justify-content:space-between;width:100%;gap:16px;padding:15px 0;border-bottom:1px solid #eae5d9;margin:0;font-size:15px}.parent-playback-setting .voice-note{font-size:12px;margin:0 0 12px;line-height:1.8}.parent-playback-setting .setting-help{margin-bottom:20px}.parent-playback-setting .bear-select{max-width:75%}.parent-page [data-parent-detail] h3{font-size:19px}.parent-menu{gap:10px!important}.parent-menu>button{padding:16px!important;min-height:72px!important}.parent-menu h3{font-size:17px!important}.parent-menu p{font-size:12px!important;margin:6px 0 0!important}.chinese-setting{font-size:14px!important;min-height:56px}.feature-card{min-width:0}
@media(max-width:1000px){body .book-shelf{grid-template-columns:repeat(3,minmax(0,1fr))}.explore-tools{grid-template-columns:repeat(3,minmax(0,1fr))}.scene-catalog-layout{grid-template-columns:240px minmax(0,1fr)}.scene-task-list .game-start{grid-column:3;grid-row:3}.scene-task-list .game-emoji,.scene-task-list .game-number{grid-row:1/4}}
@media(max-width:767px){
.adventure-hero{grid-template-columns:1fr;gap:8px;padding:22px;text-align:center}.adventure-cover .adventure-art{max-width:140px;max-height:130px}.adventure-copy h2{margin:10px 0;font-size:29px}.adventure-copy .continue-button{max-width:none;font-size:17px}.adventure-next{font-size:13px}body .trail-steps{justify-content:center;gap:17px}.adventure-copy .eyebrow{font-size:10px}.adventure-copy .text-button{font-size:12px;min-height:44px}
.explore-main{grid-template-columns:1fr;gap:12px}.explore-main .explore-card{display:grid;grid-template-columns:54px minmax(0,1fr);gap:4px 15px;padding:18px;min-height:105px}.explore-main .explore-card>span{grid-row:1/3;align-self:center;font-size:38px}.explore-main .explore-card h3{font-size:20px;margin:0}.explore-main .explore-card p{font-size:12px}.explore-tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.explore-tools .explore-card{min-height:125px;padding:16px}.explore-tools .explore-card h3{font-size:15px}.explore-tools .explore-card p{font-size:11px}.section-caption{font-size:16px;margin-top:22px}
.foundation-layout{display:block!important}.library-trigger{display:flex;align-items:center;justify-content:center;padding:12px 16px;width:100%;min-height:48px;border:1px solid #d9e1cc;border-radius:14px;background:#eff3e7;color:#70855b;font-size:14px;margin-bottom:14px}.foundation-player{width:100%}.foundation-hero{padding:15px!important}.foundation-picture{font-size:68px!important;margin:12px auto!important}.foundation-picture.words{font-size:76px!important}.foundation-hero h2{font-size:26px!important}.foundation-practice{padding:16px!important}.foundation-practice>strong{font-size:15px}.foundation-hero .foundation-tag{font-size:11px}.foundation-hero>p{font-size:13px}.foundation-audio-actions{flex-wrap:wrap}.foundation-audio-actions .continue-button{width:100%;font-size:14px}.unit-pagination{padding:4px 10px}
dialog.foundation-library{position:fixed;inset:auto 8px 8px;width:calc(100% - 16px);max-height:78dvh;border-radius:24px;padding:18px;margin:0;z-index:100}.foundation-library::backdrop{background:#303a3066;backdrop-filter:blur(4px)}.foundation-library .section-title{top:-18px;padding:10px 0;background:#fffdf7;flex-wrap:nowrap}.foundation-library .section-title>span{display:none}.foundation-library .section-title button{display:block;width:44px;height:44px;font-size:25px}.foundation-unit-grid.letters{grid-template-columns:repeat(5,minmax(0,1fr))}.foundation-unit-grid.phonemes{grid-template-columns:repeat(4,minmax(0,1fr))}
.scene-catalog-layout{display:block}.scene-overview{position:static;display:grid;grid-template-columns:64px minmax(0,1fr);gap:5px 14px;padding:18px;text-align:left;margin-bottom:16px}.scene-overview>span{grid-row:1/3;font-size:48px;align-self:center}.scene-overview h3{font-size:23px;margin:0}.scene-overview p{font-size:12px;margin:0}.scene-overview .continue-button{grid-column:1/-1;margin-top:10px}.scene-overview small{grid-column:1/-1;text-align:center;margin:5px 0 0}.scene-task-list .game-card{grid-template-columns:22px 34px minmax(0,1fr);padding:14px;gap:4px 8px;min-height:96px}.scene-task-list .game-emoji{font-size:28px}.scene-task-list strong{font-size:15px}.scene-task-list small{font-size:11px}.scene-task-list .game-start{font-size:10px}
body .book-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.book-shelf .book-cover{padding:12px}.book-shelf .book-cover-art{height:105px!important}.book-shelf .book-cover h3{font-size:14px}.book-shelf .book-reading-status{font-size:10px}.continue-reading{padding:14px 12px;gap:10px}.continue-reading strong{font-size:14px}.continue-reading>b{font-size:10px}.reading-level-heading>span{font-size:30px!important}.reading-level-heading h3{font-size:17px!important}.parent-playback-setting .speed-control{font-size:14px}.parent-playback-setting .custom-select{max-width:75%}.page-categories{margin-bottom:14px}.section-heading{align-items:flex-start;gap:8px;flex-direction:column}.section-heading>span{font-size:11px}.parent-menu>button{min-height:65px!important}
}
@media(prefers-reduced-motion:reduce){.page-categories{scroll-behavior:auto}}
#phonics-workshop,.phonics-library,.lab-card,.reading-level-section,.scene-task-list{scroll-margin-top:calc(var(--app-header-size,74px) + var(--category-height,110px) + 18px)}
.setting-section-title{font-size:14px;margin:12px 0;color:#7a886c}.parent-menu strong{font-size:15px}.parent-menu small{font-size:12px;line-height:1.6}.parent-dashboard>.feature-card{padding:24px}.parent-dashboard>.feature-card h3{margin-top:0}.parent-settings-menu{max-width:900px}.parent-dashboard{gap:18px!important}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.adventure-cover .adventure-art{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:16px;min-height:140px;max-height:none;font-size:80px}.adventure-cover .concept-group{display:flex;margin:0!important}.adventure-cover .concept-picture{font-size:80px;margin:0!important}.parent-playback-setting{padding:0;margin:0 0 16px;border-top:0}.parent-playback-setting .setting-help{margin-bottom:0}
@media(max-width:767px){.adventure-cover .adventure-art{min-height:92px;max-width:210px;gap:12px}.adventure-cover .concept-picture{font-size:64px}.adventure-cover{min-height:92px}}
