:root{--nav-navy:#040638;--nav-line:#dbe4ec;--nav-text:#172033;--nav-muted:#64748b;--nav-green:#35c892;--nav-progress-neon:#39ff14;--nav-blue:#5ca6ec}
/* Child screens previously inherited these baseline styles from the legacy
   WordPress theme. Own them here so standalone and shortcode routes agree. */
:where(.math-nav-shell,.math-game){font-weight:200;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
:where(.math-nav-shell,.math-game,.math-nav-shell *,.math-game *,.math-nav-shell::before,.math-nav-shell::after,.math-game::before,.math-game::after,.math-nav-shell *::before,.math-nav-shell *::after,.math-game *::before,.math-game *::after){box-sizing:border-box}
:where(.math-nav-shell,.math-game) :where(p){margin-block-start:0;margin-block-end:.9rem}
:where(.math-nav-shell,.math-game) :where(img){max-width:100%;height:auto;border-style:none}
html:has(.math-nav-shell),body:has(.math-nav-shell){margin:0!important;background:var(--nav-navy)!important}html:has(.math-game),body:has(.math-game){margin:0!important;background:#fff!important}
html:after{content:"";position:fixed;z-index:1000000;inset:0;pointer-events:none;opacity:0;background:var(--nav-navy);transition:opacity .28s cubic-bezier(.22,1,.36,1)}
html.math-page-is-entering:after,html.math-page-is-leaving:after{pointer-events:auto;opacity:1}
.math-nav-shell,.math-game{transition:opacity .22s ease,transform .3s cubic-bezier(.22,1,.36,1)}
.math-page-is-leaving .math-nav-shell,.math-page-is-leaving .math-game{opacity:.72;transform:scale(.992)}
@view-transition{navigation:auto}
::view-transition-old(root){animation:math-page-old .22s ease both}
::view-transition-new(root){animation:math-page-new .34s cubic-bezier(.22,1,.36,1) both}
@keyframes math-page-old{to{opacity:0;transform:scale(.994)}}
@keyframes math-page-new{from{opacity:0;transform:scale(1.006)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){html:after,.math-nav-shell,.math-game{transition:none!important}::view-transition-old(root),::view-transition-new(root){animation:none}}
.math-nav-shell,.math-nav-shell *{box-sizing:border-box}
.math-nav-shell{position:fixed;z-index:99998;inset:0;display:grid;grid-template-columns:30% minmax(0,1fr) 140px;width:100vw;height:100svh;overflow:hidden;color:var(--nav-text);background:#fff;font-family:system-ui,sans-serif}
.math-nav-shell.math-menu-screen{display:flex;flex-direction:column;gap:clamp(14px,2vh,24px);padding:clamp(18px,2.6vw,38px);background:var(--nav-navy)}
.math-menu-topbar{display:flex;flex:0 0 auto;width:100%;align-items:center;justify-content:space-between;gap:18px}
.math-menu-topbar-left{display:flex;align-items:center;gap:12px}
.math-menu-content{display:flex;min-width:0;min-height:0;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:clamp(18px,2.8vh,30px);padding:0 clamp(8px,2vw,28px) clamp(10px,2vh,24px)}
.math-menu-content .math-menu-prompt{margin:0;text-align:center}
.math-menu-prompt p,.math-menu-prompt h1{max-width:none;margin:0;text-align:center}
.math-menu-prompt p{font-size:clamp(1.1rem,2vw,1.45rem)}
.math-menu-prompt h1{margin-top:3px;font-size:clamp(1.25rem,2.25vw,1.7rem);font-weight:700}
.math-menu-settings{width:46px;height:46px;border:1px solid rgba(255,255,255,.26);border-radius:13px;background:rgba(255,255,255,.14);color:#fff;box-shadow:none;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:transform .18s ease,background .18s ease}
.math-menu-settings:hover,.math-menu-settings:focus-visible{transform:scale(1.05);background:rgba(255,255,255,.23)}
.math-menu-back{flex:0 0 auto;align-self:auto}
.math-topic-screen{grid-template-columns:30% minmax(0,1fr)}
.math-topic-screen,.math-lessons-screen,.math-topic-screen .math-nav-zone,.math-lessons-screen .math-nav-zone{background:var(--nav-navy)}
.math-topic-screen .math-nav-zone-b,.math-lessons-screen .math-nav-zone-b{position:relative}
.math-topic-screen .math-nav-zone-a,.math-lessons-screen .math-nav-zone-a{border-right-color:rgba(255,255,255,.1)}
.math-lessons-screen .math-nav-zone-c{border-left-color:rgba(255,255,255,.1)}
.math-nav-zone{min-width:0;min-height:0;overflow:hidden}
.math-nav-zone-a{position:relative;display:flex;flex-direction:column;gap:1rem;padding:2rem;color:#fff;background:var(--nav-navy);border-right:1px solid rgba(255,255,255,.08)}
.math-nav-tutor-copy{margin:auto 0;white-space:normal}
.math-nav-tutor-copy p,.math-nav-tutor-copy h1{margin:0;color:#fff;font-size:clamp(1rem,2.2vw,1.35rem);font-weight:400;line-height:1.55}
.math-nav-tutor-copy h1{max-width:22ch}
.math-nav-back{align-self:flex-start;width:52px!important;height:52px!important;padding:0!important;border:1px solid rgba(255,255,255,.28)!important;border-radius:14px!important;color:#fff!important;background:rgba(255,255,255,.14)!important;box-shadow:none!important;font-size:1.35rem!important;font-weight:500!important;text-decoration:none!important}
.math-nav-zone-b{display:grid;place-items:center;padding:clamp(20px,3vw,48px);background:#fff}
.math-nav-zone-c{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.8rem;padding:2rem 1rem;background:#fff;border-left:1px solid var(--nav-line)}
.math-css-profile{display:flex;align-items:center;gap:12px;color:#fff}
.math-dashboard-profile-row{display:flex;align-items:center;gap:12px}
.math-dashboard-profile-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px}
.math-dashboard-profile-actions .math-css-tool{width:42px;height:42px;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.14);color:#fff;box-shadow:none;font-size:1.1rem}
.math-dashboard-profile-actions .math-css-settings span{width:19px;height:19px;border-width:3px}
.math-dashboard-profile-actions .math-css-settings span:after{inset:8px;border-width:1px}
.math-screen-settings{position:absolute;z-index:4;top:clamp(18px,2.3vw,34px);right:clamp(18px,2.3vw,34px);border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.14);color:#fff;box-shadow:0 10px 30px rgba(0,0,0,.16);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:transform .18s ease,background .18s ease}.math-screen-settings:hover,.math-screen-settings:focus-visible{transform:scale(1.05);background:rgba(255,255,255,.23)}
.math-settings-overlay{position:fixed;z-index:999999;inset:0;display:grid;place-items:center;padding:clamp(18px,4vw,56px);opacity:0;background:rgba(8,4,81,.8);backdrop-filter:blur(18px) saturate(125%);-webkit-backdrop-filter:blur(18px) saturate(125%);transition:opacity .28s cubic-bezier(.22,1,.36,1)}
.math-settings-overlay[hidden]{display:none}
.math-settings-overlay.is-open{opacity:1}
.math-settings-panel{width:min(92vw,620px);padding:clamp(22px,3vw,36px);border:1px solid rgba(255,255,255,.32);border-radius:clamp(24px,3vw,34px);background:linear-gradient(145deg,rgba(255,255,255,.24),rgba(255,255,255,.12));box-shadow:0 30px 80px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.42);color:#fff;opacity:0;transform:translateY(18px) scale(.97);transition:opacity .25s ease,transform .38s cubic-bezier(.22,1,.36,1)}
.math-settings-overlay.is-open .math-settings-panel{opacity:1;transform:translateY(0) scale(1)}
.math-settings-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.math-settings-header small{display:block;margin-bottom:5px;color:rgba(255,255,255,.66);font-size:.78rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.math-settings-header h2{margin:0;color:#fff;font-size:clamp(1.35rem,2.5vw,2rem);font-weight:750;line-height:1.2}.math-settings-close{display:grid;flex:0 0 auto;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(255,255,255,.28);border-radius:14px;background:rgba(255,255,255,.12);color:#fff;font:300 2rem/1 system-ui;cursor:pointer;transition:transform .18s ease,background .18s ease}.math-settings-close:hover,.math-settings-close:focus-visible{transform:scale(1.06);background:rgba(255,255,255,.22)}
.math-language-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.math-language-list:has(.math-language-option:only-child){grid-template-columns:1fr}.math-language-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;min-height:72px;padding:12px 16px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:rgba(255,255,255,.1);color:#fff!important;text-decoration:none!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.2);transition:transform .2s cubic-bezier(.22,1,.36,1),background .2s ease,border-color .2s ease}.math-language-option:hover,.math-language-option:focus-visible{transform:translateY(-2px);border-color:rgba(255,255,255,.48);background:rgba(255,255,255,.18)}.math-language-option.is-selected{border-color:var(--nav-progress-neon);background:rgba(57,255,20,.14);box-shadow:0 0 0 1px rgba(57,255,20,.2),inset 0 1px 0 rgba(255,255,255,.24)}.math-language-code{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.16);font-size:.74rem;font-weight:850;letter-spacing:.06em}.math-language-name{font-size:1rem;font-weight:700}.math-language-check{color:var(--nav-progress-neon);font-size:1.1rem;font-weight:900;opacity:0}.math-language-option.is-selected .math-language-check{opacity:1}.math-settings-note{margin:20px 0 0;color:rgba(255,255,255,.6);font-size:.78rem;text-align:center}
.math-settings-switch-profile{display:flex;width:100%;min-height:64px;margin-top:12px;padding:12px 16px;align-items:center;gap:13px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:rgba(255,255,255,.1);color:#fff;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.2);transition:transform .2s cubic-bezier(.22,1,.36,1),background .2s ease,border-color .2s ease}.math-settings-switch-profile:hover,.math-settings-switch-profile:focus-visible{transform:translateY(-2px);border-color:rgba(255,255,255,.48);background:rgba(255,255,255,.18)}.math-settings-switch-profile span{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.16);font-size:1.2rem}.math-settings-switch-profile strong{font-size:1rem}
@media(max-width:560px){.math-settings-overlay{padding:14px}.math-settings-panel{padding:20px;border-radius:24px}.math-language-list{grid-template-columns:1fr}.math-settings-header{margin-bottom:18px}.math-language-option{min-height:64px}}
.math-css-profile>span:last-child{display:flex;flex-direction:column}.math-css-profile small{font-size:.72rem;color:rgba(255,255,255,.7)}.math-css-profile strong{font-size:1rem;color:#fff}
.math-css-avatar{position:relative;display:grid;place-items:center;width:52px;height:52px;border:3px solid #63df9a;border-radius:50%;background:#536def;box-shadow:0 0 0 2px rgba(255,255,255,.9)}
.math-css-avatar:before{content:"";width:31px;height:25px;border:4px solid #ff5c22;border-radius:9px;background:#21192f}
.math-css-avatar i,.math-css-avatar b{position:absolute;top:23px;width:5px;height:5px;border-radius:50%;background:#fff}.math-css-avatar i{left:17px}.math-css-avatar b{right:17px}
.math-css-tool{position:relative;display:grid;place-items:center;width:54px;height:54px;padding:0;border:0;border-radius:15px;background:#f0f4f8;color:#263a54;font-size:1.4rem;font-weight:800;box-shadow:0 3px 10px rgba(26,48,74,.11);cursor:pointer}
.math-css-settings span{width:23px;height:23px;border:4px solid currentColor;border-radius:50%}.math-css-settings span:after{content:"";position:absolute;inset:10px;border:2px dashed currentColor;border-radius:50%}
.math-topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(18px,2.6vw,38px);width:min(100%,850px)}
.math-topic-item{display:flex;min-width:0;align-items:center;justify-content:center}
.math-topic-tile{position:relative;isolation:isolate;display:grid;width:min(100%,clamp(150px,18vw,220px));aspect-ratio:1;margin:auto;padding:clamp(20px,2.4vw,30px);place-items:center;border:0;border-radius:50%;background:conic-gradient(from 180deg,var(--nav-progress-neon) calc(var(--topic-progress,0) * 1%),#b9c0c8 0);color:var(--nav-text)!important;text-decoration:none!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 12px 28px rgba(0,0,0,.13)!important;backdrop-filter:blur(14px) saturate(130%);-webkit-backdrop-filter:blur(14px) saturate(130%);transition:transform .22s cubic-bezier(.22,1,.36,1),filter .2s ease,box-shadow .2s ease}
.math-topic-tile:before{content:"";position:absolute;z-index:-1;inset:clamp(8px,.8vw,12px);border-radius:50%;background:linear-gradient(145deg,rgba(65,59,139,.96),rgba(20,17,89,.96) 55%,rgba(27,24,96,.96));box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 1px 0 0 rgba(255,255,255,.08)}
.math-topic-tile:hover,.math-topic-tile:focus-visible{transform:translateY(-5px) scale(1.015);box-shadow:inset 0 1px 0 rgba(255,255,255,.42),0 18px 34px rgba(0,0,0,.2)!important;filter:brightness(1.08)}
.math-topic-symbol{position:absolute;inset:clamp(8px,.8vw,12px);display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;border-radius:50%;background:linear-gradient(145deg,rgba(65,59,139,.78),rgba(20,17,89,.82) 55%,rgba(27,24,96,.86));color:#436cff;font-style:normal;box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 1px 0 0 rgba(255,255,255,.08);backdrop-filter:blur(14px) saturate(130%);-webkit-backdrop-filter:blur(14px) saturate(130%)}
.math-topic-symbol img{display:block;width:70%;height:70%;object-fit:contain}
.math-topic-art{position:absolute;inset:15%;transition:opacity .38s cubic-bezier(.22,1,.36,1),transform .48s cubic-bezier(.22,1,.36,1);will-change:opacity,transform}
.math-topic-art-default{width:78%!important;height:78%!important;inset:11%;opacity:1;transform:scale(1)}
.math-topic-art-hover{width:70%!important;height:70%!important;inset:15%;opacity:0;transform:scale(.9) translateY(3%)}
.math-topic-tile:hover .math-topic-art-default,.math-topic-tile:focus-visible .math-topic-art-default{opacity:0;transform:scale(.94)}
.math-topic-tile:hover .math-topic-art-hover,.math-topic-tile:focus-visible .math-topic-art-hover{opacity:1;transform:scale(1) translateY(0)}
@media(prefers-reduced-motion:reduce){.math-topic-art{transition:none}.math-topic-tile{transition:none}}
.math-topic-symbol b,.math-topic-symbol em{font-size:clamp(1.5rem,2.6vw,2.3rem);font-style:normal;line-height:1}.math-topic-symbol em{color:#35c892}.math-topic-symbol b:nth-of-type(2){color:#ef5350}.math-topic-symbol .gear-text{font-size:2.6rem}
.math-topic-symbol .shape-circle,.math-topic-symbol .shape-square,.math-topic-symbol .shape-triangle{position:absolute;display:block;width:34px;height:34px}.math-topic-symbol .shape-circle{left:14px;top:14px;border-radius:50%;background:#ef5350}.math-topic-symbol .shape-square{right:14px;bottom:14px;background:#436cff;transform:rotate(9deg)}.math-topic-symbol .shape-triangle{right:14px;top:14px;width:0;height:0;border-right:17px solid transparent;border-bottom:31px solid #35c892;border-left:17px solid transparent}
.math-lesson-grid-new{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(14px,2vw,24px);width:min(100%,780px)}
.math-lesson-tile{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px;min-height:clamp(108px,16vh,150px);padding:18px 22px;border:1px solid #dce5ee;border-radius:22px;background:#fff;color:var(--nav-text)!important;text-decoration:none!important;box-shadow:0 7px 20px rgba(26,48,74,.08);transition:transform .18s ease,box-shadow .18s ease}
.math-lesson-tile:not(.is-locked):hover{transform:translateY(-3px);box-shadow:0 11px 25px rgba(26,48,74,.13)}
.math-lesson-tile.is-locked{opacity:.52;background:#f7f9fb}
.math-lesson-index{display:grid;place-items:center;width:58px;height:58px;border-radius:17px;background:#eef4ff;color:#436cff;font-size:1.65rem;font-weight:900}
.math-lesson-copy{display:flex;min-width:0;flex-direction:column;gap:5px}.math-lesson-copy strong{color:var(--nav-text)!important;font-size:clamp(.9rem,1.25vw,1.08rem);line-height:1.2}.math-lesson-copy small{color:var(--nav-muted);font-size:.77rem}.math-lesson-status{position:absolute;top:10px;right:12px;color:#179a68;font-weight:900}
.math-zone-progress{display:flex;flex-direction:column;gap:9px}.math-zone-progress i{display:block;width:11px;height:11px;border:2px solid #aebdca;border-radius:50%}.math-zone-progress i.is-done{border-color:var(--nav-green);background:var(--nav-green)}
@media(max-width:1024px) and (orientation:landscape){.math-nav-shell{grid-template-columns:minmax(210px,30%) minmax(0,1fr) 76px}.math-topic-screen{grid-template-columns:minmax(210px,30%) minmax(0,1fr)}.math-nav-zone-a{padding:1.15rem}.math-nav-zone-b{padding:12px}.math-nav-zone-c{padding:.75rem .5rem}.math-nav-back{width:42px!important;height:42px!important}.math-css-tool{width:46px;height:46px}.math-screen-settings{top:12px;right:12px}.math-dashboard-profile-actions{gap:5px}.math-dashboard-profile-actions .math-css-tool{width:36px;height:36px;border-radius:10px}.math-dashboard-profile-actions .math-css-settings span{width:16px;height:16px}.math-dashboard-profile-actions .math-css-settings span:after{inset:7px}.math-topic-grid{gap:10px}.math-topic-tile{width:min(100%,150px);padding:16px}.math-topic-tile:before,.math-topic-symbol{inset:8px}.math-topic-symbol b,.math-topic-symbol em{font-size:1.12rem}.math-topic-symbol .shape-circle,.math-topic-symbol .shape-square{width:21px;height:21px}.math-topic-symbol .shape-circle{left:9px;top:9px}.math-topic-symbol .shape-square{right:9px;bottom:9px}.math-topic-symbol .shape-triangle{right:8px;top:8px;border-right-width:11px;border-bottom-width:20px;border-left-width:11px}.math-lesson-grid-new{gap:10px}.math-lesson-tile{min-height:100px;padding:12px;gap:10px;border-radius:17px}.math-lesson-index{width:46px;height:46px;border-radius:13px;font-size:1.25rem}.math-lesson-copy strong{font-size:.82rem}}
@media(max-width:760px) and (orientation:landscape){.math-topic-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.math-lesson-grid-new{grid-template-columns:repeat(2,minmax(0,1fr))}.math-css-profile>span:last-child{display:none}}
@media(max-width:760px) and (orientation:portrait){.math-nav-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr}.math-nav-zone-a{min-height:185px;padding:1.2rem}.math-nav-zone-c{display:none}.math-nav-zone-b{padding:16px;overflow:auto}.math-topic-grid,.math-lesson-grid-new{grid-template-columns:repeat(2,minmax(0,1fr))}.math-topic-tile{width:min(100%,180px)}.math-nav-tutor-copy{margin-top:28px}.math-nav-back{width:42px!important;height:42px!important}}
@media(max-width:760px) and (orientation:portrait){.math-nav-shell.math-menu-screen{display:flex;padding:16px}.math-menu-content{justify-content:center;gap:18px;padding:0 0 12px;overflow:auto}.math-menu-content .math-menu-prompt{margin:0}.math-menu-prompt p{font-size:1.08rem}.math-menu-prompt h1{font-size:1.24rem}.math-menu-screen .math-topic-grid,.math-menu-screen .math-lesson-grid-new{width:min(100%,470px)}.math-menu-screen .math-topic-tile{width:min(100%,160px)}.math-menu-screen .math-lesson-tile{min-height:94px;padding:13px}.math-menu-screen .math-nav-back{width:44px!important;height:44px!important}}
@media(max-height:520px) and (orientation:landscape){.math-nav-shell.math-menu-screen{display:flex;gap:8px;padding:10px 14px}.math-menu-content{gap:8px;padding:0 6px 4px}.math-menu-content .math-menu-prompt{margin:0}.math-menu-prompt p{font-size:1rem}.math-menu-prompt h1{font-size:1.12rem}.math-menu-screen .math-css-avatar{width:42px;height:42px}.math-menu-screen .math-css-avatar:before{transform:scale(.82)}.math-menu-screen .math-css-avatar i,.math-menu-screen .math-css-avatar b{top:18px}.math-menu-screen .math-css-avatar i{left:12px}.math-menu-screen .math-css-avatar b{right:12px}.math-menu-screen .math-topic-tile{width:min(100%,126px)}.math-menu-screen .math-lesson-tile{min-height:76px;padding:8px 11px}.math-menu-screen .math-lesson-index{width:40px;height:40px}.math-menu-settings{width:40px;height:40px}.math-menu-screen .math-nav-back{width:40px!important;height:40px!important}}

/* Full-screen menu composition based on the dashboard and lesson JPG references. */
.math-nav-shell.math-menu-screen{position:fixed;display:flex;padding:clamp(24px,3.8vw,72px);background:var(--nav-navy)}
.math-menu-topbar{position:absolute;z-index:5;top:clamp(24px,3vw,58px);right:clamp(24px,3.8vw,72px);left:clamp(24px,3.8vw,72px);width:auto;pointer-events:none}
.math-menu-topbar-left,.math-menu-back{pointer-events:auto}
.math-menu-topbar-left{gap:clamp(14px,1.5vw,28px)}
.math-menu-screen .math-css-profile{display:block}
.math-menu-profile-image{position:relative;isolation:isolate;display:grid;width:clamp(82px,9.2vw,176px);aspect-ratio:1;padding:clamp(10px,.9vw,17px);place-items:center;overflow:hidden;border-radius:50%;background:conic-gradient(from 145deg,#ef6af1 0 20%,#ff642d 20% 39%,#58f58a 39% 61%,#53a9ff 61% 82%,#ef6af1 82% 100%);box-shadow:0 6px 18px rgba(0,0,0,.18)}
.math-menu-profile-image:before{content:"";position:absolute;z-index:-1;inset:clamp(6px,.52vw,10px);border:clamp(5px,.48vw,9px) solid #526df1;border-radius:50%;background:#526df1}
.math-profile-robot{position:relative;display:block;width:78%;height:78%;margin-top:3%;filter:drop-shadow(0 3px 2px rgba(17,11,58,.18))}
.math-profile-robot:before{content:"";position:absolute;z-index:2;top:13%;left:5%;width:90%;height:58%;box-sizing:border-box;border:clamp(5px,.55vw,10px) solid #ff642d;border-radius:44% 48% 39% 42%;background:#241c31;box-shadow:clamp(-7px,-.45vw,-4px) 7px 0 -2px #282036,clamp(4px,.45vw,7px) 4px 0 -2px #282036;transform:rotate(-7deg)}
.math-profile-robot:after{content:"";position:absolute;z-index:1;bottom:0;left:27%;width:48%;height:34%;border-radius:46% 46% 23% 23%;background:#ff642d;box-shadow:clamp(-18px,-1.15vw,-10px) 9px 0 -7px #ff642d,clamp(11px,1.2vw,19px) 5px 0 -7px #ff642d}
.math-profile-robot i{position:absolute;z-index:4;top:39%;left:22%;width:17%;height:13%;border-radius:65% 65% 30% 30%;background:#fff;box-shadow:clamp(25px,2.9vw,56px) -3px 0 -1px #fff;transform:rotate(-7deg)}
.math-profile-robot b{position:absolute;z-index:4;top:49%;left:48%;width:8%;height:5%;border-radius:0 0 999px 999px;background:#fff;transform:rotate(-7deg)}
.math-profile-robot em{position:absolute;z-index:3;top:2%;left:47%;width:12%;height:25%;border-radius:999px;background:#ff642d;transform:rotate(47deg);transform-origin:bottom center}
.math-menu-settings{display:grid!important;width:clamp(64px,6.2vw,118px)!important;min-width:0!important;height:clamp(64px,6.2vw,118px)!important;padding:0!important;place-items:center;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible;backdrop-filter:none;-webkit-backdrop-filter:none}
.math-menu-settings:hover,.math-menu-settings:focus-visible{background:transparent;transform:scale(1.05)}
.math-menu-settings>img{display:block!important;width:100%!important;max-width:none!important;height:100%!important;object-fit:contain}
.math-menu-screen .math-menu-content{display:grid;width:min(100%,1480px);margin:auto;padding:clamp(132px,14vh,180px) 0 clamp(24px,4vh,54px);grid-template-columns:minmax(320px,.75fr) minmax(560px,1.25fr);align-items:center;justify-content:center;gap:clamp(44px,6vw,120px);overflow:auto}
.math-menu-content .math-menu-prompt{justify-self:start;text-align:left}
.math-menu-prompt p{max-width:none;color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;font-size:clamp(1.35rem,1.8vw,2rem);font-weight:850;line-height:1.25;letter-spacing:.01em;text-align:left;white-space:nowrap}
.math-menu-screen .math-topic-grid{justify-self:center;width:min(100%,760px);grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(22px,2.4vw,42px)}
.math-menu-screen .math-topic-tile{width:min(100%,clamp(150px,12vw,220px))}
.math-menu-screen .math-lesson-grid-new{justify-self:center;width:min(100%,692px);grid-template-columns:repeat(3,minmax(0,204px));justify-content:center;gap:clamp(24px,2.2vw,40px)}
.math-menu-screen .math-lesson-tile{--lesson-border-top:#929292;--lesson-border-bottom:#b8b8b8;position:relative;isolation:isolate;container-type:inline-size;display:grid;width:100%;max-width:204px;min-width:0;height:auto;min-height:0;aspect-ratio:204/274;padding:0;grid-template-columns:1fr;grid-template-rows:1fr;place-items:center;border:5px solid transparent;border-radius:10px;background:linear-gradient(145deg,#29256a,#141159 55%,#1b1860) padding-box,linear-gradient(180deg,var(--lesson-border-top),var(--lesson-border-bottom)) border-box;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 1px 0 0 rgba(255,255,255,.08),0 12px 28px rgba(0,0,0,.13);overflow:hidden;backdrop-filter:blur(14px) saturate(130%);-webkit-backdrop-filter:blur(14px) saturate(130%);transition:transform .22s cubic-bezier(.22,1,.36,1),filter .2s ease,box-shadow .2s ease}
.math-menu-screen .math-lesson-tile.is-progress{--lesson-border-top:#fff600;--lesson-border-bottom:#fffcad;box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 0 20px rgba(255,245,0,.12),0 12px 28px rgba(0,0,0,.13)}
.math-menu-screen .math-lesson-tile.is-mastered{--lesson-border-top:#35ff32;--lesson-border-bottom:#adffae;box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 0 22px rgba(53,255,50,.14),0 12px 28px rgba(0,0,0,.13)}
.math-menu-screen .math-lesson-tile.is-not-started{--lesson-border-top:#929292;--lesson-border-bottom:#b8b8b8}
.math-menu-screen .math-lesson-tile.is-locked{--lesson-border-top:#777;--lesson-border-bottom:#aaa;opacity:1;background:linear-gradient(145deg,#1c195f,#100d56) padding-box,linear-gradient(180deg,var(--lesson-border-top),var(--lesson-border-bottom)) border-box;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 10px 24px rgba(0,0,0,.1)}
.math-menu-screen .math-lesson-tile:not(.is-locked):hover,.math-menu-screen .math-lesson-tile:not(.is-locked):focus-visible{transform:translateY(-5px) scale(1.015);box-shadow:inset 0 1px 0 rgba(255,255,255,.42),0 18px 34px rgba(0,0,0,.2);filter:brightness(1.08)}
.math-lesson-decoration{position:absolute;z-index:0;inset:0;display:block;overflow:hidden;pointer-events:none}
.math-lesson-decoration i{position:absolute;display:block;margin:0;font-family:"Arial Black",ui-rounded,system-ui,sans-serif;font-style:normal;font-weight:900;line-height:1;opacity:.5;filter:blur(.2px) drop-shadow(0 0 3px currentColor)}
.math-card-one-green{top:22.5cqw;left:11.3cqw;color:#37ff00;font-size:27cqw}
.math-card-one-red{top:43.6cqw;left:79.4cqw;color:#ff3030;font-size:29cqw}
.math-card-two-green{top:43.6cqw;left:37.7cqw;color:#37ff00;font-size:27cqw}
.math-card-dot-large{top:22.1cqw;left:52.5cqw;width:26.7cqw;height:26.7cqw;border-radius:50%;background:#ff3030}
.math-card-dot-small{top:47.5cqw;left:17.2cqw;width:15cqw;height:15cqw;border-radius:50%;background:#ff3030}
.math-lesson-score{position:absolute;z-index:1;top:27.45cqw;left:22.55cqw;display:block;width:49.02cqw;aspect-ratio:1;border:0;border-radius:50%;background:rgba(217,217,217,.2);color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;font-style:normal}
.math-lesson-score b,.math-lesson-score em{position:absolute;font-style:normal;font-weight:500;line-height:1}
.math-lesson-score b{top:16%;left:43%;color:#ffee00;font-size:14cqw}
.math-lesson-score em{right:18%;bottom:14%;color:#46fb71;font-size:13cqw}
.math-lesson-score i{position:absolute;top:49%;left:25%;width:50%;height:2cqw;border-radius:999px;background:#fff;transform:rotate(-15deg)}
.math-menu-screen .math-lesson-copy{position:absolute;z-index:2;right:10px;bottom:13cqw;left:10px;display:flex;width:auto;height:auto;align-items:center;justify-content:center;gap:0;overflow:visible;clip:auto;clip-path:none;white-space:normal;text-align:center}
.math-menu-screen .math-lesson-copy strong{display:block;color:#fff!important;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;font-size:clamp(.82rem,1vw,1rem);font-weight:800;line-height:1.18;text-align:center}
.math-menu-screen .math-lesson-copy small{display:none}
.math-menu-screen .math-lesson-tile.is-locked .math-lesson-copy strong{color:#929292!important}
.math-menu-screen .math-menu-back{border-color:rgba(255,255,255,.32)!important;background:rgba(255,255,255,.12)!important}

@media(max-width:1100px){.math-menu-screen .math-menu-content{width:min(100%,960px);grid-template-columns:minmax(230px,.7fr) minmax(480px,1.3fr);gap:34px}.math-menu-screen .math-topic-grid,.math-menu-screen .math-lesson-grid-new{gap:18px}.math-menu-prompt p{font-size:clamp(1.15rem,2.3vw,1.55rem)}}
@media(max-width:760px) and (orientation:portrait){.math-nav-shell.math-menu-screen{display:flex;padding:16px}.math-menu-topbar{top:16px;right:16px;left:16px}.math-menu-profile-image{width:76px}.math-menu-settings{width:62px!important;height:62px!important}.math-menu-screen .math-menu-content{display:flex;width:100%;margin:0;padding:118px 0 20px;flex-direction:column;justify-content:flex-start;gap:24px;overflow:auto}.math-menu-content .math-menu-prompt{align-self:center;justify-self:center}.math-menu-prompt p{max-width:none;font-size:1.2rem;text-align:center}.math-menu-screen .math-topic-grid{width:min(100%,390px);grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.math-menu-screen .math-topic-tile{width:min(100%,155px)}.math-menu-screen .math-lesson-grid-new{width:min(100%,360px);grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.math-menu-screen .math-lesson-tile{min-height:0;padding:0;border-width:4px}.math-lesson-score{width:72px}.math-menu-screen .math-menu-back{width:44px!important;height:44px!important}}
@media(max-height:560px) and (orientation:landscape){.math-nav-shell.math-menu-screen{display:flex;padding:12px 20px}.math-menu-topbar{top:12px;right:20px;left:20px}.math-menu-profile-image{width:66px}.math-menu-settings{width:54px;height:54px}.math-menu-screen .math-menu-content{display:grid;width:min(100%,1000px);margin:auto;padding:76px 0 8px;grid-template-columns:minmax(210px,.65fr) minmax(430px,1.35fr);gap:28px;overflow:hidden}.math-menu-content .math-menu-prompt{align-self:center}.math-menu-prompt p{font-size:1.08rem;text-align:left}.math-menu-screen .math-topic-grid,.math-menu-screen .math-lesson-grid-new{width:min(100%,580px);grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 16px}.math-menu-screen .math-topic-tile{width:min(100%,126px)}.math-menu-screen .math-lesson-tile{min-height:0;padding:0;border-width:3px}.math-lesson-score{width:58px}.math-lesson-score b,.math-lesson-score em{font-size:1rem}.math-menu-screen .math-menu-back{width:40px!important;height:40px!important}}

/* CSS recreation of GO BACK BUTTON (1).svg: 295x83, 24px radius, 5.127px gradient stroke. */
.math-lessons-screen .math-menu-prompt{display:flex;flex-direction:column;align-items:flex-start;gap:clamp(18px,2vw,26px)}
.math-go-back{position:relative;isolation:isolate;display:flex!important;width:295px!important;height:83px!important;box-sizing:border-box!important;padding:5.127px 20px 5.127px 19px!important;align-items:center!important;justify-content:flex-start!important;gap:13px!important;border:0!important;border-radius:24px!important;background:linear-gradient(180deg,#47fb72 0%,#e96bfb 100%)!important;color:#fff!important;box-shadow:0 0 0 rgba(71,251,114,0)!important;text-decoration:none!important;overflow:hidden;animation:math-go-back-breathe 2.8s ease-in-out infinite;transition:transform .24s cubic-bezier(.22,1,.36,1),filter .24s ease,box-shadow .24s ease!important}
.math-go-back:before{content:"";position:absolute;z-index:0;inset:5.127px;border-radius:18.873px;background:#363079}
.math-go-back-arrow{position:relative;z-index:1;display:block;flex:0 0 auto;width:50px;height:48px;background:#fff;clip-path:path("M4.51 18.7C0 20.89 0 27.31 4.51 29.5L41.01 47.2C44.99 49.13 49.63 46.23 49.63 41.8V6.4C49.63 1.97 44.99-.93 41.01 1L4.51 18.7Z");animation:math-go-back-arrow 1.8s ease-in-out infinite}
.math-go-back strong{position:relative;z-index:1;display:block;color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold","Arial Black",system-ui,sans-serif;font-size:38px;font-weight:900;line-height:1;letter-spacing:-1.1px;white-space:nowrap}
.math-go-back:hover,.math-go-back:focus-visible{transform:translateY(-3px) scale(1.018)!important;filter:brightness(1.08);box-shadow:0 10px 26px rgba(71,251,114,.2)!important}
.math-go-back:active{transform:translateY(1px) scale(.985)!important;filter:brightness(.98)}
.math-go-back:focus-visible{outline:3px solid #fff;outline-offset:4px}
@keyframes math-go-back-breathe{0%,100%{box-shadow:0 0 0 rgba(71,251,114,0)}50%{box-shadow:0 0 18px rgba(71,251,114,.24)}}
@keyframes math-go-back-arrow{0%,100%{transform:translateX(0)}50%{transform:translateX(-5px)}}
@media(prefers-reduced-motion:reduce){.math-go-back,.math-go-back-arrow{animation:none!important}}

@media(max-width:760px) and (orientation:portrait){.math-lessons-screen .math-menu-prompt{align-items:center}.math-menu-prompt p{white-space:normal}.math-go-back{width:244px!important;height:69px!important;padding:4.25px 16px!important;gap:11px!important;border-radius:20px!important}.math-go-back:before{inset:4.25px;border-radius:15.75px}.math-go-back-arrow{width:42px;height:41px;clip-path:polygon(100% 0,100% 100%,0 50%)}.math-go-back strong{font-size:31px;letter-spacing:-.8px}}
@media(max-height:560px) and (orientation:landscape){.math-lessons-screen .math-menu-prompt{gap:10px}.math-go-back{width:205px!important;height:58px!important;padding:3.6px 13px!important;gap:9px!important;border-radius:17px!important}.math-go-back:before{inset:3.6px;border-radius:13.4px}.math-go-back-arrow{width:35px;height:34px;clip-path:polygon(100% 0,100% 100%,0 50%)}.math-go-back strong{font-size:26px;letter-spacing:-.6px}}

@media(max-width:760px) and (orientation:portrait){.math-lesson-score{width:49.02cqw}}
@media(max-height:560px) and (orientation:landscape){.math-lesson-score{width:49.02cqw}.math-lesson-score b{font-size:14cqw}.math-lesson-score em{font-size:13cqw}}
@media(min-width:1101px){.math-lesson-score{top:51px;left:41px;width:100px}.math-card-one-green{top:41px;left:18px;font-size:55px}.math-card-one-red{top:84px;left:157px;font-size:59px}.math-card-two-green{top:84px;left:72px;font-size:55px}.math-card-dot-large{top:40px;left:102px;width:54px;height:54px}.math-card-dot-small{top:92px;left:30px;width:30px;height:30px}.math-lesson-score b{font-size:29px}.math-lesson-score em{font-size:27px}.math-lesson-score i{height:4px}.math-menu-screen .math-lesson-copy{bottom:22px}}

/* Keep the identity controls compact so they support the menu instead of dominating it. */
.math-menu-profile-image{width:clamp(64px,6.5vw,124px);padding:clamp(8px,.65vw,12px)}
.math-menu-settings{width:clamp(52px,4.5vw,86px)!important;height:clamp(52px,4.5vw,86px)!important}
.math-menu-topbar-left{gap:clamp(10px,1.2vw,20px)}
@media(max-width:760px) and (orientation:portrait){.math-menu-profile-image{width:60px}.math-menu-settings{width:48px!important;height:48px!important}.math-menu-screen .math-menu-content{padding-top:98px}}
@media(max-height:560px) and (orientation:landscape){.math-menu-profile-image{width:56px}.math-menu-settings{width:46px!important;height:46px!important}.math-menu-screen .math-menu-content{padding-top:68px}}

/* Portrait tablets and iPads use the full width instead of squeezing a desktop split layout. */
@media(min-width:761px) and (max-width:1100px) and (orientation:portrait){
  .math-nav-shell.math-menu-screen{padding:clamp(24px,4vw,40px)}
  .math-menu-topbar{top:clamp(24px,3vw,34px);right:clamp(24px,4vw,40px);left:clamp(24px,4vw,40px)}
  .math-menu-screen .math-menu-content{display:flex;width:100%;margin:0;padding:clamp(112px,11vh,150px) 0 clamp(28px,4vh,48px);flex-direction:column;align-items:center;justify-content:center;gap:clamp(28px,4vh,46px);overflow:auto}
  .math-menu-content .math-menu-prompt{align-self:center;justify-self:center;text-align:center}
  .math-menu-prompt p{font-size:clamp(1.25rem,2.7vw,1.65rem);text-align:center;white-space:normal}
  .math-menu-screen .math-topic-grid{width:min(100%,720px);grid-template-columns:repeat(3,minmax(0,1fr));justify-content:center;gap:clamp(18px,2.5vw,28px)}
  .math-menu-screen .math-topic-tile{width:min(100%,clamp(150px,21vw,190px))}
  .math-menu-screen .math-lesson-grid-new{width:min(100%,700px);grid-template-columns:repeat(3,minmax(0,190px));justify-content:center;gap:clamp(18px,2.5vw,28px)}
  .math-menu-screen .math-lesson-tile{width:100%;max-width:190px}
  .math-lessons-screen .math-menu-prompt{align-items:center}
}

/* Parent authentication gate: the learning experience never loads before authorization. */
html:has(.math-parent-access),body:has(.math-parent-access){margin:0!important;background:var(--nav-navy)!important}
.math-parent-access,.math-parent-access *{box-sizing:border-box}
.math-parent-access{position:fixed;z-index:99998;inset:0;display:grid;place-items:center;min-width:0;min-height:100svh;padding:clamp(18px,4vw,64px);overflow:auto;background:var(--nav-navy);color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif}
.math-parent-access-glow{position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 20% 15%,rgba(92,106,255,.2),transparent 34%),radial-gradient(circle at 82% 84%,rgba(57,255,20,.1),transparent 30%)}
.math-parent-access-panel{position:relative;isolation:isolate;width:min(100%,980px);padding:clamp(24px,4vw,52px);border:1px solid rgba(255,255,255,.28);border-radius:clamp(24px,3vw,38px);background:linear-gradient(145deg,rgba(255,255,255,.17),rgba(255,255,255,.075));box-shadow:0 30px 80px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.34);backdrop-filter:blur(22px) saturate(125%);-webkit-backdrop-filter:blur(22px) saturate(125%)}
.math-parent-access-brand{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 18px;border:1px solid rgba(255,255,255,.3);border-radius:20px;background:rgba(255,255,255,.12)}
.math-parent-access-brand .math-css-avatar{transform:scale(.82)}
.math-parent-access-heading{text-align:center}.math-parent-access-heading p{margin:0 0 6px;color:#7dff87;font-size:.78rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.math-parent-access-heading h1{margin:0;color:#fff;font-size:clamp(1.55rem,3vw,2.55rem);line-height:1.12}.math-parent-access-heading>span{display:block;max-width:590px;margin:10px auto 0;color:rgba(255,255,255,.72);font-family:system-ui,sans-serif;font-size:clamp(.9rem,1.4vw,1.02rem);line-height:1.5}
.math-parent-auth-message{max-width:720px;margin:20px auto 0;padding:12px 16px;border:1px solid rgba(255,246,0,.5);border-radius:14px;background:rgba(255,246,0,.1);color:#fff6a8;font-family:system-ui,sans-serif;font-size:.9rem;text-align:center}
.math-parent-auth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(14px,2.2vw,24px);margin-top:clamp(22px,3vw,34px)}
.math-parent-auth-card{display:flex;min-width:0;padding:clamp(18px,2.4vw,28px);flex-direction:column;gap:16px;border:1px solid rgba(255,255,255,.2);border-radius:24px;background:rgba(4,6,56,.46);box-shadow:inset 0 1px 0 rgba(255,255,255,.17)}
.math-parent-auth-card small{display:block;margin-bottom:3px;color:rgba(255,255,255,.6);font:700 .72rem/1.2 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}.math-parent-auth-card h2{margin:0;color:#fff;font-size:clamp(1.15rem,2vw,1.5rem)}
.math-parent-auth-card label{display:flex;flex-direction:column;gap:7px;color:#fff;font:700 .82rem/1.25 system-ui,sans-serif}.math-parent-auth-card label em{color:rgba(255,255,255,.54);font-size:.72rem;font-style:normal;font-weight:500}
.math-parent-auth-card input{width:100%;height:50px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:14px;outline:0;background:rgba(255,255,255,.1);color:#fff;font:500 1rem/1 system-ui,sans-serif;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}.math-parent-auth-card input:focus{border-color:#70ff83;background:rgba(255,255,255,.15);box-shadow:0 0 0 3px rgba(57,255,20,.13)}
.math-parent-auth-card button,.math-parent-auth-blocked a{display:grid;place-items:center;min-height:52px;margin-top:auto;padding:11px 18px;border:1px solid rgba(255,255,255,.34);border-radius:16px;background:linear-gradient(145deg,rgba(92,106,255,.94),rgba(77,65,190,.92));color:#fff!important;font:850 1rem/1.1 ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;text-decoration:none!important;box-shadow:0 10px 22px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.3);cursor:pointer;transition:transform .2s cubic-bezier(.22,1,.36,1),filter .18s ease,box-shadow .18s ease}.math-parent-auth-card button:hover,.math-parent-auth-card button:focus-visible,.math-parent-auth-blocked a:hover,.math-parent-auth-blocked a:focus-visible{transform:translateY(-2px);filter:brightness(1.1);box-shadow:0 14px 28px rgba(0,0,0,.24),0 0 18px rgba(57,255,20,.09)}
.math-parent-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;opacity:0!important}
.math-parent-auth-blocked{display:flex;max-width:560px;margin:28px auto 0;padding:24px;flex-direction:column;gap:18px;border:1px solid rgba(255,255,255,.2);border-radius:22px;background:rgba(4,6,56,.46);text-align:center}.math-parent-auth-blocked p{margin:0;color:rgba(255,255,255,.78);font:500 1rem/1.5 system-ui,sans-serif}
@media(max-width:680px){.math-parent-access{place-items:start center;padding:14px}.math-parent-access-panel{padding:22px 16px;border-radius:24px}.math-parent-auth-grid{grid-template-columns:1fr}.math-parent-access-brand{width:56px;height:56px;margin-bottom:12px}.math-parent-auth-card{padding:18px;border-radius:20px}.math-parent-auth-card input{height:48px}}
@media(max-height:620px) and (orientation:landscape){.math-parent-access{place-items:start center;padding:12px}.math-parent-access-panel{padding:16px 22px}.math-parent-access-brand{display:none}.math-parent-access-heading>span{margin-top:5px}.math-parent-auth-grid{margin-top:12px}.math-parent-auth-card{padding:14px 18px;gap:9px}.math-parent-auth-card input{height:42px}.math-parent-auth-card button{min-height:44px}.math-parent-access-heading h1{font-size:1.45rem}}
@media(prefers-reduced-motion:reduce){.math-parent-auth-card button,.math-parent-auth-card input,.math-parent-auth-blocked a{transition:none}}

/* Short landscape screens keep both rows visible without horizontal or vertical clipping. */
@media(max-height:560px) and (orientation:landscape){
  .math-menu-screen .math-menu-content{grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:clamp(14px,2.4vw,24px);padding:66px 0 8px}
  .math-menu-content .math-menu-prompt{min-width:0}
  .math-menu-prompt p{max-width:20ch;font-size:clamp(.9rem,2vw,1.05rem);white-space:normal}
  .math-menu-screen .math-topic-grid{grid-template-columns:repeat(3,minmax(0,clamp(92px,12vw,126px)));justify-content:end;gap:8px clamp(10px,1.8vw,16px)}
  .math-menu-screen .math-topic-tile{width:100%}
  .math-menu-screen .math-lesson-grid-new{grid-template-columns:repeat(3,minmax(0,clamp(92px,12vw,106px)));justify-content:end;align-content:center;gap:8px clamp(10px,1.8vw,16px)}
  .math-menu-screen .math-lesson-tile{width:100%;max-width:106px}
  .math-lessons-screen .math-menu-prompt{gap:10px}
  .math-go-back{width:min(205px,100%)!important}
}

/* Parent-owned child profile manager. */
html:has(.math-profile-manager),body:has(.math-profile-manager),html:has(.math-parent-unlock),body:has(.math-parent-unlock){margin:0!important;background:var(--nav-navy)!important}
.math-profile-manager,.math-profile-manager *{box-sizing:border-box}
.math-profile-manager{position:fixed;z-index:99998;inset:0;min-height:100svh;padding:clamp(20px,3vw,48px);overflow:auto;background:radial-gradient(circle at 86% 12%,rgba(92,106,255,.18),transparent 30%),var(--nav-navy);color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif}
.math-profile-manager-topbar{display:flex;width:min(100%,1200px);margin:0 auto clamp(22px,3vw,38px);align-items:flex-start;justify-content:space-between;gap:24px}.math-profile-manager-topbar small,.math-profile-create>small{color:#72ff85;font-size:.72rem;font-weight:900;letter-spacing:.11em;text-transform:uppercase}.math-profile-manager-topbar h1{margin:5px 0;color:#fff;font-size:clamp(1.8rem,3.4vw,3rem);line-height:1.05}.math-profile-manager-topbar p{max-width:650px;margin:8px 0 0;color:rgba(255,255,255,.68);font:500 .92rem/1.5 system-ui,sans-serif}
.math-profile-manager-actions{display:flex;flex:0 0 auto;gap:10px}.math-profile-manager-actions form{margin:0}.math-profile-manager-actions a,.math-profile-manager-actions button{min-height:40px;padding:11px 15px;border:1px solid rgba(255,255,255,.25);border-radius:14px;background:rgba(255,255,255,.1);color:#fff!important;font:750 .82rem/1 system-ui,sans-serif;text-decoration:none!important;cursor:pointer;transition:transform .18s ease,background .18s ease}.math-profile-manager-actions a:hover,.math-profile-manager-actions a:focus-visible,.math-profile-manager-actions button:hover,.math-profile-manager-actions button:focus-visible{transform:translateY(-2px);background:rgba(255,255,255,.18)}
.math-profile-message{width:min(100%,1200px);margin:-18px auto 22px;padding:11px 15px;border:1px solid rgba(255,246,0,.45);border-radius:14px;background:rgba(255,246,0,.1);color:#fff7a8;font:600 .86rem/1.35 system-ui,sans-serif}.math-profile-message.is-success{border-color:rgba(57,255,20,.46);background:rgba(57,255,20,.09);color:#baffb0}
.math-sync-warning{border-color:rgba(255,192,64,.62);background:rgba(255,160,32,.13);color:#fff0bf}
.math-profile-manager-layout{display:grid;width:min(100%,1200px);margin:auto;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:clamp(18px,2.5vw,30px);align-items:start}.math-profile-list,.math-profile-create{min-width:0;padding:clamp(18px,2.4vw,30px);border:1px solid rgba(255,255,255,.24);border-radius:28px;background:linear-gradient(145deg,rgba(255,255,255,.15),rgba(255,255,255,.065));box-shadow:0 24px 60px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.26);backdrop-filter:blur(20px) saturate(125%);-webkit-backdrop-filter:blur(20px) saturate(125%)}.math-profile-list>h2,.math-profile-create h2{margin:0 0 18px;color:#fff;font-size:clamp(1.25rem,2vw,1.65rem)}.math-profile-create h2{margin-top:4px}
.math-profile-empty{padding:28px;border:1px dashed rgba(255,255,255,.3);border-radius:20px;color:rgba(255,255,255,.7);font:500 .95rem/1.5 system-ui,sans-serif;text-align:center}
.math-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.math-profile-card{position:relative;display:grid;min-width:0;padding:16px;grid-template-columns:58px minmax(0,1fr);gap:13px;border:1px solid rgba(255,255,255,.2);border-radius:21px;background:rgba(4,6,56,.48);box-shadow:inset 0 1px 0 rgba(255,255,255,.15)}.math-profile-card.is-active{border-color:#59ff70;box-shadow:0 0 18px rgba(57,255,20,.1),inset 0 1px 0 rgba(255,255,255,.2)}
.math-profile-card-avatar{display:grid;width:58px;height:58px;place-items:center;border:2px solid rgba(255,255,255,.34);border-radius:18px;background:linear-gradient(145deg,#596ef5,#42339d)}.math-profile-card-avatar i,.math-avatar-options label>span i{display:grid;place-items:center;font-size:2rem;font-style:normal}.math-profile-card-avatar i:before,.math-avatar-options label>span i:before,.math-child-avatar-glyph:before{content:"◆"}.avatar-robot i:before{content:"●";width:29px;height:23px;border:3px solid #ff692c;border-radius:8px;background:#21192f;color:#fff;font-size:0;box-shadow:inset 7px 0 0 -5px #fff,inset -7px 0 0 -5px #fff}.avatar-star i:before,.math-child-avatar.avatar-star .math-child-avatar-glyph:before{content:"★";color:#fff600}.avatar-rocket i:before,.math-child-avatar.avatar-rocket .math-child-avatar-glyph:before{content:"▲";color:#ff6b35;filter:drop-shadow(0 8px 0 #6d7cff)}.avatar-shapes i:before,.math-child-avatar.avatar-shapes .math-child-avatar-glyph:before{content:"● ▲";color:#39ff14;font-size:1.35rem;letter-spacing:-.15em;text-shadow:13px 8px 0 #ff4edb}
.math-child-avatar:not(.avatar-robot){display:grid;place-items:center;background:linear-gradient(145deg,rgba(75,65,180,.96),rgba(17,14,85,.98))}.math-child-avatar-glyph{font-size:clamp(1.8rem,3vw,3.3rem);line-height:1}
.math-profile-card-copy{min-width:0}.math-profile-card-copy h3{overflow:hidden;margin:2px 0 4px;color:#fff;font-size:1.05rem;text-overflow:ellipsis;white-space:nowrap}.math-profile-card-copy p{margin:0;color:rgba(255,255,255,.58);font:500 .72rem/1.35 system-ui,sans-serif}.math-active-profile-label{display:block;margin-top:6px;color:#74ff84;font:800 .68rem/1.2 system-ui,sans-serif;text-transform:uppercase}
.math-profile-card>form,.math-profile-card>.math-profile-play{grid-column:1/-1}.math-profile-play,.math-profile-card button,.math-profile-create button{display:grid;width:100%;min-height:43px;padding:9px 13px;place-items:center;border:1px solid rgba(255,255,255,.28);border-radius:13px;background:rgba(92,106,255,.8);color:#fff!important;font:800 .82rem/1 system-ui,sans-serif;text-align:center;text-decoration:none!important;cursor:pointer;transition:transform .18s ease,filter .18s ease}.math-profile-play:hover,.math-profile-play:focus-visible,.math-profile-card button:hover,.math-profile-card button:focus-visible,.math-profile-create button:hover,.math-profile-create button:focus-visible{transform:translateY(-2px);filter:brightness(1.12)}
.math-profile-edit{grid-column:1/-1;border-top:1px solid rgba(255,255,255,.13);padding-top:10px}.math-profile-edit summary,.math-archived-profiles summary{color:rgba(255,255,255,.68);font:700 .76rem/1.2 system-ui,sans-serif;cursor:pointer}.math-profile-edit>form{display:grid;gap:9px;margin-top:12px}.math-profile-edit label,.math-profile-create label,.math-profile-create legend{display:flex;flex-direction:column;gap:5px;color:rgba(255,255,255,.78);font:700 .74rem/1.2 system-ui,sans-serif}.math-profile-edit input,.math-profile-edit select,.math-profile-create input[type=text],.math-profile-create select{width:100%;height:42px;padding:0 11px;border:1px solid rgba(255,255,255,.24);border-radius:11px;outline:0;background:#211d68;color:#fff;font:500 .86rem/1 system-ui,sans-serif}.math-profile-edit input:focus,.math-profile-edit select:focus,.math-profile-create input:focus,.math-profile-create select:focus{border-color:#62ff76;box-shadow:0 0 0 3px rgba(57,255,20,.1)}.math-profile-archive button{background:rgba(255,255,255,.08);color:rgba(255,255,255,.7)!important}
.math-archived-profiles{margin-top:18px;padding-top:14px;border-top:1px solid rgba(255,255,255,.14)}.math-archived-profiles ul{display:grid;gap:7px;margin:12px 0 0;padding:0;list-style:none}.math-archived-profiles li{display:flex;justify-content:space-between;gap:12px;color:#fff;font:650 .8rem/1.3 system-ui,sans-serif}.math-archived-profiles li span{color:rgba(255,255,255,.5);font-weight:500}
.math-profile-create form{display:grid;gap:14px}.math-profile-create fieldset{min-width:0;margin:0;padding:0;border:0}.math-profile-create legend{margin-bottom:7px}.math-avatar-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.math-avatar-options label{position:relative;cursor:pointer}.math-avatar-options input{position:absolute;opacity:0;pointer-events:none}.math-avatar-options label>span{display:grid;min-width:0;aspect-ratio:1;padding:6px;place-items:center;border:1px solid rgba(255,255,255,.2);border-radius:13px;background:rgba(255,255,255,.07)}.math-avatar-options label>span b{overflow:hidden;width:100%;color:rgba(255,255,255,.6);font:600 .58rem/1 system-ui,sans-serif;text-align:center;text-overflow:ellipsis}.math-avatar-options input:checked+span{border-color:#5dff71;background:rgba(57,255,20,.1);box-shadow:0 0 0 2px rgba(57,255,20,.09)}.math-profile-create button:disabled{cursor:not-allowed;opacity:.4;transform:none;filter:none}
.math-settings-switch-profile{text-decoration:none!important}
.math-parent-unlock,.math-parent-unlock *{box-sizing:border-box}.math-parent-unlock{position:fixed;z-index:99998;inset:0;display:grid;min-height:100svh;padding:22px;place-items:center;overflow:auto;background:radial-gradient(circle at 50% 18%,rgba(92,106,255,.22),transparent 34%),var(--nav-navy);color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif}.math-parent-unlock-card{width:min(100%,460px);padding:clamp(24px,5vw,42px);border:1px solid rgba(255,255,255,.25);border-radius:30px;background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.065));box-shadow:0 28px 80px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.28);backdrop-filter:blur(22px) saturate(130%);-webkit-backdrop-filter:blur(22px) saturate(130%);text-align:center}.math-parent-unlock-icon{display:grid;width:72px;height:72px;margin:0 auto 18px;place-items:center;border:2px solid #72ff85;border-radius:24px;background:rgba(57,255,20,.08);box-shadow:0 0 24px rgba(57,255,20,.13)}.math-parent-unlock-icon span{position:relative;width:30px;height:25px;border:4px solid #fff;border-radius:7px}.math-parent-unlock-icon span:before{content:"";position:absolute;left:50%;bottom:17px;width:19px;height:17px;border:4px solid #fff;border-bottom:0;border-radius:12px 12px 0 0;transform:translateX(-50%)}.math-parent-unlock-card>small{color:#72ff85;font-size:.72rem;font-weight:900;letter-spacing:.11em;text-transform:uppercase}.math-parent-unlock-card h1{margin:7px 0 10px;color:#fff;font-size:clamp(1.65rem,5vw,2.35rem);line-height:1.08}.math-parent-unlock-card>p{margin:0 auto 24px;color:rgba(255,255,255,.68);font:500 .92rem/1.55 system-ui,sans-serif}.math-parent-unlock-card .math-profile-message{width:100%;margin:0 0 16px;text-align:left}.math-parent-unlock-card form{display:grid;gap:10px;text-align:left}.math-parent-unlock-card label{color:rgba(255,255,255,.8);font:750 .78rem/1.2 system-ui,sans-serif}.math-parent-unlock-card input{width:100%;height:50px;padding:0 14px;border:1px solid rgba(255,255,255,.27);border-radius:14px;outline:0;background:#211d68;color:#fff;font:600 1rem/1 system-ui,sans-serif}.math-parent-unlock-card input:focus{border-color:#72ff85;box-shadow:0 0 0 4px rgba(57,255,20,.1)}.math-parent-unlock-card button{min-height:50px;margin-top:4px;border:1px solid rgba(255,255,255,.28);border-radius:14px;background:linear-gradient(135deg,#6576ff,#8a5bff);color:#fff;font:850 .9rem/1 system-ui,sans-serif;cursor:pointer;transition:transform .18s ease,filter .18s ease}.math-parent-unlock-card button:hover,.math-parent-unlock-card button:focus-visible{transform:translateY(-2px);filter:brightness(1.1)}.math-parent-unlock-links{display:flex;margin-top:18px;justify-content:space-between;gap:16px}.math-parent-unlock-links a{color:rgba(255,255,255,.7)!important;font:700 .78rem/1.3 system-ui,sans-serif;text-decoration:none!important}.math-parent-unlock-links a:hover,.math-parent-unlock-links a:focus-visible{color:#fff!important;text-decoration:underline!important}
@media(max-width:900px){.math-profile-manager-layout{grid-template-columns:1fr}.math-profile-create{order:-1}.math-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.math-profile-manager{padding:16px}.math-profile-manager-topbar{flex-direction:column}.math-profile-manager-actions{width:100%}.math-profile-manager-actions form{flex:1}.math-profile-manager-actions a,.math-profile-manager-actions button{width:100%;text-align:center}.math-profile-grid{grid-template-columns:1fr}.math-profile-list,.math-profile-create{padding:17px;border-radius:22px}.math-avatar-options{grid-template-columns:repeat(4,minmax(55px,1fr));overflow-x:auto}.math-parent-unlock{padding:15px}.math-parent-unlock-card{padding:24px 19px;border-radius:24px}.math-parent-unlock-links{flex-direction:column;gap:10px}}
@media(max-height:600px) and (orientation:landscape){.math-profile-manager{padding:14px 22px}.math-profile-manager-topbar{margin-bottom:14px}.math-profile-manager-topbar h1{font-size:1.55rem}.math-profile-manager-topbar p{display:none}.math-profile-manager-layout{grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:14px}.math-profile-list,.math-profile-create{padding:14px;border-radius:20px}.math-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.math-profile-manager a,.math-profile-manager button,.math-parent-unlock button{transition:none}}

/* Single-card parent entry flow. */
.math-parent-access{padding:clamp(22px,4vw,54px);background:radial-gradient(circle at 20% 15%,rgba(92,106,255,.17),transparent 34%),radial-gradient(circle at 82% 84%,rgba(130,255,130,.08),transparent 30%),var(--nav-navy)}.math-parent-access-panel{width:min(100%,590px);padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}.math-parent-access-logo{display:block;width:min(220px,52vw);height:auto;margin:0 auto clamp(28px,4.2vw,48px);object-fit:contain}.math-parent-auth-single-card{position:relative;border:1px solid rgba(255,255,255,.23);border-radius:28px;background:linear-gradient(145deg,rgba(39,39,105,.82),rgba(15,15,69,.91));box-shadow:0 28px 74px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.18);backdrop-filter:blur(22px) saturate(125%);-webkit-backdrop-filter:blur(22px) saturate(125%)}.math-parent-auth-card{display:grid;margin:0;padding:clamp(25px,4vw,44px);gap:15px;border:0;border-radius:28px;background:none;box-shadow:none}.math-parent-auth-card[hidden]{display:none}.math-parent-auth-card header{text-align:center}.math-parent-auth-card header small{display:block;margin:0 0 8px;color:#82ff82;font:850 .7rem/1 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase}.math-parent-auth-card header h1{margin:0;color:#fff;font-size:clamp(2rem,4vw,3rem);font-weight:650;letter-spacing:-.04em;line-height:1.05}.math-parent-auth-card header p{margin:9px auto 10px;color:rgba(255,255,255,.7);font:400 .92rem/1.48 system-ui,sans-serif}.math-parent-auth-card label{display:flex;flex-direction:column;gap:7px;color:#fff;font:700 .8rem/1.25 system-ui,sans-serif}.math-parent-auth-card label em{color:rgba(255,255,255,.55);font-size:.7rem;font-style:normal;font-weight:500}.math-parent-auth-card input{width:100%;height:49px;padding:0 14px;border:1px solid rgba(255,255,255,.25);border-radius:13px;outline:0;background:rgba(72,69,145,.51);color:#fff;font:500 .98rem/1 system-ui,sans-serif;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}.math-parent-auth-card input:focus{border-color:#82ff82;background:rgba(82,79,160,.61);box-shadow:0 0 0 4px rgba(130,255,130,.11)}.math-parent-auth-name-row{display:grid;grid-template-columns:1fr 1fr;gap:13px}.math-parent-auth-card>button{display:grid;min-height:51px;margin-top:7px;padding:11px 18px;place-items:center;border:0;border-radius:14px;background:linear-gradient(100deg,#4da67e,#9062c8);color:#fff!important;font:850 1rem/1 ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;box-shadow:0 10px 22px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.3);cursor:pointer;transition:transform .2s cubic-bezier(.22,1,.36,1),filter .18s ease}.math-parent-auth-card>button:hover,.math-parent-auth-card>button:focus-visible{filter:brightness(1.1);transform:translateY(-2px)}.math-parent-auth-switch{margin:4px 0 0;color:rgba(255,255,255,.76);font:500 .85rem/1.4 system-ui,sans-serif;text-align:center}.math-parent-auth-switch button{padding:0;border:0;background:transparent;color:#82ff82;font:700 inherit;cursor:pointer}.math-parent-auth-switch button:hover,.math-parent-auth-switch button:focus-visible{text-decoration:underline}.math-parent-auth-terms{margin:0;color:rgba(255,255,255,.5);font:400 .68rem/1.45 system-ui,sans-serif;text-align:center}.math-parent-auth-message{margin:0 0 16px}.math-parent-access .math-parent-auth-blocked{margin:0}.math-parent-access .math-parent-access-glow{background:transparent}
@media(max-width:560px){.math-parent-access{place-items:start center;padding:22px 16px}.math-parent-access-logo{margin-bottom:26px}.math-parent-auth-single-card{border-radius:23px}.math-parent-auth-card{padding:25px 20px;border-radius:23px}.math-parent-auth-name-row{grid-template-columns:1fr;gap:15px}}@media(max-height:720px) and (orientation:landscape){.math-parent-access{place-items:start center;padding:16px 28px;overflow:auto}.math-parent-access-logo{width:150px;margin-bottom:14px}.math-parent-auth-card{padding:18px 26px;gap:9px}.math-parent-auth-card header small{margin-bottom:4px}.math-parent-auth-card header h1{font-size:1.8rem}.math-parent-auth-card header p{margin:4px auto}.math-parent-auth-card input{height:42px}.math-parent-auth-card>button{min-height:44px;margin-top:2px}.math-parent-auth-terms{display:none}}

/* Child profile flow: choose a learner first, then create one in its own focused card. */
.math-profile-manager{display:flex;min-height:100svh;padding:clamp(28px,5vw,80px);flex-direction:column;justify-content:center;overflow:hidden;background:radial-gradient(circle at 20% 18%,rgba(85,99,246,.13),transparent 31%),radial-gradient(circle at 85% 78%,rgba(46,60,194,.12),transparent 34%),var(--nav-navy)}
.math-profile-switch-heading{position:absolute;top:50%;left:clamp(28px,6.5vw,132px);width:min(34vw,480px);transform:translateY(-50%)}
.math-profile-switch-heading small,.math-profile-create-heading small{color:#82ff82;font:800 .74rem/1 system-ui,sans-serif;letter-spacing:.13em;text-transform:uppercase}.math-profile-switch-heading h1,.math-profile-create-heading h1{margin:13px 0 10px;color:#fff;font-size:clamp(2.35rem,4.25vw,5rem);font-weight:650;letter-spacing:-.045em;line-height:1}.math-profile-switch-heading p,.math-profile-create-heading p{max-width:390px;margin:0;color:rgba(255,255,255,.68);font:400 clamp(.95rem,1.25vw,1.15rem)/1.5 system-ui,sans-serif}
.math-profile-switch-stage{display:flex;min-height:0;margin-left:clamp(300px,43vw,790px);align-items:center;justify-content:center}.math-profile-switch-grid{display:grid;max-width:min(53vw,780px);grid-template-columns:repeat(3,minmax(126px,190px));align-items:start;gap:clamp(20px,2.8vw,52px)}.math-profile-choice{margin:0}.math-profile-choice button,.math-profile-add-choice{display:flex;width:100%;padding:0;border:0;background:none;color:#fff;align-items:center;flex-direction:column;font:inherit;text-decoration:none;cursor:pointer}.math-profile-choice-avatar{width:clamp(118px,10.3vw,178px);height:clamp(118px,10.3vw,178px);margin-bottom:15px;border:clamp(4px,.35vw,7px) solid #82ff82;border-radius:50%;box-shadow:0 14px 28px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.32);transition:transform .22s cubic-bezier(.2,.9,.3,1),filter .22s ease,box-shadow .22s ease}.math-profile-choice strong,.math-profile-add-choice strong{max-width:100%;overflow:hidden;font:750 clamp(.92rem,1.3vw,1.15rem)/1.2 system-ui,sans-serif;text-align:center;text-overflow:ellipsis;white-space:nowrap}.math-profile-choice small{margin-top:5px;color:#82ff82;font:800 .63rem/1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}.math-profile-choice button:hover .math-profile-choice-avatar,.math-profile-choice button:focus-visible .math-profile-choice-avatar{filter:brightness(1.09);box-shadow:0 0 0 7px rgba(130,255,130,.11),0 18px 35px rgba(0,0,0,.28);transform:translateY(-7px) scale(1.035)}.math-profile-choice button:focus-visible,.math-profile-add-choice:focus-visible{outline:3px solid #82ff82;outline-offset:10px;border-radius:18px}.math-profile-add-choice{min-height:clamp(118px,10.3vw,178px);padding-top:clamp(24px,3.1vw,52px);justify-content:flex-start;color:#fff;transition:transform .22s cubic-bezier(.2,.9,.3,1),color .2s ease}.math-profile-add-choice>span{font:200 clamp(5.2rem,9.5vw,10rem)/.64 system-ui,sans-serif}.math-profile-add-choice strong{margin-top:25px}.math-profile-add-choice:hover{color:#82ff82;transform:translateY(-6px)}.math-profile-switch-footer{position:absolute;right:clamp(24px,4vw,64px);bottom:clamp(22px,4vw,52px);display:flex;gap:18px}.math-profile-switch-footer a,.math-profile-back{color:rgba(255,255,255,.72)!important;font:700 .78rem/1 system-ui,sans-serif;text-decoration:none!important}.math-profile-switch-footer a:hover,.math-profile-switch-footer a:focus-visible,.math-profile-back:hover,.math-profile-back:focus-visible{color:#fff!important;text-decoration:underline!important}
.math-profile-create-stage{display:grid;min-height:0;place-items:center}.math-profile-create-card{width:min(100%,540px);padding:clamp(26px,3.5vw,44px);border:1px solid rgba(255,255,255,.22);border-radius:28px;background:linear-gradient(145deg,rgba(42,41,112,.77),rgba(16,16,70,.9));box-shadow:0 28px 72px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.18);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px)}.math-profile-back{display:inline-flex;margin-bottom:30px;gap:8px;align-items:center}.math-profile-back span{font-size:1.2rem}.math-profile-create-heading{text-align:center}.math-profile-create-heading p{margin:0 auto 26px}.math-profile-create-form{display:grid;gap:15px}.math-profile-create-form label,.math-profile-create-form legend{display:flex;flex-direction:column;gap:7px;color:rgba(255,255,255,.85);font:700 .82rem/1.2 system-ui,sans-serif}.math-profile-create-form fieldset{min-width:0;margin:2px 0 0;padding:0;border:0}.math-profile-create-form legend{margin-bottom:9px}.math-profile-create-form input[type=text],.math-profile-create-form select{width:100%;height:49px;padding:0 14px;border:1px solid rgba(255,255,255,.22);border-radius:13px;outline:0;background:rgba(66,62,139,.52);color:#fff;font:500 .98rem/1 system-ui,sans-serif}.math-profile-create-form input:focus,.math-profile-create-form select:focus{border-color:#82ff82;box-shadow:0 0 0 4px rgba(130,255,130,.12)}.math-profile-create-form button{min-height:52px;margin-top:5px;border:0;border-radius:14px;background:linear-gradient(100deg,#4da67e,#9062c8);color:#fff;font:800 1rem/1 system-ui,sans-serif;cursor:pointer;transition:transform .18s ease,filter .18s ease}.math-profile-create-form button:hover,.math-profile-create-form button:focus-visible{filter:brightness(1.11);transform:translateY(-2px)}
@media(max-width:900px){.math-profile-manager{justify-content:flex-start;overflow:auto}.math-profile-switch-heading{position:static;width:auto;margin:0 0 44px;transform:none}.math-profile-switch-stage{margin:0;justify-content:flex-start}.math-profile-switch-grid{max-width:none;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));width:min(100%,620px)}.math-profile-switch-footer{position:static;margin-top:42px}.math-profile-create-stage{min-height:calc(100svh - 56px)}}
@media(max-width:540px){.math-profile-manager{padding:28px 22px}.math-profile-switch-heading{margin-bottom:32px}.math-profile-switch-heading h1,.math-profile-create-heading h1{font-size:2.35rem}.math-profile-switch-grid{grid-template-columns:repeat(2,minmax(110px,1fr));gap:28px 24px}.math-profile-choice-avatar{width:118px;height:118px}.math-profile-add-choice{min-height:118px;padding-top:27px}.math-profile-switch-footer{justify-content:space-between}.math-profile-create-card{padding:25px 20px;border-radius:23px}.math-avatar-options{grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible}}
@media(max-height:600px) and (orientation:landscape){.math-profile-manager{padding:22px 48px}.math-profile-switch-heading h1{font-size:2.6rem}.math-profile-switch-heading p{font-size:.82rem}.math-profile-switch-grid{grid-template-columns:repeat(3,minmax(94px,130px));gap:25px}.math-profile-choice-avatar{width:94px;height:94px;margin-bottom:8px}.math-profile-add-choice{min-height:94px;padding-top:17px}.math-profile-add-choice strong{margin-top:15px}.math-profile-create-card{width:min(100%,470px);padding:21px}.math-profile-back{margin-bottom:16px}.math-profile-create-heading p{margin-bottom:16px}.math-profile-create-form{gap:9px}.math-profile-create-form input[type=text],.math-profile-create-form select{height:40px}.math-profile-create-form button{min-height:43px}}

/* Parent onboarding and manually verified subscription access. */
html:has(.math-access-flow),body:has(.math-access-flow){margin:0!important;background:var(--nav-navy)!important}
.math-access-flow,.math-access-flow *{box-sizing:border-box}
.math-access-flow{position:fixed;z-index:99998;inset:0;display:grid;min-height:100svh;padding:clamp(16px,4vw,54px);place-items:center;overflow:auto;background:radial-gradient(circle at 18% 12%,rgba(92,106,255,.2),transparent 34%),radial-gradient(circle at 84% 88%,rgba(114,255,133,.1),transparent 30%),var(--nav-navy);color:#fff;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif}
.math-access-flow-card{width:min(100%,900px);padding:clamp(24px,4vw,48px);border:1px solid rgba(255,255,255,.25);border-radius:clamp(24px,3vw,36px);background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.065));box-shadow:0 30px 80px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.3);backdrop-filter:blur(22px) saturate(125%);-webkit-backdrop-filter:blur(22px) saturate(125%)}
.math-access-flow-step{margin-bottom:9px;color:#72ff85;font-size:.72rem;font-weight:900;letter-spacing:.11em;text-transform:uppercase}.math-access-flow-card h1{max-width:760px;margin:0;color:#fff;font-size:clamp(1.65rem,3.4vw,2.8rem);line-height:1.12}.math-access-flow-card>p{max-width:720px;margin:12px 0 22px;color:rgba(255,255,255,.72);font:500 .94rem/1.55 system-ui,sans-serif}
.math-onboarding-form{display:grid;gap:22px}.math-onboarding-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.math-onboarding-grid label{display:grid;gap:7px;color:rgba(255,255,255,.8);font:700 .76rem/1.2 system-ui,sans-serif}.math-onboarding-grid select{width:100%;height:50px;padding:0 13px;border:1px solid rgba(255,255,255,.22);border-radius:13px;background:#211b61;color:#fff;font:700 .86rem/1 system-ui,sans-serif}
.math-help-areas,.math-payment-choice fieldset{margin:0;padding:0;border:0}.math-help-areas legend,.math-payment-choice legend{color:#fff;font-size:1rem}.math-help-areas>p{margin:4px 0 10px;color:rgba(255,255,255,.6);font:500 .76rem/1.4 system-ui,sans-serif}.math-help-areas>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.math-help-areas label{position:relative}.math-help-areas input{position:absolute;opacity:0}.math-help-areas span{display:grid;min-height:48px;padding:10px;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:13px;background:rgba(255,255,255,.06);color:#fff;font:700 .75rem/1.25 system-ui,sans-serif;text-align:center;cursor:pointer}.math-help-areas input:checked+span{border-color:#72ff85;background:rgba(114,255,133,.15);box-shadow:0 0 0 2px rgba(114,255,133,.15)}.math-help-areas input:focus-visible+span{outline:3px solid #fff;outline-offset:2px}
.math-access-flow-actions{display:flex;margin-top:20px;align-items:center;gap:10px;flex-wrap:wrap}.math-access-flow-actions a,.math-onboarding-form button,.math-payment-choice>button{min-height:46px;padding:13px 18px;border:1px solid rgba(255,255,255,.22);border-radius:14px;background:rgba(255,255,255,.1);color:#fff!important;font:800 .8rem/1 system-ui,sans-serif;text-decoration:none!important;cursor:pointer;transition:transform .18s ease,background .18s ease}.math-onboarding-form button,.math-payment-choice>button,.math-access-refresh{border-color:rgba(114,255,133,.55)!important;background:linear-gradient(135deg,rgba(114,255,133,.26),rgba(92,106,255,.28))!important}.math-access-flow-actions a:hover,.math-access-flow-actions a:focus-visible,.math-onboarding-form button:hover,.math-onboarding-form button:focus-visible,.math-payment-choice>button:hover,.math-payment-choice>button:focus-visible{transform:translateY(-2px);background:rgba(255,255,255,.18)}
.math-access-state{display:inline-flex;margin-bottom:12px;padding:7px 10px;border:1px solid rgba(255,209,102,.35);border-radius:999px;background:rgba(255,209,102,.1);color:#ffd166;font:850 .66rem/1 system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase}.math-access-state.is-suspended,.math-access-state.is-expired{border-color:rgba(255,133,153,.35);background:rgba(255,133,153,.1);color:#ff9aaa}.math-payment-reference{display:grid;max-width:570px;margin:20px 0;padding:20px;border:1px solid rgba(114,255,133,.3);border-radius:20px;background:rgba(114,255,133,.08)}.math-payment-reference small,.math-payment-reference span{color:rgba(255,255,255,.65);font:600 .72rem/1.4 system-ui,sans-serif}.math-payment-reference strong{margin:7px 0;color:#fff;font:900 clamp(1.45rem,4vw,2.4rem)/1 ui-monospace,SFMono-Regular,monospace;letter-spacing:.08em;overflow-wrap:anywhere}.math-access-note{font-size:.82rem!important}
.math-payment-choice{display:grid;max-width:660px;gap:16px}.math-payment-choice fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.math-payment-choice legend{grid-column:1/-1;margin-bottom:9px}.math-payment-choice label{position:relative}.math-payment-choice input{position:absolute;opacity:0}.math-payment-choice label>span{display:flex;min-height:92px;padding:16px;flex-direction:column;justify-content:center;border:1px solid rgba(255,255,255,.18);border-radius:17px;background:rgba(255,255,255,.06);cursor:pointer}.math-payment-choice label strong{color:#fff;font-size:.9rem}.math-payment-choice label small{margin-top:5px;color:rgba(255,255,255,.63);font:500 .73rem/1.4 system-ui,sans-serif}.math-payment-choice input:checked+span{border-color:#72ff85;background:rgba(114,255,133,.13);box-shadow:0 0 0 2px rgba(114,255,133,.13)}.math-payment-choice input:focus-visible+span{outline:3px solid #fff;outline-offset:2px}.math-payment-choice>button{justify-self:start}
@media(max-width:720px){.math-access-flow{place-items:start center;padding:14px}.math-access-flow-card{padding:22px 16px;border-radius:24px}.math-onboarding-grid{grid-template-columns:1fr}.math-help-areas>div{grid-template-columns:repeat(2,minmax(0,1fr))}.math-payment-choice fieldset{grid-template-columns:1fr}.math-onboarding-form button,.math-payment-choice>button{width:100%}.math-access-flow-actions{align-items:stretch;flex-direction:column}.math-access-flow-actions a{text-align:center}}
@media(max-height:620px) and (orientation:landscape){.math-access-flow{place-items:start center;padding:12px 22px}.math-access-flow-card{padding:18px 22px}.math-access-flow-card h1{font-size:1.55rem}.math-access-flow-card>p{margin:7px 0 12px}.math-onboarding-form{gap:12px}.math-help-areas>div{grid-template-columns:repeat(6,minmax(0,1fr))}.math-help-areas span{min-height:42px;padding:7px}.math-access-flow-actions{margin-top:11px}.math-payment-reference{margin:10px 0;padding:13px}}
@media(prefers-reduced-motion:reduce){.math-access-flow a,.math-access-flow button{transition:none}}

/* Step 14: honest, configurable manual-payment offer. */
.math-upgrade-card{width:min(100%,1080px)}
.math-upgrade-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:clamp(20px,4vw,52px);align-items:start}
.math-upgrade-header>div>p{max-width:670px;margin:12px 0 0;color:rgba(255,255,255,.72);font:500 .94rem/1.55 system-ui,sans-serif}
.math-offer-price{display:grid;min-width:210px;padding:20px 22px;border:1px solid rgba(114,255,133,.42);border-radius:22px;background:linear-gradient(145deg,rgba(114,255,133,.16),rgba(92,106,255,.12));box-shadow:inset 0 1px 0 rgba(255,255,255,.28)}
.math-offer-price strong{color:#fff;font:900 clamp(1.45rem,3vw,2.25rem)/1.05 system-ui,sans-serif}.math-offer-price span{margin-top:7px;color:rgba(255,255,255,.82);font:750 .8rem/1.3 system-ui,sans-serif}.math-offer-price small{margin-top:4px;color:#72ff85;font:800 .67rem/1.3 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em}
.math-upgrade-value{margin:24px 0;padding:20px;border:1px solid rgba(255,255,255,.16);border-radius:22px;background:rgba(255,255,255,.055)}
.math-upgrade-value h2,.math-payment-instructions h2{margin:0 0 14px;color:#fff;font-size:1rem}.math-upgrade-value ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;padding:0;gap:10px;list-style:none}.math-upgrade-value li{display:grid;grid-template-columns:28px 1fr;grid-template-rows:auto auto;padding:12px;border-radius:15px;background:rgba(255,255,255,.055)}.math-upgrade-value li>span{grid-row:1/3;display:grid;width:22px;height:22px;place-items:center;border-radius:50%;background:rgba(114,255,133,.17);color:#72ff85;font:900 .72rem/1 system-ui,sans-serif}.math-upgrade-value li strong{color:#fff;font:800 .78rem/1.25 system-ui,sans-serif}.math-upgrade-value li small{margin-top:3px;color:rgba(255,255,255,.6);font:500 .68rem/1.35 system-ui,sans-serif}.math-upgrade-value>p{margin:14px 2px 0;color:rgba(255,255,255,.62);font:500 .72rem/1.45 system-ui,sans-serif}.math-upgrade-value>p strong{color:rgba(255,255,255,.86)}
.math-payment-pending{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:14px;align-items:stretch}.math-payment-pending .math-payment-reference{margin:0}.math-payment-instructions{padding:20px;border:1px solid rgba(255,255,255,.17);border-radius:20px;background:rgba(255,255,255,.055)}.math-payment-instructions p{margin:0;color:rgba(255,255,255,.76);font:550 .8rem/1.55 system-ui,sans-serif;white-space:normal}.math-payment-pending>.math-access-note{grid-column:1/-1;margin:0}
.math-offer-unavailable{display:flex;margin:0 0 16px;padding:14px 16px;flex-direction:column;gap:4px;border:1px solid rgba(255,209,102,.35);border-radius:15px;background:rgba(255,209,102,.09)}.math-offer-unavailable strong{color:#ffd166;font-size:.8rem}.math-offer-unavailable span{color:rgba(255,255,255,.7);font:500 .72rem/1.4 system-ui,sans-serif}.math-payment-choice label.is-unavailable{opacity:.48}.math-payment-choice label.is-unavailable span{cursor:not-allowed}.math-payment-choice>button:disabled{opacity:.45;cursor:not-allowed;transform:none!important}
.math-offer-terms{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:22px;padding-top:18px;gap:14px;border-top:1px solid rgba(255,255,255,.14)}.math-offer-terms div{min-width:0}.math-offer-terms strong{color:rgba(255,255,255,.88);font:800 .7rem/1.3 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em}.math-offer-terms p{margin:5px 0 0;color:rgba(255,255,255,.6);font:500 .7rem/1.45 system-ui,sans-serif;overflow-wrap:anywhere}
@media(max-width:760px){.math-upgrade-header{grid-template-columns:1fr}.math-offer-price{min-width:0}.math-upgrade-value ul,.math-payment-pending,.math-offer-terms{grid-template-columns:1fr}.math-payment-pending>.math-access-note{grid-column:auto}}
@media(max-height:700px) and (orientation:landscape){.math-upgrade-card{padding:15px 20px}.math-upgrade-header{grid-template-columns:minmax(0,1fr) 190px;gap:16px}.math-offer-price{padding:12px 15px}.math-upgrade-value{margin:12px 0;padding:12px}.math-upgrade-value li{padding:8px}.math-upgrade-value>p{margin-top:8px}.math-offer-terms{margin-top:12px;padding-top:10px}.math-upgrade-card .math-access-flow-actions{margin-top:10px}}

.math-payment-confirmation,.math-parent-payment-confirmed{grid-column:1/-1;padding:16px;border:1px solid rgba(114,255,133,.28);border-radius:18px;background:rgba(114,255,133,.07)}
.math-payment-confirmation{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.9fr);gap:14px;align-items:end}.math-payment-confirmation label{display:flex;flex-direction:column;gap:4px}.math-payment-confirmation label strong,.math-parent-payment-confirmed strong{color:#fff;font-size:.82rem}.math-payment-confirmation label span,.math-parent-payment-confirmed small{color:rgba(255,255,255,.64);font:500 .7rem/1.4 system-ui,sans-serif}.math-payment-confirmation>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.math-payment-confirmation input{min-width:0;height:44px;padding:0 12px;border:1px solid rgba(255,255,255,.22);border-radius:12px;background:rgba(3,4,55,.48);color:#fff;font:650 .8rem/1 system-ui,sans-serif}.math-payment-confirmation button{min-height:44px;padding:0 15px;border:1px solid rgba(114,255,133,.5);border-radius:12px;background:linear-gradient(135deg,rgba(114,255,133,.26),rgba(92,106,255,.28));color:#fff;font:800 .74rem/1 system-ui,sans-serif;cursor:pointer}.math-payment-confirmation input:focus-visible,.math-payment-confirmation button:focus-visible{outline:3px solid #fff;outline-offset:2px}.math-parent-payment-confirmed{display:flex;gap:11px;align-items:center}.math-parent-payment-confirmed>span{display:grid;width:34px;height:34px;flex:0 0 auto;place-items:center;border-radius:50%;background:#72ff85;color:#07102e;font-weight:950}.math-parent-payment-confirmed>div{display:flex;min-width:0;flex-direction:column;gap:3px}
@media(max-width:760px){.math-payment-confirmation{grid-template-columns:1fr}.math-payment-confirmation>div{grid-template-columns:1fr}.math-payment-confirmation button{width:100%}}
.math-settings-subscription{display:grid;margin-top:12px;padding:14px 16px;border:1px solid rgba(114,255,133,.26);border-radius:18px;background:rgba(114,255,133,.07)}.math-settings-subscription>small{color:#72ff85;font:850 .65rem/1.2 system-ui,sans-serif;letter-spacing:.07em;text-transform:uppercase}.math-settings-subscription>strong{margin-top:4px;color:#fff;font-size:.95rem}.math-settings-subscription>span,.math-settings-subscription>p{color:rgba(255,255,255,.65);font:550 .7rem/1.4 system-ui,sans-serif}.math-settings-subscription>span{margin-top:3px}.math-settings-subscription>p{margin:7px 0 0}
.math-settings-summary{display:grid;margin-top:12px;padding:14px 16px;gap:10px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:rgba(255,255,255,.07)}.math-settings-summary small{color:#72ff85;font:850 .65rem/1.2 system-ui,sans-serif;letter-spacing:.07em;text-transform:uppercase}.math-settings-summary h3{margin:3px 0 0;color:#fff;font-size:.95rem}.math-settings-summary p{margin:0;color:rgba(255,255,255,.64);font:500 .7rem/1.4 system-ui,sans-serif}.math-settings-summary form{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end}.math-settings-summary form:has(button:only-of-type){grid-template-columns:1fr}.math-settings-summary label{display:grid;gap:4px;color:rgba(255,255,255,.75);font:700 .68rem/1.2 system-ui,sans-serif}.math-settings-summary select{height:40px;padding:0 9px;border:1px solid rgba(255,255,255,.22);border-radius:11px;background:#17165d;color:#fff}.math-settings-summary button{min-height:40px;padding:0 12px;border:1px solid rgba(114,255,133,.46);border-radius:11px;background:rgba(114,255,133,.14);color:#fff;font-weight:800;cursor:pointer}.math-settings-summary button:disabled{opacity:.58;cursor:default}.math-email-verified{display:flex;align-items:center;gap:7px;color:rgba(255,255,255,.76);font:750 .72rem/1.3 system-ui,sans-serif}.math-email-verified>span{display:grid;width:21px;height:21px;place-items:center;border-radius:50%;background:#72ff85;color:#07102e;font-size:.65rem;font-weight:950}@media(max-width:560px){.math-settings-summary form{grid-template-columns:1fr}.math-settings-summary button{width:100%}}
.math-engine-skip-link{position:fixed;z-index:1000002;top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));padding:11px 15px;border:2px solid #fff;border-radius:12px;background:#211d68;color:#fff!important;font:800 .86rem/1 system-ui,sans-serif;text-decoration:none!important;transform:translateY(-180%);transition:transform .16s ease}.math-engine-skip-link:focus{transform:translateY(0)}.math-engine-app-shell{position:relative;isolation:isolate;width:100%;min-height:100dvh;background:var(--nav-navy,#040638)}.math-engine-app-background{position:fixed;z-index:-2;inset:0;background:var(--nav-navy,#040638);pointer-events:none}.math-engine-app-transition{position:fixed;z-index:1000001;inset:0;opacity:0;background:rgba(4,6,56,.22);backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0);pointer-events:none;transition:opacity .16s ease,backdrop-filter .2s ease}.math-engine-app-shell.is-navigating .math-engine-app-transition{opacity:1;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.math-engine-app-view{width:100%;min-height:100dvh;outline:0;overflow-anchor:none}.math-engine-app-view[aria-busy=true]{cursor:progress}.math-engine-app-view>section,.math-engine-app-view>.math-game{min-height:100dvh}.math-topic-art,.math-menu-settings img,.math-primary img{display:block;object-fit:contain}.math-engine-app-shell :focus-visible{outline:3px solid #fff;outline-offset:4px}@media(prefers-reduced-motion:reduce){.math-engine-app-transition,.math-engine-skip-link{transition:none}.math-engine-app-shell *, .math-engine-app-shell *:before,.math-engine-app-shell *:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* M6: resilient kid-navigation layouts and non-blocking settings feedback. */
.math-settings-status{min-height:1.3em;margin-top:10px;color:rgba(255,255,255,.82);font:700 .8rem/1.3 system-ui,sans-serif;text-align:center}.math-language-list[aria-busy=true]{opacity:.72;pointer-events:none}.math-nav-shell.math-menu-screen{height:100dvh;min-height:100svh;padding-top:max(clamp(24px,3.8vw,72px),env(safe-area-inset-top));padding-right:max(clamp(24px,3.8vw,72px),env(safe-area-inset-right));padding-bottom:max(clamp(24px,3.8vw,72px),env(safe-area-inset-bottom));padding-left:max(clamp(24px,3.8vw,72px),env(safe-area-inset-left))}.math-menu-screen .math-menu-content{overscroll-behavior:contain;scrollbar-width:thin}@media(max-width:760px) and (orientation:portrait){.math-nav-shell.math-menu-screen{padding-top:max(16px,env(safe-area-inset-top));padding-right:max(14px,env(safe-area-inset-right));padding-bottom:max(16px,env(safe-area-inset-bottom));padding-left:max(14px,env(safe-area-inset-left))}.math-menu-screen .math-menu-content{padding-bottom:max(20px,env(safe-area-inset-bottom))}}@media(max-width:390px) and (orientation:portrait){.math-menu-screen .math-topic-grid,.math-menu-screen .math-lesson-grid-new{gap:12px}.math-menu-screen .math-topic-tile{width:min(100%,145px)}.math-menu-screen .math-menu-content{gap:18px}.math-go-back{max-width:100%}}
.math-loader-retry{display:inline-grid!important;width:auto!important;min-width:120px!important;min-height:44px!important;margin:10px!important;padding:10px 18px!important;place-items:center!important}

.math-privacy-consent{display:grid;max-width:1180px;margin:18px auto 0;padding:clamp(18px,2.5vw,28px);grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr);align-items:center;gap:24px;border:1px solid rgba(114,255,133,.3);border-radius:24px;background:linear-gradient(135deg,rgba(114,255,133,.1),rgba(116,130,255,.1));box-shadow:inset 0 1px 0 rgba(255,255,255,.12);color:#fff}.math-privacy-consent small{color:#72ff85;font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.math-privacy-consent h2{margin:6px 0 8px;font-size:1.12rem}.math-privacy-consent p{margin:5px 0;color:rgba(255,255,255,.72);font-size:.76rem;line-height:1.55}.math-privacy-consent form{display:grid;gap:12px}.math-privacy-consent label,.math-profile-minimal-notice label{display:flex;align-items:flex-start;gap:9px;color:rgba(255,255,255,.84);font-size:.72rem;line-height:1.45}.math-privacy-consent input[type=checkbox],.math-profile-minimal-notice input[type=checkbox]{width:18px;height:18px;flex:0 0 auto;margin-top:1px;accent-color:#72ff85}.math-privacy-consent button{min-height:44px;border:1px solid rgba(114,255,133,.5);border-radius:14px;background:rgba(114,255,133,.16);color:#fff;font-weight:800;cursor:pointer}.math-profile-minimal-notice{padding:14px;border:1px solid rgba(114,255,133,.24);border-radius:15px;background:rgba(114,255,133,.07)}.math-profile-minimal-notice strong{display:block;margin-bottom:5px;color:#fff;font-size:.78rem}.math-profile-minimal-notice p{margin:0 0 10px;color:rgba(255,255,255,.68);font-size:.68rem;line-height:1.5}@media(max-width:760px){.math-privacy-consent{grid-template-columns:1fr;margin:14px 12px 0}.math-profile-minimal-notice{padding:12px}}@media(max-height:560px) and (orientation:landscape){.math-privacy-consent{padding:14px;grid-template-columns:1fr 1fr;gap:14px}.math-privacy-consent p{font-size:.66rem}}@media(prefers-reduced-motion:reduce){.math-privacy-consent button{transition:none!important}}

.math-profile-choice-avatar.avatar-robot{position:relative;overflow:hidden;background:linear-gradient(145deg,#6072f2,#4b57cf)}.math-profile-choice-avatar.avatar-robot .math-child-avatar-glyph{position:absolute;top:29%;left:17%;width:66%;height:43%;border:clamp(4px,.42vw,7px) solid #ff642d;border-radius:43% 46% 36% 39%;background:#241c31;box-shadow:-8px 7px 0 -4px #282036,7px 4px 0 -4px #282036;transform:rotate(-7deg)}.math-profile-choice-avatar.avatar-robot .math-child-avatar-glyph:before{position:absolute;top:38%;left:22%;width:16%;height:17%;border-radius:50% 50% 35% 35%;background:#fff;box-shadow:clamp(30px,3vw,53px) -2px 0 -1px #fff;content:"";transform:rotate(7deg)}.math-profile-choice-avatar.avatar-robot .math-child-avatar-glyph:after{position:absolute;top:-35%;left:47%;width:15%;height:43%;border-radius:999px;background:#ff642d;content:"";transform:rotate(47deg);transform-origin:bottom center}
/* Keep the account card compact and all of its controls visible on laptop-height screens. */
.math-parent-auth-card .math-parent-auth-switch button{display:inline!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#82ff82!important;font:700 inherit!important;transform:none!important}.math-parent-auth-card .math-parent-auth-switch button:hover,.math-parent-auth-card .math-parent-auth-switch button:focus-visible{filter:none!important;text-decoration:underline}.math-parent-auth-card .math-parent-auth-switch{display:block!important}
@media(max-height:900px) and (orientation:landscape){.math-parent-access{place-items:start center;padding:18px 30px;overflow:auto}.math-parent-access-logo{width:165px;margin-bottom:14px}.math-parent-auth-card{padding:21px 30px;gap:10px}.math-parent-auth-card header small{margin-bottom:5px}.math-parent-auth-card header h1{font-size:2rem}.math-parent-auth-card header p{margin:5px auto}.math-parent-auth-card input{height:43px}.math-parent-auth-card>button{min-height:45px;margin-top:3px}.math-parent-auth-terms{display:none}}
@media(max-height:900px) and (orientation:landscape){.math-parent-access.is-login{place-items:center;overflow:hidden}}
@media(max-height:900px) and (orientation:landscape){.math-profile-manager.is-create-screen{padding:18px 38px}.math-profile-create-card{padding:22px 30px}.math-profile-back{margin-bottom:14px}.math-profile-create-heading h1{font-size:clamp(2.1rem,3.4vw,3.1rem)}.math-profile-create-heading p{margin-bottom:14px;font-size:.85rem}.math-profile-create-form{gap:9px}.math-profile-create-form input[type=text],.math-profile-create-form select{height:43px}.math-profile-create-form button{min-height:46px;margin-top:2px}.math-profile-create-form fieldset{margin:0}.math-avatar-options label>span{padding:4px}}
/* The consent option remains visible, while the full child form fits on common 16:9 laptops. */
@media(max-height:1200px) and (orientation:landscape){.math-profile-manager.is-create-screen{padding:14px 34px;overflow:auto}.math-profile-manager.is-create-screen .math-profile-create-card{padding:18px 28px}.math-profile-manager.is-create-screen .math-profile-back{margin-bottom:10px}.math-profile-manager.is-create-screen .math-profile-create-heading h1{font-size:clamp(2rem,3.1vw,2.8rem)}.math-profile-manager.is-create-screen .math-profile-create-heading p{margin-bottom:10px;font-size:.8rem}.math-profile-manager.is-create-screen .math-profile-create-form{gap:7px}.math-profile-manager.is-create-screen .math-profile-create-form input[type=text],.math-profile-manager.is-create-screen .math-profile-create-form select{height:39px}.math-profile-manager.is-create-screen .math-profile-create-form button{min-height:42px;margin-top:1px}.math-profile-manager.is-create-screen .math-profile-create-form fieldset{margin:0}.math-profile-manager.is-create-screen .math-profile-create-form legend{margin-bottom:5px}.math-profile-manager.is-create-screen .math-avatar-options label>span{height:60px;aspect-ratio:auto;padding:3px}.math-profile-manager.is-create-screen .math-avatar-options label>span i{font-size:1.55rem}.math-profile-manager.is-create-screen .math-profile-minimal-notice{padding:9px 11px}.math-profile-manager.is-create-screen .math-profile-minimal-notice p{display:none}.math-profile-manager.is-create-screen .math-profile-minimal-notice label{font-size:.64rem}}

/* Match the parent-account card: same width, padding, fields, and comfortable rhythm. */
.math-profile-manager.is-create-screen .math-profile-create-card{width:min(100%,590px);padding:clamp(25px,4vw,44px);border-color:rgba(255,255,255,.23);background:linear-gradient(145deg,rgba(39,39,105,.82),rgba(15,15,69,.91));box-shadow:0 28px 74px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.18)}.math-profile-manager.is-create-screen .math-profile-back{margin-bottom:26px}.math-profile-manager.is-create-screen .math-profile-create-heading h1{font-size:clamp(2rem,4vw,3rem)}.math-profile-manager.is-create-screen .math-profile-create-heading p{margin-bottom:22px;font-size:.92rem}.math-profile-manager.is-create-screen .math-profile-create-form{gap:15px}.math-profile-manager.is-create-screen .math-profile-create-form input[type=text],.math-profile-manager.is-create-screen .math-profile-create-form select{height:49px;border-color:rgba(255,255,255,.25);background:rgba(72,69,145,.51)}.math-profile-manager.is-create-screen .math-profile-create-form button{min-height:51px;margin-top:7px}.math-profile-manager.is-create-screen .math-profile-create-form fieldset{margin:2px 0 0}.math-profile-manager.is-create-screen .math-profile-create-form legend{margin-bottom:9px}.math-profile-manager.is-create-screen .math-avatar-options{gap:13px}.math-profile-manager.is-create-screen .math-avatar-options label>span{height:76px;aspect-ratio:auto;padding:6px}.math-profile-manager.is-create-screen .math-avatar-options label>span i{font-size:2rem}.math-profile-manager.is-create-screen .math-profile-minimal-notice{padding:11px 13px}.math-profile-manager.is-create-screen .math-profile-minimal-notice label{font-size:.72rem}
@media(max-height:900px) and (orientation:landscape){.math-profile-manager.is-create-screen{padding:14px 30px;overflow:auto}.math-profile-manager.is-create-screen .math-profile-create-card{padding:20px 28px}.math-profile-manager.is-create-screen .math-profile-back{margin-bottom:12px}.math-profile-manager.is-create-screen .math-profile-create-heading h1{font-size:2.1rem}.math-profile-manager.is-create-screen .math-profile-create-heading p{margin-bottom:10px;font-size:.8rem}.math-profile-manager.is-create-screen .math-profile-create-form{gap:8px}.math-profile-manager.is-create-screen .math-profile-create-form input[type=text],.math-profile-manager.is-create-screen .math-profile-create-form select{height:41px}.math-profile-manager.is-create-screen .math-profile-create-form button{min-height:44px;margin-top:2px}.math-profile-manager.is-create-screen .math-profile-create-form fieldset{margin:0}.math-profile-manager.is-create-screen .math-profile-create-form legend{margin-bottom:5px}.math-profile-manager.is-create-screen .math-avatar-options label>span{height:58px;padding:3px}.math-profile-manager.is-create-screen .math-avatar-options label>span i{font-size:1.5rem}.math-profile-manager.is-create-screen .math-profile-minimal-notice{padding:8px 10px}.math-profile-manager.is-create-screen .math-profile-minimal-notice p{display:none}.math-profile-manager.is-create-screen .math-profile-minimal-notice label{font-size:.63rem}}

.math-profile-manager.is-create-screen .math-profile-consent-inline{display:grid!important;grid-template-columns:17px minmax(0,1fr);align-items:center;gap:9px;margin:-3px 0 0;color:rgba(255,255,255,.7);font:500 .7rem/1.4 system-ui,sans-serif}.math-profile-manager.is-create-screen .math-profile-consent-inline input{width:17px;height:17px;min-height:0;flex:0 0 auto;margin:0;accent-color:#82ff82}.math-profile-manager.is-create-screen .math-profile-consent-inline span{display:block}

/* Profile chooser: a single clear tutor prompt and a soft neutral add control. */
.math-profile-switch-heading h1{white-space:nowrap;font-size:clamp(2rem,3.4vw,4.4rem)}.math-profile-add-choice>span{position:relative;display:block;width:clamp(82px,8.5vw,132px);height:clamp(82px,8.5vw,132px);font-size:0;opacity:1;transition:opacity .2s ease}.math-profile-add-choice>span:before,.math-profile-add-choice>span:after{position:absolute;top:50%;left:50%;border-radius:0;background:#fff;content:"";transform:translate(-50%,-50%)}.math-profile-add-choice>span:before{width:clamp(66px,6.8vw,108px);height:7px}.math-profile-add-choice>span:after{width:7px;height:clamp(66px,6.8vw,108px)}.math-profile-add-choice:hover,.math-profile-add-choice:focus-visible{color:#fff;transform:translateY(-6px)}.math-profile-add-choice:hover>span,.math-profile-add-choice:focus-visible>span{opacity:.5}
@media(max-width:900px){.math-profile-switch-heading h1{white-space:normal}}
