/* Shared controls and responsive learning journey. */
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #a99bea;outline-offset:3px}button:disabled{cursor:default}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #ad9aef;outline-offset:2px}.main,.word-main,.stat>div,.student-identity>div{min-width:0}.word-main,.student-identity strong,.student-identity p{overflow-wrap:anywhere}.panel{margin-bottom:16px}.panel h2{line-height:1.4}.smallbtn{min-height:40px}.primary{min-height:46px}.welcome{gap:12px}.welcome>div{min-width:0}.welcome p{line-height:1.7}.hero{border-radius:22px}.pet-card{transition:transform .18s,box-shadow .18s}.pet-card:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 6px 16px #8061ce15}.pet-message{font-size:13px;line-height:1.7}.playbox{max-width:760px;padding:24px;border-radius:24px;box-shadow:0 10px 35px #55437608}.play-top{align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:15px}.play-top strong{font-size:11px;background:#f4f0ff;padding:7px 10px;border-radius:20px}.countdown{margin:10px 0 16px}.journey-heading{display:flex;justify-content:space-between;align-items:center;text-align:left;margin:15px 0 10px;gap:10px}.journey-heading small{display:block;font-size:10px;color:#9a92ad;margin-bottom:4px;letter-spacing:1px}.journey-heading strong{font-size:13px;color:#625877}.journey-heading>span{font-size:12px;font-weight:800;color:#9183b8}.adventure-world{height:150px;border-radius:18px;margin:0;overflow:hidden}.scene-caption{font-size:10px;background:#ffffffb8;padding:4px 8px}.scene-decor{font-size:30px}.scene-sky{font-size:25px}.explorer{font-size:35px;min-width:44px;min-height:44px}.scene-goal{font-size:30px}.scene-message{font-size:11px;bottom:6px;line-height:1.5;padding:0 10px}.scene-spark{min-width:44px;min-height:44px;top:30px}.scene-spark.discovered{animation:discovery .45s ease}.treasure-trail{gap:8px;margin:13px 0 20px;font-size:10px;color:#a59daf;justify-content:space-between}.journey-step{white-space:nowrap;display:flex;align-items:center;gap:5px}.journey-step:before{content:'';width:6px;height:6px;border:1px solid #d6cfdf;border-radius:50%}.journey-step.done{color:#8a70c4}.journey-step.done:before{background:#9c84d3;border-color:#9c84d3}.journey-line{height:1px;flex:1;background:#ece7f2}.journey-line.done{background:#bfaadd}.scene-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.scene-choice{border:1px solid #ebe6f3;border-radius:13px;padding:12px 8px;font-size:12px;background:#faf9fd;display:flex;align-items:center;justify-content:center;gap:7px}.scene-choice.active{border-color:#ae98e2;background:#f2edfc;color:#7055a2}.scene-choice>span{font-size:23px}.buddy-picker{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:15px 0;text-align:left}.buddy-picker>span{font-size:11px;color:#9a92ad;margin-right:4px}.buddy-choice{padding:7px 10px;background:#faf9fd;border:1px solid #ece7f3;border-radius:20px;font-size:11px;color:#80758f;min-height:36px}.buddy-choice.active{background:#f2edfc;border-color:#c8b8e6;color:#7256a4}.question-card{background:#fafaff;border:1px solid #eeebf7;border-radius:18px;padding:20px;margin-top:10px}.question-card .wordbig{font-size:42px;margin-top:4px;overflow-wrap:anywhere}.question-card .phonetic{font-size:12px;line-height:1.7}.question-card .say{width:48px;height:48px;margin:13px 0 8px;background:#eee8ff}.question-card .prompt{font-size:13px;color:#817591;margin:6px 0 16px}.question-card .answer{min-height:52px;font-weight:650;font-size:14px;border-width:1px;background:#fff;transition:background .15s,border-color .15s,transform .15s;overflow-wrap:anywhere}.question-card .answer:active:not(:disabled){transform:scale(.98)}.question-card .answer.correct{background:#ecfaf2;border-color:#76bfa0}.question-card .answer.wrong{background:#fff1ec;border-color:#dfa490}.question-card .answer:disabled{color:inherit}.question-card #spellingAnswer{font-size:20px!important;min-height:50px}.tutor-stage{min-height:76px;border-radius:14px;padding:10px 14px;margin:14px 0;gap:12px;background:#faf8fd}.tutor-cast{width:95px;height:58px}.tutor-cast .character{width:52px;height:52px;border-radius:11px}.tutor-cast .learner{left:40px;top:6px}.tutor-cast .mom{top:0}.tutor-stage .whip-swish{display:none}.tutor-bubble{font-size:12px;font-weight:600;line-height:1.6}.tutor-bubble small{font-size:10px;margin-top:4px}.feedback{font-size:13px;line-height:1.8;border-radius:12px;text-align:left;font-weight:650;padding:0 12px}.feedback.good{background:#f0faf4;padding:12px;color:#398465}.feedback.bad{background:#fff7ee;padding:12px;color:#ab7351}.next{width:100%;margin-top:14px!important;min-height:48px}.journey-finish{padding-top:22px}.journey-finish>small{font-size:11px;color:#9c8db5;letter-spacing:1px}.journey-finish h2{font-size:22px;margin:9px 0 20px}.round-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#f9f7fc;border-radius:16px;padding:18px 8px;margin:18px 0}.round-summary>div+div{border-left:1px solid #e9e4f0}.round-summary strong{display:block;font-size:27px;font-weight:800;color:#71618c}.round-summary strong small{font-size:12px;color:#a096b0}.round-summary span{display:block;font-size:11px;color:#9a90a8;margin-top:5px}.arrival-reward{display:flex;align-items:center;gap:18px;padding:20px;text-align:left;background:#fffaf0;border:1px solid #f0e5d0;border-radius:17px;margin:20px 0}.arrival-reward>span{font-size:45px;flex-shrink:0}.arrival-reward small{font-size:10px;color:#a68d68}.arrival-reward h3{font-size:16px;margin:6px 0;color:#776145}.arrival-reward p{font-size:12px;color:#a0927f;line-height:1.7;margin:7px 0 12px}.arrival-reward.opened{background:#f5faf3;border-color:#dbe9d5;animation:discovery .4s ease}.finish-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.practice-editor,.auth-card{overflow-wrap:anywhere}@keyframes discovery{from{transform:translateY(6px);opacity:.6}to{transform:translateY(0);opacity:1}}
@media(max-width:850px){.sidebar{border-radius:16px;scrollbar-width:thin;min-width:0}.nav{flex-shrink:0;font-size:12px;min-height:44px}.nav.active{box-shadow:inset 0 -2px #a38de5}.layout{gap:16px}.playbox{margin:0 auto}.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.top{margin-bottom:16px}.welcome h1{font-size:21px}.gift-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.app{padding:14px 12px calc(24px + env(safe-area-inset-bottom))}.top{gap:12px}.brand{font-size:19px}.streak{max-width:150px;white-space:nowrap}.topright{gap:8px}.topright .profile-select{max-width:125px;min-height:42px}.topright .avatar{display:none}.student-context{padding:14px;gap:12px;margin-bottom:16px}.student-identity strong{font-size:15px}.student-identity .school-badge{width:42px;height:42px;border-radius:12px}.student-identity{gap:10px}.unit-context{gap:8px}.unit-context .smallbtn{font-size:12px;padding:8px}.welcome{align-items:flex-start}.welcome h1{font-size:20px}.welcome p{font-size:12px}.welcome>.smallbtn{font-size:11px;white-space:nowrap}.panel{border-radius:18px;padding:16px}.sidebar{padding:6px;border-radius:13px}.stats{gap:9px}.stats .stat{padding:12px 10px;gap:8px}.stat strong{font-size:21px}.stat small{font-size:10px}.rightcol,.profile-grid,.unit-grid,.gift-grid{grid-template-columns:minmax(0,1fr)}.hero{padding:20px;min-height:210px}.pet-panel{padding:17px;border-radius:18px}.pet-panel h2{font-size:17px}.pet-shelf{gap:8px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.pet-card{min-width:0;padding:10px 4px}.pet-card span{font-size:30px}.pet-card small{font-size:10px}.playbox{padding:14px;border-radius:18px;width:100%}.play-top{font-size:10px;gap:6px}.play-top strong{font-size:10px;padding:6px 8px}.journey-heading strong{font-size:12px}.adventure-world{height:128px}.scene-decor{font-size:25px;bottom:35px}.scene-message{font-size:10px;left:0;right:0}.scene-picker{gap:6px}.scene-choice{flex-direction:column;gap:4px;padding:9px 5px;font-size:11px}.buddy-picker>span{flex-basis:100%;margin-bottom:2px}.treasure-trail{font-size:9px;gap:5px;margin:12px 0}.question-card{padding:16px 12px;border-radius:14px}.question-card .wordbig{font-size:36px}.question-card .answers{grid-template-columns:minmax(0,1fr);gap:9px}.question-card .answer{min-height:48px;padding:12px;font-size:14px}.question-card #spellingAnswer{width:100%!important;font-size:18px!important}.tutor-stage{padding:9px;gap:9px}.tutor-cast{width:76px;height:50px}.tutor-cast .character{width:43px;height:43px}.tutor-cast .learner{left:31px;top:5px}.tutor-bubble{font-size:11px}.feedback{font-size:12px}.round-summary{padding:14px 5px}.round-summary strong{font-size:24px}.round-summary span{font-size:10px}.journey-finish h2{font-size:19px}.arrival-reward{padding:15px;gap:12px}.arrival-reward>span{font-size:36px}.arrival-reward h3{font-size:14px}.finish-actions{flex-direction:column;align-items:stretch}.finish-actions button{width:100%;min-height:46px}.practice-tools>div{width:100%}.practice-tools button{flex:1}.practice-editor{padding:14px}.practice-editor .profile-grid{grid-template-columns:1fr}.recording-choice select{width:100%;min-width:0;max-width:100%}.dictation-sheet{grid-template-columns:minmax(0,1fr)}.classroom-submit{display:flex;flex-wrap:wrap;gap:8px}.classroom-submit button{flex:1;min-height:44px}.history-row{grid-template-columns:minmax(0,1fr) 65px 54px}.history-row time{grid-column:1/-1}.wordlist .word-row{gap:7px}.history-tools select{max-width:100%;min-width:0}.history-tools label{max-width:100%}.unit-form{gap:12px}.unit-form .field{flex:1 1 100%;min-width:0}.unit-form input{max-width:100%;width:100%}.toast{max-width:calc(100% - 24px);width:max-content;bottom:calc(18px + env(safe-area-inset-bottom));font-size:12px;line-height:1.6}.auth-overlay{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.auth-columns{grid-template-columns:1fr}.auth-card input:not([type=checkbox]),.auth-card select,.field input,.field textarea,.dictation-entry input,.practice-editor input,.practice-editor textarea,.practice-editor select{font-size:16px}.admin-panel .admin-actions button{min-height:42px}.student-identity p{font-size:11px}.profile-select{font-size:16px}.main audio{max-width:100%}}
@media(max-width:370px){.topright{row-gap:10px}.topright .streak{order:3;width:100%;max-width:none;font-size:11px}.topright #accountTools{margin-left:auto}.scene-message{font-size:9px}.play-top strong{padding:5px 6px}.round-summary strong{font-size:21px}}
@media(prefers-reduced-motion:reduce){.scene-sky,.explorer.hopping,.scene-spark.discovered,.arrival-reward.opened,.tutor-stage .character{animation:none!important}.explorer,.pet-card,.question-card .answer{transition:none}.celebration{display:none}}

.buddy-hint{font-size:10px;color:#a098af;line-height:1.5;margin-left:4px}@media(max-width:600px){.buddy-hint{flex-basis:100%;margin:3px 0 0}}

/* Focused quiz: the scene and actions stay visible while long questions scroll. */
body.in-game-focus{overflow:hidden}.playbox.game-focus{position:fixed;inset:14px;margin:0 auto;width:calc(100% - 28px);max-width:760px;max-height:calc(100dvh - 28px);z-index:110;display:flex;flex-direction:column;text-align:center;box-shadow:0 0 0 100vmax #40365455,0 20px 70px #40365422;padding:18px 22px;overflow:hidden}.game-focus>.play-top{flex-shrink:0;margin:0 0 8px;font-size:11px;flex-wrap:nowrap}.game-focus .play-top>span{min-width:0;text-align:left}.game-exit{flex-shrink:0;background:#f5f3fa;border-radius:10px;padding:8px 10px;min-height:40px;color:#93849f;font-size:12px}.game-focus>.countdown{flex-shrink:0;margin:0 0 8px;font-size:11px;display:flex;align-items:center;gap:12px}.game-focus .countdown-track{flex:1;margin:0;height:4px}.game-focus>.journey-heading{flex-shrink:0;margin:4px 0 6px}.game-focus .journey-heading small{display:none}.game-focus>.adventure-world{height:90px;min-height:90px;flex-shrink:0;border-radius:13px}.game-focus .scene-caption{font-size:9px;padding:3px 7px;top:7px;left:9px}.game-focus .scene-sky{font-size:20px;top:5px}.game-focus .scene-decor{font-size:24px;bottom:28px}.game-focus .explorer{font-size:28px;bottom:21px}.game-focus .adventure-path{bottom:27px}.game-focus .scene-goal{font-size:26px;bottom:27px}.game-focus .scene-spark{font-size:18px;top:4px}.game-focus .scene-message{font-size:10px;bottom:4px}.game-focus>.treasure-trail{flex-shrink:0;margin:8px 0;font-size:9px}.question-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 3px}.game-focus .question-card{margin-top:0;padding:14px 16px}.game-focus .wordbig{font-size:36px;line-height:1.2;margin:0 0 7px}.game-focus .question-card .say{margin:7px 0 4px;width:44px;height:44px}.game-focus .prompt{margin:4px 0 10px;font-size:12px}.game-focus .question-card .answer{min-height:46px;padding:10px;font-size:13px}.game-focus .tutor-stage{min-height:0;padding:6px 10px;margin:8px 0 0;gap:9px}.game-focus .tutor-cast{width:64px;height:38px}.game-focus .tutor-cast .character{width:32px;height:32px;border-radius:8px}.game-focus .tutor-cast .learner{left:28px;top:3px}.game-focus .tutor-bubble{font-size:11px}.game-focus .tutor-bubble small{display:none}.game-focus .question-card #checkAnswer{margin:8px auto!important;min-height:42px;font-size:13px}.game-focus .question-card:has(#spellingAnswer)>div:first-child{margin:8px 0 6px!important;font-size:18px!important}.game-footer{flex-shrink:0;padding:10px 3px 0;background:#fff;border-top:1px solid #eeebf5;margin-top:10px;max-height:35%;overflow-y:auto}.game-focus .feedback{height:auto;min-height:0;margin:0 0 8px;font-size:12px;line-height:1.6}.game-focus .feedback:empty{display:none}.game-focus .next{display:block!important;width:100%;min-height:46px;margin:0!important}.game-focus .next:disabled{background:#f1edf8;color:#a299b1;box-shadow:none;cursor:default}.game-focus .question-scroll:focus-visible{outline:2px solid #b7a3e9;outline-offset:-2px}
@media(min-width:900px) and (min-height:760px){.game-focus .question-card{padding:20px}.game-focus .wordbig{font-size:44px}.game-focus>.adventure-world{height:112px;min-height:112px}.game-focus .question-card .answer{min-height:52px}}
@media(max-width:600px){.playbox.game-focus{inset:0;max-width:none;width:100%;max-height:100dvh;border-radius:0;border:0;padding:calc(10px + env(safe-area-inset-top)) 12px calc(8px + env(safe-area-inset-bottom));box-shadow:none}.game-focus>.play-top{gap:6px;font-size:10px}.game-focus .play-top strong{font-size:9px;padding:5px 7px}.game-focus .game-exit{min-height:38px;padding:7px 8px;font-size:11px}.game-focus .question-card{padding:12px 10px}.game-focus .question-card .answers{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.game-focus .question-card .answer{min-height:48px;font-size:13px;padding:9px 7px}.game-focus .wordbig{font-size:32px}.game-focus .phonetic{font-size:11px}.game-focus .next{min-height:48px}.game-focus>.journey-heading strong{font-size:11px}.game-focus .question-card #spellingAnswer{min-height:46px;padding:11px!important}.game-focus .question-card .prompt{font-size:11px}.game-focus .tutor-stage{margin-top:7px}.game-footer{padding-top:8px;margin-top:8px}}
@media(max-height:620px){.game-focus>.adventure-world{height:72px;min-height:72px}.game-focus>.treasure-trail{display:none}.game-focus>.journey-heading{margin:0 0 5px}.game-focus .scene-message{font-size:9px}.game-focus .scene-decor{font-size:19px}.game-focus .wordbig{font-size:28px}.game-focus .question-card .phonetic{display:none}}
.game-focus .game-footer{max-height:none;overflow:visible}.game-focus .game-footer .feedback{max-height:min(18dvh,110px);overflow-y:auto;overflow-wrap:anywhere}

/* Keep the uploaded family expressions visible outside the scrolling question. */
.game-focus>.tutor-stage{display:flex;flex-shrink:0;min-height:66px;padding:7px 10px;margin:9px 3px 0;gap:12px}.game-focus>.tutor-stage .tutor-cast{width:98px;height:52px}.game-focus>.tutor-stage .character{width:48px;height:48px;border-radius:10px}.game-focus>.tutor-stage .mom{left:0;top:0;z-index:2}.game-focus>.tutor-stage .learner{left:48px;top:3px}.game-focus>.tutor-stage .tutor-bubble{font-size:12px;line-height:1.5;text-align:left}.game-focus>.tutor-stage .tutor-bubble small{display:block;font-size:9px;margin-top:3px}@media(max-height:620px){.game-focus>.tutor-stage{min-height:48px;padding:4px 8px;margin-top:5px;gap:8px}.game-focus>.tutor-stage .tutor-cast{width:78px;height:40px}.game-focus>.tutor-stage .character{width:38px;height:38px}.game-focus>.tutor-stage .learner{left:39px;top:1px}.game-focus>.tutor-stage .tutor-bubble{font-size:10px}.game-focus>.tutor-stage .tutor-bubble small{display:none}}

.sound-toggle{flex-shrink:0;min-width:40px;min-height:40px;padding:6px;border:1px solid #e9e4f2;border-radius:10px;background:#faf8fe;font-size:18px;line-height:1;cursor:pointer}.sound-toggle[aria-pressed=false]{background:#f4f3f6;opacity:.75}.sound-setting{display:flex;align-items:center;justify-content:flex-end;gap:8px;color:#998fa8;font-size:11px;margin-top:8px}.game-focus .play-top>strong{margin-left:auto}@media(max-width:600px){.game-focus .play-top>strong{display:none}.game-focus .play-top>.sound-toggle{margin-left:auto}.game-focus .play-top{justify-content:space-between}.game-focus .play-top>.game-exit{min-height:40px}}

.pronunciation-entry{margin-top:18px;min-height:44px;width:100%;border:1px dashed #ded4ee;background:#faf8ff;font-size:13px}

/* Fish emoji faces left by default; turn the ocean companion toward the treasure. */
.adventure-world.ocean .explorer span{display:inline-block;transform:scaleX(-1)}
