/* Ruang Angka — Bold Kids UI (visual-only revision, original learning engine preserved) */
:root{
 --bg:#FFFFFF;--surface:#E9F3FF;--surface2:#F0F7FF;--paper:#FFFFFF;
 --border:#DCE7FB;--text:#132960;--muted:#65718A;--taupe:#64718A;
 --sage:#1453E7;--sage-dark:#1251E6;--sage-soft:#E9F0FF;
 --apricot:#FFE88E;--sky:#DFF1FF;--lavender:#ECE6FF;
 --shadow:0 7px 22px rgba(17,58,129,.055);--radius:26px;
 font-family:Nunito,"Nunito Sans","Arial Rounded MT Bold",ui-rounded,system-ui,-apple-system,sans-serif;
}
html,body{background:#fff;color:var(--text)}
button{touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #FFCB08;outline-offset:3px}
h1,h2,h3{letter-spacing:-.035em;font-weight:900}
p{line-height:1.5}
.app-shell{max-width:1150px}
.app-header{height:83px;border-bottom:0;position:relative;z-index:4}
.brand{font-size:24px;color:#134BE0;font-weight:1000;letter-spacing:-.055em;line-height:1.07}
.brand small{color:#5975AD;font-size:9px;letter-spacing:.11em;margin-top:4px}
.logo{transform:rotate(-8deg);gap:3px}
.logo span{background:#1154E8;border-radius:6px}
.logo span:nth-child(2){background:#FFCA05}
.logo span:nth-child(3){background:#FF5558}
.logo span:nth-child(4){background:#00B772}
.desktop-nav button{font-weight:900;font-size:14px}
.desktop-nav button.active{background:#E8F0FF;color:#1451E7}
.header-icon{background:#FFCD06;color:#1548C8;border:0;border-radius:18px;width:45px;height:45px}
.header-icon svg{stroke-width:2.8}
.pill-plain{border:0;background:#ECF3FF;font-weight:900;border-radius:20px;color:#1644C3}
.avatar{background:#1352E9;color:white;width:33px;height:33px}
.main-content{padding-top:8px}
.btn{border-radius:19px;font-weight:900;border:2px solid #DDE8FD;min-height:52px;font-size:15px}
.btn.primary{background:#1454EC;color:#fff;border-color:#1454EC;box-shadow:0 5px 0 #0A39B4}
.btn.primary:hover{background:#1048D4}
.btn.soft{background:#FFE773;color:#243371;border-color:#FFE773}
.btn.small{min-height:43px;border-radius:15px;font-size:13px}
.btn:active{transform:translateY(2px)}
.eyebrow{color:#1454EB;font-weight:1000;letter-spacing:.13em}
.section-heading h2,.page-head h1{color:#152C63}
.page-head{margin-top:12px;margin-bottom:26px}
.page-head h1{font-size:clamp(29px,5vw,42px)}
.card{border:2px solid #E3EBFC;box-shadow:var(--shadow)}
.footer-note{display:none}
/* Main illustrated welcome, inspired by bold geometric children's educational apps */
.kid-home{max-width:980px;margin:0 auto;padding-bottom:6px}
.kid-welcome-banner{min-height:247px;display:flex;position:relative;overflow:hidden;isolation:isolate;align-items:center;justify-content:space-between;gap:10px;background:white;padding:17px 30px 24px 35px;border-radius:34px}
.kid-welcome-banner:before{content:"";position:absolute;z-index:-2;width:268px;height:268px;right:-72px;top:-120px;border-radius:50%;background:#FFD009}
.kid-welcome-banner:after{content:"";position:absolute;z-index:-1;width:35px;height:35px;right:235px;bottom:29px;border-radius:50%;background:#FF535A}
.kid-welcome-text{align-self:center;z-index:2;min-width:0}
.kid-welcome-text h1{margin:4px 0 17px;color:#163A9D;font-size:clamp(38px,5.8vw,60px);font-weight:1000;line-height:1.04;letter-spacing:-.06em}
.kid-welcome-text h1 span{color:#1253EC}
.kid-greeting{margin:0;font-size:clamp(17px,2.6vw,23px);color:#253B75;font-weight:950}
.kid-start-btn{display:inline-flex;align-items:center;justify-content:center;gap:21px;padding:12px 13px 12px 23px;min-height:56px;color:white;background:#1453EE;border:0;border-radius:40px;font-size:17px;font-weight:950;box-shadow:0 5px 0 #0937AF}
.kid-start-btn span{width:33px;height:33px;border-radius:50%;background:#FFD21E;display:grid;place-items:center;color:#164CCC;font-size:14px;padding-left:2px}
.kid-start-btn:active{transform:translateY(3px);box-shadow:0 2px 0 #0937AF}
.kid-welcome-mascot{width:260px;height:233px;flex-shrink:0;display:grid;place-items:center;position:relative;z-index:1}
.kid-welcome-mascot:before{content:"";position:absolute;width:170px;height:170px;background:#E5F2FF;border-radius:50%;z-index:-1;left:37px;top:31px}
.kid-penguin{height:235px;width:235px;display:block;filter:drop-shadow(0 7px 1px rgba(17,49,115,.06))}
.kid-sun-doodle{position:absolute;top:18px;left:44%;color:#FFC700;font-size:30px;transform:rotate(-10deg)}
.kid-section-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:11px 2px 16px}
.kid-section-top h2{font-size:clamp(22px,3.5vw,28px);margin:0;color:#183061}
.kid-sparkles{font-size:22px;color:#FFC900;letter-spacing:6px}
.kid-activity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.kid-activity-card{border:0;text-align:center;position:relative;border-radius:30px;min-height:250px;padding:22px 12px 16px;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;overflow:hidden;box-shadow:0 5px 0 rgba(21,50,98,.07);transition:transform .15s,filter .15s}
.kid-activity-card:hover{transform:translateY(-3px)}
.kid-activity-card:active{transform:translateY(2px)}
.kid-blue{background:#1250E8;color:white}
.kid-yellow{background:#FFCD08;color:#172D65}
.kid-sky{background:#D7EEFF;color:#1541B6}
.kid-coral{background:#FE5B63;color:white}
.kid-activity-card:before{content:"";width:160px;height:160px;border-radius:50%;border:23px solid rgba(255,255,255,.10);position:absolute;left:-85px;top:-80px;pointer-events:none}
.kid-card-spark{position:absolute;right:20px;top:12px;color:rgba(255,255,255,.75);font-size:26px;line-height:1}
.kid-yellow .kid-card-spark,.kid-sky .kid-card-spark{color:#1454ED}
.kid-card-visual{height:141px;display:flex;align-items:center;justify-content:center;gap:3px;position:relative;z-index:1}
.visual-numbers span{font-size:88px;font-weight:1000;line-height:1;letter-spacing:-.13em;text-shadow:0 5px 0 rgba(0,0,0,.08);-webkit-text-stroke:1px rgba(0,0,0,.02)}
.visual-numbers span:nth-child(1){color:#FFCE04;transform:rotate(-8deg) translateY(8px)}
.visual-numbers span:nth-child(2){color:#FF6267;transform:rotate(6deg) translateY(-5px)}
.visual-numbers span:nth-child(3){color:#8BDFFF;transform:rotate(-3deg) translateY(5px)}
.visual-apples svg{width:100%;max-width:210px;height:123px;filter:drop-shadow(0 5px 0 rgba(163,88,0,.07))}
.visual-shapes{gap:11px;align-items:center}
.v-circle{display:block;background:#FFCD07;border-radius:50%;width:55px;height:55px;box-shadow:0 5px 0 rgba(21,70,180,.10)}
.v-square{display:block;background:#38B4F2;width:55px;height:55px;border-radius:13px;transform:rotate(8deg);box-shadow:0 5px 0 rgba(21,70,180,.10)}
.v-triangle{display:block;width:0;height:0;border-left:31px solid transparent;border-right:31px solid transparent;border-bottom:62px solid #FF5963;transform:rotate(-9deg)}
.visual-sum{gap:11px;font-size:73px;font-weight:1000;color:#FFDA0E;text-shadow:0 4px 0 rgba(0,0,0,.09)}
.visual-sum b{color:white;font-size:54px}
.visual-sum span:last-child{color:#C7EDFF}
.kid-card-bottom{display:flex;align-items:center;justify-content:center;gap:6px;position:relative;z-index:1;background:white;border-radius:999px;min-height:59px;padding:8px 12px;color:#173C9C;font-size:clamp(14px,1.6vw,17px);line-height:1.16}
.kid-card-bottom strong{font-weight:1000;flex:1;white-space:normal}
.kid-play-arrow{border-radius:50%;width:30px;height:30px;background:#FFCA07;color:#114CDA;flex-shrink:0;display:grid;place-items:center;padding-left:2px;font-size:11px}
.kid-yellow .kid-card-bottom{color:#17347C}
.kid-bottom-actions{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:22px}
.kid-round-action{display:flex;align-items:center;min-height:86px;padding:11px 22px;border:0;border-radius:27px;text-align:left;background:#E5F3FF;gap:14px;color:#1942B3;font-size:18px;font-weight:1000}
.kid-round-action:nth-child(2){background:#FFF1AA;color:#304078}
.kid-action-emoji{font-size:32px}
.kid-round-action strong{flex:1}
.kid-arrow-small{width:31px;height:31px;border-radius:50%;background:white;display:grid;place-items:center;font-size:26px;font-weight:900}
.kid-progress-note{text-align:center;margin:22px 0 0;font-weight:850;color:#5B6C91}
/* Core learning pages remain operational, with bolder accessible controls */
.level-head{margin-top:32px}
.level-num{border:none;background:#FFCD0A;color:#1743B6;border-radius:16px;font-size:20px;width:46px;height:46px}
.lesson-tile{border:2px solid #DFE8FB;box-shadow:0 5px 0 rgba(24,60,125,.04);border-radius:25px;min-height:155px;padding:20px}
.lesson-tile:nth-child(4n+1),.home-card:nth-child(4n+1){border-color:#CDE0FF}
.lesson-tile:nth-child(4n+2),.home-card:nth-child(4n+2){border-color:#FFE7A4}
.lesson-tile .title{font-size:17px;font-weight:1000;color:#203B83}
.lesson-tile .desc,.lesson-tile .prereq{display:none}
.lesson-tile .mini-label{font-size:10px;font-weight:900;color:#70809E}
.lesson-tile:hover{border-color:#1453EA}
.tile-icon{width:60px;height:60px;border-radius:20px;color:#1648D8}
.tile-icon svg{width:35px;height:35px;stroke-width:2.8}
.tile-icon.sage{background:#E6F0FF;color:#1756E9}
.tile-icon.apricot{background:#FFF0AE;color:#E78205}
.tile-icon.sky{background:#D7F0FF;color:#1396D4}
.tile-icon.lavender{background:#F0E7FF;color:#8055D7}
.status-dot{background:#E3E7F1}
.status-dot.progress{background:#FFCB00}
.status-dot.mastered{background:#00C486}
.lesson-back{color:#1954D9;font-weight:950}
.lesson-progress .step{background:#DCE8FF}
.lesson-progress .step.current{background:#FDCB09}
.lesson-progress .step.done{background:#1357EC}
.lesson-card{background:white;border:2px solid #E2EBFF;border-radius:30px;box-shadow:var(--shadow)}
.lesson-card h1{color:#14347D;font-size:clamp(25px,4vw,37px)}
.lesson-card .instruction{color:#637394;font-weight:700}
.stage-mark{background:#FFF0B4!important;color:#31478F!important;font-weight:950}
.activity-zone{background:#F3F8FF;border:2px dashed #C9DDFB;border-radius:28px}
.activity-zone .tiny,.tiny{color:#5172AD;font-weight:950}
.math-block{background:#1253EB;box-shadow:0 5px 0 #0D3EA9;border:2px solid white}
.math-block.alt{background:#FFCC08;box-shadow:0 5px 0 #E49A00}
.math-block.selected{outline:4px solid #FFCA00}
.dot{background:#1253E9}
.dot.alt{background:#FFCD0B}
.math-group{border:2px solid #DAE6FB;background:white;border-radius:20px}
.merge-target{border-color:#ACCBFF;background:#E7F2FF;border-radius:20px}
.answer-choices button,.shape-choice,.num-token,.assessment-choices button{min-height:74px;min-width:75px;background:white;border:3px solid #D8E7FF;border-radius:23px;font-size:28px;font-weight:1000;color:#1646B8}
.answer-choices button.selected,.shape-choice.selected{background:#FFCC08!important;color:#143B93!important;border-color:#EAAA00!important}
.lesson-toolbar .btn{min-height:57px}
.feedback{background:#E9F9ED!important;border-color:#9DE0B1!important;border-radius:20px;color:#165C32!important;font-size:17px;font-weight:950}
.feedback.try{background:#FFF5D2!important;border-color:#F7D271!important;color:#7B5700!important}
.help-card{background:#FFF8E4;border:1px solid #F3DE92;border-radius:18px}
.lesson-summary{border-radius:30px;position:relative;overflow:hidden}
.lesson-summary .summary-art{background:#FFCE08;color:#1552E9;border-radius:50%}
.lesson-summary h1{color:#1744C3}
.summary-tags span{background:#EAF3FF;color:#1850C4;font-weight:900}
.status-pill.progress,.status-pill.mastered{background:#E4F9F0;color:#007D54}
.parent-tabs button.active{background:#1650E4;border-color:#1650E4}
.toggle-switch.on{background:#1756E9}
.modal{border-radius:28px}
/* First-run welcome */
.kid-onboarding{max-width:945px;gap:27px;align-items:center}
.kid-onboarding .welcome-hero{position:relative;overflow:hidden;border-radius:35px;background:#EAF3FF;padding:35px 30px;min-height:490px}
.kid-onboarding .welcome-hero:after{content:"";background:#FFCB06;border-radius:50%;position:absolute;width:250px;height:250px;right:-100px;top:-105px;z-index:0}
.kid-onboarding .welcome-hero h1{font-size:clamp(29px,4vw,44px);font-weight:1000;color:#1842B3;position:relative;z-index:1}
.kid-onboarding .welcome-hero h1 span{color:#1453EF}
.kid-onboarding .welcome-hero p{font-weight:800;color:#5C6D96;position:relative;z-index:1}
.kid-onboarding-logo{display:flex;gap:6px;margin-bottom:14px;font-size:48px;font-weight:1000;color:#1050E9;position:relative;z-index:1}
.kid-onboarding-logo span:nth-child(2){color:#FFBA00}.kid-onboarding-logo span:nth-child(3){color:#FF6161}
.onboarding-penguin{position:absolute;right:2%;bottom:0;width:215px;height:215px}
.kid-onboarding .onboard-form{border-radius:29px}
.kid-onboarding .onboard-form h2{font-size:28px;color:#143EAA}
.kid-onboarding input,.kid-onboarding select{min-height:51px;border-radius:14px;border:2px solid #DCE8FF;background:white}
.kid-checkbox-label{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:800;margin:3px 0 22px;color:#53678E}
.kid-checkbox-label input{accent-color:#1655EB;width:20px;height:20px}
.kid-parent-note{text-align:center;margin:18px 0 0}
.mobile-nav{background:rgba(255,255,255,.98);border-color:#DFE9FF;box-shadow:0 -5px 22px rgba(11,55,133,.07)!important}
.mobile-nav button{font-size:11px;font-weight:950;color:#697BA2;min-height:55px;border-radius:16px}
.mobile-nav button.active{color:#1554E8;background:#E9F1FF}
.mobile-nav button svg{width:24px;height:24px;stroke-width:2.7}
/* Responsive phone-first cards and stable fixed bottom navigation */
@media(max-width:770px){
 .app-header{height:72px}.main-content{padding-top:6px;padding-bottom:115px}
 .kid-welcome-banner{min-height:226px;padding:17px 15px 20px 17px}
 .kid-welcome-banner:before{right:-104px;top:-130px;width:230px;height:230px}
 .kid-welcome-banner:after{right:164px;bottom:18px;width:19px;height:19px}
 .kid-welcome-text h1{font-size:clamp(37px,7.6vw,55px)}
 .kid-welcome-mascot{height:192px;width:193px;margin-right:-13px}
 .kid-penguin{height:195px;width:195px}
 .kid-welcome-mascot:before{width:130px;height:130px;left:30px;top:24px}
 .kid-sun-doodle{top:20px;left:49%}
 .kid-activity-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
 .kid-activity-card{min-height:235px}
 .kid-card-bottom{font-size:16px}
 .kid-bottom-actions{margin-top:18px}
 .kid-onboarding{gap:16px}
 .kid-onboarding .welcome-hero{min-height:350px}
 .kid-onboarding .welcome-hero .onboarding-penguin{width:165px;height:165px}
}
@media(max-width:480px){
 .app-shell{padding:0 13px}.app-header{height:68px}
 .brand{font-size:19px;gap:9px}.brand small{font-size:8px}
 .logo{grid-template-columns:repeat(2,11px);grid-template-rows:repeat(2,11px)}
 .avatar{width:31px;height:31px}.pill-plain{padding:5px 6px;border-radius:17px}
 .header-icon{width:38px;height:38px;border-radius:13px}
 .kid-welcome-banner{min-height:206px;padding:11px 7px 18px 13px;border-radius:23px}
 .kid-welcome-text{min-width:171px}
 .kid-greeting{font-size:15px;margin-bottom:7px}
 .kid-welcome-text h1{font-size:clamp(33px,9.4vw,42px);margin-bottom:15px;line-height:1.05}
 .kid-start-btn{font-size:14px;gap:9px;min-height:44px;padding:7px 7px 7px 15px}
 .kid-start-btn span{height:28px;width:28px;font-size:10px}
 .kid-welcome-mascot{width:155px;height:162px;margin-right:-25px;margin-top:24px}
 .kid-penguin{width:158px;height:158px}
 .kid-welcome-mascot:before{width:103px;height:103px;left:22px;top:20px}
 .kid-welcome-banner:before{width:188px;height:188px;top:-119px;right:-87px}
 .kid-welcome-banner:after{right:145px;bottom:27px;width:15px;height:15px}
 .kid-sun-doodle{left:53%;font-size:20px;top:12px}
 .kid-section-top{margin:9px 2px 12px}.kid-section-top h2{font-size:21px}
 .kid-sparkles{font-size:17px;letter-spacing:2px}
 .kid-activity-grid{gap:11px}
 .kid-activity-card{border-radius:23px;min-height:202px;padding:13px 8px 10px}
 .kid-card-visual{height:115px}
 .visual-numbers span{font-size:67px}
 .visual-apples svg{height:104px}
 .visual-sum{font-size:59px;gap:5px}.visual-sum b{font-size:40px}
 .visual-shapes{gap:5px}
 .v-triangle{border-left-width:23px;border-right-width:23px;border-bottom-width:48px}
 .v-circle{width:44px;height:44px}.v-square{width:42px;height:42px;border-radius:10px}
 .kid-card-bottom{border-radius:17px;min-height:50px;font-size:13.5px;padding:7px 7px 7px 8px}
 .kid-play-arrow{width:26px;height:26px;font-size:10px}
 .kid-card-spark{font-size:19px;right:13px}
 .kid-bottom-actions{gap:10px;margin-top:15px}
 .kid-round-action{min-height:70px;padding:8px 10px;gap:7px;border-radius:19px;font-size:12.5px}
 .kid-action-emoji{font-size:23px}
 .kid-arrow-small{width:22px;height:22px;font-size:20px}
 .mobile-nav{padding:7px 7px calc(7px + env(safe-area-inset-bottom))}
 .mobile-nav button{min-width:60px;font-size:10px}
 .lesson-tile{padding:13px;min-height:146px}.lesson-tile .title{font-size:14px}
 .tile-icon{width:50px;height:50px;border-radius:17px}.tile-icon svg{width:28px;height:28px}
 .kid-onboarding .welcome-hero{min-height:265px;padding:18px}
 .kid-onboarding .welcome-hero h1{font-size:28px;max-width:260px}
 .kid-onboarding .onboarding-penguin{width:116px!important;height:116px!important;right:0;bottom:-9px}
 .kid-onboarding-logo{font-size:33px}
 .kid-onboarding .onboard-form h2{font-size:23px}
}
@media(max-width:350px){.kid-welcome-mascot{transform:scale(.86);margin-right:-38px}.kid-welcome-text{min-width:164px}.kid-card-bottom{font-size:12px}.kid-round-action{font-size:11px}.kid-activity-card{min-height:196px}}
@media(prefers-reduced-motion:reduce){.kid-activity-card,.kid-start-btn{transition:none}}
