/* Scoped MADA V105 age-responsive student dashboard; the rest of the app remains unchanged. */
body[data-mada-page="home"] #main.mada105-main{padding:0!important;margin:0!important;background:transparent;overflow:visible;max-width:none!important;min-width:0;}
body[data-mada-page="home"] .mada105-shell{--m105-pink:#e62584;--m105-orange:#f18b00;--m105-yellow:#ffe650;--m105-blue:#1667af;--m105-ink:#354559;color:#354559;font-family:Tahoma,"Noto Sans Arabic",Arial,sans-serif;font-size:14px;line-height:1.3;direction:rtl;position:relative;isolation:isolate;padding:12px 18px 22px;background:linear-gradient(164deg,#fff 0%,#fafbff 68%,#f4f6fb 100%);min-height:100%;max-width:1250px;margin:0 auto;overflow:clip;}
body[data-mada-page="home"] .mada105-shell::after{content:"";pointer-events:none;position:absolute;inset:auto -12% -65px;z-index:-1;height:220px;background:linear-gradient(20deg,#fff1c5 5%,#ffc9635e 30%,#f7a2d354 57%,#88c9fa55 83%);border-radius:55% 45% 0 0/54% 54% 0 0;}
body[data-mada-page="home"] .mada105-shell *,body[data-mada-page="home"] .mada105-shell *::before,body[data-mada-page="home"] .mada105-shell *::after{box-sizing:border-box}
body[data-mada-page="home"] .mada105-shell button{font:inherit;cursor:pointer;min-width:0;}
body[data-mada-page="home"] .mada105-top{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;min-height:92px;gap:12px;direction:ltr;position:relative;}
body[data-mada-page="home"] .mada105-logo{height:90px;max-width:175px;object-fit:contain;justify-self:center;grid-column:3;}
body[data-mada-page="home"] .mada105-top button{box-shadow:none;border:0;}
body[data-mada-page="home"] .mada105-menu{background:#fff;color:#354559;font-size:23px;border-radius:13px;min-width:44px;height:43px;box-shadow:0 1px 7px #35455920!important}
body[data-mada-page="home"] .mada105-lang{display:flex;border:1px solid #dbe1eb;border-radius:30px;overflow:hidden;background:#fff;direction:ltr;padding:2px;gap:2px}
body[data-mada-page="home"] .mada105-lang button{color:#354559;background:transparent;border-radius:24px;padding:6px 12px!important;min-height:32px;font-family:Arial,sans-serif}
body[data-mada-page="home"] .mada105-lang button.active{background:#354559;color:#fff}
body[data-mada-age-home="junior"] .mada105-lang button.active{background:#e62584}
body[data-mada-page="home"] .mada105-notifications{position:relative;height:40px;min-width:40px;border-radius:50%;background:#fff;color:#354559;font-size:25px}
body[data-mada-page="home"] .mada105-notifications i{position:absolute;width:9px;height:9px;right:6px;top:5px;border-radius:50%;background:#e62584}
body[data-mada-page="home"] .mada105-person{display:flex;align-items:center;gap:12px;position:relative;background:linear-gradient(110deg,#fff 0%,#fff 65%,#f3f5f8 100%);border-radius:19px;padding:8px 13px;min-height:75px;box-shadow:0 6px 25px #35455916;overflow:hidden}
body[data-mada-page="home"] .mada105-avatar{width:57px;height:57px;flex:0 0 57px;border-radius:50%;border:3px solid #ffbc33;overflow:hidden;background:#fff0ae}
body[data-mada-page="home"] .mada105-avatar img{height:100%;width:100%;object-fit:cover}
body[data-mada-page="home"] .mada105-person-name{display:flex;flex-direction:column;gap:4px;z-index:1;text-align:start}
body[data-mada-page="home"] .mada105-person-name strong{font-size:20px;font-weight:850;color:#283d53}
body[data-mada-page="home"] .mada105-person-name span{font-size:13px;font-weight:650;color:#57667b}
body[data-mada-page="home"] .mada105-person-decor{position:absolute;inset-inline-end:10%;font-size:35px;color:#f1a52e;opacity:.22;pointer-events:none}
body[data-mada-page="home"] .mada105-stage{font-size:11px!important;font-weight:700;letter-spacing:.03em;color:#647388;text-align:start;margin:10px 5px 8px!important}
body[data-mada-page="home"] .mada105-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-areas:"hero hero class class" "games piano rhythm exercise" "reports reports reports reports";gap:12px}
body[data-mada-page="home"] button.mada105-card{position:relative;overflow:hidden;isolation:isolate;min-height:113px;display:flex;align-items:center;justify-content:flex-start;width:100%;margin:0;padding:14px 17px;border:0;border-radius:18px;text-align:start;box-shadow:0 4px 15px #35455916;transition:transform .13s ease,box-shadow .13s ease;}
body[data-mada-page="home"] button.mada105-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px #35455924}
body[data-mada-page="home"] button.mada105-card:active{transform:scale(.992)}
body[data-mada-page="home"] button.mada105-card:focus-visible{outline:3px solid #1667af;outline-offset:3px}
body[data-mada-page="home"] .mada105-card-visual{position:absolute;inset:0 auto 0 0;width:51%;overflow:hidden;z-index:0;direction:ltr;}
body[data-mada-page="home"] .mada105-card-visual::after{content:"";position:absolute;inset:0;background:linear-gradient(to right,transparent 52%,var(--fade,#fff0) 100%)}
body[data-mada-page="home"] .mada105-card-visual img{width:100%;height:100%;display:block;object-fit:cover;object-position:left center}
body[data-mada-page="home"] .mada105-card-copy{position:relative;z-index:1;display:flex;flex-direction:column;max-width:67%;gap:3px;text-align:start;align-items:flex-start;}
body[data-mada-page="home"] .mada105-card-copy strong{font-size:clamp(15px,1.6vw,21px);font-weight:850;line-height:1.26;}
body[data-mada-page="home"] .mada105-card-copy small{font-size:11px;font-weight:650;line-height:1.1}
body[data-mada-page="home"] .mada105-card.mada105-hero{grid-area:hero;min-height:175px;background:linear-gradient(115deg,#ffbe28,#ffe85b);color:#27364c;--fade:#ffe85b}
body[data-mada-page="home"] .mada105-card.mada105-class{grid-area:class;min-height:175px;background:linear-gradient(110deg,#ffb9d9,#f8d4e8);color:#27364c;--fade:#f8d4e8}
body[data-mada-page="home"] .mada105-card.mada105-reports{grid-area:reports;background:linear-gradient(110deg,#92d8ff,#d1eefe);--fade:#d1eefe;min-height:98px;}
body[data-mada-page="home"] .mada105-card.mada105-small{min-height:115px;}
body[data-mada-page="home"] .mada105-card.mada105-small.mada105-orange{background:linear-gradient(100deg,#ffedaf,#fff7df);--fade:#fff7df}
body[data-mada-page="home"] .mada105-card.mada105-small.mada105-blue{background:linear-gradient(100deg,#b8e5ff,#e1f3ff);--fade:#e1f3ff}
body[data-mada-page="home"] .mada105-card.mada105-small.mada105-pink{background:linear-gradient(100deg,#ffd0e1,#ffe8ee);--fade:#ffe8ee}
body[data-mada-page="home"] .mada105-card.mada105-small.mada105-yellow{background:linear-gradient(100deg,#ffe1a1,#fff5d5);--fade:#fff5d5}
body[data-mada-page="home"] .mada105-card.mada105-small .mada105-card-copy strong{font-size:clamp(12px,1.24vw,16px)}
body[data-mada-page="home"] .mada105-card.mada105-hero .mada105-card-copy strong,body[data-mada-page="home"] .mada105-card.mada105-class .mada105-card-copy strong{font-size:clamp(23px,2.4vw,31px)}
body[data-mada-page="home"] .mada105-play-mark{display:grid;place-items:center;width:40px;height:40px;position:relative;z-index:2;border-radius:50%;background:#fffdf5;color:#df2881;font-size:17px;box-shadow:0 3px 9px #0002;margin-inline-start:12px}
body[data-mada-page="home"] .mada105-bottom{display:flex;align-items:stretch;justify-content:space-around;position:sticky;z-index:30;bottom:env(safe-area-inset-bottom,0px);margin:12px 0 0;padding:6px 4px max(6px,env(safe-area-inset-bottom));background:#fffefdf2;border:1px solid #e8ecf2;box-shadow:0 -4px 16px #3545590a;border-radius:19px;gap:3px}
body[data-mada-page="home"] .mada105-bottom button{border:0;background:transparent;color:#354559;flex:1;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:1px;min-height:49px;border-radius:12px;box-shadow:none;padding:4px 2px;}
body[data-mada-page="home"] .mada105-bottom button.current{color:#e62584;background:#fff2f8;}
body[data-mada-page="home"] .mada105-bottom button>span{font-size:24px;line-height:1}
body[data-mada-page="home"] .mada105-bottom button>small{font-size:11px;white-space:nowrap}
body[data-mada-page="home"] .mada105-more{margin:10px 0 0}
body[data-mada-page="home"] .mada105-more-toggle{display:block;margin:auto;border:0;border-radius:16px;background:#fff;padding:8px 20px;font-size:12px;color:#57667b;min-height:35px}
body[data-mada-page="home"] .mada105-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
body[data-mada-page="home"] .mada105-extra-grid[hidden]{display:none!important}
body[data-mada-page="home"] .mada105-extra-grid button{min-height:98px!important}
/* Ages 4–5: bolder academic blue and magenta banners, like approved screenshot. */
body[data-mada-age-home="middle"] .mada105-hero{background:linear-gradient(120deg,#0a69b7,#0969b5 70%,#245a9e)!important;color:#fff!important;--fade:#0969b5!important}
body[data-mada-age-home="middle"] .mada105-class{background:linear-gradient(120deg,#e62584,#ab126a)!important;color:#fff!important;--fade:#ab126a!important}
body[data-mada-age-home="middle"] .mada105-card.mada105-hero .mada105-card-visual::after{background:linear-gradient(90deg,transparent 35%,#0969b5 96%)}
body[data-mada-age-home="middle"] .mada105-card.mada105-class .mada105-card-visual::after{background:linear-gradient(90deg,transparent 35%,#ab126a 96%)}
/* Ages 6–8: photo-based, more refined dark academy look. */
body[data-mada-age-home="senior"] .mada105-card.mada105-hero{background:linear-gradient(130deg,#354559,#202d43)!important;color:#fff!important;--fade:#202d43!important}
body[data-mada-age-home="senior"] .mada105-card.mada105-class{background:linear-gradient(130deg,#fff,#e9edf5)!important;color:#354559!important;--fade:#e9edf5!important}
body[data-mada-age-home="senior"] .mada105-card.mada105-small{background:#253149!important;color:#fff!important}
body[data-mada-age-home="senior"] .mada105-card.mada105-reports{background:#23344e!important;color:#fff!important}
body[data-mada-age-home="senior"] .mada105-card.mada105-small .mada105-card-visual::after{background:linear-gradient(90deg,transparent 5%,#263249 100%)}
body[data-mada-age-home="senior"] .mada105-card.mada105-reports .mada105-card-visual::after{background:linear-gradient(90deg,transparent 40%,#23344e 100%)}
body[data-mada-age-home="senior"] .mada105-card.mada105-hero .mada105-card-visual::after{background:linear-gradient(90deg,transparent 45%,#202d43 100%)}
body[data-mada-age-home="senior"] .mada105-person{background:linear-gradient(120deg,#fff,#f3f4f8)}
body[data-mada-age-home="senior"] .mada105-play-mark{color:#fff;background:#f4ad08}
/* Tablet. */
@media (max-width:1023px){body[data-mada-page="home"] .mada105-shell{padding:10px 12px 18px}body[data-mada-page="home"] .mada105-cards{gap:10px}body[data-mada-page="home"] .mada105-card.mada105-hero,body[data-mada-page="home"] .mada105-card.mada105-class{min-height:144px}body[data-mada-page="home"] .mada105-card-copy strong{font-size:18px}}
/* Phone: the same exact cards, arranged like the approved app mockups. */
@media(max-width:700px){
 body[data-mada-page="home"] .mada-topbar{display:none!important}
 body[data-mada-page="home"] .mada105-shell{padding:5px 10px 12px;min-height:100dvh;border-radius:0;}
 body[data-mada-page="home"] .mada105-top{min-height:81px;gap:8px;grid-template-columns:36px 74px 1fr 36px;}
 body[data-mada-page="home"] .mada105-logo{height:80px;max-width:121px}
 body[data-mada-page="home"] .mada105-lang button{font-size:10px;padding:5px 7px!important;min-height:28px}
 body[data-mada-page="home"] .mada105-menu{height:36px;min-width:35px;font-size:19px}
 body[data-mada-page="home"] .mada105-person{min-height:62px;padding:5px 9px;border-radius:16px}
 body[data-mada-page="home"] .mada105-avatar{width:50px;height:50px;flex-basis:50px}
 body[data-mada-page="home"] .mada105-person-name strong{font-size:18px}
 body[data-mada-page="home"] .mada105-person-name span{font-size:11px}
 body[data-mada-page="home"] .mada105-stage{font-size:10px!important;margin:7px 3px!important}
 body[data-mada-page="home"] .mada105-cards{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"hero hero" "class class" "games piano" "rhythm exercise" "reports reports";gap:9px}
 body[data-mada-page="home"] button.mada105-card{border-radius:15px;padding:10px 13px;}
 body[data-mada-page="home"] .mada105-card.mada105-hero{min-height:116px!important}
 body[data-mada-page="home"] .mada105-card.mada105-class{min-height:94px!important}
 body[data-mada-page="home"] .mada105-card.mada105-small{min-height:83px!important}
 body[data-mada-page="home"] .mada105-card.mada105-reports{min-height:73px!important}
 body[data-mada-page="home"] .mada105-card-visual{width:49%}
 body[data-mada-page="home"] .mada105-card.mada105-hero .mada105-card-copy strong{font-size:clamp(22px,5.2vw,28px)}
 body[data-mada-page="home"] .mada105-card.mada105-class .mada105-card-copy strong{font-size:clamp(19px,4.7vw,25px)}
 body[data-mada-page="home"] .mada105-card.mada105-small .mada105-card-copy strong{font-size:clamp(12px,3.45vw,16px)}
 body[data-mada-page="home"] .mada105-card.mada105-reports .mada105-card-copy strong{font-size:18px}
 body[data-mada-page="home"] .mada105-card.mada105-small .mada105-card-copy{max-width:67%}
 body[data-mada-page="home"] .mada105-play-mark{width:28px;height:28px;font-size:12px;margin-inline-start:6px}
 body[data-mada-page="home"] .mada105-more{margin:6px 0 0}
 body[data-mada-page="home"] .mada105-more-toggle{min-height:31px;padding:5px 10px;font-size:10px}
 body[data-mada-page="home"] .mada105-bottom{margin-top:7px;position:sticky;bottom:env(safe-area-inset-bottom);padding:4px 3px max(4px,env(safe-area-inset-bottom));}
 body[data-mada-page="home"] .mada105-bottom button{min-height:43px}
 body[data-mada-page="home"] .mada105-bottom button>span{font-size:21px}
 body[data-mada-page="home"] .mada105-bottom button>small{font-size:9px}
 body[data-mada-page="home"] .mada105-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:370px){body[data-mada-page="home"] .mada105-shell{padding:4px 7px 11px}body[data-mada-page="home"] .mada105-top{grid-template-columns:35px 70px 1fr 34px}body[data-mada-page="home"] .mada105-card.mada105-small{min-height:78px!important}body[data-mada-page="home"] .mada105-card.mada105-hero{min-height:105px!important}body[data-mada-page="home"] .mada105-card.mada105-class{min-height:87px!important}body[data-mada-page="home"] .mada105-card.mada105-small .mada105-card-copy strong{font-size:11px}}
@media(prefers-reduced-motion:reduce){body[data-mada-page="home"] button.mada105-card{transition:none}}

/* Dedicated home header replaces the legacy top bar on all student devices. */
body[data-mada-age-home] .mada-topbar{display:none!important}
/* On larger screens preserve artwork detail by avoiding oversized, blurry crops. */
@media(min-width:701px){
 body[data-mada-page="home"] .mada105-card-visual{width:39%}
 body[data-mada-page="home"] .mada105-card.mada105-reports .mada105-card-visual{width:29%}
 body[data-mada-page="home"] .mada105-card.mada105-small .mada105-card-copy{max-width:64%}
}

/* V107 welcome restoration: personalized greeting and original music encouragement on all three age dashboards. */
body[data-mada-page="home"] .mada105-person-name .mada105-student-greet{color:#243449!important;font-weight:850;font-size:clamp(14px,2vw,20px);line-height:1.45;overflow-wrap:anywhere}
body[data-mada-page="home"] .mada105-musical-welcome{display:flex;align-items:center;gap:10px;min-width:0;margin:9px 0 1px;padding:9px 13px;border:1px solid #e6eaf1;border-inline-start:4px solid #e62584;border-radius:14px;background:linear-gradient(105deg,#fff 50%,#fff5d7 100%);box-shadow:0 2px 10px #3545590d;color:#263851;}
body[data-mada-page="home"] .mada105-musical-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;background:#fff0f7;color:#b41b64;border-radius:50%;font-size:20px;font-weight:800;}
body[data-mada-page="home"] .mada105-musical-text{display:flex;flex-direction:column;gap:2px;min-width:0;text-align:start;}
body[data-mada-page="home"] .mada105-musical-text strong{font-size:clamp(13px,1.4vw,17px);font-weight:800;color:#263851;line-height:1.35}
body[data-mada-page="home"] .mada105-musical-text small{font-size:clamp(11px,1.15vw,13px);font-weight:650;color:#536178;line-height:1.4}
body[data-mada-age-home="middle"] .mada105-musical-welcome{border-inline-start-color:#1667af;background:linear-gradient(110deg,#fff 60%,#e9f5ff)}
body[data-mada-age-home="senior"] .mada105-musical-welcome{border-inline-start-color:#354559;background:linear-gradient(110deg,#fff 60%,#eff2f7)}
@media(max-width:700px){
 body[data-mada-page="home"] .mada105-musical-welcome{padding:7px 10px;gap:8px;margin-top:7px;border-radius:12px}
 body[data-mada-page="home"] .mada105-musical-icon{flex-basis:28px;width:28px;height:28px;font-size:17px}
 body[data-mada-page="home"] .mada105-student-greet{font-size:clamp(13px,3.9vw,17px)!important}
 body[data-mada-page="home"] .mada105-musical-text strong{font-size:12px}
 body[data-mada-page="home"] .mada105-musical-text small{font-size:11px}
}
