:root{font-family:Vazirmatn,Tahoma,sans-serif;color:#24334b;background:#f5f1e8;font-synthesis:none;--bg:#f5f1e8;--surface:#fffdf8;--surface2:#eee7d9;--ink:#24334b;--muted:#758094;--navy:#17243a;--mint:#58bea0;--gold:#d7a94a;--red:#d96666;--border:#ded8cc;--shadow:0 10px 30px #27364c18;color-scheme:light}:root.dark{--bg:#101827;--surface:#19253a;--surface2:#243148;--ink:#edf3f2;--muted:#a8b3c4;--border:#34425a;--shadow:0 12px 35px #0005;color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:var(--bg);color:var(--ink);-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit}button:focus-visible{outline:3px solid #58bea077;outline-offset:2px}.app-shell{max-width:580px;min-height:100vh;margin:auto;background:var(--bg);position:relative;overflow:hidden}.page{padding:20px 20px calc(28px + env(safe-area-inset-bottom))}.topbar{height:68px;padding:env(safe-area-inset-top) 14px 0;display:flex;align-items:center;justify-content:space-between;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:20}.topbar h1{font-size:19px;margin:0}.topbar-space,.icon-btn{width:42px}.icon-btn{height:42px;border:0;background:transparent;border-radius:50%;display:grid;place-items:center}.icon-btn:active{background:var(--surface2);transform:scale(.94)}.brand{display:flex;align-items:center;gap:11px;position:relative;z-index:2}.brand-mark{width:52px;height:52px;border-radius:17px;background:var(--navy);color:var(--gold);display:grid;place-items:center;box-shadow:0 8px 20px #17243a33}.brand h1{font-size:24px;margin:0}.brand p{font-size:11px;color:var(--muted);margin:0}.wisdom{margin-right:auto;background:var(--surface);border:1px solid var(--border);height:38px;border-radius:19px;padding:0 11px;display:flex;align-items:center;gap:5px;color:var(--gold);font-weight:800}.library-art{height:235px;margin:22px -20px -32px;position:relative;background:linear-gradient(#17243a,#263855 72%,#735d48);overflow:hidden;clip-path:polygon(0 0,100% 0,100% 88%,52% 100%,0 88%)}.moon-glow{position:absolute;width:180px;height:180px;border-radius:50%;background:#e6bd6177;filter:blur(35px);left:calc(50% - 90px);top:22px}.arch{position:absolute;left:calc(50% - 65px);bottom:25px;width:130px;height:170px;border:12px solid #ad8956;border-bottom:0;border-radius:70px 70px 0 0;box-shadow:0 0 0 6px #55432f}.door{height:100%;display:grid;place-items:center;background:linear-gradient(90deg,#423429,#72583b,#423429);border-radius:55px 55px 0 0;color:#d8ae5a;font-size:48px;font-weight:800;text-shadow:0 2px 7px #000}.door:after{content:"";width:9px;height:9px;border-radius:50%;background:#e4c060;position:absolute;bottom:58px;right:22px}.shelf{position:absolute;bottom:56px;width:145px;height:110px;border-bottom:8px solid #946f42;display:flex;align-items:flex-end;gap:4px;padding:0 9px}.shelf i{display:block;width:18px;background:#b76859;border-radius:3px 3px 0 0;box-shadow:inset -3px 0 #fff2}.shelf i:nth-child(2n){height:70px;background:#4f9a8b}.shelf i:nth-child(3n){height:91px;background:#c89e4d}.shelf i:nth-child(4n){height:55px}.shelf i:nth-child(5n){height:80px}.s1{right:0}.s2{left:0}.floor-lines{position:absolute;left:0;right:0;bottom:0;height:55px;background:repeating-linear-gradient(80deg,transparent 0 65px,#d1ab7422 66px 68px)}.story{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:18px 20px;box-shadow:var(--shadow);z-index:2}.story span,.lesson-intro span{font-size:12px;color:var(--mint);font-weight:700}.story h2{margin:4px 0;font-size:20px}.story p,.lesson-intro p{font-size:13px;color:var(--muted);margin:5px 0;line-height:1.8}.primary{width:100%;min-height:54px;border:0;border-radius:17px;background:linear-gradient(135deg,#4db695,#62c8a8);box-shadow:0 8px 20px #4db69544;color:#fff;font-weight:800;display:flex;gap:8px;align-items:center;justify-content:center;margin-top:16px;transition:.2s}.primary:active{transform:translateY(2px) scale(.99);box-shadow:0 4px 10px #4db69544}.primary:disabled{opacity:.5}.home-menu{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:20px}.home-menu button{border:0;background:transparent;display:flex;align-items:center;flex-direction:column;gap:7px;font-size:11px;color:var(--muted)}.home-menu svg{background:var(--surface);border:1px solid var(--border);width:47px;height:47px;padding:12px;border-radius:15px;color:var(--ink);transition:.2s}.home-menu button:active svg{transform:scale(.9)}.chapter-banner{border-radius:24px;background:linear-gradient(135deg,#1b2a42,#304667);color:#fff;padding:22px;display:flex;gap:17px;align-items:center;box-shadow:var(--shadow)}.chapter-banner>svg{color:var(--gold)}.chapter-banner small{color:#75d0b3}.chapter-banner h2{margin:1px 0}.chapter-banner p{margin:0;color:#bec8d5;font-size:12px}.level-path{padding:24px 3px;position:relative}.level-path:before{content:"";position:absolute;right:30px;top:30px;bottom:30px;width:3px;background:repeating-linear-gradient(var(--mint) 0 8px,transparent 8px 14px)}.level-node{position:relative;width:100%;min-height:74px;border:1px solid var(--border);border-radius:19px;background:var(--surface);margin-bottom:12px;padding:9px;display:flex;align-items:center;text-align:right;gap:12px;box-shadow:0 5px 15px #25334a0d}.level-node>span{z-index:1;width:42px;height:42px;flex:none;border-radius:50%;background:var(--surface2);display:grid;place-items:center;font-weight:800}.level-node.done>span{background:var(--mint);color:#fff}.level-node>div:nth-child(2){display:flex;flex-direction:column}.level-node small{color:var(--muted);font-size:10px}.level-node:disabled{opacity:.55}.stars{margin-right:auto;display:flex;color:var(--border)}.done .stars{color:var(--gold)}.coming{display:flex;gap:13px;background:var(--surface2);border-radius:18px;padding:16px;color:var(--muted)}.coming b{color:var(--ink)}.coming p{margin:2px 0;font-size:11px}.lesson-intro{margin-bottom:18px}.lesson-intro h2{font-size:24px;margin:5px 0}.concept-grid{display:grid;gap:12px}.concept-card{background:var(--surface);border:1px solid var(--border);border-right:5px solid var(--accent);border-radius:19px;padding:16px 18px;position:relative;animation:rise .45s both;animation-delay:var(--delay)}.concept-number{position:absolute;left:15px;top:14px;background:color-mix(in srgb,var(--accent),transparent 82%);color:var(--accent);border-radius:9px;width:29px;height:29px;display:grid;place-items:center;font-weight:800}.concept-card h3{margin:0 0 5px;color:var(--accent)}.concept-card p{font-size:13px;margin:0;line-height:1.7}.concept-card small{display:block;background:var(--surface2);padding:7px 10px;border-radius:9px;margin-top:9px;color:var(--muted)}.game-screen{max-width:580px;min-height:100vh;margin:auto;padding:18px 20px calc(22px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.game-hud{display:flex;align-items:center;gap:10px}.progress-track{height:9px;border-radius:5px;background:var(--surface2);flex:1;overflow:hidden}.progress-track span{height:100%;display:block;background:var(--mint);transition:width .4s}.game-hud b{font-size:12px}.game-hud em{font-style:normal;background:var(--surface);padding:5px 8px;border-radius:9px}.game-hud em.danger{color:var(--red);animation:pulse .7s infinite}.question-card{margin-top:35px}.level-kind{color:var(--mint);font-size:12px;font-weight:700}.question-card h2{font-size:22px;line-height:1.6;margin:7px 0 22px}.options{display:flex;gap:9px;flex-wrap:wrap}.options.vertical{flex-direction:column}.options button,.sort-zone button,.match-grid button{border:1px solid var(--border);background:var(--surface);border-radius:14px;padding:13px 16px;transition:.15s}.options.vertical button{text-align:right;display:flex;justify-content:space-between}.options button.selected{border:2px solid var(--mint);background:color-mix(in srgb,var(--mint),transparent 88%)}.options button.selected span{width:18px;height:18px;border:5px solid var(--mint);border-radius:50%}.drop-zones{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}.drop-zones button{min-height:95px;border:2px dashed var(--border);border-radius:16px;background:var(--surface2);display:flex;flex-direction:column;justify-content:center;gap:5px}.drop-zones button.filled{border-style:solid;border-color:var(--mint);background:color-mix(in srgb,var(--mint),transparent 89%)}.drop-zones small{color:var(--muted)}.sort-zone{min-height:130px;border:2px dashed var(--border);padding:10px;border-radius:18px;margin-bottom:13px;display:grid;gap:7px}.sort-zone:empty:after{content:"کارت‌ها را به ترتیب انتخاب کن";color:var(--muted);margin:auto;font-size:12px}.sort-zone button{text-align:right}.sort-zone b{display:inline-grid;place-items:center;margin-left:9px;width:23px;height:23px;background:var(--mint);color:#fff;border-radius:7px}.match-grid{display:grid;grid-template-columns:1fr 1.5fr;gap:12px}.match-grid>div{display:grid;gap:8px}.match-grid button{font-size:12px}.match-grid button.matched{border-color:var(--mint);background:color-mix(in srgb,var(--mint),transparent 88%)}.feedback{margin-top:auto;border-radius:17px;overflow:hidden;max-height:0;padding:0 16px;transition:.35s}.feedback.ok,.feedback.bad{max-height:160px;margin-top:20px;padding:13px 16px}.feedback.ok{background:#5cbd9b22;color:var(--mint)}.feedback.bad{background:#dc6e6e1c;color:var(--red)}.feedback-title{display:flex;gap:7px;align-items:center;font-weight:800}.feedback p{color:var(--ink);margin:4px 0;font-size:12px}.action{margin-top:15px}.achievement-list{display:grid;gap:12px}.achievement-list article{display:flex;align-items:center;gap:13px;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:14px;opacity:.55}.achievement-list article.earned{opacity:1;border-color:#d7a94a66}.achievement-list article>div{width:52px;height:52px;display:grid;place-items:center;background:var(--surface2);border-radius:15px;color:var(--muted)}.achievement-list .earned>div{color:var(--gold);background:#d7a94a22}.achievement-list section{flex:1}.achievement-list h3,.achievement-list p{margin:0}.achievement-list p{font-size:11px;color:var(--muted)}.achievement-list article>span{font-size:10px;color:var(--muted)}.settings-list{display:grid;gap:11px}.setting{width:100%;border:1px solid var(--border);background:var(--surface);border-radius:17px;padding:15px;display:flex;align-items:center;gap:11px}.setting b{font-weight:600}.setting i{width:45px;height:25px;border-radius:20px;background:var(--surface2);margin-right:auto;padding:3px;transition:.2s}.setting i span{display:block;width:19px;height:19px;border-radius:50%;background:#fff;box-shadow:0 2px 4px #0002;transition:.2s}.setting i.on{background:var(--mint)}.setting i.on span{transform:translate(-20px)}.setting.static div{display:flex;flex-direction:column}.setting.static small{color:var(--muted)}.setting.static>span{margin-right:auto}.danger-button{margin-top:25px;border:1px solid var(--red);background:transparent;color:var(--red);height:48px;border-radius:15px}.about{text-align:center;padding:30px 8px}.about-logo{margin:auto;width:108px;height:108px;border-radius:32px;background:var(--navy);color:var(--gold);display:grid;place-items:center;box-shadow:var(--shadow)}.about h2{font-size:28px;margin-bottom:5px}.about p{line-height:2;color:var(--muted);font-size:14px}.quote{margin:25px 0;background:var(--surface);border:1px solid var(--border);border-radius:17px;padding:20px;color:var(--gold)}.about small{color:var(--muted)}.result-screen{text-align:center;padding-top:10vh;position:relative}.trophy-big{margin:auto;width:130px;height:130px;border-radius:50%;display:grid;place-items:center;background:#d7a94a22;color:var(--gold);animation:pop .6s}.result-screen h1{margin:18px 0 5px}.result-stars{color:var(--gold);display:flex;justify-content:center;gap:2px}.result-stars svg:nth-child(2){transform:translateY(-8px)}.result-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:35px 0 10px}.result-stats div{display:flex;flex-direction:column;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:17px}.result-stats b{font-size:22px}.result-stats small{color:var(--muted)}.text-button{border:0;background:transparent;color:var(--muted);margin:18px}.result-rays{position:absolute;z-index:-1;width:310px;height:310px;right:calc(50% - 155px);top:4vh;background:repeating-conic-gradient(#d7a94a11 0 10deg,transparent 10deg 25deg);border-radius:50%;animation:spin 20s linear infinite}@keyframes rise{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}@keyframes pop{0%{transform:scale(.4) rotate(-15deg)}70%{transform:scale(1.1)}to{transform:none}}@keyframes pulse{50%{transform:scale(1.1)}}@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:700px){body{background:linear-gradient(135deg,#101a2b,#273b58);padding:30px}.app-shell,.game-screen{border-radius:28px;min-height:calc(100vh - 60px);box-shadow:0 20px 80px #0005}.topbar{border-radius:28px 28px 0 0}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
