/* Readability takes priority: fixed readable type, fewer choices, no text scaling. */
body,body .font-display,.brand-name,body h1,body h2,body h3,body h4{font-family:"Trebuchet MS",Arial,sans-serif!important}
body{font-size:18px;color:#123e52}
header{padding:8px 4%!important;min-height:58px;flex-wrap:nowrap!important}
header p,header>div:first-child>div:first-child,header>div:last-child>div:nth-child(2),header button[title="Parent & Educator Dashboard"]{display:none!important}
header .brand-name{font-size:28px!important;font-weight:800;letter-spacing:0}
header #global-stars{font:700 19px/1.2 "Trebuchet MS",sans-serif}
header>div:last-child{gap:6px!important}header>div:last-child>*{margin-left:0!important}
header #tts-btn,header button:last-child{min-width:44px;width:44px!important;height:44px!important;padding:8px!important}
header button:last-child>span{display:none}
main#app-container{padding:10px 4%!important}
.viewport-stage{height:100%;transform:none!important;min-height:0;display:block}
.kid-screen{width:100%;max-width:960px;height:100%;min-height:0;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.kid-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;min-height:44px}
.kid-heading h2{font-size:clamp(23px,3vw,32px);line-height:1.15;font-weight:800;margin:0;color:#123e52}
.kid-heading .kid-back:first-child{order:2}
.kid-back,.kid-pager button{border:2px solid #b8d5cb;border-radius:12px;background:#fffdf6!important;color:#123e52!important;min-height:44px;padding:8px 12px;font-size:18px!important;font-weight:700;line-height:1.2;white-space:nowrap}
.kid-primary{background:#087b78!important;color:#fff!important;border:0;border-radius:14px;min-height:50px;padding:12px 22px;font-size:21px!important;font-weight:800;line-height:1.15;box-shadow:0 4px 0 #075d5d;flex-shrink:0}
.kid-primary:disabled{background:#d4e2da!important;color:#45655f!important;box-shadow:none;opacity:1}
.kid-instruction,.kid-instruction-row p{font-size:20px!important;line-height:1.35;margin:0;color:#123e52!important;font-weight:700;flex-shrink:0}
.kid-instruction-row{display:flex;justify-content:space-between;gap:10px;align-items:center}
.kid-island{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1.2fr;align-items:center;background:#d7eee3;border:2px solid #c1ded2;border-radius:26px;padding:28px;gap:20px}
.kid-island.island-1{background:#f6e0d4}.kid-island.island-2{background:#deedf1}.kid-island.island-3{background:#f8ebbc}.kid-island.island-4{background:#e1ebd6}
.kid-island-art{font-size:clamp(80px,16vw,160px);text-align:center;line-height:1.2;color:#087b78;animation:bob 4s ease-in-out infinite;text-shadow:0 7px #fff8}
.kid-island-info h3{font-size:clamp(28px,4vw,42px);font-weight:800;line-height:1.15;margin:0 0 14px}.kid-island-info p{font-size:22px;line-height:1.4;margin:0 0 18px}.kid-island-info .kid-progress{font-size:18px;margin-bottom:22px}.kid-island-info .kid-primary{width:100%}
.kid-pager{display:flex;align-items:center;justify-content:center;gap:25px;flex-shrink:0;font-size:20px;font-weight:700;min-height:48px}.kid-pager button{min-width:64px;font-size:28px!important;padding:3px 18px}
.kid-missions{display:grid;gap:14px;flex:1;min-height:0;align-content:center}.kid-mission{display:flex;gap:18px;align-items:center;min-height:85px;padding:16px;border:2px solid #bad8cd;border-radius:18px;background:#eef6e9!important;text-align:left;font-size:22px;color:#123e52!important}.kid-mission>span:nth-child(2){flex:1}.kid-mission small{display:block;font-size:18px;margin-top:5px}.kid-mission-number{font-size:30px;font-weight:800;background:white;border-radius:50%;width:48px;height:48px;display:grid;place-items:center;flex-shrink:0}.kid-mission:disabled{opacity:.65}
.kid-puzzle-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:20px;align-items:center;flex:1;min-height:0}
#puzzle-canvas.kid-pattern{display:flex;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:12px;min-height:0!important;padding:18px!important;border:2px solid #bedbd0;border-radius:20px;height:100%}
.kid-tile{display:inline-flex;width:68px;height:68px;align-items:center;justify-content:center;background:#fffdf4;border:3px solid #396a6b;border-radius:12px;flex-shrink:0;vertical-align:middle}.kid-tile svg{width:55px;height:55px}.kid-tile.unknown{font-size:36px;font-weight:800;color:#087b78;border-style:dashed;background:#d4f1e6}#answer-slot{min-width:0!important;display:inline-flex}
.kid-answers{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.kid-answer{display:flex;flex-direction:column;align-items:center;gap:8px;border:3px solid #b9d6cb;border-radius:16px;padding:12px;background:#fffdf6!important;font-size:20px!important;font-weight:700;color:#123e52!important;min-width:90px}.kid-answer .kid-tile{border:0;background:transparent}.kid-answer.chosen,[aria-pressed=true].kid-answer{border-color:#087b78;background:#ccede2!important;box-shadow:0 0 0 2px #087b78}
.kid-bridge-choices{display:grid;gap:18px}.kid-bridge-choices fieldset{min-width:0;border:0;padding:0;margin:0}.kid-bridge-choices legend{font-size:20px;font-weight:700;margin-bottom:8px}.kid-shape-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.kid-shape-choices button{display:flex;gap:8px;align-items:center;justify-content:center;min-height:48px;font-size:18px!important;font-weight:700;border:2px solid #b5d3c7;border-radius:12px;background:#fffdf6!important;padding:6px;color:#123e52!important}.kid-shape-choices .kid-tile{width:30px;height:30px;border:0;background:none}.kid-shape-choices svg{width:30px;height:30px}.kid-stroke-choices{display:flex;gap:8px}.kid-stroke-choices button{flex:1;min-width:0;font-size:18px!important;min-height:50px;background:#fffdf6!important;border:2px solid #b5d3c7;border-radius:12px;padding:7px;color:#123e52!important}.stroke-sample{display:block;border-top:3px solid #123e52;width:30px;margin:0 auto 5px}.kid-bridge-choices button[aria-pressed=true]{border-color:#087b78;background:#ccecdf!important;box-shadow:inset 0 0 0 1px #087b78}
.kid-signals{height:auto!important;min-height:0!important;background:#e6f3e9!important;border:2px solid #bddace;border-radius:18px;padding:18px!important;display:grid;gap:18px}.kid-signal-row strong{font-size:18px}.kid-beats{display:grid;grid-template-columns:repeat(var(--beats),minmax(0,1fr));gap:3px;margin-top:10px}.kid-beats>span{height:30px;border-radius:6px;background:#c6d9d1;border:1px solid #93b4a8}.kid-beats .pulse{background:var(--pulse);border:2px solid #123e52}.kid-beats .beat-active{outline:3px solid #123e52;transform:translateY(-4px)}.kid-playback{display:flex;justify-content:space-between;align-items:center;gap:12px}.kid-playback output{font-size:20px;font-weight:800;white-space:nowrap}.kid-scrub{display:flex;align-items:center;gap:12px;font-size:18px}.kid-scrub input{min-width:0;flex:1;max-width:100%!important;height:32px}.kid-signal-answer{display:grid;gap:18px;justify-items:center}.kid-signal-answer label{font-size:22px;font-weight:700}.kid-signal-answer input{width:100px;height:64px;font-size:30px!important;text-align:center;border:3px solid #4e8c83;border-radius:12px}.kid-channels{display:grid;grid-template-columns:1fr 1fr;gap:16px;flex:1;min-height:0}.kid-channels button{font-size:24px;font-weight:800;border:2px solid #b8d6c9;border-radius:18px;background:#f8edbf!important;display:flex;gap:15px;align-items:center;justify-content:center;color:#123e52!important}.kid-channels button>span{font-size:40px}
footer{padding:8px 4%!important;min-height:64px}footer>div{max-width:960px!important;flex-direction:row!important;gap:12px!important}footer>div>div:first-child{min-width:0}footer>div>div:first-child>div:first-child,footer h4{display:none!important}footer p{font:700 18px/1.3 "Trebuchet MS",Arial,sans-serif!important;font-style:normal!important;color:#123e52!important}footer>div>div:last-child{flex-shrink:0;gap:8px!important}footer button{font-size:18px!important;font-weight:700;min-height:44px;padding:8px 12px!important;border-radius:12px!important}footer button:first-child{background:#087b78!important;color:white!important}footer button i{display:none}
#modal-content.kid-modal{transform:none!important;width:min(600px,calc(100vw - 24px));padding:22px!important;max-height:none!important;box-sizing:border-box}#modal-content.kid-modal>div>div:first-child{display:none}#modal-content.kid-modal h3{font-size:28px!important;font-weight:800;line-height:1.2;margin:0 0 18px}#modal-content.kid-modal .kid-modal-body{margin-bottom:18px}#modal-content.kid-modal p,#modal-content.kid-modal li,#modal-content.kid-modal small,#modal-content.kid-modal .text-xs,#modal-content.kid-modal .text-sm{font-size:18px!important;line-height:1.45!important;color:#123e52!important}#modal-content.kid-modal button{font:700 18px/1.25 "Trebuchet MS",sans-serif!important;min-height:44px}#modal-content.kid-modal .kid-modal-body p{margin-bottom:14px}.kid-modal-pages{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 16px;font-size:18px;font-weight:700}.kid-modal-pages button{min-width:52px;border:2px solid #b8d5cb;border-radius:12px;padding:8px;background:#fffdf6!important}.kid-modal-body>[hidden]{display:none!important}
.kid-modal-pages[hidden]{display:none!important}
@media(max-width:600px){
 header .brand-name{font-size:25px!important}header #global-stars{font-size:18px}header>div:last-child>div{padding:5px 7px!important}header #tts-btn{display:none!important}
 .kid-screen{gap:10px}.kid-heading{gap:8px}.kid-heading h2{font-size:24px}.kid-heading .kid-back{font-size:17px!important;padding:8px;min-height:44px}.kid-island{grid-template-columns:1fr;text-align:center;align-content:center;gap:10px;padding:18px}.kid-island-art{font-size:90px;line-height:1}.kid-island-info h3{font-size:32px;margin-bottom:12px}.kid-island-info p{font-size:20px;margin-bottom:16px}.kid-island-info .kid-progress{font-size:18px;margin-bottom:20px}.kid-primary{font-size:20px!important;min-height:48px;padding:10px 18px}.kid-instruction,.kid-instruction-row p{font-size:18px!important}.kid-instruction-row .kid-back{font-size:16px!important;padding:6px 8px}
 .kid-puzzle-layout{display:flex;flex-direction:column;gap:12px;justify-content:center}.kid-pattern{width:100%;flex:1;max-height:220px}#puzzle-canvas.kid-pattern{height:auto;gap:9px;padding:12px!important}.kid-tile{width:53px;height:53px;border-radius:9px}.kid-tile svg{width:43px;height:43px}.kid-answer{font-size:18px!important;gap:4px;padding:7px;min-width:74px}.kid-answer .kid-tile{width:45px;height:45px}.kid-answers{gap:9px}.kid-bridge-choices{width:100%;gap:10px}.kid-bridge-choices legend{font-size:18px;margin-bottom:6px}.kid-shape-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.kid-shape-choices button{min-height:44px;font-size:18px!important;padding:5px}.kid-shape-choices .kid-tile{width:24px;height:24px}.kid-shape-choices svg{width:24px;height:24px}.kid-stroke-choices button{min-height:48px;font-size:18px!important;padding:4px}.kid-bridge .kid-pattern{flex:none;max-height:none}.kid-bridge .kid-tile{width:43px;height:43px}.kid-bridge .kid-tile svg{width:34px;height:34px}.kid-bridge #puzzle-canvas{padding:8px!important;gap:6px}.kid-bridge .kid-puzzle-layout{gap:10px}
 .kid-signals{width:100%;gap:12px;padding:12px!important}.kid-signal-row strong{font-size:18px}.kid-beats>span{height:20px}.kid-beats{gap:2px;margin-top:7px}.kid-playback .kid-back{font-size:17px!important;padding:6px 9px}.kid-playback output{font-size:18px}.kid-scrub{font-size:17px}.kid-signal-answer{width:100%;grid-template-columns:auto 80px;gap:10px}.kid-signal-answer label{font-size:19px;text-align:left}.kid-signal-answer input{width:80px;height:48px;font-size:25px!important}.kid-signal-answer button{grid-column:1/-1;width:100%}.kid-channels{gap:10px}.kid-channels button{font-size:21px;gap:8px}.kid-channels button>span{font-size:32px}
 footer{padding:7px 4%!important;min-height:66px}footer p{font-size:17px!important;line-height:1.3!important}footer button{font-size:17px!important;padding:8px!important}footer>div>div:last-child{flex-direction:column;gap:4px!important}footer #hint-btn:not(.hidden){min-height:36px;padding:5px 8px!important}footer:has(#hint-btn:not(.hidden)) p{font-size:17px!important}
 #modal-content.kid-modal{padding:18px!important}#modal-content.kid-modal h3{font-size:24px!important;margin-bottom:12px}
}
@media(max-height:650px) and (max-width:600px){
 .kid-screen{gap:7px}.kid-island{gap:7px;padding:12px}.kid-island-art{font-size:60px}.kid-island-info h3{font-size:28px;margin-bottom:8px}.kid-island-info p{font-size:18px;margin-bottom:10px}.kid-island-info .kid-progress{margin-bottom:12px}.kid-missions{gap:8px}.kid-mission{min-height:72px;padding:10px;gap:12px;font-size:20px}.kid-mission small{font-size:17px}.kid-mission-number{width:42px;height:42px;font-size:26px}.kid-puzzle-layout{gap:8px}.kid-bridge .kid-puzzle-layout{gap:7px}.kid-bridge .kid-pattern{gap:5px!important}.kid-bridge-choices{gap:7px}.kid-bridge .kid-tile{width:36px;height:36px}.kid-bridge .kid-tile svg{width:30px;height:30px}.kid-bridge-choices legend{margin-bottom:3px}.kid-shape-choices .kid-tile{display:none}.kid-stroke-choices button{min-height:44px}.stroke-sample{margin-bottom:2px}.kid-instruction-row .kid-back{min-height:40px}.kid-signals{gap:8px}.kid-beats>span{height:14px}.kid-scrub input{height:26px}.kid-signal-answer{gap:7px}.kid-signals .kid-back{min-height:40px}
}
@media(max-height:500px) and (min-width:601px){
 header{min-height:48px;padding-block:3px!important}footer{min-height:52px;padding-block:4px!important}main#app-container{padding:6px 3%!important}.kid-screen{gap:6px}.kid-heading{min-height:40px}.kid-heading h2{font-size:24px}.kid-back{font-size:17px!important;min-height:40px;padding:6px 10px}.kid-primary{min-height:44px;padding:8px 15px;font-size:19px!important}.kid-island{padding:12px 24px;gap:16px;grid-template-columns:.6fr 1.4fr}.kid-island-art{font-size:75px}.kid-island-info h3{font-size:28px;margin-bottom:6px}.kid-island-info p{font-size:18px;margin-bottom:6px}.kid-island-info .kid-progress{font-size:17px;margin-bottom:10px}.kid-pager{min-height:40px}.kid-pager button{min-height:40px}.kid-missions{grid-template-columns:repeat(3,1fr);gap:10px}.kid-mission{flex-direction:column;justify-content:center;text-align:center;font-size:19px;gap:6px;padding:10px}.kid-mission small{font-size:17px}.kid-mission>b{display:none}.kid-mission-number{width:36px;height:36px;font-size:24px}.kid-puzzle-layout{gap:14px;min-height:0}.kid-pattern .kid-tile{width:44px;height:44px}.kid-pattern .kid-tile svg{width:36px;height:36px}#puzzle-canvas.kid-pattern{padding:8px!important;gap:6px}.kid-answers{gap:7px}.kid-answer{font-size:18px!important;padding:7px;min-width:74px}.kid-answer .kid-tile{height:42px;width:42px}.kid-bridge-choices{gap:6px}.kid-bridge-choices legend{font-size:18px;margin-bottom:3px}.kid-shape-choices{grid-template-columns:repeat(4,1fr);gap:5px}.kid-shape-choices button{font-size:16px!important;padding:5px;min-height:40px}.kid-shape-choices .kid-tile{display:none}.kid-stroke-choices button{font-size:17px!important;min-height:42px;padding:4px}.kid-bridge .kid-puzzle-layout{grid-template-columns:.7fr 1.3fr}.kid-instruction{font-size:18px!important}.kid-signals{padding:8px!important;gap:6px}.kid-signal-row strong{font-size:17px}.kid-beats{margin-top:4px}.kid-beats>span{height:13px}.kid-playback .kid-back{min-height:36px}.kid-scrub{font-size:16px}.kid-scrub input{height:22px}.kid-signal-answer{gap:10px}.kid-signal-answer label{font-size:20px}.kid-signal-answer input{height:48px}.kid-channels{grid-template-columns:repeat(4,1fr)}.kid-channels button{font-size:20px;flex-direction:column;gap:6px}#modal-content.kid-modal h3{font-size:23px!important;margin-bottom:8px}#modal-content.kid-modal{padding:14px 20px!important}#modal-content.kid-modal .kid-modal-body{margin-bottom:10px}.kid-modal-pages{margin:6px 0 10px}
}
.kid-age-setting{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:18px;font-weight:700;padding:10px}.kid-age-setting select{font-size:18px;min-height:44px;padding:7px;border:2px solid #86afa1;border-radius:10px}.kid-modal-pages span{font-size:18px}
#modal-content [hidden]{display:none!important}
@media(max-height:500px) and (min-width:601px){.kid-signal-row strong{display:block;line-height:1.05}.kid-signals{gap:4px!important}.kid-scrub{line-height:1.1}.kid-signals .kid-back{padding:4px 8px;min-height:32px}.kid-playback output{font-size:18px}.kid-beats{margin-top:3px}}
@media(max-height:400px) and (min-width:601px){.kid-signals{padding:6px!important;gap:3px!important}.kid-signal{gap:4px}}
.kid-practice{font-size:20px;font-weight:700;color:#123e52!important;background:#f6e4b2!important;border:2px solid #d8c486;border-radius:12px;min-height:48px;padding:10px;flex-shrink:0}.kid-levels .kid-missions{align-content:center}.kid-levels .kid-pager{gap:16px}.kid-levels .kid-pager span{font-size:18px;white-space:nowrap}@media(max-height:500px) and (min-width:601px){.kid-levels{position:relative;padding-bottom:50px}.kid-levels .kid-missions{grid-template-columns:repeat(2,1fr)}.kid-levels .kid-pager{position:absolute;left:0;bottom:0}.kid-levels .kid-practice{position:absolute;right:0;bottom:0;min-height:44px;padding:7px 14px;font-size:18px}}
