#testPage{margin:0;padding:0 0 16px;overflow-wrap:anywhere;color:var(--text,#172e36)}
.test-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px;position:sticky;top:0;background:var(--bg,#f3f6f7);padding:8px 0;z-index:3}.test-heading h2{font-size:20px;flex:1;min-width:110px;margin:0}.test-heading button{font-size:14px}
#testContent{line-height:1.5;min-width:0}#testContent>p{margin:10px 0}#testPage button,#paneltesttools button{background:var(--surface,#fff);color:var(--text,#172e36);border-color:var(--border,#8aa2aa);max-width:100%;white-space:normal;overflow-wrap:anywhere;font:inherit;min-height:48px}#testPage button:disabled{opacity:.7;cursor:default}#testPage button[aria-pressed=true]{outline:3px solid var(--accent,#126b60);outline-offset:-4px}#testPage input,#testPage select,#testPage textarea{background:var(--surface,#fff);color:var(--text,#172e36);border-color:var(--border,#8aa2aa)}
.test-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));gap:10px;margin:12px 0}.test-grid>div{min-width:0}.test-grid>button,.test-picture{min-height:110px;min-width:0;padding:12px 8px}.test-picture{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;max-width:100%;font-size:18px!important}.test-picture .symbol{font-size:48px;min-height:52px;max-width:100%}.test-picture img{max-width:100%;width:72px;height:72px;object-fit:contain}.test-picture>span:last-child{max-width:100%;white-space:normal;overflow-wrap:anywhere}.test-picture .bilingual-label{display:flex;flex-direction:column;gap:5px}.test-picture .translation-label{font-size:.9em;line-height:1.5}.test-picture .english-label{font-weight:bold}.test-picture bdi:lang(ar),.test-picture bdi:lang(ur){font-family:'Noto Naskh Arabic','Nirmala UI',sans-serif;line-height:1.6}
.test-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.test-list{padding-left:24px}.test-list>li{padding:12px 0;border-bottom:1px solid var(--border,#8aa2aa)}.test-list>li>label{display:inline;vertical-align:middle}.test-editor{background:var(--surface,#fff);border:1px solid var(--border,#8aa2aa);border-radius:14px;padding:12px;margin:16px 0}.test-editor label{margin-top:12px}.test-editor>button{width:100%}.test-editor textarea{min-height:100px}.test-editor select{width:100%}#paneltesttools>label{display:inline-block;margin:12px 0 12px 4px;width:calc(100% - 44px);vertical-align:middle}#paneltesttools>button{display:block;width:100%;margin:12px 0}#paneltesttools>select{margin-bottom:14px}
.test-body-map{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:460px;margin:12px auto;padding:16px;border:2px solid var(--border,#8aa2aa);border-radius:90px 90px 24px 24px;background:var(--surface,#fff)}.test-body-map [data-body=head]{grid-column:1/-1;border-radius:50%;justify-self:center;width:100px}.test-timer,.test-quantity{font-size:36px;font-weight:bold;white-space:normal;overflow-wrap:anywhere}.test-breathe{display:grid;place-items:center;max-width:300px;min-height:160px;border:3px solid var(--accent,#126b60);border-radius:50%;padding:24px;margin:20px auto;text-align:center;background:var(--surface,#fff)}.test-sentence{min-height:60px;border:2px solid var(--border,#8aa2aa);padding:14px;border-radius:12px;font-size:22px}.test-balloons button{font-size:48px!important;min-height:100px}.test-canvas{width:100%;max-width:800px;display:block;aspect-ratio:1000/660;background:#fff;border:2px solid var(--border,#8aa2aa);touch-action:none}.test-puzzle-guide{display:block;width:150px;height:150px;object-fit:contain;margin:12px auto}.test-puzzle-grid{display:grid;gap:6px;max-width:600px;margin:16px auto}.test-puzzle-grid>button{aspect-ratio:1;min-width:0;min-height:48px;font-size:20px;font-weight:bold;color:#000!important;background-color:#fff!important;text-shadow:0 0 3px #fff,0 0 3px #fff;border:2px solid var(--border,#8aa2aa);border-radius:6px}.test-puzzle-grid>button:disabled{opacity:1}.test-scan-focus{outline:5px solid var(--accent,#126b60)!important;outline-offset:-5px!important}#testFeedback{padding:12px 0;min-height:48px;font-weight:bold}.test-memory{grid-template-columns:repeat(4,minmax(0,1fr))}.test-memory button{padding:8px 4px;min-height:100px;font-size:15px!important}.test-memory .symbol{font-size:32px}.test-memory img{width:48px;height:48px}
body.large .test-picture{min-height:145px;font-size:23px!important}body.large #testPage button{min-height:60px}body.words-only .test-picture .symbol{display:none}body[data-button-shape=circle] .test-picture{border-radius:50%;padding:22px}body[data-button-shape=triangle] .test-picture,body[data-button-shape=star] .test-picture{border-width:3px;border-style:dashed}body.contrast #testPage,body.contrast #paneltesttools{--bg:#000;--surface:#000;--text:#fff;--accent:#ffeb00;--border:#fff}.test-moving button{animation:test-float 4s ease-in-out infinite alternate}.test-moving button:nth-child(even){animation-delay:-2s}.test-pulse{animation:test-breathe 6s ease-in-out infinite alternate}@keyframes test-float{to{transform:translateY(-8px)}}@keyframes test-breathe{to{box-shadow:0 0 0 8px var(--soft,#e1e9eb)}}@media(prefers-reduced-motion:reduce){.test-moving button,.test-pulse{animation:none!important}}@media(max-width:400px){.test-heading{gap:6px}.test-heading button{padding:8px;font-size:13px}.test-heading h2{font-size:18px;order:3;flex-basis:100%}.test-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.test-memory{grid-template-columns:repeat(2,minmax(0,1fr))}.test-actions>button{flex:1 1 110px}}@media(max-height:550px){.test-heading{position:static}.test-picture{min-height:90px}.test-breathe{min-height:100px}.test-timer{font-size:28px}}
body.dyslexia #testPage .test-picture{font-size:calc(18px * var(--reading-scale))!important;line-height:var(--reading-lines)}body.dyslexia #testPage .test-memory button{font-size:calc(15px * var(--reading-scale))!important}body.reading-left #testPage .test-picture>span:last-child{text-align:left}body.reading-calm #testPage .test-moving button,body.reading-calm #testPage .test-pulse{animation:none!important}

#testPage details{padding:0 10px;background:var(--surface,#fff);border-color:var(--border,#8aa2aa);margin-top:12px}#testPage details .test-editor{border:0;padding:0}
.game-toolbar{display:flex;flex-wrap:wrap;gap:12px;padding:14px;background:var(--surface,#fff);border:1px solid var(--border,#8aa2aa);border-radius:16px;margin:10px 0}.game-option{flex:1 1 130px;min-width:0;display:flex;flex-direction:column;gap:6px;font-weight:650}.game-option select{width:100%;min-width:0;margin:0;font:inherit}.game-option span{font-size:.9em}.game-options{margin:10px 0 18px!important;border:1px solid var(--border,#8aa2aa);border-radius:12px}.game-options summary{padding:12px 2px;min-height:48px;font-weight:650}.game-check{display:flex;align-items:center;gap:10px;padding:10px 0}.game-check input{flex:0 0 24px;width:24px;height:24px}.game-notice{padding:14px 16px;border-left:5px solid var(--accent,#126b60);border-radius:10px;background:var(--surface,#fff);margin:12px 0;font-size:1.05em;line-height:1.5}.game-complete{border:2px solid var(--accent,#126b60);font-weight:700}.game-example{font-size:1.25em}.game-target{max-width:260px;margin:15px auto}.game-target .test-picture{min-height:170px}.game-target img{width:104px;height:104px}.game-correct{outline:4px solid var(--accent,#126b60)!important;outline-offset:-5px!important}.game-hint{outline:4px dashed var(--accent,#126b60)!important;outline-offset:-6px!important}.game-actions>button{flex:1 1 140px}.game-menu-description{font-size:14px;font-weight:400;line-height:1.4;color:inherit;display:block}.game-sentence{display:flex;flex-wrap:wrap;gap:8px;border:2px solid var(--accent,#126b60);border-radius:14px;padding:14px;min-height:70px;margin:16px 0}.game-sentence button{min-height:48px!important;padding:8px 14px}.game-step-list{padding-left:34px}.game-step-list li{padding:12px;background:var(--surface,#fff);margin:8px 0;border-radius:10px}.game-counters{display:flex;flex-wrap:wrap;gap:14px;padding:15px;background:var(--surface,#fff);border-radius:15px}.game-counters span{font-size:44px;position:relative;line-height:1.2}.game-crossed{opacity:.6}.game-crossed:after{content:'×';position:absolute;inset:0;color:var(--text,#172e36);text-shadow:0 0 3px var(--surface,#fff);text-align:center;font-size:54px;line-height:1}.game-pet{max-width:280px;margin:12px auto}.game-pet .test-picture{width:100%;min-height:190px}.game-pet img{width:130px;height:130px}.game-pet .symbol{font-size:100px}.test-balloons button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:148px}.game-balloon{display:block;width:60px;height:74px;background:var(--balloon-colour);border:2px solid var(--text,#172e36);border-radius:50% 50% 46% 46%;position:relative;box-shadow:inset 10px 7px 0 #ffffff26}.game-balloon:after{content:'';position:absolute;bottom:-13px;left:28px;width:2px;height:12px;background:var(--text,#172e36)}.game-balloon-name{font-size:17px!important;line-height:1.5;font-weight:650}.game-conversation{list-style:none;padding:0}.game-conversation li{padding:12px 16px;border:1px solid var(--border,#8aa2aa);border-radius:12px;margin:8px 0;max-width:90%;background:var(--surface,#fff)}.game-reply{margin-left:auto!important;border-right:5px solid var(--accent,#126b60)!important}.game-music-keys{grid-template-columns:repeat(4,minmax(0,1fr))}.game-music-keys button{min-height:110px!important;border-bottom:8px solid hsl(var(--key-hue),45%,45%)!important;font-weight:700!important}.game-key-active{outline:4px solid var(--accent,#126b60)!important;outline-offset:-5px}.test-puzzle-grid{max-width:480px}.test-puzzle-grid>button[aria-pressed=true]{outline:4px solid var(--accent,#126b60)!important;outline-offset:-4px}.test-memory button[aria-label^='Hidden']{font-size:36px!important;font-weight:700}.test-picture small{font-size:14px;line-height:1.4}.test-picture .game-menu-description{max-width:100%}
@media(min-width:850px){#testContent:has(.game-toolbar){max-width:1050px;margin:0 auto}.game-target{max-width:300px}.game-toolbar .game-option{flex-basis:200px}.game-counters span{font-size:54px}.test-balloons{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:400px){.game-toolbar{gap:8px;padding:10px}.game-option{flex-basis:110px}.game-option select{font-size:14px}.game-counters span{font-size:32px}.game-music-keys{grid-template-columns:repeat(4,minmax(0,1fr))}.game-music-keys button{padding:6px!important;min-height:85px!important}.test-balloons button{min-height:130px}.game-balloon{width:48px;height:60px}.game-actions>button{flex-basis:115px}.game-menu-description{font-size:13px}}
body.contrast .game-music-keys button{border-bottom-color:var(--accent)!important}body.colourblind .game-balloon-name{text-decoration:underline}body.reading-calm .game-balloon{box-shadow:none}body.words-only .game-pet .symbol{display:none}
.test-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 0 12px}.test-heading h2{min-width:0;font-size:19px;line-height:1.35}.test-heading h2:focus{outline:none}.test-heading button{padding:8px 10px;font-size:14px;min-height:46px!important}.test-heading h2{order:0;flex-basis:auto}#testContent>.game-toolbar~p{line-height:1.5}#testContent .test-canvas{margin:14px 0}.test-picture small{font-weight:400}.game-options{clear:both}
@media(max-width:400px){.test-heading{gap:6px}.test-heading h2{font-size:17px;order:0}.test-heading button{padding:8px;font-size:13px}.game-option{font-size:14px}.game-toolbar{margin-bottom:12px}}
.test-body-map{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(54px,auto));border-radius:24px;background-image:url("art/test-body-map.svg");background-repeat:no-repeat;background-position:center;background-size:auto 96%}.test-body-map [data-body=head]{grid-column:2;grid-row:1;width:auto;justify-self:stretch}.test-body-map [data-body=chest]{grid-column:2;grid-row:2}.test-body-map [data-body=tummy]{grid-column:2;grid-row:3}.test-body-map [data-body=back]{grid-column:1;grid-row:3}.test-body-map [data-body=arm]{grid-column:3;grid-row:2}.test-body-map [data-body=leg]{grid-column:2;grid-row:4}

/* Activities scale with available width and viewport height, rather than device models. */
#testPage{max-width:1400px;margin:0 auto;width:100%;font-size:clamp(16px,1.5vw,20px)}#testContent{min-width:0;width:100%}#testContent .test-menu-grid{grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:clamp(8px,1.2vw,16px)}
#testContent .test-menu-grid>.test-picture{height:100%;min-height:clamp(118px,18dvh,170px);font-size:clamp(16px,1.7vw,20px)!important;padding:12px;gap:8px}#testContent .test-menu-grid .symbol{font-size:clamp(36px,4vw,58px);min-height:0}#testContent .test-menu-grid img{width:clamp(48px,5vw,76px);height:clamp(48px,5vw,76px)}#testContent .game-menu-description{font-size:clamp(12px,1.2vw,15px)}
#testPage .test-editor{max-width:100%;min-width:0}#testPage .test-editor input,#testPage .test-editor textarea,#testPage .test-editor select{max-width:100%;min-width:0}#testPage .test-canvas{width:min(100%,800px,90dvh);height:auto}#testPage .test-heading{grid-template-columns:auto minmax(0,1fr) auto}#testPage .test-heading h2{font-size:clamp(17px,2vw,23px);line-height:1.35;overflow-wrap:anywhere}
@media(min-width:1000px){#testContent .test-menu-grid{grid-template-columns:repeat(4,minmax(0,1fr))}#testContent .game-toolbar{position:static}}
@media(max-width:480px){#testContent .test-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#testContent .test-menu-grid>.test-picture{padding:10px 6px;font-size:16px!important}.test-heading button{font-size:13px;padding:8px}.game-menu-description{font-size:12px!important}}
@media(max-height:500px){#testContent .test-menu-grid>.test-picture{min-height:100px;padding:8px}.test-heading{position:static!important}#testPage .test-heading h2{font-size:18px}#testContent .test-menu-grid img{width:40px;height:40px}#testContent .game-menu-description{display:none}#testPage .test-picture{min-height:90px}#testPage .test-canvas{width:min(100%,70dvh)}}
body.large #testContent .test-menu-grid>.test-picture{font-size:23px!important;min-height:145px}body.dyslexia #testContent .test-menu-grid>.test-picture{font-size:calc(18px * var(--reading-scale))!important;line-height:var(--reading-lines)}

.todo-list{list-style:none;padding:0;margin:16px 0;display:flex;flex-direction:column;gap:10px}
.todo-item{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.todo-item input{width:26px;height:26px;margin:0}.todo-item label{overflow-wrap:anywhere;margin:0;min-height:44px;display:flex;align-items:center}.todo-item .todo-completed{text-decoration:line-through}.todo-item button{min-height:44px}
@media(max-width:370px){.todo-item{grid-template-columns:28px minmax(0,1fr)}.todo-item button{grid-column:2;justify-self:start}}

.calculator-keys{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.calculator-keys button{min-height:58px;font-size:24px}#calculatorResult{display:block;font-size:clamp(24px,5vw,44px);overflow-wrap:anywhere;min-height:1.5em}

#testPage .test-heading:has(#testBack[hidden]) { grid-template-columns: minmax(0, 1fr); }
body.tools-open #composer #composerActions:has(> #bottomControls) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.tools-open #composer #composerActions > #bottomControls { grid-column: auto; }
body.tools-open #composer #composerActions > #bottomControls > #layout { width: 100%; min-width: 0; max-width: none; }
#testPage progress {
  width: 100%;
  height: 1.25rem;
  accent-color: var(--accent);
}
.mini-passport dt {
  font-weight: 700;
}
.mini-passport dd {
  margin: 0 0 12px;
}
.game-counters > button {
  min-width: 48px;
  font-size: clamp(23px, 4vw, 40px);
}
