@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root{--color-bg:#f9f7ff;--color-primary:#6d28d9;--color-secondary:#db2777;--ink:#2a1b4a;--lav:#f1ebff;--line:#ede9fe;--muted:#9385b5;--panel:#fff;--shadow:0 12px 34px -18px #581c8759;--sidebar:260px;--bottom:64px}
*{box-sizing:border-box}
html,body{margin:0;width:100%;min-height:100%;overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
body{min-height:100dvh;overflow:hidden;background:linear-gradient(160deg,#f6f1ff,#fdf7ff 45%,#fff7fb);color:var(--ink);font-family:'IBM Plex Sans Arabic',system-ui,sans-serif}
button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{cursor:not-allowed;opacity:.58}
.app-frame{height:100dvh;display:flex;direction:rtl;overflow:hidden}
.sidebar{width:var(--sidebar);flex:0 0 var(--sidebar);display:flex;flex-direction:column;gap:1rem;padding:calc(env(safe-area-inset-top,0px) + 1rem) .75rem 1rem;background:#ffffffd9;border-left:1px solid var(--line);backdrop-filter:blur(18px);overflow:auto}
.brand{display:flex;align-items:center;gap:.65rem;padding:.25rem .5rem .65rem}.brand-mark{width:44px;height:44px;flex:0 0 44px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#7c3aed,#a855f7 55%,#ec4899 130%);color:#fff;font:800 22px 'Baloo Bhaijaan 2',sans-serif;box-shadow:0 8px 18px #7c3aed33}.brand-name{display:block;font:800 16px/1.2 'Baloo Bhaijaan 2',sans-serif;color:var(--ink)}.brand-tagline{display:block;font-size:10px;font-weight:700;color:#a78bda;margin-top:2px}
.side-nav{display:flex;flex-direction:column;gap:4px}.nav-link{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:16px;color:#6d28d9;font-size:13px;font-weight:600;transition:.18s}.nav-link:hover{background:#f5f0ff}.nav-link.active{color:#fff;background:#6d28d9;box-shadow:0 8px 18px #7c3aed40}.nav-ico{width:20px;text-align:center;font-size:16px}.sidebar-note{margin-top:auto;padding:0 8px;color:#b6a8d5;font-size:10px;line-height:1.8}
.app-main{min-width:0;flex:1;display:flex;flex-direction:column;overflow:hidden}.app-content{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d6c7f4 transparent}.page-wrap{max-width:1120px;margin:0 auto;padding:14px 24px 42px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 16px}.page-title{font:800 23px/1.25 'Baloo Bhaijaan 2',sans-serif;color:var(--ink);margin:0}.page-subtitle{margin:2px 0 0;font-size:11px;color:#a18dc7}.heading-icon{display:flex;align-items:center;gap:10px}.heading-icon .brand-mark{width:40px;height:40px;flex-basis:40px;border-radius:14px}.mobile-back{width:40px;height:40px;border:1px solid var(--line);border-radius:14px;background:#fff;color:#7c3aed;display:grid;place-items:center}
.hero{position:relative;overflow:hidden;border-radius:30px;background:linear-gradient(135deg,#7c3aed,#a855f7 55%,#ec4899 130%);color:#fff;padding:24px;margin:0 0 22px;box-shadow:0 0 0 1px #8b5cf626,0 24px 50px -30px #4c1d9599}.hero:before,.hero:after{content:'';position:absolute;border-radius:50%;pointer-events:none}.hero:before{width:170px;height:170px;left:-38px;top:-70px;background:#ffffff12}.hero:after{width:150px;height:150px;left:60px;bottom:-104px;background:#fb718533}.hero-content{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:18px}.hero-symbol{font-size:24px}.hero h1{font:800 clamp(28px,5vw,42px)/1.18 'Baloo Bhaijaan 2',sans-serif;margin:6px 0 2px}.hero p{font-size:14px;color:#ffffffd9;margin:0;line-height:1.7}.hero-badges{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.hero-badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 11px;background:#ffffff2c;font-size:11px;font-weight:600}.hero-grade{width:112px;height:112px;flex:0 0 112px;border-radius:28px;background:#ffffff24;display:grid;place-items:center;font:800 52px 'Baloo Bhaijaan 2',sans-serif;backdrop-filter:blur(5px)}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;margin:18px 0 10px;gap:10px}.section-title{font:700 17px/1.2 'Baloo Bhaijaan 2',sans-serif;color:var(--ink);margin:0}.section-sub{font-size:11px;color:#9b88bf;margin-top:2px}.section-link{border:0;background:transparent;color:#6d28d9;font-weight:700;font-size:12px}
.card{border:1px solid var(--line);border-radius:26px;background:#fff;box-shadow:var(--shadow)}.card-pad{padding:16px}.grade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px}.grade-card{padding:17px 12px;text-align:center;transition:transform .18s,box-shadow .18s}.grade-card:hover,.feature-card:hover,.lesson-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px -18px #581c8790}.grade-number{width:62px;height:62px;border-radius:19px;margin:auto;display:grid;place-items:center;color:#fff;font:800 23px 'Baloo Bhaijaan 2',sans-serif;background:linear-gradient(135deg,#8b5cf6,#c026d3);box-shadow:0 8px 18px #7c3aed44}.grade-card:nth-child(2) .grade-number{background:linear-gradient(135deg,#a855f7,#6366f1)}.grade-card:nth-child(3) .grade-number{background:linear-gradient(135deg,#6366f1,#9333ea)}.grade-name{font:700 15px 'Baloo Bhaijaan 2',sans-serif;margin-top:8px}.grade-tagline{font-size:11px;color:#9b88bf;margin-top:3px}.grade-progress{font-size:11px;color:#7c3aed;font-weight:700;margin-top:5px}
.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:22px}.feature-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:22px;transition:.18s;text-align:right}.feature-icon{width:44px;height:44px;border-radius:16px;flex:0 0 44px;display:grid;place-items:center;color:#fff;font-size:20px;background:linear-gradient(135deg,#8b5cf6,#6d28d9);box-shadow:0 6px 14px #7c3aed33}.feature-title{display:block;font:700 14px 'Baloo Bhaijaan 2',sans-serif;line-height:1.2}.feature-desc{display:block;font-size:11px;color:#9b88bf;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lesson-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.lesson-card{display:flex;align-items:center;gap:11px;padding:12px;border-radius:19px;transition:.18s}.lesson-initial{width:40px;height:40px;flex:0 0 40px;border-radius:14px;display:grid;place-items:center;background:#f3eefe;color:#6d28d9;font-weight:700}.lesson-name{display:block;font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lesson-unit{display:block;font-size:11px;color:#9b88bf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lesson-minutes{font-size:10px;color:#a18dc7;white-space:nowrap}.unit-panel{margin:14px 0 18px;padding:15px 16px 16px}.unit-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.unit-mark{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#8b5cf6,#c026d3);color:#fff;font:700 18px 'Baloo Bhaijaan 2',sans-serif}.unit-title{font:700 16px 'Baloo Bhaijaan 2',sans-serif;margin:0}.unit-count{font-size:11px;color:#a18dc7}
.pill-row{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:2px 0 8px}.pill{flex:0 0 auto;padding:7px 12px;border:1px solid #e9defd;border-radius:999px;color:#7c3aed;background:#fff;font-size:11px;font-weight:600}.pill.active{background:#6d28d9;border-color:#6d28d9;color:#fff}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 18px;border:0;border-radius:16px;background:#6d28d9;color:#fff;font-size:13px;font-weight:700;box-shadow:0 8px 18px #7c3aed2b;transition:transform .15s,filter .15s}.button:hover{filter:brightness(1.05);transform:translateY(-1px)}.button.secondary{background:#f5f0ff;color:#6d28d9;box-shadow:none}.button.outline{background:#fff;color:#6d28d9;border:1px solid #e9defd;box-shadow:none}.button.danger{background:#fff1f2;color:#be123c;box-shadow:none}.button.small{min-height:34px;padding:6px 11px;border-radius:12px;font-size:11px}.button:disabled{opacity:.55;cursor:not-allowed;transform:none}
.form-control{width:100%;min-height:44px;border:1px solid #e8def9;border-radius:14px;padding:10px 12px;background:#fff;color:var(--ink);outline:none;font-size:13px}.form-control:focus{border-color:#a78bfa;box-shadow:0 0 0 3px #c4b5fd55}.form-control::placeholder{color:#b0a3c8}.form-label{display:block;font-size:11px;font-weight:700;color:#8068ac;margin:0 0 6px}.form-group{margin:0 0 13px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.textarea{min-height:100px;resize:vertical}.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.muted{color:#9b88bf}.small-text{font-size:11px}.empty-state{text-align:center;padding:30px 16px;color:#9582b5}.empty-icon{font-size:28px;margin-bottom:6px}.divider{height:1px;background:#f0eafd;margin:14px 0}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.stat-card{text-align:center;padding:15px}.stat-value{font:800 22px 'Baloo Bhaijaan 2',sans-serif;color:#5b21b6}.stat-label{font-size:11px;color:#9683b7;margin-top:3px}.progress-track{height:9px;border-radius:999px;background:#eee8fa;overflow:hidden}.progress-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#8b5cf6,#ec4899);transition:width .3s}.toast{position:fixed;z-index:100;bottom:calc(var(--bottom) + env(safe-area-inset-bottom,0px) + 12px);left:50%;transform:translate(-50%,18px);opacity:0;pointer-events:none;max-width:min(90vw,440px);padding:10px 16px;border-radius:14px;background:#2a1b4a;color:#fff;font-size:12px;box-shadow:0 10px 30px #2a1b4a3b;transition:.2s}.toast.visible{opacity:1;transform:translate(-50%,0)}
.bottom-nav{display:none}.bottom-link{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:58px;color:#a394c2;font-size:10px;font-weight:700}.bottom-link .nav-ico{width:36px;height:27px;border-radius:11px;display:grid;place-items:center;font-size:16px}.bottom-link.active{color:#6d28d9}.bottom-link.active .nav-ico{background:#f2eefe}
.lesson-tabs{position:sticky;top:0;z-index:5;background:#f9f7ffeb;backdrop-filter:blur(12px);padding:3px 0}.content-section{margin:12px 0 17px;padding:16px}.content-section h3{font:700 15px 'Baloo Bhaijaan 2',sans-serif;color:#5b21b6;margin:0 0 7px}.content-section p{font-size:13px;line-height:1.9;color:#55456e}.formula-card{padding:12px;border-radius:16px;background:#faf8ff;border:1px solid #eee7fb;text-align:center}.formula-main{font-size:16px;font-weight:700;color:#6d28d9}.formula-desc{font-size:11px;color:#9b88bf;margin-top:4px}.example-card{margin:10px 0;padding:14px;border:1px solid #ede9fe;border-radius:18px;background:#fff}.example-question{font-weight:700;font-size:13px}.example-steps{margin:10px 0;padding-inline-start:22px;font-size:12px;line-height:1.9;color:#655579}.question-card{padding:16px;margin:12px 0}.question-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.answer-option{padding:11px 12px;border:1px solid #e9defd;border-radius:14px;background:#fff;text-align:right;color:#55456e;font-size:13px}.answer-option:hover{border-color:#a78bfa;background:#faf7ff}.answer-option.correct{border-color:#34d399;background:#ecfdf5;color:#047857}.answer-option.wrong{border-color:#fda4af;background:#fff1f2;color:#be123c}.feedback{margin-top:12px;padding:11px;border-radius:14px;font-size:12px;line-height:1.7}.feedback.good{background:#ecfdf5;color:#047857}.feedback.bad{background:#fff1f2;color:#be123c}.teacher-tabs{display:flex;gap:8px;overflow:auto;margin-bottom:14px}.teacher-tab{white-space:nowrap}.attempt-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #f1ebfa;font-size:12px}.attempt-percent{font-weight:700;color:#7c3aed}
.diagram{width:100%;max-width:520px;min-height:180px;margin:0 auto;border-radius:16px;background:#fff}.diagram-wrap{margin:0}.diagram-wrap figcaption{text-align:center;color:#9b88bf;font-size:11px;margin-top:6px;line-height:1.6}.diagram-details{font-size:10px;color:#8068ac;margin:8px auto;max-width:520px}.diagram-details summary{cursor:pointer;font-weight:700}.diagram-detail{padding:3px 0;border-bottom:1px solid #f1ebfa;overflow-wrap:anywhere}.video-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.video-result{padding:12px;border:1px solid var(--line);border-radius:18px;background:#fff}.video-thumb{aspect-ratio:16/9;border-radius:13px;background:linear-gradient(135deg,#3f1c66,#7c3aed);display:grid;place-items:center;color:#fff;font-size:28px}.video-search-state{max-width:650px}.video-search-state .video-thumb{max-width:300px;margin-bottom:12px}
.game-card{overflow:hidden;transition:.18s}.game-banner{height:110px;display:grid;place-items:center;color:#fff;font-size:32px;background:linear-gradient(135deg,#a855f7,#6d28d9)}.game-card:nth-child(3n+2) .game-banner{background:linear-gradient(135deg,#fb7185,#db2777)}.game-card:nth-child(3n) .game-banner{background:linear-gradient(135deg,#fbbf24,#f97316)}.game-copy{padding:13px}.game-next-slot{text-align:center;margin:12px}.worksheet-result{margin:14px 0}.library-content{margin-top:12px}.activity-box{font-size:13px;line-height:1.8}.activity-order{display:flex;flex-direction:column;gap:8px;padding-inline-start:25px}.activity-order li::marker{color:#8b5cf6;font-weight:700}.activity-order .answer-option{width:100%;min-height:45px}.activity-output .feedback{display:block}
.lab-layout{display:grid;grid-template-columns:1fr 1.5fr;gap:14px}.lab-canvas{min-height:280px;display:grid;place-items:center;overflow:hidden}.cube{width:130px;height:130px;position:relative;transform:rotateX(-25deg) rotateY(35deg);transform-style:preserve-3d;transition:.2s;touch-action:none}.cube-face{position:absolute;width:130px;height:130px;background:#7c3aed;border:1px solid #c4b5fd;opacity:.9}.cube-front{transform:translateZ(65px)}.cube-right{transform:rotateY(90deg) translateZ(65px);background:#6d28d9}.cube-top{transform:rotateX(90deg) translateZ(65px);background:#a78bfa}.plot{width:100%;height:230px;border:1px solid #eee7fb;border-radius:14px;background:#fff}.plot-activity-grid{width:min(100%,360px);aspect-ratio:1;margin:12px auto;border:1px solid #e9defd;border-radius:14px;background:#fff;overflow:hidden;cursor:crosshair;touch-action:manipulation}.plot-activity-grid svg{display:block;width:100%;height:100%}.attempt-point{pointer-events:none}.pair-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start}.pair-list>div{display:flex;flex-direction:column;gap:7px}.pair-list .answer-option{width:100%;min-height:44px}.pair-choice.selected{border-color:#7c3aed;background:#f1ebff}.pair-choice.matched{opacity:.55;border-color:#34d399;background:#ecfdf5}.pair-choice.mismatch{border-color:#fda4af;background:#fff1f2}.pair-choice:disabled{cursor:default}.sqrt-value{color:#6d28d9}.sqrt-status{margin-top:5px}.chat-log{height:min(52dvh,460px);overflow:auto;display:flex;flex-direction:column;gap:10px;padding:8px;border-radius:18px;background:#faf8ff}.chat-bubble{max-width:88%;padding:11px 14px;border-radius:16px;font-size:13px;line-height:1.8;white-space:normal}.chat-bubble.assistant{align-self:flex-start;background:#fff;border:1px solid #eee7fb;color:#4c3b65;border-top-left-radius:4px}.chat-bubble.user{align-self:flex-end;background:#6d28d9;color:#fff;border-top-right-radius:4px}.question-editor legend{color:#5b21b6}.content-section details>summary{cursor:pointer}.content-section[hidden],.lab-content[hidden]{display:none!important}
@media(max-width:1050px){.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.lesson-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){:root{--sidebar:0px;--bottom:64px}.app-frame{display:block}.sidebar{display:none}.app-main{height:100dvh}.page-wrap{padding:calc(env(safe-area-inset-top,0px) + 12px) 14px calc(var(--bottom) + env(safe-area-inset-bottom,0px) + 18px)}.page-title{font-size:21px}.hero{padding:18px;margin-bottom:17px;border-radius:26px}.hero-grade{width:82px;height:82px;flex-basis:82px;border-radius:22px;font-size:38px}.hero p{font-size:12px}.grade-grid{gap:7px}.grade-card{padding:12px 6px;border-radius:21px}.grade-number{width:51px;height:51px;border-radius:16px;font-size:20px}.grade-name{font-size:13px}.grade-tagline{display:none}.feature-grid{gap:8px}.feature-card{padding:10px;gap:8px;border-radius:18px}.feature-icon{width:38px;height:38px;flex-basis:38px;border-radius:13px;font-size:18px}.feature-title{font-size:12px}.feature-desc{font-size:10px}.lesson-list{grid-template-columns:1fr;gap:8px}.unit-panel{padding:13px 12px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bottom-nav{display:flex;position:fixed;z-index:40;right:0;bottom:0;left:0;min-height:calc(var(--bottom) + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);background:#fffffff2;border-top:1px solid #ede9fe;backdrop-filter:blur(18px)}.question-options{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.lab-layout{grid-template-columns:1fr}.video-results{grid-template-columns:1fr}.hero-badge{font-size:10px}.content-section{padding:13px}.attempt-row{grid-template-columns:minmax(0,1fr) auto}.attempt-row .attempt-date{display:none}.toolbar .button{flex:1}.page-heading{margin-bottom:12px}.pair-list{grid-template-columns:1fr 1fr;gap:6px}.diagram{min-height:150px}.chat-log{height:48dvh}.video-search-state .video-thumb{max-width:100%}.lesson-tabs .pill{font-size:10px;padding:7px 10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

@media(max-width:1050px) and (min-width:768px){:root{--sidebar:20vw}}
.brand>.brand-mark{background:#6d28d9;box-shadow:none;border-radius:11px}


/* حالات التفاعل للألعاب الأصلية */
.grade-card.selected{border-color:#8b5cf6;box-shadow:0 0 0 2px #ede9fe,0 14px 28px #6d28d91a}.game-toolbar{justify-content:flex-start;flex-wrap:wrap;gap:8px;margin-bottom:12px}.game-score-chip{background:#f1ebff;color:#6d28d9}.game-round-chip{background:#faf7ff;color:#6d28d9}.game-clock{background:#fff7ed;color:#c2410c}.game-round-note{color:#7c3aed;font-size:12px;font-weight:700;margin:0 0 10px}.game-question-text{font-family:'Baloo Bhaijaan 2','IBM Plex Sans Arabic',sans-serif;font-size:19px;font-weight:700;line-height:1.9;color:#2a1b4a;text-align:center;margin:10px 0 18px}.game-options{margin-top:16px}.game-step-list,.game-available-steps{display:flex;flex-direction:column;gap:8px;margin-top:12px}.game-step{text-align:right;display:flex;align-items:flex-start;gap:10px;line-height:1.75}.game-step-number,.selected-step>span{width:24px;height:24px;flex:0 0 24px;display:inline-grid;place-items:center;border-radius:8px;background:#f1ebff;color:#7c3aed;font-size:11px;font-weight:800}.game-prompt-hint{color:#7c3aed;font-size:13px;font-weight:700;margin-bottom:4px}.wheel-area{display:flex;flex-direction:column;align-items:center;gap:10px;margin:2px 0 18px}.wheel-wrap{position:relative;width:190px;height:190px}.wheel-svg{width:100%;height:100%;transition:transform 1.6s cubic-bezier(.17,.67,.16,1)}.wheel-pointer{position:absolute;z-index:2;top:-7px;left:50%;transform:translateX(-50%);font-size:24px;color:#4c1d95}.wheel-hub{position:absolute;inset:0;margin:auto;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#fff;box-shadow:0 3px 12px #2a1b4a2e;font-weight:800;color:#6d28d9;pointer-events:none}.game-hint-button{margin-top:12px}.feedback.hint{display:block;margin-top:8px;background:#fffbeb;color:#92400e;padding:10px 12px;border-radius:14px}.game-hearts{float:left;font-size:13px}.escape-progress{display:flex;gap:6px;margin:0 0 10px}.escape-progress span{height:8px;flex:1;border-radius:999px;background:#ede9fe}.escape-progress span.done{background:linear-gradient(90deg,#7c3aed,#a855f7)}.hunt-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.hunt-option{min-height:78px;display:grid;place-items:center;text-align:center}.game-selected-steps{min-height:70px;border:1px dashed #c4b5fd;background:#faf8ff;border-radius:16px;padding:10px;display:flex;flex-direction:column;gap:7px}.selected-step{display:flex;align-items:center;gap:9px;padding:8px 10px;background:#6d28d9;color:#fff;border-radius:12px;font-size:13px;font-weight:700}.selected-step>span{background:#ffffff40;color:#fff}.game-available-steps{margin-top:10px}.game-available-steps .answer-option{text-align:right}.game-result{text-align:center;max-width:600px;margin:0 auto}.game-result-icon{font-size:54px;margin-bottom:6px}.game-result-bar{height:12px;max-width:320px;margin:16px auto 0;background:#ede9fe;border-radius:999px;overflow:hidden}.game-result-bar span{display:block;height:100%;background:linear-gradient(90deg,#7c3aed,#a855f7,#ec4899);border-radius:inherit;transition:width .3s ease}.video-search-state{margin-top:14px}.empty-state .button{margin-top:10px}
@media(max-width:640px){.game-toolbar{gap:6px}.game-toolbar .button{padding-inline:10px}.game-score-chip,.game-round-chip,.game-clock{font-size:11px;padding:6px 9px}.wheel-wrap{width:178px;height:178px}.hunt-options{gap:6px}.hunt-option{min-height:66px;padding:7px;font-size:12px}.pair-list{gap:6px}.pair-list .answer-option{padding:9px 7px;font-size:12px}.game-question-text{font-size:17px}}

.source-warning{padding:10px 12px;margin:10px 0;border:1px solid #fbbf24;border-radius:14px;background:#fffbeb;color:#92400e;font-size:12px;line-height:1.8}.interactive-grid-svg{touch-action:manipulation}.keyboard-cursor{fill:#7c3aed;stroke:#fff;stroke-width:2;opacity:.8}

.sidebar .brand-mark{font-size:0;color:transparent;background:#fff url('/assets/icon-512.png') center/cover no-repeat;box-shadow:0 6px 14px #2a1b4a24}


/* نسب الشبكة والهوية المرئية في صفحة المصدر المنشورة */
.sidebar .brand-mark{width:34px;height:34px;flex:0 0 34px;border-radius:11px;font-size:18px;color:#fff;background:#6d28d9;box-shadow:none}
@media(min-width:768px){
  .page-wrap{padding-top:8px}
  .hero{min-height:144px;padding:16px;margin-bottom:12px;border-radius:25px}
  .hero-symbol{font-size:13px}
  .hero h1{font-size:30px;line-height:1.15}
  .hero p{font-size:11px}
  .hero-badges{gap:6px;margin-top:7px}
  .hero-badge{padding:4px 9px;font-size:9px}
  .hero-grade{width:92px;height:92px;flex-basis:92px;border-radius:24px;font-size:34px}
  .section-head{margin:14px 0 8px}
  .grade-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
  .grade-card{padding:11px 9px}
  .grade-number{width:44px;height:44px;border-radius:13px;font-size:18px;box-shadow:0 5px 12px #7c3aed3b}
  .grade-name{font-size:13px;margin-top:5px}
  .grade-tagline{font-size:9px}
  .grade-progress{font-size:10px;margin-top:3px}
  .feature-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
  .feature-card{min-height:58px;padding:8px 10px;gap:8px;border-radius:16px}
  .feature-icon{width:34px;height:34px;flex-basis:34px;border-radius:11px;font-size:17px}
  .feature-title{font-size:11px}
  .feature-desc{font-size:9px}
  .lesson-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .page-wrap>.card.card-pad{padding:9px 12px}
  .sidebar{gap:8px;padding:8px 12px 12px}
  .brand{padding:0 4px 4px;gap:7px}
  .brand-name{font-size:14px}
  .brand-tagline{font-size:9px}
  .side-nav{gap:3px}
  .nav-link{min-height:29px;padding:6px 10px;border-radius:12px;font-size:12px;gap:8px}
  .nav-ico{width:18px;font-size:15px}
}
@media(max-width:767px){.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.feature-card.tone-purple .feature-icon{background:#7c3aed;box-shadow:0 5px 12px #7c3aed36}
.feature-card.tone-pink .feature-icon{background:#ec4899;box-shadow:0 5px 12px #ec489936}
.feature-card.tone-green .feature-icon{background:#22c55e;box-shadow:0 5px 12px #22c55e36}
.feature-card.tone-orange .feature-icon{background:#f97316;box-shadow:0 5px 12px #f9731636}
.feature-card.tone-cyan .feature-icon{background:#06b6d4;box-shadow:0 5px 12px #06b6d436}
.feature-card.tone-yellow .feature-icon{background:#fbbf24;box-shadow:0 5px 12px #fbbf2436}
.feature-card.tone-violet .feature-icon{background:#8b5cf6;box-shadow:0 5px 12px #8b5cf636}
.feature-card.tone-amber .feature-icon{background:#ef4444;box-shadow:0 5px 12px #ef444436}


/* ضبط القياس الطباعي والمسافات بعد المقارنة البصرية على عرض المصدر */
.page-heading{margin:0 0 8px}
.page-title{font-size:17px;line-height:1.25}
.heading-icon{gap:8px}
.heading-glyph{display:inline-grid;min-width:24px;place-items:center;color:#9582b5;font-size:18px;line-height:1}
@media(min-width:768px){
  .section-head{margin:10px 0 6px}
  .grade-grid{margin-bottom:10px}
  .grade-card{padding:8px 9px;border-radius:18px}
  .page-wrap>.card.card-pad{padding:6px 10px}
  .page-wrap>.card.card-pad .button{min-height:38px;padding:7px 13px;border-radius:13px}
  .sidebar{gap:0;padding:6px 12px 10px}
  .brand{padding:0 4px;gap:7px}
  .brand-name{font-size:12px;white-space:nowrap}
  .brand-tagline{font-size:9px}
  .nav-link{min-height:28px;padding:5px 8px;border-radius:12px;font-size:12px;gap:8px}
}
@media(max-width:767px){.page-title{font-size:18px}.page-heading{margin-bottom:8px}}

@media(min-width:768px){.feature-grid{gap:8px;margin-bottom:8px}.sidebar{gap:4px}}


/* Optional student cloud-sync consent */
.cloud-consent{display:grid;gap:11px;margin-top:14px;padding-top:13px;border-top:1px solid var(--border,#eee7fa)}
.consent-row{display:flex;align-items:flex-start;gap:10px;line-height:1.8;font-size:.9rem;cursor:pointer}
.consent-row input{width:18px;height:18px;flex:0 0 18px;margin-top:4px;accent-color:#6d28d9}
.consent-row input:disabled{cursor:not-allowed;opacity:.55}
@media(max-width:600px){.cloud-consent .button{width:100%}.consent-row{font-size:.86rem}}
