/* Soroban Academy R49 — stable Home + exclusive pages + polished forest games */
#home{overflow:visible!important}
#home>:not(.hero):not(#modules){display:none!important;visibility:hidden!important;pointer-events:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important}
#home>.hero{display:block!important;grid-template-columns:1fr!important;gap:0!important;min-height:0!important;margin-bottom:12px!important;position:relative!important}
#home>.hero>:not(:first-child),#home>.hero>.stats,#home>.hero>[class~="stats"],#v174GuidedModuleCard,#v175GuidedModuleCard,#v177QuickHome,#v188FinalBanner{display:none!important;visibility:hidden!important;opacity:0!important;position:absolute!important;pointer-events:none!important;width:0!important;height:0!important;min-width:0!important;min-height:0!important;max-width:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important}
#home>.hero>:first-child{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important}
#modules.r46HomeGrid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important;align-items:stretch!important;gap:12px!important;width:100%!important;min-height:0!important;transform:none!important;animation:none!important;transition:none!important}
#modules.r46HomeGrid>.r46GroupTitle{grid-column:1/-1!important;width:100%!important;margin:15px 0 2px!important;padding:0!important;font-size:22px!important;line-height:1.25!important;font-weight:950!important;color:#174f43!important;background:none!important;border:0!important;box-shadow:none!important;transform:none!important;animation:none!important;transition:none!important}
#modules.r46HomeGrid>.safeR25Card{width:100%!important;min-width:0!important;height:184px!important;min-height:184px!important;max-height:184px!important;margin:0!important;padding:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;border-radius:20px!important;animation:none!important;transition:none!important;transform:none!important;will-change:auto!important;contain:layout paint!important}
#modules.r46HomeGrid>.safeR25Card *,#modules.r46HomeGrid>.safeR25Card:hover,#modules.r46HomeGrid>.safeR25Card:active,#modules.r46HomeGrid>.safeR25Card:focus{animation:none!important;transition:none!important;transform:none!important;will-change:auto!important}
#modules.r46HomeGrid .safeR25Title{flex:0 0 40px!important;height:40px!important;min-height:40px!important;max-height:40px!important;width:100%!important;box-sizing:border-box!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:15px!important;line-height:1.15!important;padding:10px 10px 5px!important}
#modules.r46HomeGrid .safeR25Visual{display:block!important;flex:1 1 auto!important;width:100%!important;height:144px!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
#modules.r46HomeGrid .safeR25Visual>img{display:block!important;width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;object-position:center!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;animation:none!important;transition:none!important;transform:none!important}
#modules.r46HomeGrid .r46IconFallback{width:100%;height:100%;display:grid;place-items:center;font-size:54px;background:linear-gradient(145deg,#edf6f1,#fff7e7);color:#176d57}
#modules.r46HomeGrid>.safeR25Card:focus-visible{outline:3px solid rgba(18,112,90,.25)!important;outline-offset:2px!important}
#modules.r46HomeGrid>.safeR25Card:active{filter:brightness(.97)!important}.v25MenuItem[data-r46-game-menu] .mi img{display:block;width:100%;height:100%;object-fit:cover;border-radius:10px}

