/* Intelectus Matemática V18.6.1 — mobile/responsive stability */
html[data-ifx-product="matematica"] body:before,
html[data-ifx-product="matematica"] .splash,
html[data-ifx-product="matematica"] .v14Hero{background-attachment:scroll!important}
html[data-ifx-product="matematica"] .appShell,
html[data-ifx-product="matematica"] .appShell main{overflow-x:clip!important}
html[data-ifx-product="matematica"] img,
html[data-ifx-product="matematica"] svg{max-width:100%;height:auto}
html[data-ifx-product="matematica"] .appShell>header,
html[data-ifx-product="matematica"] .v14Nav,
html[data-ifx-product="matematica"] #ifx-commerce-fab,
html[data-ifx-product="matematica"] .headerProfile,
html[data-ifx-product="matematica"] .route-onboard>header,
html[data-ifx-product="matematica"] .v14Hero,
html[data-ifx-product="matematica"] .v14Panel,
html[data-ifx-product="matematica"] .lesson,
html[data-ifx-product="matematica"] .micro,
html[data-ifx-product="matematica"] .familySetup{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-ifx-product="matematica"] .appShell>header{background:#fdfefd!important}
html[data-ifx-product="matematica"] .v14Nav{background:#063d2f!important}
html[data-ifx-product="matematica"] .v14Action,
html[data-ifx-product="matematica"] .v14World,
html[data-ifx-product="matematica"] .v14Setting,
html[data-ifx-product="matematica"] .v14Badge,
html[data-ifx-product="matematica"] .v14Reward,
html[data-ifx-product="matematica"] .brandFooter{content-visibility:visible!important;contain-intrinsic-size:none!important}
html[data-ifx-product="matematica"] .heroAiArt,
html[data-ifx-product="matematica"] .splashAiArt,
html[data-ifx-product="matematica"] .v14Hero:after{animation:none!important;translate:none!important}
html[data-ifx-product="matematica"] .missionScene,
html[data-ifx-product="matematica"] .aiExerciseScene,
html[data-ifx-product="matematica"] .castArt,
html[data-ifx-product="matematica"] .worldArt{isolation:isolate}
html[data-ifx-product="matematica"] .missionScene img,
html[data-ifx-product="matematica"] .missionScene svg,
html[data-ifx-product="matematica"] .aiExerciseScene img,
html[data-ifx-product="matematica"] .castArt img,
html[data-ifx-product="matematica"] .worldArt svg{display:block;max-width:100%;height:auto}
html.ifx-layout-resizing[data-ifx-product="matematica"] *,
html.ifx-layout-resizing[data-ifx-product="matematica"] *:before,
html.ifx-layout-resizing[data-ifx-product="matematica"] *:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
html.ifx-layout-resizing[data-ifx-product="matematica"] .missionScene,
html.ifx-layout-resizing[data-ifx-product="matematica"] .aiExerciseScene,
html.ifx-layout-resizing[data-ifx-product="matematica"] .castArt,
html.ifx-layout-resizing[data-ifx-product="matematica"] .heroAiArt,
html.ifx-layout-resizing[data-ifx-product="matematica"] .splashAiArt,
html.ifx-layout-resizing[data-ifx-product="matematica"] .worldArt{opacity:0!important}
@media(max-width:520px){
 html[data-ifx-product="matematica"] .appShell.route-onboard{padding:6px 7px 22px!important}
 html[data-ifx-product="matematica"] .route-onboard>header{top:4px!important;min-height:58px!important;margin-bottom:7px!important;padding:5px 8px!important;border-radius:16px!important}
 html[data-ifx-product="matematica"] .route-onboard>header .v14Logo img{width:min(150px,47vw)!important;max-height:48px!important}
 html[data-ifx-product="matematica"] .route-onboard>header .headerActions{gap:5px!important}
 html[data-ifx-product="matematica"] .route-onboard>header .headerActions button{width:36px!important;min-height:36px!important;height:36px!important;padding:0!important}
 html[data-ifx-product="matematica"] .route-onboard>header .starPill{min-height:36px!important;padding:0 8px!important;font-size:.76rem!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup{padding:15px 12px 18px!important;border-radius:21px!important;margin-bottom:10px!important}
 html[data-ifx-product="matematica"] .route-onboard .steps{gap:5px!important;margin-bottom:9px!important}
 html[data-ifx-product="matematica"] .route-onboard .steps i{height:6px!important}
 html[data-ifx-product="matematica"] .route-onboard .step{min-height:24px!important;margin-bottom:7px!important;padding:4px 9px!important;font-size:.64rem!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup h1{margin-bottom:6px!important;font-size:clamp(1.55rem,7vw,1.9rem)!important;line-height:1.02!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup>p{margin-bottom:9px!important;font-size:.83rem!important;line-height:1.35!important}
 html[data-ifx-product="matematica"] .route-onboard .gradeGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:9px 0 3px!important}
 html[data-ifx-product="matematica"] .route-onboard .gradeGrid .secondary{min-height:50px!important;padding:7px 5px!important;font-size:.76rem!important;border-radius:13px!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterGrid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin:9px 0 3px!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterCard{padding:4px!important;border-radius:13px!important;min-height:0!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterCard .avatarCast{width:100%!important;height:auto!important;aspect-ratio:1!important;border-radius:10px!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterCard b{margin-top:3px!important;font-size:.61rem!important;line-height:1.08!important;min-height:2.15em!important;display:grid!important;place-items:center!important;text-align:center!important}
 html[data-ifx-product="matematica"] .route-onboard .guideFamilyGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin:9px 0 3px!important}
 html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard{padding:5px!important;border-radius:14px!important}
 html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard .teacherCast{width:100%!important;height:auto!important;aspect-ratio:1.18/1!important;min-height:0!important;border-radius:11px!important}
 html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard b{margin-top:3px!important;font-size:.72rem!important}
 html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard small{font-size:.6rem!important;line-height:1.15!important;min-height:2.25em!important}
 html[data-ifx-product="matematica"] .route-onboard .setupActions{grid-template-columns:.8fr 1.2fr!important;gap:7px!important;margin-top:9px!important}
 html[data-ifx-product="matematica"] .route-onboard .setupActions .primary,
 html[data-ifx-product="matematica"] .route-onboard .setupActions .back{min-height:45px!important;padding:7px 8px!important;font-size:.79rem!important;border-radius:13px!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup>.teacherCast{float:left!important;width:72px!important;height:86px!important;max-width:72px!important;max-height:86px!important;margin:0 10px 5px 0!important;border-radius:14px!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup>.teacherCast+h1{padding-top:2px!important}
 html[data-ifx-product="matematica"] .route-onboard .soundCard{clear:both!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:7px 0 2px!important;padding:9px!important;border-radius:15px!important}
 html[data-ifx-product="matematica"] .route-onboard .soundCard>label{margin:0!important}
 html[data-ifx-product="matematica"] .route-onboard .soundCard>label:first-child,
 html[data-ifx-product="matematica"] .route-onboard .soundCard>.soundRow{grid-column:1/-1!important}
 html[data-ifx-product="matematica"] .route-onboard .soundCard select{min-height:40px!important;height:40px!important;font-size:.76rem!important}
 html[data-ifx-product="matematica"] .route-onboard .soundCard .secondary{min-height:38px!important;margin:0!important;padding:5px 4px!important;font-size:.64rem!important;border-radius:11px!important}
 html[data-ifx-product="matematica"] .route-onboard .soundRow{grid-template-columns:56px 1fr 36px!important;gap:6px!important;font-size:.7rem!important}
 html[data-ifx-product="matematica"] .route-onboard .brandFooter{margin-top:9px!important;padding:8px!important}
 html[data-ifx-product="matematica"] .lesson,html[data-ifx-product="matematica"] .micro,html[data-ifx-product="matematica"] .center.narrow{margin:9px auto!important;padding:12px!important;border-radius:21px!important}
 html[data-ifx-product="matematica"] .lessonTop{gap:7px!important}.lessonTop .back{min-height:42px!important;padding:6px 10px!important}
 html[data-ifx-product="matematica"] .dots{margin:8px 0!important}
 html[data-ifx-product="matematica"] .missionScene{border-radius:16px!important;max-height:165px!important;overflow:hidden!important}
 html[data-ifx-product="matematica"] .missionScene .worldArt,html[data-ifx-product="matematica"] .missionScene svg{width:100%!important;max-height:165px!important;object-fit:cover!important}
 html[data-ifx-product="matematica"] .teacherCoach{margin:8px 0!important;padding:8px!important;gap:8px!important;border-radius:15px!important}
 html[data-ifx-product="matematica"] .teacherCoach .teacherCast{width:44px!important;height:44px!important;flex:0 0 44px!important}
 html[data-ifx-product="matematica"] .teacherCoach b{font-size:.78rem!important}.teacherCoach p{font-size:.7rem!important;line-height:1.25!important}
 html[data-ifx-product="matematica"] .instruction h1{font-size:1.22rem!important;line-height:1.08!important}
 html[data-ifx-product="matematica"] .listen{width:46px!important;height:46px!important;border-radius:13px!important}
 html[data-ifx-product="matematica"] .stimulus{min-height:132px!important;padding:12px!important;border-radius:19px!important;font-size:clamp(2rem,10vw,3.1rem)!important}
 html[data-ifx-product="matematica"] .choices{gap:8px!important;margin-top:8px!important}
 html[data-ifx-product="matematica"] .choices button{min-height:68px!important;border-radius:16px!important;font-size:1.2rem!important}
 html[data-ifx-product="matematica"] .helpButton{min-height:44px!important;margin-top:10px!important}
}
@media(max-width:350px){
 html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterGrid{gap:4px!important}
 html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterCard b{font-size:.56rem!important}
 html[data-ifx-product="matematica"] .route-onboard .setupActions .primary,html[data-ifx-product="matematica"] .route-onboard .setupActions .back{font-size:.72rem!important}
}
/* Atividade limpa: checkout nunca cobre exercício, diagnóstico ou microaula */
body:has(.route-diagnostic) #ifx-commerce-fab,
body:has(.route-play) #ifx-commerce-fab,
body:has(.route-microLesson) #ifx-commerce-fab,
body:has(.route-skillLesson) #ifx-commerce-fab,
body:has(.route-end) #ifx-commerce-fab{display:none!important}
@media(max-width:520px){
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard){padding-left:7px!important;padding-right:7px!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header{min-height:62px!important;padding:5px 8px!important;border-radius:17px!important;gap:7px!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .v14Logo img{width:min(145px,42vw)!important;max-height:48px!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .headerProfile{padding:4px 7px 4px 4px!important;gap:5px!important;border-radius:15px!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .headerProfile .castArt{width:32px!important;height:32px!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .headerProfile b{font-size:.68rem!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .headerProfile small{font-size:.53rem!important;white-space:nowrap!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .headerActions{gap:4px!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .headerActions button{width:34px!important;min-height:34px!important;height:34px!important;padding:0!important}
 html[data-ifx-product="matematica"] .appShell:not(.route-splash):not(.route-onboard)>header .starPill{min-height:34px!important;padding:0 6px!important;font-size:.65rem!important}
 html[data-ifx-product="matematica"] .v14Nav{width:calc(100% - 10px)!important;padding:5px!important;gap:3px!important;border-radius:20px!important}
 html[data-ifx-product="matematica"] .v14Nav button{min-height:50px!important;padding:4px 2px!important;border-radius:14px!important}
 html[data-ifx-product="matematica"] .v14Nav button .ico{font-size:1.05rem!important}
 html[data-ifx-product="matematica"] .v14Nav button span:last-child{font-size:.5rem!important}
 html[data-ifx-product="matematica"] .v14Hero{min-height:370px!important;padding:17px!important;border-radius:23px!important}
 html[data-ifx-product="matematica"] .v14HeroCopy{width:100%!important;padding-bottom:145px!important}
 html[data-ifx-product="matematica"] .v14Hero h1{font-size:2rem!important;margin:10px 0 8px!important}
 html[data-ifx-product="matematica"] .v14Hero p{font-size:.84rem!important;line-height:1.38!important}
 html[data-ifx-product="matematica"] .heroAiArt{width:175px!important;max-width:52vw!important;right:50%!important;transform:translateX(50%)!important}
 html[data-ifx-product="matematica"] .v14Grid2{grid-template-columns:1fr!important;gap:8px!important;margin-top:9px!important}
 html[data-ifx-product="matematica"] .v14QuickGrid{grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:8px!important}
 html[data-ifx-product="matematica"] .v14QuickGrid>.v14Action:last-child{grid-column:1/-1!important}
 html[data-ifx-product="matematica"] .v14Action{min-height:112px!important;padding:12px!important;border-radius:18px!important}
 html[data-ifx-product="matematica"] .aiCardIcon{width:58px!important;height:58px!important;margin-bottom:4px!important}
 html[data-ifx-product="matematica"] .v14Action b{font-size:.92rem!important}.v14Action small{font-size:.67rem!important;line-height:1.25!important;margin-top:3px!important}
 html[data-ifx-product="matematica"] .v14Worlds{grid-template-columns:1fr 1fr!important;gap:7px!important}
 html[data-ifx-product="matematica"] .v14World{border-radius:16px!important}.v14World .worldMeta{padding:8px!important}.v14World b{font-size:.74rem!important}.v14World small{font-size:.6rem!important}
 html[data-ifx-product="matematica"] .v14SectionHead{margin:17px 2px 8px!important}.v14SectionHead h2{font-size:1.16rem!important}.v14SectionHead span{font-size:.62rem!important}
 html[data-ifx-product="matematica"] .v14GradeGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.v14GradeCard{min-height:104px!important;padding:10px!important;border-radius:17px!important}.v14GradeCard span{font-size:1.55rem!important}.v14GradeCard b{font-size:.82rem!important}.v14GradeCard small{font-size:.58rem!important}
 html[data-ifx-product="matematica"] .v14Stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.v14Stat{padding:10px 5px!important;border-radius:15px!important}.v14Stat b{font-size:1.25rem!important}.v14Stat span{font-size:.58rem!important}
 html[data-ifx-product="matematica"] .v14RewardGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.v14Reward{padding:10px!important;border-radius:16px!important}.v14Reward .bigIcon{font-size:1.8rem!important}
 html[data-ifx-product="matematica"] .v14BadgeGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.v14Badge{padding:10px!important;border-radius:16px!important}.v14Badge span{font-size:1.8rem!important}
 html[data-ifx-product="matematica"] .v14SettingsGrid{grid-template-columns:1fr!important;gap:8px!important}.v14Setting{padding:13px!important;border-radius:17px!important}
}
.heroAvatarArt{display:grid!important;place-items:end center!important;background:transparent!important}
.heroAvatarArt img{width:100%!important;height:auto!important;object-fit:contain!important;object-position:center bottom!important;border-radius:28px 28px 12px 12px!important;box-shadow:none!important}
@media(max-width:520px){
 html[data-ifx-product="matematica"] #ifx-commerce-fab{display:none!important}
 html[data-ifx-product="matematica"] .heroAvatarArt{width:152px!important;max-width:46vw!important;bottom:0!important}
 html[data-ifx-product="matematica"] .heroAvatarArt img{max-height:150px!important}
}
.splashAvatarArt{object-fit:cover!important;object-position:center top!important;background:#f0f9f4!important;box-shadow:0 12px 28px rgba(16,91,58,.12)!important}
@media(max-width:520px){.splashAvatarArt{width:160px!important;max-width:50vw!important;height:160px!important;border-radius:24px!important}}
/* Correção estrutural: a arte de cada trilha nunca ultrapassa os limites do próprio card */
html[data-ifx-product="matematica"] .v14World .worldArt{width:100%!important;margin:0!important;max-width:100%!important;overflow:hidden!important}
html[data-ifx-product="matematica"] .v14World .worldArt svg{width:100%!important;max-width:100%!important;margin:0!important}

/* V18.6.2 — header profile: nome da criança e guia em linhas independentes */
html[data-ifx-product="matematica"] .appShell:not(.route-splash)>header .headerProfile{
  display:flex!important;align-items:center!important;gap:10px!important;
  min-height:64px!important;min-width:190px!important;max-width:280px!important;
  padding:8px 14px 8px 8px!important;border-radius:20px!important;
  overflow:hidden!important;flex:0 1 auto!important;
}
html[data-ifx-product="matematica"] .appShell:not(.route-splash)>header .headerProfile>.castArt{
  width:46px!important;height:46px!important;flex:0 0 46px!important;margin:0!important;
}
html[data-ifx-product="matematica"] .appShell:not(.route-splash)>header .headerProfile>.headerProfileText{
  display:flex!important;flex-direction:column!important;justify-content:center!important;
  align-items:flex-start!important;gap:4px!important;min-width:0!important;
  line-height:1!important;overflow:hidden!important;
}
html[data-ifx-product="matematica"] .appShell:not(.route-splash)>header .headerProfile>.headerProfileText>b{
  display:block!important;margin:0!important;padding:0!important;
  color:#f7fff9!important;font-size:.94rem!important;font-weight:900!important;
  line-height:1.12!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html[data-ifx-product="matematica"] .appShell:not(.route-splash)>header .headerProfile>.headerProfileText>small{
  display:block!important;margin:0!important;padding:0!important;
  color:#d6eee3!important;font-size:.72rem!important;font-weight:700!important;
  line-height:1.22!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
@media(max-width:820px){
  html[data-ifx-product="matematica"] .appShell:not(.route-splash)>header .headerProfile{display:none!important}
}

/* V18.6.3 — logo centralizado + onboarding móvel rolável */
html[data-ifx-product="matematica"] .route-onboard>header{
  position:sticky!important;display:grid!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center!important;min-height:94px!important;padding:8px 12px!important;
}
html[data-ifx-product="matematica"] .route-onboard>header .v14Logo{
  grid-column:2!important;justify-self:center!important;display:flex!important;
  align-items:center!important;justify-content:center!important;width:auto!important;
  min-height:0!important;height:auto!important;overflow:visible!important;margin:0!important;
}
html[data-ifx-product="matematica"] .route-onboard>header .v14Logo img{
  display:block!important;width:min(280px,48vw)!important;max-width:none!important;
  max-height:78px!important;height:auto!important;margin:0 auto!important;
  object-fit:contain!important;object-position:center!important;
}
html[data-ifx-product="matematica"] .route-onboard>header .headerActions{
  grid-column:3!important;justify-self:end!important;margin-left:0!important;
}
html:has(.route-onboard),body:has(.route-onboard){
  height:auto!important;min-height:100%!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;scroll-behavior:smooth;
}
body:has(.route-onboard) #app,
html[data-ifx-product="matematica"] .appShell.route-onboard,
html[data-ifx-product="matematica"] .route-onboard main{
  height:auto!important;min-height:100dvh!important;max-height:none!important;
  overflow-y:visible!important;overflow-x:hidden!important;touch-action:pan-y!important;
}
html[data-ifx-product="matematica"] .route-onboard main{min-height:0!important;padding-bottom:calc(44px + env(safe-area-inset-bottom))!important}
html[data-ifx-product="matematica"] .route-onboard .familySetup{height:auto!important;max-height:none!important;overflow:visible!important}
@media(max-width:760px){
  html[data-ifx-product="matematica"] .route-onboard>header{min-height:84px!important;padding:7px 10px!important}
  html[data-ifx-product="matematica"] .route-onboard>header .v14Logo img{width:min(230px,52vw)!important;max-height:70px!important}
}
@media(max-width:520px){
  html[data-ifx-product="matematica"] .appShell.route-onboard{padding-bottom:calc(44px + env(safe-area-inset-bottom))!important}
  html[data-ifx-product="matematica"] .route-onboard>header{top:4px!important;min-height:78px!important;padding:6px 8px!important}
  html[data-ifx-product="matematica"] .route-onboard>header .v14Logo img{width:min(190px,49vw)!important;max-height:64px!important}
  html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterGrid,
  html[data-ifx-product="matematica"] .route-onboard .guideFamilyGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:12px 0 8px!important}
  html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterCard,
  html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard{padding:7px!important;border-radius:17px!important}
  html[data-ifx-product="matematica"] .route-onboard .familySetup:has([data-avatar]) .familyCharacterCard b{font-size:.78rem!important;min-height:1.35em!important;margin-top:6px!important}
  html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard b{font-size:.8rem!important;margin-top:5px!important}
  html[data-ifx-product="matematica"] .route-onboard .guideFamilyCard small{font-size:.68rem!important;min-height:2.3em!important}
}
@media(max-width:360px){
  html[data-ifx-product="matematica"] .route-onboard>header .v14Logo img{width:min(172px,50vw)!important}
}

/* V18.6.4 · single commercial CTA on splash */
html[data-ifx-product="matematica"] .route-splash #ifx-commerce-inline{display:none!important}
