/* Additions inherit the original cream/gouache palette, lettering and controls. */
#learning-mode-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px;}
#learning-mode-tabs .game-category-choice{display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:74px;padding:8px 6px;text-align:center;color:#63351f;font:800 16px/1.15 "Baloo 2","Nunito",sans-serif;}
#learning-mode-tabs small{font:700 11px/1.2 "Nunito",sans-serif;}
.learning-resume{grid-column:1/-1;}
#learning-error{position:fixed;z-index:2000;bottom:12px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);padding:12px 20px;background:#fff9ed;border:2px solid #f3727e;border-radius:20px;color:#9b3126;font:800 14px/1.3 "Nunito",sans-serif;}
.learning-blue{color:#398faf;}
#learning-next{position:absolute;z-index:15;top:57.5%;left:14%;width:28%;min-height:44px;padding:5px 10px;font-size:clamp(14px,4cqw,20px);}
#screen-game[data-learning-mode=listen4] .answer-choice-slot{width:21cqw;height:21cqw;max-width:21cqw;max-height:21cqw;top:33%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(odd){left:23%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(even){left:55%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(n+3){top:45%;}
#screen-game[data-learning-mode=listen4] #learning-next{top:57.5%;}
.learning-question-image{position:absolute;top:33%;left:35%;width:30%;height:17%;object-fit:contain;pointer-events:none;}
#screen-game[data-learning-mode=spelling] .answer-choice-slot{top:50%;width:34cqw;max-width:34cqw;height:9cqw;max-height:9cqw;min-height:44px;aspect-ratio:auto;border:2px solid #d8b887;border-radius:18px;background:#fff9edf0;box-shadow:0 3px 0 #b67f2233;color:#63351f;font:800 clamp(14px,4.1cqw,23px)/1.1 "Baloo 2","Nunito",sans-serif;}
#screen-game[data-learning-mode=spelling] .answer-choice-slot:nth-of-type(1){left:14%;}
#screen-game[data-learning-mode=spelling] .answer-choice-slot:nth-of-type(2){left:52%;}
#screen-game[data-learning-mode=spelling] .answer-choice-slot.correct{background:#edf7e9;border-color:#86ae6a;}
#screen-game[data-learning-mode=spelling] .answer-choice-slot.wrong{background:#fff0eb;border-color:#e5a597;}
#learning-result-detail{position:absolute;left:10%;top:calc(50% + var(--result-content-shift) + var(--result-layer-nudge-y) - 28px + var(--result-reward-spacing-y) - 1.35em);width:80%;display:flex;flex-wrap:wrap;justify-content:center;gap:3px 14px;text-align:center;color:#63351f;font:800 clamp(11px,3cqw,16px)/1.15 "Nunito",sans-serif;z-index:7;}
#learning-result-detail small{display:block;width:100%;font-size:clamp(9px,2.5cqw,12px);line-height:1.25;}
#learning-result-theme{position:absolute;z-index:12;left:18%;top:80%;width:64%;font-size:clamp(13px,3.5cqw,19px);min-height:44px;}
.result-reward-message{white-space:normal;text-align:center;}
@media(max-height:600px){
 #screen-result :is(#learning-result-detail,.result-reward-message){margin-top:10px;}
 #screen-result :is(.result-view-stickers,.result-play-again){margin-top:8px;}
}
#screen-themes{overflow:hidden;}
#screen-themes .worlds-select-body{width:min(100%,1060px);flex:1;min-height:0;}
#learning-themes-heading{font:800 clamp(22px,4vw,34px)/1.1 "Baloo 2","Nunito",sans-serif;}
#learning-themes-copy{text-align:center;font-size:16px;margin:0 0 18px;}
#learning-themes-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding-bottom:20px;}
.learning-theme-folder{display:flex;flex-direction:column;padding:24px 16px;color:#63351f;font-family:"Baloo 2","Nunito",sans-serif;text-align:center;}
.learning-theme-folder img{width:130px;max-width:100%;height:130px;object-fit:contain;}
.learning-theme-folder strong{font-size:23px;line-height:1.2;}.learning-theme-folder small{font:700 13px/1.3 "Nunito",sans-serif;}
.learning-task{padding:10px 10px 14px;border:3px solid #f1dfb4;border-radius:24px;background:#fff;box-shadow:0 5px 14px #82532924;text-align:center;}
.learning-task>img{width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:14px;}
.learning-task h2{font-size:23px;line-height:1.2;margin-top:10px;}.learning-task p{font-size:16px;margin:5px 0;}
.learning-task .worlds-button{width:100%;margin-top:8px;}
.learning-decorate{background:#edf7e9;}
.learning-core-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;align-items:start;}
.learning-core-strip img{width:100%;aspect-ratio:1;object-fit:contain;}.learning-core-strip small{display:block;font:800 11px/1.25 "Nunito",sans-serif;overflow-wrap:anywhere;}
.learning-album-themes{position:absolute;right:12px;top:130px;z-index:10;font-size:13px;}
#screen-theme-editor{overflow:hidden;}
#screen-theme-editor .worlds-header{position:absolute;top:0;left:0;z-index:10;width:100%;max-width:none;padding:12px;pointer-events:none;}
#screen-theme-editor .worlds-header button{pointer-events:auto;}
#learning-world-title{display:flex;align-items:center;gap:8px;padding:6px 14px;border-radius:20px;background:#fff9edeb;box-shadow:0 2px 8px #63351f20;font-size:clamp(19px,3vw,28px);font-weight:800;line-height:1.2;max-width:80%;}
#learning-world-title img{width:46px;height:46px;object-fit:contain;}#learning-world-title small{display:block;color:#af6079;font:800 12px/1.2 "Nunito",sans-serif;}
.learning-world-main{position:absolute;inset:0 0 155px;display:flex;align-items:center;justify-content:center;container-type:size;}
#learning-world-canvas{width:min(100cqw,calc(100cqh * 4 / 3));aspect-ratio:4/3;}
#learning-world-canvas .worlds-scene-art{object-fit:contain;}
.learning-world-controls{position:absolute;bottom:0;left:0;right:0;height:155px;border-top:2px solid #ead5b6;background:#fff8e9f0;padding:10px 12px;z-index:12;}
.learning-world-tools{display:flex;gap:8px;overflow-x:auto;padding:0 0 8px;white-space:nowrap;scrollbar-width:thin;}
.learning-world-tools .worlds-button{flex:none;font-size:14px;}
.learning-world-tools button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #be8535;}
#learning-world-tray{display:flex;gap:10px;overflow-x:auto;height:82px;touch-action:pan-x;}
#learning-world-tray .worlds-tray-sticker{flex:none;width:78px;min-width:78px;height:78px;background:#fff;border:1px solid #ead5b6;border-radius:14px;padding:3px;}
#learning-world-tray img{height:51px;width:100%;object-fit:contain;}#learning-world-tray span{display:block;font-size:11px;line-height:1.1;}
@media(max-width:650px){#learning-themes-grid{grid-template-columns:1fr;gap:14px;}.learning-theme-folder{flex-direction:row;flex-wrap:wrap;justify-content:center;padding:14px;gap:6px;}.learning-theme-folder img{width:80px;height:80px;}.learning-theme-folder strong{font-size:22px;align-self:center;}.learning-theme-folder small{width:100%;}.learning-task h2{font-size:22px;}.learning-core-strip small{font-size:11px;}#learning-mode-tabs .game-category-choice{font-size:13px;min-height:68px;}#learning-mode-tabs small{font-size:10px;}.learning-album-themes{top:114px;}#learning-world-title{font-size:18px;padding:6px 9px;gap:4px;}#learning-world-title img{width:34px;height:34px;}#learning-world-title small{font-size:10px;}.learning-world-main{inset:65px 0 155px;}}
@media(max-height:600px){.learning-world-main{inset:0 0 135px;}.learning-world-controls{height:135px;padding:5px 8px;}#learning-world-tray{height:74px;}#learning-mode-tabs{margin-top:8px;}#learning-mode-tabs .game-category-choice{min-height:54px;}}

.learning-series-tab img{width:29px;height:29px;object-fit:contain;}.learning-series-tab{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0!important;}.learning-series-tab span{font-size:12px;line-height:1.1;}
/* Two-level picker: retain the original cream paper, lettering and warm edges. */
#game-category-dialog{width:min(760px,calc(100vw - 24px));}
#game-category-dialog [hidden]{display:none!important;}
#game-category-dialog[data-step=modes]{height:min(746px,calc(100dvh - 24px));}
#game-category-dialog[data-step=modes] .game-category-header{padding:30px 24px 12px;}
#game-category-dialog[data-step=modes] .game-category-header h2{margin:0;}
#game-category-dialog[data-step=modes] .game-category-options{display:flex;flex-direction:column;gap:16px;padding:16px 30px 22px;justify-content:center;}
.learning-mode-card{flex:1 0 136px;max-height:154px;display:flex;align-items:center;position:relative;gap:24px;padding:8px 24px 8px 14px;border:2px solid var(--mode-edge);border-radius:30px;background:linear-gradient(115deg,#fffdf4,var(--mode-tint));box-shadow:inset 0 2px 0 #fffef9,0 5px 0 #b67f221b;isolation:isolate;text-align:left;color:#63351f;font-family:"Baloo 2","Nunito",sans-serif;touch-action:manipulation;}
.learning-mode-card::after{content:'';position:absolute;inset:6px;border:1px solid #fffdf6;border-radius:24px;pointer-events:none;z-index:-1;}
.tone-peach{--mode-tint:#ffead0;--mode-edge:#e8bd93;}.tone-blue{--mode-tint:#dfedf5;--mode-edge:#abd0df;}.tone-pink{--mode-tint:#f4e2ed;--mode-edge:#d6b6cb;}
.learning-mode-card:hover{filter:brightness(1.015);border-color:#bd946b;}
.learning-mode-card:active{transform:translateY(2px);box-shadow:0 2px 0 #b67f221b;}
.learning-mode-logo{width:120px;height:120px;object-fit:contain;flex:none;pointer-events:none;}
.learning-mode-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;}
.learning-mode-copy strong{font-size:29px;line-height:1.05;font-weight:800;}
.learning-mode-subtitle{font:800 19px/1.2 "Nunito",sans-serif;color:#946447;}
.tone-blue .learning-mode-subtitle{color:#4a8195;}.tone-pink .learning-mode-subtitle{color:#a2688c;}
.learning-mode-status{font:800 13px/1.2 "Nunito",sans-serif;color:#4a839a;}
.learning-mode-arrow{font-size:39px;font-weight:800;color:#ba9573;}
#game-category-copy{display:flex;align-items:center;justify-content:center;gap:8px;font:800 16px/1.2 "Nunito",sans-serif;}
#game-category-copy .learning-mode-logo{width:43px;height:43px;}#game-category-copy b{font-weight:700;color:#946447;}
#learning-resume{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;background:#ffe497!important;}
#learning-resume small{font-size:13px;font-family:"Nunito",sans-serif;}
#game-category-dialog[data-step=modes] #game-category-cancel{min-width:112px;}
#learning-theme-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 20px;}
.learning-theme-tab{display:flex;align-items:center;justify-content:center;gap:10px;min-height:94px;border:2px solid #e9d8b7;border-radius:24px;background:#fffdf3;color:#63351f;font:800 21px/1.2 "Baloo 2","Nunito",sans-serif;box-shadow:0 3px 0 #b67f221b;}
.learning-theme-tab img{width:72px;height:72px;object-fit:contain;}
.learning-theme-tab[aria-pressed=true]{border-color:#ceaa68;background:#fff0c8;box-shadow:0 0 0 2px #ffe2a2,0 3px 0 #b67f221b;}
#learning-themes-copy{margin-bottom:12px;}
.learning-switch-dialog{width:min(440px,calc(100vw - 32px));margin:auto;padding:28px;border:3px solid #dec59e;border-radius:30px;background:#fff9ed;box-shadow:0 10px 45px #44240940;color:#63351f;text-align:center;font-family:"Baloo 2","Nunito",sans-serif;max-height:calc(100dvh - 24px);overflow:auto;}
.learning-switch-dialog::backdrop{background:#27464066;backdrop-filter:blur(3px);}
.learning-switch-dialog h2{font-size:29px;line-height:1.1;margin:0 0 14px;}
.learning-switch-dialog p{margin:10px 0;font:700 16px/1.4 "Nunito",sans-serif;}
#learning-switch-target{font-weight:800;color:#9d6785;background:#f5e6ee;border-radius:14px;padding:10px;}
.learning-switch-dialog .learning-switch-note{font-size:13px;color:#876b55;}
.learning-switch-dialog button{display:block;width:100%;margin-top:10px;min-height:48px;}
#learning-switch-confirm{background:#ffe28a;}#learning-switch-cancel{background:transparent;box-shadow:none;}
@media(max-width:650px){
 #game-category-dialog[data-step=modes]{height:min(670px,calc(100dvh - 24px));}
 #game-category-dialog[data-step=modes] .game-category-header{padding:24px 10px 10px;}
 #game-category-dialog[data-step=modes] .game-category-header h2{font-size:31px;}
 #game-category-dialog[data-step=modes] .game-category-options{padding:12px 12px 18px;gap:14px;}
 .learning-mode-card{gap:9px;padding:8px 12px 8px 4px;border-radius:25px;min-height:135px;max-height:148px;flex-basis:135px;}
 .learning-mode-logo{width:100px;height:100px;}
 .learning-mode-copy strong{font-size:23px;line-height:1.08;}.learning-mode-subtitle{font-size:16px;}.learning-mode-status{font-size:11px;}.learning-mode-arrow{font-size:29px;}
 #game-category-copy{font-size:13px;gap:5px;}#game-category-copy .learning-mode-logo{width:34px;height:34px;}
 #game-category-dialog[data-step=modes] #game-category-cancel{min-width:70px;}
 #learning-resume{font-size:15px;gap:6px;}#learning-resume small{font-size:11px;}
 #learning-theme-tabs{gap:7px;margin-bottom:16px;}.learning-theme-tab{flex-direction:column;gap:4px;min-height:106px;padding:6px;font-size:14px;border-radius:18px;}.learning-theme-tab img{width:64px;height:64px;}
}
@media(max-width:360px){.learning-mode-logo{width:82px;height:82px;}.learning-mode-copy strong{font-size:21px;}.learning-mode-subtitle{font-size:14px;}.learning-mode-card{gap:6px;padding-right:10px;}}
@media(max-height:600px) and (min-width:651px){
 #game-category-dialog[data-step=modes] .game-category-header{padding:14px 12px 4px;}
 #game-category-dialog[data-step=modes] .game-category-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:10px 18px;align-content:stretch;}
 .learning-mode-card{flex-direction:column;gap:3px;padding:6px 8px;min-height:0;max-height:none;align-items:center;text-align:center;}
 .learning-mode-logo{width:76px;height:76px;}.learning-mode-copy{flex:none;gap:4px;}.learning-mode-copy strong{font-size:18px;}.learning-mode-subtitle{font-size:13px;}.learning-mode-status{font-size:10px;}.learning-mode-arrow{display:none;}
}
@media(prefers-reduced-motion:reduce){.learning-mode-card:active{transform:none;}}
/* Learn / Play / Practice: three purposes, with both game choices inside Play. */
#game-category-dialog[data-step=modes]{height:min(796px,calc(100dvh - 24px));}
#game-category-dialog[data-step=modes] .game-category-options{gap:14px;padding-top:12px;}
.learning-mode-card{flex:1 0 143px;max-height:159px;gap:22px;}
.learning-mode-card[data-section=play]{flex-basis:174px;min-height:174px;max-height:187px;}
.learning-mode-card .learning-mode-logo{width:126px;height:126px;}
.learning-mode-card .learning-mode-copy{gap:5px;}
.learning-section-label{font:900 11px/1.1 "Nunito",sans-serif;letter-spacing:.16em;color:#9b704a;}
.tone-blue .learning-section-label{color:#4a829a;}.tone-pink .learning-section-label{color:#a5688f;}
.learning-play-entries{display:flex;gap:12px;margin-top:4px;}
.learning-play-entry{display:flex;align-items:center;justify-content:center;gap:9px;min-height:61px;padding:8px 14px;border:2px solid #a6cbd6;border-radius:18px;box-shadow:0 3px 0 #86adbf26;background:#fffdf3;color:#467188;font:800 16px/1.1 "Baloo 2","Nunito",sans-serif;touch-action:manipulation;}
.learning-play-entry:active{transform:translateY(2px);}.learning-play-entry:hover{background:#f0faff;}
.learning-pick-icon{display:grid;grid-template-columns:repeat(2,1fr);gap:3px;flex:none;}
.learning-pick-icon i{display:grid;place-items:center;width:20px;height:20px;background:#e9f2f3;border:1px solid #a8c7cb;border-radius:5px;color:#b88836;font:900 13px/1 "Nunito",sans-serif;font-style:normal;}
.learning-pick-icon i:first-child{background:#ffe497;border-color:#d1b873;}.pick-two i{height:30px;}
.study-screen{overflow:hidden;}
#study-library-body{width:100%;max-width:1100px;margin:auto;flex:1;min-height:0;overflow-y:auto;padding:0 24px 28px;overscroll-behavior:contain;}
.study-invitation{text-align:center;margin:0 0 18px;font-size:18px;color:#927557;}
/* Shared editable title treatment derived from the approved Sticker Book title. */
.app-page-title{position:relative;isolation:isolate;font-family:"Baloo 2","Nunito",sans-serif;font-weight:800;line-height:1.16;letter-spacing:-.025em;text-align:center;padding-bottom:9px;}
.app-title-word{display:inline-block;white-space:nowrap;}
.app-title-letter{display:inline-block;color:var(--title-ink);-webkit-text-fill-color:var(--title-ink);-webkit-text-stroke:.45px #fff9ed;paint-order:stroke fill;text-shadow:0 .6px 0 #ffffff75;}
.app-title-letter:nth-child(3n+1){transform:rotate(-1.3deg) translateY(-.4px);}.app-title-letter:nth-child(3n){transform:rotate(1.1deg) translateY(.4px);}
.app-page-title::after{content:"";position:absolute;z-index:-1;left:9%;right:6%;bottom:0;height:6px;border-radius:70% 40% 55% 35%;background:linear-gradient(4deg,#f6c24b,#ffe088 55%,#ffd161);transform:rotate(-.6deg);box-shadow:0 1px 0 #efb34024;}
.app-page-title-small{font-size:clamp(18px,2.5vw,24px);letter-spacing:0;padding-bottom:0;}.app-page-title-small::after{display:none;}
#screen-word-library .worlds-header,#screen-word-study .worlds-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;}
#screen-word-library .worlds-header h1,#screen-word-study .worlds-header h1{min-width:0;font-size:clamp(23px,4vw,34px);}
@media(max-width:360px){#screen-word-library .worlds-header,#screen-word-study .worlds-header{gap:6px;padding-left:10px;padding-right:10px;}#screen-word-library .worlds-header button,#screen-word-study .worlds-header button{padding:8px;font-size:12px;}#screen-word-library .worlds-header h1,#screen-word-study .worlds-header h1{font-size:21px;}}
#study-word-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;}
.study-word-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px;border:2px solid #e9d6b9;border-radius:24px;background:#fffdf6;box-shadow:0 4px 0 #ba906119;color:#63351f;min-width:0;min-height:155px;touch-action:manipulation;}
.study-word-tile img{width:100%;height:104px;object-fit:contain;pointer-events:none;}
.study-word-tile span{font:800 18px/1.1 "Baloo 2","Nunito",sans-serif;overflow-wrap:anywhere;}
.study-word-tile:hover{border-color:#c8a566;background:#fff7dd;}
.study-reader{display:flex;align-items:center;justify-content:center;gap:clamp(28px,5vw,70px);width:100%;max-width:1050px;margin:auto;flex:1;min-height:0;padding:22px 28px;overflow:auto;}
.study-art-frame{flex:0 1 430px;aspect-ratio:1;max-width:46%;border:3px solid #e8d3b3;border-radius:38px;background:#fffdf7;box-shadow:0 7px 0 #c4a47b21;display:flex;align-items:center;justify-content:center;padding:20px;}
#study-image{width:100%;height:100%;aspect-ratio:1;object-fit:contain;border-radius:16px;}
.study-reader-copy{max-width:45%;min-width:0;text-align:center;}
.study-eyebrow{font:900 12px/1.2 "Nunito",sans-serif;letter-spacing:.1em;color:#ac8b61;}
#study-word{font:800 clamp(32px,5vw,58px)/1.1 "Baloo 2","Nunito",sans-serif;margin:14px 0 6px;overflow-wrap:anywhere;color:#704528;}
#study-meaning{font:700 22px/1.5 "Nunito",sans-serif;color:#947452;margin:0 0 24px;}
#study-listen{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:60px;padding:12px 24px;font-size:23px;background:#ffe08a;}
#study-listen svg{width:28px;height:28px;}
#study-speech-status{font:700 13px/1.4 "Nunito",sans-serif;min-height:20px;color:#a0695c;margin:12px 0 0;}
.study-reader-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:780px;width:100%;padding:18px 28px 26px;margin:0 auto;flex:none;}
.study-reader-nav button{min-height:48px;min-width:130px;}.study-reader-nav button:disabled{opacity:.4;}
#study-position{font:800 15px/1.1 "Nunito",sans-serif;color:#9c7c52;}
@media(max-width:650px){
 #game-category-dialog[data-step=modes]{height:min(782px,calc(100dvh - 24px));}
 #game-category-dialog[data-step=modes] .game-category-header{padding-top:20px;padding-bottom:5px;}
 #game-category-dialog[data-step=modes] .game-category-header h2{font-size:29px;}
 #game-category-dialog[data-step=modes] .game-category-options{gap:12px;}
 .learning-mode-card{min-height:148px;flex-basis:148px;max-height:164px;gap:5px;}
 .learning-mode-card[data-section=play]{min-height:175px;flex-basis:175px;max-height:190px;}
 .learning-mode-card .learning-mode-logo{width:101px;height:101px;}
 .learning-mode-copy strong{font-size:24px;}.learning-section-label{font-size:9px;}.learning-mode-subtitle{font-size:14px;}
 .learning-play-entries{gap:6px;}.learning-play-entry{flex:1;min-width:0;flex-direction:column;gap:4px;font-size:12px;padding:7px 6px;min-height:70px;border-radius:14px;}
 .learning-pick-icon i{width:15px;height:15px;font-size:10px;border-radius:4px;}.pick-two i{height:24px;}
 #study-library-body{padding:0 12px 20px;}#study-word-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}.study-word-tile{padding:8px 5px;min-height:123px;border-radius:18px;}.study-word-tile img{height:79px;}.study-word-tile span{font-size:14px;}
 .study-screen .worlds-header h1{font-size:23px;}.study-screen .worlds-header button{font-size:14px;}
 .study-reader{flex-direction:column;gap:16px;justify-content:center;padding:14px 18px;}
 .study-art-frame{flex:none;width:min(100%,320px);max-width:100%;padding:14px;border-radius:28px;}
 .study-reader-copy{max-width:100%;width:100%;}#study-word{font-size:38px;margin-top:8px;}#study-meaning{font-size:18px;margin-bottom:14px;}
 #study-listen{min-height:54px;font-size:20px;padding:10px 24px;}#study-speech-status{margin-top:6px;min-height:18px;}
 .study-reader-nav{padding:12px 18px 18px;gap:8px;}.study-reader-nav button{min-width:108px;}
}
@media(max-width:360px){.learning-mode-card .learning-mode-logo{width:84px;height:84px;}.learning-mode-copy strong{font-size:21px;}.learning-play-entry{font-size:11px;}.study-art-frame{width:260px;}}
@media(max-height:600px) and (min-width:651px){
 #game-category-dialog[data-step=modes] .game-category-options{gap:10px;}
 .learning-mode-card,.learning-mode-card[data-section=play]{min-height:0;max-height:none;gap:1px;padding:5px;}
 .learning-mode-card .learning-mode-logo{width:71px;height:71px;}
 .learning-mode-copy strong{font-size:18px;}.learning-mode-copy{gap:2px!important;}.learning-mode-subtitle{font-size:11px;}.learning-section-label{font-size:8px;}
 .learning-play-entries{gap:5px;margin-top:3px;}.learning-play-entry{gap:4px;padding:5px;min-height:50px;font-size:10px;flex-direction:column;}.learning-pick-icon i{width:11px;height:11px;font-size:8px;}.pick-two i{height:20px;}
 .study-art-frame{max-height:calc(100dvh - 150px);width:auto;flex:none;}.study-reader{padding:8px 24px;}.study-reader-nav{padding:6px 24px 10px;}#study-word{font-size:36px;}#study-listen{min-height:48px;font-size:18px;}#study-meaning{margin-bottom:8px;}
}
@media(max-width:650px) and (max-height:720px){
 #game-category-dialog[data-step=modes] .game-category-options{justify-content:flex-start;}
 .study-reader{justify-content:flex-start;}
 .study-art-frame{width:245px;}
 #study-word{font-size:32px;}#study-meaning{margin-bottom:10px;}.study-reader{gap:10px;}
}
/* Compact categories: picture above a name and its count, with the same palette. */
#game-category-dialog[data-step=categories]{width:min(680px,calc(100vw - 24px));height:min(626px,calc(100dvh - 24px));}
#game-category-dialog[data-step=categories] .game-category-header{padding:20px 16px 12px;}
#game-category-dialog[data-step=categories] .game-category-header h2{font-size:32px;margin-bottom:7px;}
#game-category-dialog[data-step=categories] .game-category-options{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;padding:8px 18px 16px;}
#game-category-dialog[data-step=categories] .game-category-choice{min-height:96px;padding:6px 4px 16px;flex-direction:column;justify-content:center;gap:0;border-radius:17px;}
#game-category-dialog[data-step=categories] .game-category-choice-art{width:70px;height:70px;}
#game-category-dialog[data-step=categories] .game-category-choice-copy{flex-direction:row;align-items:center;justify-content:center;gap:4px;width:100%;}
#game-category-dialog[data-step=categories] .game-category-choice-copy strong{font-size:13px;line-height:1.05;text-align:center;overflow-wrap:normal;max-width:calc(100% - 26px);}
#game-category-dialog[data-step=categories] .game-category-choice-copy{position:absolute;right:6px;bottom:5px;width:auto;}
#game-category-dialog[data-step=categories] .game-category-choice-copy small{flex:none;min-width:23px;padding:2px 5px;border-radius:9px;background:#fffaf2ed;font:800 13px/1.1 "Nunito",sans-serif;color:#856449;}
#game-category-dialog[data-step=categories] .game-category-choice[aria-pressed=true]::after{right:3px;top:3px;width:16px;height:16px;font-size:11px;}
#game-category-dialog[data-step=categories] .game-category-footer{padding:12px 18px 16px;}
@media(max-width:650px){
 #game-category-dialog[data-step=categories]{height:min(740px,calc(100dvh - 24px));}
 #game-category-dialog[data-step=categories] .game-category-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:7px 12px 12px;}
 #game-category-dialog[data-step=categories] .game-category-choice{min-height:84px;padding:5px 3px 16px;gap:0;border-radius:15px;}
 #game-category-dialog[data-step=categories] .game-category-choice-art{width:58px;height:58px;}
 #game-category-dialog[data-step=categories] .game-category-choice-copy{gap:0;min-height:0;}
 #game-category-dialog[data-step=categories] .game-category-choice-copy strong{font-size:12px;max-width:calc(100% - 23px);}
 #game-category-dialog[data-step=categories] .game-category-choice-copy small{font-size:12px;min-width:22px;}
 #game-category-dialog[data-step=categories] .game-category-header{padding:15px 12px 9px;}
 #game-category-dialog[data-step=categories] .game-category-header h2{font-size:28px;}
 #game-category-dialog[data-step=categories] .game-category-footer{padding:10px 12px 14px;}
}
@media(max-height:500px) and (min-width:651px){
 #game-category-dialog[data-step=categories] .game-category-header{padding:10px 12px 6px;}
 #game-category-dialog[data-step=categories] .game-category-header h2{font-size:24px;}
 #game-category-dialog[data-step=categories] .game-category-footer{padding:8px 12px 10px;}
}
/* The left control goes back to the current selection without ending a round. */
#screen-game .game-back{left:3%;top:2%;width:18%;min-height:44px;aspect-ratio:auto;display:flex;align-items:center;justify-content:center;gap:3px;padding:5px 4px;border:1px solid #e8d6b5;border-radius:22px;background:#fff9ed;color:#63351f;font:800 clamp(12px,3.8cqw,19px)/1 "Baloo 2","Nunito",sans-serif;box-shadow:0 3px 0 #b67f2220;}
#screen-game .game-back span{font-size:28px;line-height:1;}
#screen-game .game-category-open{left:23%;top:2%;width:56%;min-height:44px;padding:4px 8px;}
#game-category-label{display:flex;flex-direction:column;gap:2px;line-height:1.05;}
#game-category-label strong{font-size:clamp(12px,3.65cqw,18px);font-weight:800;}
#game-category-label small{font:700 clamp(10px,2.7cqw,14px)/1 "Nunito",sans-serif;overflow:hidden;text-overflow:ellipsis;}
/* Four answers get a taller board. Progress sits outside it in its own row. */
#screen-game[data-learning-mode=listen4] .game-board{top:17.9%;height:49.5%;object-fit:fill;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot{width:26cqw;height:26cqw;max-width:26cqw;max-height:26cqw;top:33%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(odd){left:19%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(even){left:55%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(n+3){top:49%;}
#screen-game[data-learning-mode=listen4] .game-progress{left:47%;top:66.7%;width:43%;}
#screen-game[data-learning-mode=listen4] #learning-next{top:66.7%;left:12%;width:29%;}
#screen-game[data-learning-mode=listen4] .game-buddy-group{top:74.5%;left:25%;width:44.5%;}
#screen-game[data-learning-mode=listen4] .game-bubble-group{top:76%;left:61%;width:31%;}
#screen-game[data-learning-mode=listen4] .game-ground-card-left{top:87%;left:10%;width:24%;}
#screen-game[data-learning-mode=listen4] .game-ground-cards-right{top:85%;left:68%;width:27%;}
@container(max-width:280px){
 #screen-game[data-learning-mode=listen4] .answer-choice-slot{width:24cqw;height:24cqw;max-width:24cqw;max-height:24cqw;}
 #screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(n+3){top:47.5%;}
 #screen-game[data-learning-mode=listen4] #learning-next,#screen-game[data-learning-mode=listen4] .game-progress{top:65%;}
 #screen-game[data-learning-mode=listen4] .game-buddy-group{top:78%;width:36%;left:29%;}
 #screen-game[data-learning-mode=listen4] .game-bubble-group{top:78%;}
}

/* Shared QA fixes: same voice toolbar and touch controls on every device. */
#screen-voice-preview.active{display:flex;flex-direction:column;}
.voice-return-bar{flex:none;width:100%;padding:10px 16px;background:#fff8ed;border-bottom:1px solid #eddec6;}
#screen-voice-preview #voice-preview-frame{flex:1;min-height:0;height:0!important;}
.profile-see-all::after{content:"";position:absolute;inset:-10px -5px;min-height:44px;}
/* Approved header adjustment: the brand stays close to the choice cards. */
#game-category-dialog[data-step=modes] .game-category-header{padding:16px 18px 4px;}
#game-category-dialog[data-step=modes] #game-category-title{font-size:clamp(25px,6.8vw,32px);line-height:1.08;margin:0;}
#game-category-dialog[data-step=modes] .game-category-options{justify-content:flex-start;padding-top:8px;gap:12px;}
.parental-audio-section{margin-top:16px;padding-top:12px;border-top:1px solid #ead6b6;}
.parental-audio-section .settings-action{width:100%;}
#daily-practice-dialog{max-width:420px;}
#daily-practice-dialog h2{font-size:27px;}
#daily-practice-stars{display:flex;justify-content:center;gap:20px;font-size:42px;line-height:1.4;color:#e5dece;}
#daily-practice-stars .earned{color:#ffc94e;}
#daily-practice-replay{background:#edf2e6;}
#daily-practice-later{background:transparent;box-shadow:none;}

/* 2026-10-22: enlarge the original four-choice panel and keep progress outside. */
#screen-game[data-learning-mode=listen4] .game-board{left:-1.75%;width:103.5%;height:54%;}
#screen-game[data-learning-mode=listen4] .answer-choice-slot:nth-child(n+3){top:51.5%;}
#screen-game[data-learning-mode=listen4] .game-progress,#screen-game[data-learning-mode=listen4] #learning-next{top:71%;}
#screen-game[data-learning-mode=listen4] .game-buddy-group{top:79%;}
#screen-game[data-learning-mode=listen4] .game-bubble-group{top:80.5%;}
#screen-game[data-learning-mode=listen4] .game-ground-card-left{top:89.5%;}
#screen-game[data-learning-mode=listen4] .game-ground-cards-right{top:87.5%;}
