/* Juju learning journey: quiet surfaces, clear hierarchy and generous touch targets. */
:root{--ink:#243552;--muted:#617086;--paper:#fff;--violet:#345caf;--border:#dce3eb;--blue:#345caf;--green:#287861;--coral:#b6543f;--radius:24px}
body{margin:0;padding:22px 24px 120px;background:#f6f5f0;color:var(--ink);font-family:'Avenir Next','Segoe UI',system-ui,sans-serif;letter-spacing:-.012em;line-height:1.45}
*,*::before,*::after{box-sizing:border-box}button{font:inherit;letter-spacing:inherit;box-shadow:none;min-height:48px;border-radius:14px;cursor:pointer;transition:background .14s,transform .14s}button:disabled{cursor:default}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #ba6539;outline-offset:4px}button:active{transform:scale(.98)}[hidden]{display:none!important}
header{max-width:1080px;margin:0 auto 26px;padding:0 0 18px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;box-shadow:none;min-height:74px}
.brand{font-size:1.13rem;letter-spacing:-.04em;color:var(--ink)}.header-left{gap:13px}.avatar-badge{width:56px;height:56px;border:1px solid #d3dfe7;background:#e4eae4;box-shadow:none}.avatar-level-tag{display:none}.wallet-pill{font-size:.78rem;padding:1px 6px;background:transparent;border:0;color:#8e6a2d}.wallet-pill .gem-icon{width:17px;height:17px}
/* One icon grid and one control size: legacy artwork must not set either. */
.header-left,.header-left .status{min-width:0}
.header-left .avatar-badge{flex-shrink:0}
.header-left .brand{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.header-btns{align-items:center;gap:8px;flex-wrap:nowrap;flex-shrink:0}
.header-btns .nav-icon-button{display:grid;place-items:center;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border:1px solid var(--border);background:#fff;color:#475a74;border-radius:15px;box-shadow:none}
.header-btns .nav-icon-button svg{display:block;width:24px;height:24px;overflow:hidden;filter:none;pointer-events:none}
.header-btns .nav-icon-button:hover{background:#eaf0f9;border-color:#bdcbdc}
.header-btns .nav-icon-button:active{background:#e0e8f4;transform:scale(.96)}
.header-btns #btn-repeat{background:#edf5f0;border-color:#ccdcd4;color:#2b6752}
.header-btns #btn-repeat:hover{background:#e0eee5;border-color:#9ebead}

main,#main-content,#home-screen{width:100%;max-width:1080px;margin-inline:auto}#home-screen{padding-bottom:18px}.home-hero{position:relative;display:grid;grid-template-columns:1fr 230px;gap:24px;min-height:228px;padding:30px 40px;border:1px solid #d9e3e3;border-radius:28px;background:#e9efeb;box-shadow:none;overflow:hidden}.home-hero:after{content:'';position:absolute;width:220px;height:220px;border:1px solid #c9d8d1;border-radius:50%;right:24px;top:12px;pointer-events:none}.home-hero h1{font-size:clamp(1.7rem,4.3vw,2.65rem);line-height:1.14;max-width:550px;letter-spacing:-.055em;font-weight:780;margin:10px 0 12px;color:#243e38}.home-hero p:not(.eyebrow){font-size:.92rem;line-height:1.5;margin:0;color:#4d665f}.home-hero .journey-eyebrow{font-size:.64rem!important;font-weight:750;letter-spacing:.16em;color:#52766a!important}.home-hero #home-avatar{position:relative;z-index:1;width:210px;height:214px;align-self:end;justify-self:center;filter:none;margin:-16px 0 -30px}.home-hero .journey-caption{font-size:.76rem!important;margin-top:19px!important;color:#59766b!important}.home-hero #btn-home-avatar{position:absolute;right:14px;bottom:14px;z-index:2;width:48px;height:48px;overflow:hidden;color:transparent;font-size:0;padding:10px;border:1px solid #c5d6cd;background:#fff;border-radius:50%}.home-hero #btn-home-avatar:after{content:'✦';color:#385d51;font-size:26px}.home-summary{display:none}
.subject-nav{display:flex;gap:10px;align-items:center;margin:25px 0 28px}.subject-tab{display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:8px 18px;border:1px solid transparent;border-radius:16px;background:transparent;color:#5b6b7f;font-size:.88rem;font-weight:650;box-shadow:none}.subject-symbol{display:grid;place-items:center;width:29px;height:29px;font-size:19px;letter-spacing:-.04em}.subject-tab[aria-pressed=true]{background:#fff;border-color:#d5dfe8;color:#2c487a;box-shadow:0 2px 5px #32445e05}.subject-tab[data-subject=math] .subject-symbol{font-size:15px;color:#3d66b6}.subject-tab[data-subject=language] .subject-symbol{color:#a75b45}.subject-tab[data-subject=logic] .subject-symbol{color:#337961}
.catalog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.catalog-heading h2{font-size:1.2rem;font-weight:700;letter-spacing:-.025em;margin:0}.activity-grid.game-selection{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:0 0 24px}.activity-card,.game-selection .activity-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;min-height:150px;padding:16px 10px;text-align:center;border:1px solid var(--border);background:#fff!important;box-shadow:0 2px 2px #2b3e5703!important;border-radius:22px;color:var(--ink);transform:none}.activity-card:hover{border-color:#9cb0c9;box-shadow:0 5px 12px #2b3e5709!important;transform:translateY(-2px)}.activity-card strong{font-size:.83rem;font-weight:670;line-height:1.25;max-width:150px}.activity-card .activity-icon{display:block;width:66px;height:66px;min-width:66px;padding:12px;border-radius:20px;background:#eaf0fa;color:#4168ab;filter:none;margin:0}.activity-card[data-domain=language] .activity-icon{background:#faeee7;color:#ae6349}.activity-card[data-domain=logic] .activity-icon{background:#eaf2ec;color:#428370}.activity-card .selection-mark,.activity-card .locked-badge{display:none!important}.selection-editing .activity-card .selection-mark{display:grid!important;place-items:center;position:absolute;right:8px;top:8px;width:24px;height:24px;border-radius:50%;background:#e9eff8;color:#365da0;font-size:14px}.selection-editing .activity-card[aria-pressed=false]{opacity:.58}.selection-editing .game-locked{opacity:.45}.selection-editing .game-locked .selection-mark{display:none!important}
.session-launcher{position:fixed;z-index:15;bottom:0;left:0;right:0;margin:0;padding:12px 24px calc(12px + env(safe-area-inset-bottom));background:#f6f5f0ed;border-top:1px solid #dce3eb;backdrop-filter:blur(14px);box-shadow:none}.session-launcher-inner{max-width:1080px;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:20px}.session-launcher #btn-start-session{display:flex;align-items:center;justify-content:center;gap:14px;background:#345caf;color:#fff;width:min(100%,360px);min-height:59px;border:0;border-radius:18px;font-size:1.1rem;font-weight:700;box-shadow:0 4px 0 #244782}.session-launcher #btn-start-session svg{width:26px;height:26px}#selection-status{margin:0;font-size:.8rem}.is-playing .session-launcher{display:none}footer{max-width:1080px;margin-inline:auto;font-size:.7rem;color:#68768a}.is-playing footer{display:none}
body.is-playing{padding-bottom:26px}.is-playing header{margin-bottom:12px}.adventure-bar{max-width:800px;min-height:30px;margin:0 auto;background:transparent;border:0;padding:0}.adventure-bar #avatar-progress-label{display:none}.adventure-bar #btn-avatar{min-height:40px;padding:8px 10px;background:transparent;color:#63738a;font-size:.76rem;box-shadow:none;border:0}.round-reward{justify-content:center}.round-stars{min-width:0;gap:7px}.round-stars .star-picture{width:21px;height:21px;filter:none}.round-stars .star-picture:not(.lit){fill:#e7ebef;stroke:#d0d8e1}.round-stars .star-picture.lit{fill:#e8ba54;stroke:#c29333}#mode-banner{font-size:.9rem;font-weight:550;min-height:28px;margin:10px auto 0;color:#5e6e83;text-align:center}#game-feedback:empty,#voice-transcript:empty{display:none}#board{max-width:100%;margin-inline:auto}#voice-status-box{max-width:500px;margin:8px auto;font-size:.85rem;padding:8px 14px;border-radius:12px}#voice-transcript{font-size:.8rem;color:#617086;text-align:center;margin:6px}
.lesson,.vocabulary-game{width:min(100%,760px);margin:12px auto 0;padding:24px 32px;border:1px solid var(--border);border-radius:28px;background:#fff;box-shadow:0 6px 22px #24355204;text-align:center}.lesson-topline,.vocabulary-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;color:#68788d;font-size:.75rem;margin-bottom:18px}.lesson-name,.vocabulary-toolbar h2{font-size:.78rem;font-weight:600;margin:0}.lesson-step,.vocabulary-progress{padding:4px 10px;border-radius:20px;background:#f0f3f7;font-size:.76rem;color:#667892;font-variant-numeric:tabular-nums}.lesson-prompt,.vocabulary-prompt{font-weight:690;font-size:clamp(1.14rem,3.2vw,1.6rem);line-height:1.4;letter-spacing:-.03em;margin:10px auto 18px;color:#293d5a;max-width:590px}.lesson-visual{display:block;width:min(100%,380px);height:auto;max-height:230px;margin:8px auto 22px}.lesson-picture,.vocabulary-portrait{display:block;width:min(100%,300px);height:210px;object-fit:contain;margin:0 auto 16px;border-radius:18px;background:#fff}.lesson-word{font-size:2.5rem;font-weight:650;letter-spacing:.02em;margin:20px}.lesson-choices,.vocabulary-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:560px;margin:20px auto 0}.lesson-choice{min-height:78px;border:2px solid #dfe6f0;background:#f8fafe;color:#304f87;font-size:1.6rem;font-weight:700;padding:16px;border-radius:18px;box-shadow:0 3px 0 #dfe6f0}.lesson-choice:hover{background:#eaf0fa;border-color:#b6c8e3}.lesson-choice .lesson-visual{width:180px;height:105px;max-width:100%;margin:0}.lesson-success .lesson-choices{opacity:.65}.lesson-feedback,.vocabulary-status{min-height:26px;margin:18px 0 6px;color:#385778;font-size:.85rem;font-weight:600}.lesson-success .lesson-feedback{color:#287861;font-size:30px}.lesson-tools,.vocabulary-actions{display:flex;justify-content:center;gap:12px;margin-top:12px}.lesson-icon-button{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;min-width:52px;border:1px solid #dbe3ec;background:#f5f7fa;color:#4c6383;box-shadow:none;border-radius:16px;padding:13px}.lesson-icon-button svg{width:25px;height:25px}.lesson-icon-button:hover{background:#e6edf7}.reading-passage{max-width:580px;font-size:1.1rem;line-height:1.9;padding:22px 26px;text-align:start;background:#f7f5ee;border-radius:18px;color:#394b60;user-select:text}
.answer-labels{display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;gap:10px;margin:18px 0}.answer-label{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%;min-height:62px;padding:13px 18px;border:2px solid #dbe4ef;background:#fff;color:#365b96;box-shadow:0 3px 0 #e2e8f1;font-size:1rem;font-weight:600;border-radius:17px;user-select:none}.answer-label svg{width:23px;height:23px;flex:none}.answer-label[aria-pressed=true]{border-color:#4774ba;background:#eaf1fc;box-shadow:0 3px 0 #b1c6e8}.answer-dock{display:flex;justify-content:center;align-items:center;gap:10px;margin:19px auto 6px;width:min(100%,330px);min-height:68px;border:2px dashed #8ba4c4;background:#eef3f9;color:#385d91;border-radius:19px;font-size:.85rem}.answer-dock:disabled{border-color:#d2dbe6;background:#f8fafc;color:#8592a3}.answer-dock svg{width:28px;height:28px}.early-reader .answer-dock span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.answer-label.dragging,.letter-tile.dragging{opacity:.35}.drag-ghost{position:fixed!important;z-index:2000;pointer-events:none;max-width:260px;transform:translate(-50%,-70%) rotate(-3deg);box-shadow:0 10px 24px #24355230!important;opacity:1!important}
.word-slots,.letter-tray{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:22px auto;max-width:650px;min-height:64px}.word-slot,.letter-tile{display:inline-flex;align-items:center;justify-content:center;min-width:46px;min-height:58px;padding:10px 13px;font-size:1.4rem;font-weight:650;border-radius:12px;line-height:1.2}.word-slot{background:#f0f3f7;color:#304d78;border:2px solid #b4c4d8;border-bottom-width:4px;box-shadow:none}.word-slot:disabled{color:#9aa7b9;border-style:dashed;background:#f8fafc}.letter-tile{background:#fff;color:#304d78;border:1px solid #c5d2e3;box-shadow:0 4px 0 #c5d2e3}.letter-tile:disabled{opacity:.16;box-shadow:none}.lesson[data-lesson=sentences] .word-slot,.lesson[data-lesson=sentences] .letter-tile{font-size:1.05rem;min-height:48px;min-width:60px}.vocabulary-letters{font-size:1.65rem;letter-spacing:.18em;line-height:1.8;overflow-wrap:anywhere;margin:16px 0}.letter-keyboard{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;max-width:610px;margin:16px auto}.letter-keyboard button{width:42px;min-height:46px;border:1px solid #c5d2e3;color:#355780;background:#f4f7fb;box-shadow:0 3px 0 #d6e0ee;font-size:1.1rem}.letter-keyboard button:disabled{opacity:.25}.vocabulary-form,.lesson-form{display:flex;justify-content:center;align-items:center;gap:10px;margin:22px auto;max-width:540px}.vocabulary-form input,.lesson-input{min-width:0;width:100%;font:inherit;font-size:1.4rem;padding:14px 15px;border:2px solid #b6c7dc;border-radius:15px;background:#fff;min-height:58px;color:#243552;text-align:center;user-select:text}.vocabulary-form label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.vocabulary-form button{flex:none}.vocabulary-note{font-size:.7rem;color:#718096;margin:8px auto;max-width:500px}.vocabulary-choice{border:2px solid #e1e7ef;min-height:130px;background:#fff;border-radius:20px;padding:10px;box-shadow:0 3px 0 #e1e7ef}.vocabulary-choice img{height:125px;max-height:140px;width:100%;object-fit:contain}.vocabulary-choice.correct{border-color:#4d977f;background:#f0f7f3}.vocabulary-choice.tried{opacity:.55}
.talk-button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;position:relative;min-width:90px;min-height:90px;margin:6px auto;padding:13px 20px;border:2px solid #b4c8e2;background:#eef4fc;color:#365c99;box-shadow:0 4px 0 #b4c8e2;border-radius:26px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.talk-button>svg{width:27px;height:36px}.talk-button>span:last-child{font-size:.7rem;font-weight:650;max-width:150px}.talk-wave{display:none}.talk-button.is-listening{background:#e3f2e8;border-color:#6ca98a;color:#22694c;box-shadow:0 2px 0 #6ca98a;transform:translateY(2px)}.talk-button.is-listening .talk-wave{display:block;letter-spacing:5px;height:12px;line-height:8px}.talk-button.is-listening>svg{height:28px}.rhythm-play{width:94px;height:94px;border-radius:50%;background:#edf3fa;color:#416bb0;display:grid;place-items:center;margin:24px auto;border:3px solid #c8d7ed;box-shadow:none}.rhythm-play svg{width:36px;height:36px}.rhythm-play.beat{background:#d9904a;transform:scale(1.08);color:#fff;border-color:#d9904a}.detective-range{display:flex;justify-content:space-between;padding:14px 20px;border-radius:15px;background:#eef3fa;color:#42628f;gap:15px}.detective-slots{font-size:1.4rem;overflow-wrap:anywhere}.detective-attempts{display:flex;flex-wrap:wrap;gap:7px;list-style:none;padding:0;font-size:.82rem;color:#586e8c}
.draw-container{background:#fff;border:1px solid var(--border);border-radius:24px;max-width:760px;box-shadow:none;padding:20px;margin:12px auto}.draw-header{gap:12px}.draw-target-title{font-size:1.1rem!important;color:#344d71}.draw-score-badge{background:#eff3f8!important;border:0!important;color:#5f718a!important;font-size:.72rem;max-width:280px;line-height:1.45}.draw-practice-hint{display:none}.draw-controls{display:flex;gap:12px;justify-content:center}.draw-controls .btn-draw-action{width:58px;min-height:54px;font-size:0!important;border:1px solid #c9d5e4;border-radius:16px;background:#edf3fa!important;color:#365e95!important;box-shadow:none!important;padding:10px}.draw-controls .btn-draw-action:after{font-size:26px}#btn-draw-clear:after{content:'↶'}#btn-draw-demo:after{content:'◉'}#btn-draw-check:after{content:'✓'}#btn-draw-check{background:#e3f0e9!important;color:#28785d!important;border-color:#a5cab8}.draw-number-hint summary{font-size:.8rem;color:#63748b;padding:8px}.letter-pad #draw-canvas{border-color:#dbe3ee;border-radius:18px;background:#fcfcfd}.cards-grid .card,.voice-card{border:2px solid #d1dded;border-radius:22px;background:#fff;color:#365e98;box-shadow:0 4px 0 #d1dded}.match-game{border:1px solid #dce3eb;background:#fff;border-radius:24px;padding:20px!important}.match-tile{border:2px solid #dce4ef!important;background:#fafbfd!important;box-shadow:0 3px 0 #dce4ef!important;color:#365b8f!important;border-radius:17px!important}.match-tile.selected{border-color:#779bcf!important;background:#eaf1fc!important}
.modal-content{background:#fff;border-radius:24px;color:var(--ink);border-color:#dce3eb;box-shadow:0 15px 80px #18314f30}.parent-section{border-color:#dce3eb}.domain-level-card{display:block;text-align:start;border:1px solid #e0e6ef;border-radius:15px;padding:12px}.domain-level-card label{display:block;margin-bottom:10px}.placement-stages{display:flex;flex-wrap:wrap;gap:6px}.placement-stage{min-height:38px;padding:7px 10px;background:#f0f3f8;color:#526a8d;border:1px solid transparent;box-shadow:none;border-radius:9px;font-size:.75rem}.placement-stage[aria-pressed=true]{background:#345caf;color:white}.parent-summary,.parent-intro{color:#5c6b80}.parent-summary{background:#f4f6f9}.skill-summary p,.coverage-domain p{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e8edf2;padding:6px 0;margin:0;font-size:.8rem}.coverage-domain small{white-space:nowrap;color:#697b94}.coverage-domain h4{margin:18px 0 5px}.coverage-content>p{font-size:.77rem;color:#6c788a}.session-duration{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 0}.session-timer-info{font-size:.78rem}.parent-section .quiet-btn{border:1px solid #c7d3e3;color:#365d97;background:#f1f5fb;box-shadow:none}.home-note{display:none}
@media(max-width:950px){.activity-grid.game-selection{grid-template-columns:repeat(4,minmax(0,1fr))}.home-hero{grid-template-columns:1fr 180px}.home-hero #home-avatar{width:180px}.home-hero:after{width:185px;height:185px}.activity-card strong{font-size:.81rem}}
@media(max-width:650px){body{padding:14px 16px 108px}header{min-height:59px;padding-bottom:13px;margin-bottom:18px}.header-left{gap:8px}.avatar-badge{width:46px;height:46px}.header-btns{max-width:none;gap:5px}.header-btns .nav-icon-button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border-radius:13px}.brand{font-size:.96rem}.wallet-pill{font-size:.7rem}.home-hero{grid-template-columns:1fr 100px;min-height:191px;padding:22px 20px;gap:5px;border-radius:23px}.home-hero h1{font-size:1.65rem;max-width:245px;margin:10px 0}.home-hero p:not(.eyebrow){font-size:.78rem}.home-hero #home-avatar{width:126px;height:159px;margin:0 -9px -22px}.home-hero:after{width:130px;height:130px;right:-9px;top:35px}.home-hero .journey-caption{display:none}.home-hero #btn-home-avatar{width:38px;min-height:38px;height:38px;right:10px;bottom:10px}.home-hero #btn-home-avatar:after{font-size:20px}.subject-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:18px 0 23px}.subject-tab{flex-direction:column;gap:3px;min-height:66px;padding:5px 4px;border-radius:15px;font-size:.67rem}.subject-symbol{height:26px}.catalog-heading{margin-bottom:12px}.catalog-heading h2{font-size:1.07rem}.activity-grid.game-selection{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.activity-card,.game-selection .activity-card{padding:12px 6px;min-height:123px;gap:9px;border-radius:18px}.activity-card .activity-icon{width:51px;height:51px;min-width:51px;padding:9px;border-radius:16px}.activity-card strong{font-size:.72rem;line-height:1.25}.session-launcher{padding:10px 18px calc(10px + env(safe-area-inset-bottom))}.session-launcher #btn-start-session{min-height:54px;width:100%;font-size:1rem;border-radius:16px}.session-launcher-inner{gap:9px}.selection-editing #selection-status{display:none}.is-playing header{margin-bottom:8px}.lesson,.vocabulary-game{padding:18px 16px;border-radius:22px;margin-top:8px}.lesson-topline,.vocabulary-toolbar{margin-bottom:12px}.lesson-prompt,.vocabulary-prompt{font-size:1.16rem;margin:9px auto 15px}.lesson-visual{max-height:195px;margin:6px auto 16px}.lesson-picture,.vocabulary-portrait{height:168px;margin-bottom:12px}.lesson-choices{gap:10px;margin-top:15px}.lesson-choice{font-size:1.35rem;min-height:67px;padding:11px}.lesson-choices .lesson-visual{max-height:105px;margin:0}.lesson-tools{margin-top:8px}.lesson-feedback,.vocabulary-status{margin:12px 0 3px;font-size:.78rem}.lesson-icon-button{width:46px;height:46px;min-width:46px;min-height:46px;padding:11px;border-radius:14px}.answer-label{padding:10px 12px;min-height:56px;max-width:100%;font-size:.9rem;gap:7px;border-radius:14px}.answer-labels{gap:8px;margin:15px 0}.answer-dock{min-height:59px;margin:15px auto 3px}.talk-button{min-width:78px;min-height:78px;padding:11px 15px;border-radius:22px}.talk-button>span:last-child{font-size:.64rem}.talk-button>svg{height:30px;width:24px}.word-slots,.letter-tray{gap:6px;margin:15px auto;min-height:50px}.word-slot,.letter-tile{min-width:33px;min-height:48px;padding:9px;font-size:1.1rem;border-radius:10px}.vocabulary-letters{font-size:1.3rem;letter-spacing:.09em}.vocabulary-choices{gap:10px}.vocabulary-choice{min-height:109px;padding:8px;border-radius:17px}.vocabulary-choice img{height:96px}.vocabulary-form,.lesson-form{margin:17px auto}.vocabulary-form input,.lesson-input{min-height:52px;font-size:1.2rem;padding:11px}.reading-passage{padding:18px;font-size:1rem;line-height:1.8}.draw-container{padding:12px;border-radius:21px}.draw-header{flex-wrap:wrap;justify-content:center;gap:7px}.draw-score-badge{font-size:.68rem}.draw-controls .btn-draw-action{width:53px;min-height:49px}.modal-content{border-radius:21px}.match-game{padding:13px!important}.match-tile{min-height:78px}}
@media(max-width:359px){body{padding-inline:10px}.activity-grid.game-selection{grid-template-columns:repeat(2,minmax(0,1fr))}.brand{font-size:.86rem}.header-btns{gap:3px}.home-hero{padding:18px 16px;grid-template-columns:1fr 75px}.home-hero h1{font-size:1.4rem}.home-hero #home-avatar{width:102px}}
@media(max-height:520px) and (orientation:landscape){body.is-playing{padding:7px 15px}.is-playing header{min-height:46px;padding-bottom:6px}.is-playing .avatar-badge{height:38px;width:38px}.is-playing #mode-banner,.is-playing .adventure-bar{display:none}.lesson,.vocabulary-game{margin-top:7px;padding:12px 22px}.lesson-visual,.vocabulary-portrait{height:120px;max-height:120px;margin-bottom:8px}.lesson-prompt,.vocabulary-prompt{font-size:1.05rem;margin:5px 0 9px}.lesson-topline{margin-bottom:5px}.lesson-choices{grid-template-columns:repeat(4,minmax(0,1fr));margin:10px auto}.answer-labels{margin:10px}.answer-dock{min-height:48px;margin:9px auto}.lesson-tools{margin-top:4px}.home-hero{min-height:140px}.home-hero #home-avatar{height:160px}}
html[dir=rtl] .home-hero:after{right:auto;left:24px}html[dir=rtl] .home-hero #btn-home-avatar{right:auto;left:14px}html[dir=rtl] .activity-card{text-align:center}.reduce-motion .rhythm-play.beat{transform:none}
.home-hero .install-entry{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;max-width:100%;margin-top:16px;padding:10px 16px;border:1px solid #bccdde;border-radius:12px;background:#fff;color:#345caf;box-shadow:none;font-size:.84rem;font-weight:700;line-height:1.2}
.home-hero .install-entry svg{display:block;width:20px;height:20px;flex:none;margin:0;filter:none}
.home-hero .install-entry:hover{background:#f2f6fc;border-color:#849fc5}
.home-hero .install-entry:disabled{opacity:.6;cursor:wait}
@media(display-mode:standalone){.home-hero .install-entry{display:none}}
.picture-answer-frame{border:2px dashed #d6e2ed;background:#fcfdfd;border-radius:21px;padding:12px;margin:0 auto;max-width:420px}.picture-answer-frame .vocabulary-portrait{margin:0 auto}.word-garden{font-size:1.4rem;letter-spacing:.1em;color:#c48a37;min-height:30px}.vocabulary-game .vocabulary-actions>.lesson-icon-button{align-self:center}.vocabulary-game[data-response=spoken] .vocabulary-prompt{font-size:1rem;max-width:420px}

/* A whole finger target remains available even in long words on a phone. */
.letter-keyboard button{width:46px;min-height:48px}.word-slot,.letter-tile{min-width:46px}.vocabulary-game[data-response=assemble] .word-slots{gap:6px}

.lesson[data-lesson=worddetective] .word-slot,.lesson[data-lesson=worddetective] .letter-tile{font-size:1.05rem;min-height:48px;min-width:60px}
/* Keep the writing surface and its actions within typical portrait viewports. */
body .letter-pad #draw-canvas{width:min(100%,max(220px,calc(100svh - 400px)));height:auto;max-width:100%}
.draw-instruction{min-width:0;flex:1;text-align:start}
.draw-writing-format{margin:6px 0 0;padding:7px 10px;border:1px solid #cbd9ec;border-radius:10px;background:#edf3fb;color:#294d7d;font-size:1rem;font-weight:700;line-height:1.4;overflow-wrap:break-word}
.letter-pad .draw-header{align-items:flex-start;flex-wrap:wrap}
.letter-pad .draw-instruction{flex-basis:230px}
@media(max-width:400px){.letter-pad .draw-instruction{flex-basis:100%}.draw-writing-format{font-size:.95rem}}
@media(orientation:landscape) and (max-height:550px){
 .draw-container.letter-pad{grid-template-columns:minmax(0,1fr) minmax(180px,240px);gap:10px;align-items:start}
 .letter-pad .draw-header{align-items:stretch}.letter-pad .draw-instruction{flex-basis:auto}
 .letter-pad .draw-score-badge{align-self:flex-start}.letter-pad .draw-controls{flex-direction:row;flex-wrap:wrap}
 body .letter-pad #draw-canvas{width:min(100%,calc(100svh - 110px))}
}

/* A quieter study surface as the learner reaches secondary school. */
.secondary-learner .home-hero{min-height:160px;grid-template-columns:1fr;padding-block:32px;background:#eaf0f6}
.secondary-learner .home-hero #home-avatar,.secondary-learner .home-hero #btn-home-avatar,.secondary-learner .home-hero:after{display:none}
.secondary-learner .home-hero h1{font-size:clamp(1.55rem,3vw,2.3rem);max-width:none}
.secondary-learner .journey-caption{color:#51677f}
.secondary-learner .activity-grid.game-selection{grid-template-columns:repeat(4,minmax(0,1fr))}
.secondary-learner .activity-card{border-radius:17px;min-height:158px}
.activity-card .activity-stage{display:block;max-width:100%;font-size:.66rem;line-height:1.5;color:#64738b;white-space:normal}
.secondary-lesson sup{font-size:.72em;vertical-align:super;line-height:0}
.placement-band{flex:0 0 100%;font-size:.73rem;font-weight:700;margin-top:9px;color:#64738b}
.secondary-lesson{max-width:850px;text-align:start}
.secondary-lesson .lesson-prompt{font-size:clamp(1.1rem,2.3vw,1.55rem);line-height:1.6;max-width:740px;text-wrap:pretty}
.secondary-lesson .reading-passage{white-space:pre-line;line-height:1.8;margin:16px auto 24px;border-inline-start:3px solid #6685b5;background:#f2f5fa;border-radius:0 12px 12px 0}
.secondary-lesson .lesson-choices{grid-template-columns:1fr;max-width:700px;gap:10px}
.secondary-lesson .lesson-choice{font-size:1rem;line-height:1.55;text-align:start;min-height:62px;padding:15px 20px;overflow-wrap:anywhere}
.secondary-lesson .lesson-form{max-width:600px;direction:ltr}
.secondary-lesson .lesson-input{font-variant-numeric:tabular-nums;min-width:0}
.answer-format{font-size:.8rem;text-align:center;color:#62718a;line-height:1.55;margin:18px 0 0}
.lesson-code{direction:ltr;text-align:left;background:#202f46;color:#edf3ff;padding:22px 26px;border-radius:15px;overflow-x:auto;font:500 .95rem/1.85 ui-monospace,SFMono-Regular,Consolas,monospace;margin:20px auto;max-width:650px;tab-size:4}
.lesson-solution{border:1px solid #b9d6c7;background:#f1f8f4;border-radius:16px;padding:20px 24px;margin:20px 0 0}
.lesson-solution h3{font-size:.84rem;margin:0 0 10px;color:#30705a}
.solution-text{white-space:pre-line;line-height:1.75;font-size:1rem;overflow-wrap:anywhere;margin:0 0 18px}
.lesson-next{display:flex;align-items:center;justify-content:center;min-height:50px;padding:10px 28px;background:#355dac;border:0;border-radius:12px;color:#fff;font:700 1rem system-ui;margin-inline-start:auto;cursor:pointer}
.lesson-next:focus-visible{outline:3px solid #bd8a30;outline-offset:4px}
.secondary-lesson[data-lesson=historylab] .word-slots,.secondary-lesson[data-lesson=historylab] .letter-tray{display:grid;grid-template-columns:1fr;gap:8px;width:100%;counter-reset:events}
.secondary-lesson[data-lesson=historylab] .word-slot,.secondary-lesson[data-lesson=historylab] .letter-tile{width:100%;height:auto;min-height:54px;font-size:.88rem;line-height:1.45;white-space:normal;text-align:start;padding:13px 16px}
.secondary-lesson[data-lesson=historylab] .word-slot:before{counter-increment:events;content:counter(events) '. ';font-weight:700;color:#537cc3}
.secondary-lesson.lesson-success .lesson-form,.secondary-lesson.lesson-success .lesson-choices,.secondary-lesson.lesson-success .letter-tray,.secondary-lesson.lesson-success .lesson-tools,.secondary-lesson.lesson-success .answer-format{display:none}
@media(max-width:720px){.secondary-learner .activity-grid.game-selection{grid-template-columns:repeat(2,minmax(0,1fr))}.secondary-learner .home-hero{padding:24px}.secondary-learner .subject-tab{font-size:.73rem}.secondary-lesson .reading-passage{padding:16px}.secondary-lesson .lesson-choice{font-size:.93rem;padding:13px 15px}.lesson-solution{padding:17px}.lesson-code{padding:17px;font-size:.8rem}.lesson-next{width:100%}}
@media(prefers-reduced-motion:reduce){.secondary-lesson *{scroll-behavior:auto}}

/* The alphabetic interval follows reading order, including Hebrew RTL. */
.wordbounds-note,.wordbounds-count{font-size:.8rem;line-height:1.6;color:#52647c;margin:12px auto;max-width:560px}
.wordbounds-range{display:grid;grid-template-columns:minmax(0,1fr) 35px minmax(0,1fr);align-items:center;gap:10px;margin:22px auto 10px}
.wordbound{min-width:0;padding:16px 10px;border:2px solid #b9cce2;border-radius:18px;background:#f1f6fc;display:flex;flex-direction:column;gap:8px}
.wordbound-label{font-size:.72rem;color:#51647b}.wordbound-value{font-size:clamp(1.05rem,4vw,1.6rem);font-weight:700;color:#284b79;overflow-wrap:anywhere}.wordbounds-mystery{font-size:1.8rem;color:#587494}
.wordbounds-submit{flex:none;min-height:52px;padding:10px 18px;border:1px solid #345f9f;border-radius:14px;color:#fff;background:#355dac;font:600 .9rem system-ui;box-shadow:none}
.wordbounds-feedback{min-height:28px;font-size:.87rem;line-height:1.5;color:#355779;overflow-wrap:anywhere}.wordbounds input[aria-invalid=true]{border-color:#a67836}
.wordbounds-bank,.wordbounds-help{text-align:start;border:1px solid #dbe3ec;border-radius:14px;margin:14px 0;padding:0 14px;color:#415a77;font-size:.83rem;line-height:1.6}
.wordbounds summary{cursor:pointer;min-height:48px;padding:12px 0;font-weight:650}.wordbounds-help p{margin:0 0 12px}
.wordbounds-words{max-height:220px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:8px;padding:4px 0 14px;overscroll-behavior:contain}
.wordbounds-word{max-width:100%;min-height:44px;padding:8px 12px;overflow-wrap:anywhere;border:1px solid #c3d2e4;border-radius:10px;background:#f5f8fc;box-shadow:none;color:#294d7a;font:500 .9rem system-ui}
.wordbounds button:focus-visible,.wordbounds summary:focus-visible{outline:3px solid #bd8a30;outline-offset:3px}.wordbounds-history{max-height:180px;overflow-y:auto;text-align:start;margin:15px 0 0;padding-inline-start:28px;font-size:.8rem;color:#4f637e;line-height:1.6}.wordbounds-history li{padding:4px 0}.wordbounds-history bdi{font-weight:650;margin-inline-end:12px}
.wordbounds-lesson.lesson-success .wordbounds-form,.wordbounds-lesson.lesson-success .lesson-tools{display:none}.wordbounds-lesson.lesson-success .wordbounds-feedback{color:#287861;font-weight:700}
@media(max-width:400px){.wordbounds-form{flex-wrap:wrap}.wordbounds-form input{flex-basis:100%}.wordbounds-submit{width:100%}.wordbounds-range{gap:5px;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)}.wordbound{padding:12px 6px}.wordbound-label{font-size:.67rem}}

.wordbounds-retry{min-height:44px;padding:10px 18px;border:1px solid #b9cce2;border-radius:12px;background:#f1f6fc;color:#294d7a;box-shadow:none;font:600 .85rem system-ui}.wordbounds-submit:disabled{opacity:.55}

/* Reserve feedback space even before the first correct number answer. */
#play-area:has(.cards-grid) #game-feedback:empty{display:block}

/* Parent controls must shrink and wrap, not overflow their dialog. */
#settings-modal .modal-content>*{min-width:0;max-width:100%}
#settings-modal .parent-section{overflow-wrap:anywhere}
#settings-modal .placement-stages{min-width:0;max-width:100%}
#settings-modal .placement-stage{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
#settings-modal .form-group>label{min-width:0}
#settings-modal input[type=file],#settings-modal textarea{width:100%;min-width:0}
#settings-modal .coverage-domain small{white-space:normal}
/* The native level field is keyboard-editable: never leave its focus invisible. */
#settings-modal .domain-level-card input.sr-only{position:static;width:100%;height:auto;clip:auto;clip-path:none;overflow:visible;white-space:normal;margin:0 0 10px;padding:6px 10px}
@media(max-width:650px){#settings-modal #domain-level-inputs{grid-template-columns:minmax(0,1fr)}}