body.r46GameOpen{overflow:hidden!important;overscroll-behavior:none!important;background:#f8f6ef!important}
.r46GamePage{position:fixed!important;inset:0!important;z-index:5000!important;background:linear-gradient(180deg,#faf9f4,#edf5ef)!important;padding:max(8px,env(safe-area-inset-top)) 9px max(8px,env(safe-area-inset-bottom))!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;color:#173f39}
.r46GamePage.hidden{display:none!important}.r46GameHead{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:50px;padding:4px 3px 8px;border-bottom:1px solid #e4dfd3}.r46GameHead h2{margin:0;font-size:20px;color:#174f43}.r46GameHead small{display:block;color:#7d7466;font-weight:700;margin-top:2px}.r46Back{border:1px solid #ddcfb8;background:#fffaf0;border-radius:14px;padding:10px 14px;font-weight:900;color:#174f43;cursor:pointer;touch-action:manipulation}.r46GameBody{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column}.r46Card{background:#fff;border:1px solid #e8dfd1;border-radius:22px;box-shadow:0 10px 30px rgba(74,63,42,.08)}.r46DinoTop{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.r46DinoStat,.r46DinoTopRight{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.r46Pill{background:rgba(255,250,239,.96);border:1px solid #d9c7a2;color:#174f43;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:950;box-shadow:0 3px 9px rgba(50,56,43,.08)}.r46Pill.offline{background:#fff4d8;border-color:#f1d995;color:#7a5a13}.r46DifficultyLabel{display:flex;align-items:center;gap:6px;background:#f7ecd5;border:1px solid #d8c39d;border-radius:999px;padding:4px 5px 4px 10px;font-size:12px;font-weight:950;color:#5c4c31;box-shadow:0 3px 9px rgba(78,60,34,.08)}.r46DifficultyLabel select{border:0;background:#fff;border-radius:999px;padding:5px 8px;font:inherit;font-weight:900;color:#174f43;outline:none}.r46DifficultyLabel select:disabled{opacity:.68}.r46DinoOverlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;padding:14px;text-align:center;background:linear-gradient(180deg,rgba(9,35,24,.03),rgba(9,35,24,.18))}.r48GameWelcome{width:min(92%,440px);min-height:205px;border-radius:25px;background-image:var(--cover);background-size:cover;background-position:center;overflow:hidden;box-shadow:0 18px 46px rgba(10,37,25,.38);border:2px solid rgba(225,194,125,.78);display:flex;align-items:flex-end}.r48WelcomeShade{width:100%;padding:18px;background:linear-gradient(180deg,transparent,rgba(7,38,25,.88));color:white;text-align:right}.r48WelcomeShade span{display:inline-block;padding:4px 9px;border-radius:999px;background:rgba(255,255,255,.19);font-size:11px;font-weight:900}.r48WelcomeShade h3{margin:7px 0 3px;font-size:25px;color:white}.r48WelcomeShade p{margin:0;line-height:1.55;font-size:13px;font-weight:750}.r48ResultCard{background:rgba(255,255,255,.95);border:1px solid #e1d8c7;border-radius:24px;padding:18px 22px;box-shadow:0 14px 38px rgba(45,60,50,.19);max-width:390px}.r48ResultIcon{font-size:44px}.r48ResultCard h3{margin:4px 0 7px;color:#174f43;font-size:24px}.r48ResultCard p{margin:0;color:#6e675d;line-height:1.65;font-weight:700}.r46DinoControls{display:grid;grid-template-columns:1fr auto;gap:8px}.r46Jump,.r46Start{border:0;border-radius:17px;padding:14px 16px;font-weight:950;font-size:17px;cursor:pointer;touch-action:manipulation}.r46Jump{background:linear-gradient(145deg,#24966f,#116449);color:white;box-shadow:0 9px 20px rgba(15,91,66,.28);border:1px solid rgba(255,255,255,.2)}.r46Start{background:linear-gradient(145deg,#f7e7bf,#e7c982);color:#5b431d;border:1px solid #d2b16d;min-width:120px;box-shadow:0 8px 18px rgba(112,82,29,.18)}

.r46DuelBody{height:100%;min-height:0;display:flex;flex-direction:column;gap:8px;padding-top:8px}.r46DuelSetup{overflow:auto;padding:13px;background:linear-gradient(180deg,#fff,#fbf8f1)}.r48DuelTitle{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.r48DuelTitle h3{margin:2px 0 0;color:#174f43}.r48DuelTitle small{color:#817767;font-weight:800}.r48DuelHearts{font-size:27px;color:#e04455;letter-spacing:4px}.r46SetupGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.r46Field{display:flex;flex-direction:column;gap:5px}.r46Field span{font-size:12px;font-weight:900;color:#625b50}.r46Field input,.r46Field select{width:100%;border:1px solid #ded5c6;background:#fff;border-radius:13px;padding:10px 11px;font:inherit;font-weight:800;outline:none}.r46Field input:focus,.r46Field select:focus{border-color:#2b8c76;box-shadow:0 0 0 3px rgba(43,140,118,.12)}.r48TrainerSettings{margin-top:11px;padding:10px;border:1px solid #e5dbc9;background:#f8f4ec;border-radius:17px}.r48TrainerSettings h4{margin:0 0 8px;color:#4e4639}.r48ModeButtons{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:9px}.r48ModeButtons button{border:1px solid #ddd2bf;background:#fff;border-radius:13px;padding:9px 4px;min-height:55px;font-weight:900;color:#514a3f;cursor:pointer}.r48ModeButtons button small{font-size:9px}.r48ModeButtons button.active{background:linear-gradient(145deg,#17866d,#126954);color:#fff;border-color:#126954;box-shadow:0 6px 16px rgba(20,120,94,.18)}.r48StudentLocked{opacity:.82}.r48StudentLocked:before{content:'إعدادات المدرب';display:block;font-size:11px;font-weight:900;color:#756b5d;margin-bottom:5px}.r48SettingsGrid{grid-template-columns:repeat(4,minmax(0,1fr))}.r46DuelNote{margin:9px 0 0;padding:9px 10px;border-radius:12px;background:#eef7f2;color:#58675e;font-size:12px;line-height:1.6;font-weight:700}.r46DuelStart{width:100%;margin-top:10px;border:0;border-radius:15px;background:linear-gradient(145deg,#177a63,#0f6552);color:white;padding:13px;font-size:16px;font-weight:950;cursor:pointer;box-shadow:0 8px 18px rgba(23,122,99,.18)}
.r46Arena{display:none;height:100%;min-height:0;grid-template-rows:auto minmax(110px,.62fr) minmax(190px,1fr) auto;gap:8px}.r46Arena.on{display:grid}.r46ScoreRow{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.r46TeamBox{border-radius:17px;padding:8px 10px;color:white;min-width:0}.r46TeamBox.red{background:linear-gradient(135deg,#dc4653,#9f2737)}.r46TeamBox.blue{background:linear-gradient(135deg,#367fdc,#244da4)}.r46TeamName{font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.r46Hp{display:flex;align-items:center;gap:5px;margin-top:4px}.r46Heart{position:relative;display:inline-block;color:rgba(255,255,255,.35);font-size:25px;line-height:1}.r46Heart::after{content:"♥";position:absolute;inset:0;color:white;overflow:hidden;width:var(--fill,100%)}.r46HpNum{font-size:12px;font-weight:900;margin-inline-start:3px}.r46Vs{font-weight:1000;color:#7a6e5a;background:#fff7e8;border:1px solid #e6d8bd;border-radius:50%;width:44px;height:44px;display:grid;place-items:center}.r46FlashStage{position:relative;display:grid;place-items:center;text-align:center;overflow:hidden;background:radial-gradient(circle at 50% 30%,#fff,#f1eee5);border:1px solid #e3dccf;border-radius:22px}.r46FlashStage .num{font-family:Arial,Tahoma,sans-serif;font-size:clamp(48px,12vw,105px);font-weight:1000;color:#174f43;line-height:1;direction:ltr}.r46FlashStage .hint{position:absolute;bottom:10px;font-size:12px;color:#7c7468;font-weight:800}.r46FlashStage.pulse .num{animation:r46FlashPop .16s ease-out}@keyframes r46FlashPop{from{transform:scale(.78);opacity:.25}to{transform:scale(1);opacity:1}}.r46Answers{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-height:0}.r46AnswerSide{border-radius:20px;padding:9px;display:flex;flex-direction:column;min-width:0;overflow:hidden}.r46AnswerSide.red{background:#fff0f1;border:1px solid #f0b8be}.r46AnswerSide.blue{background:#eef6ff;border:1px solid #b9d6fa}.r46SideTitle{text-align:center;font-size:13px;font-weight:950;margin-bottom:6px}.r46AnswerSide.red .r46SideTitle{color:#a72e3b}.r46AnswerSide.blue .r46SideTitle{color:#245aa8}.r46AnswerGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;flex:1}.r46Ans{border:1px solid rgba(70,70,70,.12);background:#fff;border-radius:14px;font-size:clamp(18px,4.4vw,30px);font-weight:1000;cursor:pointer;touch-action:manipulation;min-height:58px}.r46Ans.wrong{background:#ffe4e6}.r46Ans:active{filter:brightness(.95)}.r46Ans:disabled{opacity:.48;cursor:default}.r46RoundMessage{min-height:42px;display:grid;place-items:center;text-align:center;border-radius:14px;background:#fff;border:1px solid #e5ddcf;padding:7px 10px;font-weight:900;color:#4f4a42}.r46RoundMessage.winRed{background:#fff0f1;color:#a72e3b;border-color:#efb7bd}.r46RoundMessage.winBlue{background:#eef6ff;color:#245aa8;border-color:#b9d6fa}.r46DuelActions{display:flex;gap:8px}.r46DuelActions button{flex:1;border:0;border-radius:13px;padding:10px;font-weight:900;cursor:pointer}.r46DuelActions .soft{background:#f2ebde;color:#5c503d}.r46DuelActions .main{background:#177a63;color:#fff}

body.r46AdventureMode #game{max-width:none!important;width:100%!important;margin:0!important;padding:8px!important;min-height:calc(100dvh - 8px)!important}body.r46AdventureMode #game .gamewrap,body.r46AdventureMode #game .v17OriginalShell,body.r46AdventureMode #game .v17FrameWrap{width:100%!important;max-width:none!important}body.r46AdventureMode #game .v17FrameWrap{height:min(78dvh,760px)!important;min-height:460px!important}body.r46AdventureMode #game iframe{width:100%!important;height:100%!important}

@media(max-width:650px){#modules.r46HomeGrid{gap:9px!important}#modules.r46HomeGrid>.safeR25Card{height:168px!important;min-height:168px!important;max-height:168px!important}#modules.r46HomeGrid .safeR25Title{flex-basis:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important;font-size:13.2px!important;padding:9px 8px 4px!important}#modules.r46HomeGrid .safeR25Visual{height:130px!important;min-height:130px!important}#modules.r46HomeGrid>.r46GroupTitle{font-size:20px!important;margin-top:13px!important}.r46GamePage{padding-left:7px!important;padding-right:7px!important}.r46GameHead h2{font-size:17px}.r46GameHead small{display:none}.r46DinoTop{gap:5px}.r46DinoStat{gap:4px}.r46DinoTopRight{width:100%;justify-content:space-between}.r46Pill{padding:6px 8px;font-size:11px}.r46DifficultyLabel{font-size:11px}.r46DinoControls{grid-template-columns:1fr 105px}.r46Jump,.r46Start{padding:13px 10px}.r46SetupGrid{grid-template-columns:1fr 1fr}.r48ModeButtons{grid-template-columns:repeat(3,1fr)}.r48SettingsGrid{grid-template-columns:1fr 1fr}.r46Arena{grid-template-rows:auto minmax(92px,.5fr) minmax(220px,1.25fr) auto}.r46TeamBox{padding:7px}.r46Heart{font-size:21px}.r46Vs{width:37px;height:37px}.r46Answers{gap:5px}.r46AnswerSide{padding:6px}.r46AnswerGrid{gap:5px}.r46Ans{min-height:54px;border-radius:11px}.r46RoundMessage{font-size:12px;min-height:36px}}
@media(max-height:650px){.r46GameHead{min-height:40px;padding-bottom:4px}.r46GameHead h2{font-size:16px}.r46DinoTop{font-size:11px}.r46Arena{grid-template-rows:auto minmax(76px,.42fr) minmax(170px,1fr) auto}.r46FlashStage .num{font-size:clamp(42px,10vw,78px)}.r46Ans{min-height:45px}.r46RoundMessage{min-height:30px;padding:4px}}
#r46DinoPage .r48GameWelcome{width:min(96%,520px);min-height:245px;background-position:center 54%;border-color:#d5b168}
#r46DinoPage .r48WelcomeShade{padding:20px;background:linear-gradient(180deg,rgba(5,31,21,.02),rgba(5,31,21,.9))}
#r46DinoPage .r48WelcomeShade h3{font-size:23px;line-height:1.35}
@media(max-width:650px){#r46DinoPage .r48GameWelcome{min-height:205px}}

/* DEV21 Dino mobile first: one main interaction, legible stats, optional audio/pause. */
@media(max-width:650px){
 #r46DinoPage .r46GameHead{padding:8px 9px 10px!important;background:#e9f9f1;border-radius:18px;min-height:55px!important}
 #r46DinoPage .r46GameHead h2{font-size:19px!important}
 #r46DinoPage .r46DinoShell{padding:8px!important;display:flex;flex-direction:column;gap:9px}
 #r46DinoPage .r46DinoStat{display:flex;justify-content:space-between;width:100%;gap:6px}
 #r46DinoPage .r46DinoStat #r46DinoBest{display:none!important}
 #r46DinoPage .r46DinoTop{justify-content:space-between!important}
 #r46DinoPage .r46DinoCanvasWrap{min-height:210px;border-radius:19px;overflow:hidden}
 #r46DinoPage .r46DinoControls{grid-template-columns:minmax(0,1fr) auto!important;gap:8px}
 #r46DinoPage #r46Jump{min-height:64px!important;font-size:20px!important;border-radius:18px!important;background:linear-gradient(125deg,#0cae89,#1472c9)!important;color:white!important}
 #r46DinoPage #r46DinoStart{min-width:103px!important;min-height:64px!important;font-size:15px!important;border-radius:18px!important}
 #r46DinoPage .r53GameTools button{min-width:42px;min-height:42px;touch-action:manipulation}
 #r46DinoPage .r58DinoDifficulty button{min-height:43px!important}
}
