*{box-sizing:border-box}body{margin:0;background:#f3f3ff;color:#212342;font:17px/1.5 system-ui,sans-serif}header{max-width:1150px;margin:auto;padding:22px 24px;display:flex;justify-content:space-between;gap:16px}a{color:#5943bf;text-decoration:none;font-weight:700}main{max-width:1100px;margin:auto;padding:0 24px}button,input,textarea{font:inherit}button{border:0;background:#6550de;color:white;border-radius:15px;padding:13px 22px;font-weight:700;cursor:pointer;box-shadow:0 5px 0 #443297;transition:transform .15s}button:hover{transform:translateY(-2px)}button:active{transform:translateY(3px);box-shadow:none}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #00a7a4;outline-offset:4px}button:disabled{opacity:.6;cursor:default}input,textarea{border:2px solid #d8d4ef;border-radius:12px;padding:12px;color:#262542;background:white}textarea{width:100%;margin:12px 0;resize:vertical}input{min-width:0}h1{font-size:clamp(38px,6vw,66px);line-height:1.04;margin:18px 0}h2{font-size:28px}em{font-style:normal;color:#6651dc}.hero{position:relative;overflow:hidden;border:1px solid white;border-radius:32px;background:linear-gradient(115deg,#fff,#e8e4ff 65%,#d5f4ed);padding:40px;margin-bottom:22px;box-shadow:0 16px 50px #44329712}.hero p{max-width:560px}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:800;color:#6550a6}.hero-art{position:absolute;right:40px;top:55px;font-size:100px;transform:rotate(-9deg);filter:drop-shadow(0 12px 0 #6550de25)}.hero-art span{display:block;font-size:48px;text-align:center}.entry{background:white;border-radius:22px;padding:22px;border:1px solid #e0ddef}.entry form{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.grades{display:flex;flex-wrap:wrap;gap:12px}.grades button{background:white;color:#544584;box-shadow:0 4px 0 #ddd6fa;border:2px solid transparent}.grades button.active{background:#6550de;color:white;border-color:#433080}.subjects{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.subject-card{text-align:left;min-height:146px;padding:20px;background:white;color:#292640;border:1px solid #e5dff5;box-shadow:0 6px 0 #e3dff4}.subject-card:nth-child(3n+2){background:#e9f9f2}.subject-card:nth-child(3n){background:#fff4df}.subject-card span{font-size:35px;display:block}.subject-card small{display:block;font-weight:400;color:#696581;font-size:13px;margin-top:8px}.hint{color:#77718e;font-size:14px}.task-heading{margin:22px 0}.task-heading span{background:#e4defb;padding:6px 12px;border-radius:20px;font-size:14px}.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.modes button{padding:22px 10px}.modes small{display:block;font-size:13px;font-weight:400;margin-top:8px}.quiet{background:white;color:#524579;box-shadow:none;border:1px solid #d8d1e9;padding:8px 14px}#playArea,#practiceArea{margin-top:25px;background:white;padding:22px;border-radius:24px}.hud{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.hud strong{margin-right:auto}.collected{min-height:48px;padding:8px;margin:12px 0;background:#f5f1ff;border-radius:14px}.chip{display:inline-block;background:#ded5ff;padding:4px 10px;border-radius:10px;margin:3px}canvas{display:block;width:100%;max-width:700px;aspect-ratio:10/7;margin:auto;border-radius:18px;background:#101c38;touch-action:none}.controls{display:flex;justify-content:center;gap:10px;margin:16px 0}.controls button{font-size:26px;min-width:60px;touch-action:manipulation}.modes button.selected{background:#108578;box-shadow:0 5px 0 #086258}footer{padding:40px 0;text-align:center;color:#77718e}[hidden]{display:none!important}@media(max-width:760px){.hero{padding:26px}.hero-art{position:static;font-size:55px;display:flex;justify-content:center;gap:22px;margin-top:16px}.hero-art span{font-size:35px}.subjects{grid-template-columns:repeat(2,1fr)}.modes{grid-template-columns:1fr}.modes button{padding:12px}.modes small{margin:2px}main{padding:0 14px}header{padding:16px 14px;font-size:14px}#playArea{padding:14px}.controls button{min-width:50px;padding:8px 15px}}@media(prefers-reduced-motion:reduce){button{transition:none}}
.grades{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;margin:25px 0 38px}.grades button{position:relative;overflow:hidden;min-height:185px;text-align:left;padding:25px;border-radius:25px;background:linear-gradient(140deg,#fff,#eee8ff);box-shadow:0 9px 0 #ddd6fa,0 15px 25px #4432970d}.grades button:nth-child(3n+2){background:linear-gradient(140deg,#fff,#ddf5ed);box-shadow:0 9px 0 #c3e7db}.grades button:nth-child(3n){background:linear-gradient(140deg,#fff,#fff0cf);box-shadow:0 9px 0 #eedcaa}.grade-number{display:block;font-size:56px;line-height:1;font-weight:900;color:#6850cc}.grade-title{display:block;margin:10px 0 4px;font-size:22px;color:#2e294a}.grade-description{font-size:13px;color:#77718e;font-weight:500}.grade-icon{position:absolute;right:24px;top:24px;font-size:42px;transform:rotate(8deg);filter:drop-shadow(0 5px 0 #6550de15)}.categories{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:26px 0}.categories button{padding:23px 14px;font-size:19px;background:white;color:#524579;border:2px solid #e6dff8;box-shadow:0 6px 0 #e6dff8}.categories small{display:block;font-size:13px;font-weight:400;margin-top:6px}.categories button.selected{background:#6550de;color:white;border-color:#6550de;box-shadow:0 6px 0 #453399}.modes{grid-template-columns:repeat(2,1fr)}#bjbArea{background:white;padding:25px;border-radius:22px}.bjb-card{display:block;margin:14px 0;padding:18px;border-radius:15px;background:#efecff;color:#5943a5}.bjb-card small{display:block;font-weight:400;margin-top:5px}.entry{margin-bottom:28px}.hero-art{font-size:70px;right:25px;top:60px}.hero h1{font-size:clamp(34px,5vw,56px);max-width:740px}.hero p{max-width:600px}@media(max-width:760px){.grades{grid-template-columns:repeat(2,1fr);gap:16px}.grades button{min-height:160px;padding:20px}.grade-number{font-size:43px}.grade-icon{font-size:30px;right:16px;top:20px}.categories{grid-template-columns:1fr;gap:12px}.categories button{padding:14px;text-align:left}.categories small{display:inline;margin-left:10px}.hero-art{position:static}.modes{grid-template-columns:1fr}}@media(min-width:761px) and (max-width:1000px){.hero-art{opacity:.2}}
.hero{display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:center;gap:20px;padding:32px}.hero h1{font-size:clamp(32px,4.3vw,49px)}.student-welcome{text-align:center;align-self:stretch}.portrait-frame{position:relative;height:350px;max-width:240px;margin:auto;border-radius:28px;overflow:hidden;box-shadow:0 10px 28px #312a4d25;background:#23212a}.portrait-frame .portrait-fallback,.portrait-frame .student-portrait{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;aspect-ratio:2/3;border-radius:0;background:transparent;max-width:none;touch-action:auto}.voice-button{font-size:14px;padding:10px 14px;margin-top:16px;background:#087f7d;box-shadow:0 4px 0 #07514f}.student-welcome .hint{font-size:12px;margin:12px 0 0}.guide-speaking .portrait-frame{box-shadow:0 0 0 4px #8ce2ce,0 12px 30px #17735f25}.lesson-guide{display:flex;align-items:center;gap:16px;background:white;border-radius:18px;padding:12px;margin:18px 0}.lesson-guide img{height:100px;width:68px;object-fit:cover;border-radius:12px}.lesson-guide p{margin:4px 0;font-size:14px}.lesson-guide button{font-size:13px;padding:6px 10px}@media(max-width:760px){.hero{grid-template-columns:1fr;padding:24px}.student-welcome{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;align-items:center;text-align:left}.portrait-frame{height:195px;width:130px;grid-row:span 2;border-radius:16px}.voice-button{margin:0;align-self:end}.student-welcome .hint{align-self:start;margin-top:4px}.lesson-guide img{height:80px;width:55px}}

/* Restore the original background and left-side student guide. */
:root{background:#0b344e}body{background:radial-gradient(ellipse at 12% 10%,#275d88 0,transparent 42%),radial-gradient(ellipse at 90% 20%,#614795 0,transparent 40%),radial-gradient(ellipse at 65% 90%,#127b78 0,transparent 50%),linear-gradient(135deg,#082b43,#163e68 50%,#123750);background-attachment:fixed;color:#193d55}body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.12;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cg fill='none' stroke='%23f8d38e' stroke-width='2'%3E%3Cpath d='M75 30C40 5 15 40 40 60C55 70 60 50 45 48M75 30C110 5 135 40 110 60C95 70 90 50 105 48M75 120C40 145 15 110 40 90C55 80 60 100 45 102M75 120C110 145 135 110 110 90C95 80 90 100 105 102M75 30L75 120M30 75L120 75'/%3E%3Cpath d='M75 60L90 75L75 90L60 75Z'/%3E%3C/g%3E%3C/svg%3E")}
header,main{position:relative;z-index:1}header a{color:#fff4d5}#catalog,#subjectScene,#workspace{padding:26px;background:linear-gradient(135deg,#fffdf5,#f4f7ff);border:1px solid #ffe9ab;border-radius:25px;box-shadow:0 20px 55px #021c3c44;margin:22px 0}.hero{overflow:visible;background:linear-gradient(135deg,#fffdf5,#f4f7ff);border:1px solid #ffe9ab;box-shadow:0 24px 70px #021c3c55;grid-template-columns:220px minmax(0,1fr)}.hero-copy{grid-column:2;grid-row:1}.student-welcome{grid-column:1;grid-row:1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:10px}.portrait-frame{height:330px;width:220px;max-width:none;box-shadow:none;border-radius:0;overflow:visible;background:transparent}.portrait-frame .portrait-fallback,.portrait-frame .student-portrait{object-fit:contain;object-position:center bottom;background:transparent;filter:drop-shadow(0 0 18px #77d9ff44)}.hero h1{font-size:clamp(28px,3.3vw,44px)}.hero p{font-size:16px}.eyebrow{letter-spacing:1px}.voice-button{margin:4px 0}.guide-speaking .portrait-frame{box-shadow:none;filter:drop-shadow(0 0 15px #6fd3e455)}footer,footer a{color:#fff4d5}button{background:linear-gradient(120deg,#225e91,#4269a4);box-shadow:0 4px 12px #12365e25}.grades button{border-color:#e5d7ad}.grade-number{color:#255d89}.categories button.selected{background:#235d8b;border-color:#235d8b;box-shadow:0 5px 0 #143d5f}
@media(min-width:1101px){main{max-width:1100px;margin-left:310px;margin-right:24px;width:calc(100% - 334px);padding:0 16px}.hero{display:block}.student-welcome{position:fixed;left:12px;top:92px;bottom:14px;width:280px;z-index:2;justify-content:flex-end;gap:8px}.portrait-frame{width:280px;height:calc(100vh - 200px);max-height:700px;flex:1}.student-welcome .hint{color:#fff4d5;font-size:12px}.student-welcome .voice-button{flex:none}.hero h1{max-width:100%;font-size:clamp(32px,3.4vw,48px)}}
@media(max-width:760px){main{padding:0 12px}.hero{display:grid;grid-template-columns:100px minmax(0,1fr);gap:14px;padding:18px 14px}.hero-copy{grid-column:2;grid-row:1}.student-welcome{grid-column:1;grid-row:1;display:flex;align-self:center;gap:6px}.portrait-frame{height:180px;width:110px;grid-row:auto;max-width:110px}.hero h1{font-size:clamp(23px,5vw,34px)}.hero p{font-size:13px}.eyebrow{font-size:9px;letter-spacing:.4px}.voice-button{font-size:11px;padding:8px 6px;width:110px;line-height:1.3}.student-welcome .hint{font-size:10px;margin:0}.grades{gap:12px}.grades button{min-height:140px;padding:16px}.grade-number{font-size:38px}.grade-icon{font-size:26px;right:12px}.grade-title{font-size:19px}#catalog,#subjectScene,#workspace{padding:18px 12px}.entry{padding:16px}.entry input{width:100%}header a{font-size:13px}}
.categories{grid-template-columns:repeat(4,minmax(0,1fr))}.categories button{font-size:16px;padding:20px 8px}.game-rules{background:#f0f7ff;border:1px solid #b7d1e6;border-radius:18px;padding:18px;margin:16px 0}.game-rules h3{margin-top:0}.game-rules li{padding:5px 0}.game-rules ol{padding-left:24px}.next-token{font-size:21px;font-weight:800;color:#15547d;background:#fff2c9;padding:12px;border-radius:12px}#testArea{background:white;border-radius:22px;padding:22px;margin-top:22px}.test-question{border:1px solid #d7ddeb;border-radius:16px;padding:18px;margin:18px 0}.test-question legend{font-weight:700;padding:0 8px}.test-question label{display:flex;align-items:center;gap:14px;background:#f4f6fb;border-radius:12px;padding:12px;margin:10px 0;cursor:pointer}.test-question input{width:22px;height:22px;accent-color:#235d8b;flex:none}.test-question label:has(input:checked){background:#dbeefb;outline:2px solid #4b87b3}.test-review{padding:15px;border-radius:14px;margin:14px 0;border-left:5px solid #278663;background:#ecf9f0}.test-review.incorrect{border-color:#c05947;background:#fff2ee}.test-review p{margin:6px 0}@media(max-width:900px){.categories{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.categories{grid-template-columns:1fr}.categories button{text-align:left}.test-question{padding:12px}#testArea{padding:14px}}
.round-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:20px 0}.round-card{background:#edf3ff;color:#274e74;border:2px solid #cfddf0;box-shadow:0 4px 0 #ccdaed;padding:15px 8px;font-size:14px}.round-card.selected{background:linear-gradient(120deg,#1675a2,#315aa4);color:white;border-color:#22618b}.round-card small{display:block;font-weight:400;margin-top:5px}#nextRound{background:linear-gradient(120deg,#14805f,#23a779);margin:12px 10px 12px 0}#roundStatus{font-weight:700;color:#246181}.subject-backdrop{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;perspective:900px}.subject-object{position:absolute;left:var(--x);top:var(--y);font-size:clamp(34px,6vw,78px);opacity:.36;filter:drop-shadow(8px 12px 4px #00142f60);text-shadow:1px 1px #fff8,3px 3px #153f7355,5px 5px #10305a55;transform:rotateY(-18deg) rotateX(8deg);animation:subjectFloat var(--duration) ease-in-out var(--delay) infinite alternate;color:#c4e8ff}.subject-object:nth-child(even){font-size:42px;opacity:.28}.subject-object.moving-robot{animation:robotWalk var(--duration) ease-in-out var(--delay) infinite alternate;opacity:.62;filter:drop-shadow(5px 10px 4px #00243855)}.robot-3d{position:relative;width:74px;height:100px;transform:rotateY(-18deg)}.robot-head{position:absolute;top:16px;left:4px;width:66px;height:42px;line-height:28px;border-radius:14px;background:linear-gradient(130deg,#f6fdff,#96c9e9);border:3px solid #4695b6;box-shadow:inset -7px -4px 0 #337fa533,5px 3px 0 #2e6a8b;color:#124d6c;text-align:center;font-size:28px;text-shadow:none}.robot-antenna{position:absolute;top:0;left:35px;width:4px;height:18px;background:#62bcde}.robot-antenna:before{content:'';position:absolute;left:-4px;top:0;width:12px;height:12px;border-radius:50%;background:#ffd66a;box-shadow:0 0 12px #ffe2a0}.robot-body{position:absolute;top:62px;left:17px;width:42px;height:27px;line-height:23px;border-radius:9px;background:linear-gradient(135deg,#9ee7ff,#3e9abb);border:2px solid #36718b;box-shadow:5px 3px 0 #286488;color:#ffe38c;font-size:20px;text-align:center;text-shadow:none}.robot-body:before,.robot-body:after{content:'';position:absolute;top:4px;width:7px;height:22px;border-radius:5px;background:#a8dded}.robot-body:before{left:-12px;transform:rotate(25deg)}.robot-body:after{right:-12px;transform:rotate(-25deg)}.robot-feet{position:absolute;top:92px;left:20px;width:34px;display:flex;justify-content:space-between}.robot-feet i{display:block;width:12px;height:11px;border-radius:4px;background:#7dc6df;box-shadow:2px 2px #265671;animation:robotFoot .65s ease-in-out infinite alternate}.robot-feet i+ i{animation-delay:-.65s}
@keyframes subjectFloat{from{transform:translate3d(0,0,0) rotateY(-18deg) rotateX(8deg) rotate(-8deg)}to{transform:translate3d(24px,-30px,30px) rotateY(15deg) rotateX(-6deg) rotate(8deg)}}@keyframes robotWalk{0%{transform:translate3d(-25px,0,0) rotate(-3deg)}50%{transform:translate3d(28px,-12px,0) rotate(3deg)}100%{transform:translate3d(70px,0,0) rotate(-3deg)}}@keyframes robotFoot{to{transform:translateY(-4px)}}
body[data-subject="kazakh"]{background:radial-gradient(ellipse at 20% 20%,#78834188,transparent 50%),linear-gradient(135deg,#4b4e24,#183d50)}body[data-subject="russian"]{background:radial-gradient(ellipse at 70% 15%,#de87bb66,transparent 50%),linear-gradient(135deg,#373674,#293759)}body[data-subject="english"]{background:radial-gradient(ellipse at 70% 20%,#c27ad777,transparent 50%),linear-gradient(135deg,#363c84,#243561)}body[data-subject="math"]{background:radial-gradient(ellipse at 30% 30%,#578cd966,transparent 50%),linear-gradient(135deg,#252b63,#4b3971)}body[data-subject="science"]{background:radial-gradient(ellipse at 60% 20%,#48ae8266,transparent 50%),linear-gradient(135deg,#123f45,#235945)}body[data-subject="world"]{background:radial-gradient(ellipse at 40% 20%,#59b7b166,transparent 50%),linear-gradient(135deg,#1c4e67,#27565a)}body[data-subject="history"]{background:radial-gradient(ellipse at 50% 20%,#dca76555,transparent 50%),linear-gradient(135deg,#55432d,#343f56)}body[data-subject="it"]{background:radial-gradient(ellipse at 55% 20%,#47cfde55,transparent 50%),linear-gradient(135deg,#102d52,#124f68)}body:not([data-subject="home"]):before{opacity:.045}#workspace{background:linear-gradient(135deg,#fffdf5f2,#f4f7fff5)}.subject-card{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(135deg,#fff,#e4edff);box-shadow:0 7px 0 #cdd9e8,0 14px 25px #13305415}.subject-card:after{content:attr(data-decoration);position:absolute;z-index:-1;right:-4px;top:14px;font-size:70px;opacity:.17;transform:rotate(-15deg) rotateY(-20deg);text-shadow:3px 4px #3c6d8540;filter:drop-shadow(5px 7px 3px #23426b22)}.subject-card[data-subject="it"]{background:linear-gradient(135deg,#fff,#bfefff)}.subject-card[data-subject="math"]{background:linear-gradient(135deg,#fff,#e1d7ff)}.subject-card[data-subject="science"],.subject-card[data-subject="world"]{background:linear-gradient(135deg,#fff,#cdf0dc)}.subject-card[data-subject="history"]{background:linear-gradient(135deg,#fff,#f8e0b8)}.subject-card[data-subject="kazakh"]{background:linear-gradient(135deg,#fff,#fff0b8)}.subject-card[data-subject="russian"],.subject-card[data-subject="english"]{background:linear-gradient(135deg,#fff,#f4d8ed)}@media(max-width:760px){.round-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.round-card:last-child{grid-column:span 2}.subject-object{opacity:.16}.subject-object.moving-robot{opacity:.28}.robot-3d{transform:scale(.7)}.subject-card:after{font-size:55px}}@media(prefers-reduced-motion:reduce){.subject-object,.subject-object.moving-robot,.robot-feet i{animation:none!important}}
