/* Mobile integration of the approved UI studio. No scene geometry changes. */
:root{
 --fui-ink:#35495f;--fui-muted:#526a80;--fui-line:#c6e2ee;
 --fui-lemon:linear-gradient(150deg,#fffddf 0%,#fff290 44%,#ffe665 100%);
 --fui-sky:linear-gradient(150deg,#fff 0%,#eaf9ff 44%,#bceaff 100%);
 --fui-mint:linear-gradient(145deg,#f5fffa,#d2f8e6 45%,#a5edc9);
 --fui-pink:linear-gradient(145deg,#fff7fb,#ffdeea 45%,#ffbcd4);
 --fui-lavender:linear-gradient(145deg,#fdfaff,#eee3ff 45%,#d9c2ff);
 --fui-button-shadow:inset 0 2px white,0 2px 0 #b3e7fa;
}
.mobile-title-word{display:inline-block;white-space:nowrap}
.mobile-title-word>span{color:var(--letter-ink)!important;-webkit-text-fill-color:var(--letter-ink)!important;-webkit-text-stroke:0!important;text-shadow:none!important}
.album-title img{clip-path:none!important;object-fit:contain}
/* The visible icon plate is small; the interactive target remains 44 × 44. */
body .app-header-control{isolation:isolate;border:0!important;background:transparent!important;box-shadow:none!important;color:#326b8d!important;}
body .app-header-control::before{content:''!important;display:block!important;position:absolute!important;inset:6.6px!important;width:30.8px!important;height:30.8px!important;border:1px solid #c4e1ee!important;border-radius:10.5px!important;background:var(--fui-sky)!important;box-sizing:border-box!important;box-shadow:inset 0 2px white,0 2px 0 #add4df28!important;pointer-events:none;z-index:-1;}
body .app-header-control::after{display:none!important;content:none!important;}
body .app-header-control.approved-action-icon>svg[data-approved-glyph]{display:block!important;position:relative!important;width:18.2px!important;height:18.2px!important;min-width:18.2px!important;max-width:18.2px!important;min-height:18.2px!important;max-height:18.2px!important;fill:currentColor!important;stroke:none!important;transform:none!important;}
body .app-header-control.approved-action-icon.scene-lock-button[aria-pressed=true]::before{background:var(--fui-lemon)!important;border-color:#e4cd70!important}
body .app-header-control:active::before{box-shadow:inset 0 1px 3px #52789026!important}
.mobile-label-symbol{width:19px;height:19px;flex:none;vertical-align:middle;margin-right:7px;fill:currentColor}
/* A little edge light and depth, with clear reading surfaces. */
:is(.worlds-button,.sw-primary,#game-category-start,#learning-switch-confirm,#study-listen,.settings-action.primary,.buddy-dialog button[type=submit],#btn-resume){border:1px solid #eee18f;border-radius:20px;background:var(--fui-lemon);color:#604d25;box-shadow:inset 0 2px white,0 3px 0 #f2dc63,0 7px 14px #edcf3610;font:800 16px/1.25 Nunito,sans-serif;}
:is(.sw-secondary,.sw-icon,.sw-sound,.sw-sentence-sound,#game-category-cancel,#learning-switch-cancel,.study-voice-action,.settings-action:not(.primary):not(.danger)){
 background:var(--fui-sky);border:1px solid #a9dcf2;border-radius:20px;box-shadow:var(--fui-button-shadow);color:#326b8d;font-family:Nunito,sans-serif;font-weight:800;
}
:is(.settings-action.danger,#learning-remove){background:var(--fui-pink);color:#954d70;border-color:#e6b8cc;box-shadow:inset 0 2px white,0 2px 0 #efcad8}
button:focus-visible{outline:2px solid #3989ac;outline-offset:3px}
button:disabled{cursor:default}
dialog:not(#game-category-dialog){border:1px solid #e0eaf0;background:linear-gradient(155deg,#fff,#fffef9 75%,#f6f2ff);box-shadow:inset 0 2px white,0 22px 60px #36516e25;}
dialog::backdrop{background:#344c7040;backdrop-filter:blur(3px)}
.overlay-card{border:1px solid #e0eaf0;border-radius:28px;background:linear-gradient(150deg,#fff,#fffef5);box-shadow:inset 0 2px white,0 20px 55px #36516e30;color:var(--fui-ink)}
.overlay-title{font:600 27px/1.2 Fredoka,sans-serif;color:var(--fui-ink)}
.study-art-frame{background:linear-gradient(145deg,#fffef9,#fff7d1);border:1px solid #ecdda1;box-shadow:inset 0 3px white,0 3px 0 #f2e49555;}
.study-word-tile,.game-category-choice,.sw-word-tile{border:1px solid #c6e2ee;border-radius:21px;box-shadow:inset 0 2px white,0 2px 0 #c4dfec30;background:linear-gradient(150deg,#fff,#f2faff)}
.study-eyebrow{display:none}
.study-recording{background:transparent}
.study-recording[data-phase=recording] .study-record-button{background:var(--fui-pink);border-color:#edb6cb;color:#a3416a}
.study-recording[data-phase=playing] .study-my-voice-button{background:var(--fui-mint);border-color:#a9dcc0;color:#2b7756}
.study-voice-action svg[data-mobile-symbol],#study-listen svg[data-mobile-symbol]{fill:currentColor;stroke:none;width:21px;height:21px}
/* Card order and original role-specific artwork are retained. */
#game-category-dialog.has-sight-entry[data-step=modes]{--entry-badge-size:86px;}
#game-category-dialog.has-sight-entry[data-step=modes] .game-category-options{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:12px;padding:12px;}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card,
#game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play]{display:grid;grid-template-columns:var(--entry-badge-size) minmax(0,1fr) 12px;column-gap:10px;align-items:center;flex:0 0 auto;min-height:112px;max-height:none;padding:12px 10px;border:1px solid #c8e2eb;border-radius:25px;box-shadow:inset 0 2px white;text-align:left;}
#game-category-dialog .learning-mode-card[data-section=learn]{background:linear-gradient(140deg,#fffde4,#fff3a0 45%,#ffe875)}
#game-category-dialog .learning-mode-card[data-section=play]{background:linear-gradient(140deg,#f6fdff,#d6f2ff 45%,#a2dfff)}
#game-category-dialog .learning-mode-card[data-mode=sight-words]{background:var(--fui-lavender)}
#game-category-dialog .learning-mode-card[data-section=practice]{background:var(--fui-pink)}
#game-category-dialog .learning-mode-copy{display:flex;flex:1;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;min-width:0;text-align:left;}
#game-category-dialog .learning-mode-copy strong{font:600 21px/1.12 Fredoka,sans-serif!important;color:#35495f;text-align:left;overflow-wrap:normal;}
#game-category-dialog .learning-mode-subtitle{font:600 12px/1.35 Nunito,sans-serif;text-align:left;color:#405d72;}
#game-category-dialog .learning-mode-arrow{display:block;align-self:center;font:600 24px/1 Nunito;color:#416b85}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-badge{align-self:center;justify-self:center;}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-play-entries{display:flex;gap:7px;margin-top:1px;justify-content:flex-start;}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-play-entry{display:flex;flex:0 0 44px;min-width:44px;width:44px;min-height:44px;height:44px;padding:5px;border-radius:14px;border:1px solid #a6cbd6;background:#fffdf3;box-shadow:inset 0 2px white,0 2px 0 #86adbf26;}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-pick-icon{gap:3px;}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-pick-icon i{width:12px;height:12px;border:1px solid #a8c7cb;background:#e9f2f3;border-radius:3px;font:800 10px/1 Nunito;color:#946d23;}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-pick-icon i:first-child{background:#ffe875;border-color:#e2c65b}
#game-category-dialog.has-sight-entry[data-step=modes] .pick-two i{height:23px}
#game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play]{min-height:136px}
/* Only the phone layout is being reviewed. Bounds adapt to the real viewport. */
@media(max-width:600px){
 dialog{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto;overscroll-behavior:contain;}
 #game-category-dialog{width:calc(100vw - 24px);height:calc(100dvh - 24px);max-width:440px!important;overflow:hidden;}
 #game-category-dialog .game-category-shell{min-height:0;}
 #game-category-dialog .game-category-header{padding:16px 12px 4px;}
 #game-category-title{font-size:clamp(24px,6.7vw,30px)!important;}
 #game-category-dialog .game-category-footer{padding:10px 12px 14px;}
 #game-category-dialog .game-category-actions button{min-height:48px;font-size:15px;}
 #game-category-dialog[data-step=categories] .game-category-options{grid-template-columns:repeat(3,minmax(0,1fr));}
 .study-reader{flex-direction:column;align-items:center;justify-content:flex-start;overflow-y:auto;min-height:0;gap:12px;padding:12px 16px 20px;}
 .study-art-frame{flex:none;width:min(72vw,280px);max-width:100%;min-height:0;padding:16px;}
 .study-reader-copy{flex:none;width:100%;max-width:100%;}
 #study-word{font-size:36px;margin:4px 0 8px;}
 #study-meaning{margin-bottom:12px;}
 .study-reader-nav{padding:8px 12px 12px;gap:6px;}
 .study-reader-nav button{min-width:44px;}
 .study-recording-buttons{gap:10px;}
 .study-voice-action{min-height:48px;}
 .overlay-card{max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;}
 .sw-shell{max-width:100%;min-height:0;}
 .sw-header{flex:none;}
 .sw-letter{border-radius:13px;box-shadow:inset 0 2px white,0 2px 0 #b3dfef40;}
}
@media(max-width:360px){
 #game-category-dialog.has-sight-entry[data-step=modes]{--entry-badge-size:76px;}
 #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card{column-gap:8px;padding:10px 8px;min-height:102px;}
 #game-category-dialog .learning-mode-copy strong{font-size:20px!important;}
 #game-category-dialog .learning-mode-subtitle{font-size:11.5px;}
}
@media(max-height:650px) and (max-width:600px){
 #game-category-dialog .game-category-header{padding-top:12px;}
 #game-category-dialog .game-category-options{gap:10px!important;}
 .study-art-frame{width:min(58vw,210px);}
 #study-word{font-size:32px;}
}
@media(prefers-reduced-motion:reduce){.learning-mode-card:active{transform:none}}
/* Content teaching stays single-ink; ordinary navigation headings use the approved candy family. */
#game-category-title .app-title-letter,#screen-word-library .app-title-letter,#screen-word-study .app-title-letter,#screen-sight-words .app-title-letter{color:var(--title-ink,#35495f)!important;-webkit-text-fill-color:var(--title-ink,#35495f)!important;}

svg[data-mobile-symbol]{fill:currentColor;stroke:none}
/* Definitive teaching typography. Use direct selectors so legacy font shorthands
   cannot restore decorative Baloo lettering on dynamically inserted study views. */
body #screen-word-study #study-word,
body #screen-word-library .study-word-tile > span,
body #screen-sight-words .sw-target,
body #screen-sight-words .sw-example,
body #screen-sight-words .sw-word-tile > span,
body #screen-sight-words .sw-slots button,
body #screen-sight-words .sw-letter,
body #screen-game .word-en,
body #screen-game[data-learning-mode=spelling] .answer-choice-slot,
body .learning-core-strip small,
body .album-name{
 font-family:Andika,sans-serif!important;
 font-weight:400!important;
 font-synthesis:none!important;
 letter-spacing:0!important;
}
body #screen-sight-words .sw-sentence-target{font-family:Andika,sans-serif!important;font-weight:700!important;}

/* Profile plates follow the shared UI. Coordinates match the visible artwork,
   not the padded PNG canvases. Original sticker tiles are deliberately untouched. */
#screen-profile :is(.profile-user-panel,.profile-buddy-panel,.profile-stickers-panel) > .profile-panel-art{visibility:hidden}
#screen-profile :is(.profile-user-panel,.profile-buddy-panel,.profile-stickers-panel)::before{
 content:"";position:absolute;box-sizing:border-box;border:1px solid var(--fui-line);
 border-radius:5.6cqw;background:linear-gradient(150deg,#fff,#fffef7 75%,#f5faff);
 box-shadow:inset 0 2px #fff,0 2px 0 #c4dfec55,0 6px 18px #36516e12;pointer-events:none;
}
#screen-profile .profile-user-panel::before{left:2.77cqw;top:23.66cqw;width:53.22cqw;height:53.28cqw}
#screen-profile .profile-buddy-panel::before{left:57.97cqw;top:23.78cqw;width:39.06cqw;height:53.62cqw;background:linear-gradient(150deg,#fff,#fbf8ff)}
#screen-profile .profile-stickers-panel::before{left:3.41cqw;top:79.59cqw;width:92.90cqw;height:67.96cqw}
#screen-profile .profile-buddy-heading{position:absolute;left:59cqw;top:26.4cqw;width:37cqw;margin:0;text-align:center;color:var(--fui-ink);font:600 4.7cqw/1.2 Fredoka,sans-serif}
#screen-profile :is(.profile-details h1,.profile-details p,.profile-stickers-panel h2){color:var(--fui-ink)}
#screen-profile .profile-stat::before{content:"";position:absolute;top:61.12cqw;width:23.34cqw;height:12.70cqw;box-sizing:border-box;border:1px solid #b7e4d3;border-radius:3.4cqw;background:var(--fui-mint);box-shadow:inset 0 2px white,0 2px 0 #a9d6c644}
#screen-profile .profile-stat-words::before{left:5.22cqw}
#screen-profile .profile-stat-stars::before{left:30.55cqw;background:var(--fui-lavender);border-color:#d7c5ef;box-shadow:inset 0 2px white,0 2px 0 #c7b0e344}
/* Display-only silhouettes retain the exact original book/star artwork. */
#screen-profile .profile-stat-words>img{clip-path:polygon(11.326% 42.081%,12.776% 38.674%,16.091% 36.096%,19.682% 34.899%,22.928% 35.083%,25.000% 36.280%,27.555% 33.794%,30.870% 32.136%,33.771% 31.860%,35.773% 32.597%,37.086% 34.807%,38.398% 35.820%,39.365% 39.227%,41.506% 52.394%,41.644% 54.696%,40.746% 56.906%,39.365% 58.195%,36.948% 58.840%,33.978% 58.656%,32.044% 59.484%,29.420% 61.418%,27.693% 62.063%,25.345% 61.694%,23.412% 61.971%,20.649% 63.260%,17.818% 64.180%,15.815% 63.720%,14.365% 62.339%,13.674% 60.037%,11.326% 45.764%)}
#screen-profile .profile-stat-stars>img{clip-path:polygon(19.475% 37.753%,21.961% 32.505%,23.619% 30.479%,25.345% 29.742%,27.279% 30.110%,29.144% 31.676%,31.975% 37.753%,35.981% 38.674%,38.122% 40.239%,39.503% 42.634%,39.986% 45.212%,39.434% 47.698%,38.329% 49.816%,35.843% 53.039%,36.602% 57.827%,36.533% 60.129%,35.497% 62.707%,33.840% 64.457%,32.113% 65.193%,30.180% 64.825%,25.483% 62.431%,20.718% 64.917%,18.577% 65.285%,16.644% 64.457%,15.193% 62.799%,14.503% 60.681%,14.365% 58.103%,15.124% 52.947%,12.638% 49.540%,11.740% 47.422%,11.395% 44.936%,11.809% 42.357%,12.914% 40.331%,14.572% 39.134%)}

/* Back is the sizing baseline for every compact navigation/tool control.
   The 44px hit target stays intact; plate 30.8px, centered glyph 18.2px. */
body .app-header-control>img[data-header-glyph],body .app-header-control>svg[data-header-glyph]{width:18.2px!important;height:18.2px!important;min-width:18.2px!important;max-width:18.2px!important;min-height:18.2px!important;max-height:18.2px!important;}
body .app-header-control:active:not(:disabled){background:transparent!important;box-shadow:none!important;}
#game-category-dialog #game-category-copy{display:none!important}
/* Override the earlier shared layer's full-size plate, including locked controls. */
body .screen:not(#screen-game):not(#screen-home) .app-header-control,
body .screen:not(#screen-game):not(#screen-home) .app-header-control.scene-lock-button[aria-pressed=true],
body dialog .app-header-control{border:0!important;background:transparent!important;box-shadow:none!important}

/* Category-heading visual study: a little of the brand's smiling-star energy. */
#game-category-dialog[data-step=categories] #game-category-title{position:relative;isolation:isolate;margin-top:19px!important;margin-bottom:12px!important;overflow:visible;}
#game-category-dialog[data-step=categories] #game-category-title::before{content:"";position:absolute;width:32px;height:32px;left:calc(50% - 16px);top:-28px;background:url("category-covers/title-happy-star.svg") center/contain no-repeat;filter:drop-shadow(0 2px 1px #be9b4130);pointer-events:none;}
#game-category-dialog[data-step=categories] #game-category-title .app-title-letter{-webkit-text-stroke:3px white!important;paint-order:stroke fill;text-shadow:0 2px 2px #baaa8740!important;}
#game-category-dialog[data-step=categories] #game-category-title::after{display:block!important;content:"";position:absolute;inset:-4px 0 -5px;width:auto;height:auto;margin:0;transform:none;box-shadow:none;border-radius:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at center,#ffd458 0 48%,transparent 55%) left 3px top 4px/9px 5px no-repeat,radial-gradient(ellipse at center,#ffd458 0 48%,transparent 55%) left 0 bottom 4px/12px 6px no-repeat,radial-gradient(ellipse at center,#ffd458 0 48%,transparent 55%) right 3px top 4px/9px 5px no-repeat,radial-gradient(ellipse at center,#ffd458 0 48%,transparent 55%) right 0 bottom 4px/12px 6px no-repeat;}
