/* Scoped presentation only: preserve learning state and navigation. */
/* Keep the immersive scene in normal flow, including RTL and scrollbar widths. */
body.learning-world .stage:has(.levels.show){width:100%;max-width:none;padding-inline:0}
body.learning-world .levels.show{width:100%;max-width:100%;margin-inline:0}
body.learning-world .levels.show .dashboard-layout{min-width:0}
body.learning-world .levels.show #welcomeCard::before{display:none!important}
body.learning-world .levels.show #welcomeCard{gap:10px;scrollbar-gutter:stable}
body.learning-world .levels.show #welcomeCard .child-passport{
  display:grid;grid-template-columns:80px minmax(0,1fr);align-items:center;gap:4px 12px;
  margin:-4px -4px 12px;padding:12px;background:#e2f3f4;border-radius:18px;
  border-bottom:4px solid var(--world-accent);
}
.child-passport img{grid-row:1/3;object-fit:contain;max-width:100%}
body.learning-world .levels.show #welcomeCard .child-passport h2{font-size:20px;text-align:start;overflow-wrap:anywhere}
.passport-stars{display:flex;gap:8px;align-items:center;color:#835214;font-size:12px}
.passport-stars strong{display:grid;place-items:center;background:#ffe19a;width:38px;height:38px;border-radius:50%;font-size:20px;border:2px solid white}
body.learning-world .levels.show #welcomeCard .total-stars{display:none}
body.learning-world .levels.show #welcomeCard .account-metric{background:#eaf5ff;border:0;border-bottom:3px solid #bdd7ef;box-shadow:none}
body.learning-world .levels.show #welcomeCard .account-metric:nth-child(2){background:#fff4d8;border-bottom-color:#edcf85}
body.learning-world .levels.show #welcomeCard #dailyJourneyBtn{background:#218d96;border-bottom:4px solid #17666d;box-shadow:none}
@media(max-width:1050px){
  body.learning-world .levels.show{margin-inline:0;padding-inline:12px}
  body.learning-world .levels.show #welcomeCard .child-passport{grid-template-columns:56px minmax(0,1fr);padding:8px;margin-bottom:6px}
  .child-passport img{width:56px;height:64px}
  .passport-stars strong{width:28px;height:28px;font-size:16px}
}
body.companion-world{
  background:#e7f4fa url('./learning-adventure-world-v2.webp') center/cover fixed !important;
  min-height:100vh;
}
.companion-world .stage{position:relative}
.companion-world .topbar{background:#ffffffed;border:2px solid white;border-radius:22px;padding:16px;box-shadow:0 6px 0 #315f6220}
.companion-world .hero,.companion-world .panel,.companion-world .activity{
  background:#ffffffed;border:2px solid white;border-top:5px solid #54aaa3;box-shadow:0 7px 0 #315f6225;
}
.companion-world .hero h1,.companion-world .intro h1{color:#246f6a}
.companion-world .metrics .metric:nth-child(1){background:#e6f5f1}
.companion-world .metrics .metric:nth-child(2){background:#fff0d3}
.companion-world .metrics .metric:nth-child(3){background:#e7f1ff}
.companion-world .metrics .metric:nth-child(4){background:#f3edff}
.companion-world .queue>.empty{border:2px solid white;box-shadow:0 6px 0 #315f6220}
.companion-world .queue>.empty::before{
  content:"";display:block;width:90px;height:100px;margin:0 auto 12px;
  background:url('./bayan-mascot-v1.webp') center/contain no-repeat;
}
.companion-world .intro>div:first-child{font-size:0!important;height:110px;background:url('./bayan-mascot-v1.webp') center/contain no-repeat}
.companion-world .track-tab{min-height:52px}
.companion-world button:focus-visible{outline:3px solid #197bba;outline-offset:4px}
body.companion-report{background-image:linear-gradient(#f2faf6b8,#f2faf6b8),url('./learning-adventure-world-v2.webp')!important}

body.learning-world #trackSelect .track-head{padding-block:18px;min-height:130px}
body.learning-world #trackSelect .track-card{
  --tile:#39988c;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;
  min-width:0;min-height:290px;padding:18px 12px;text-align:center;isolation:isolate;
  background:#f8fffd!important;border:3px solid white!important;border-bottom:8px solid var(--tile)!important;
}
body.learning-world #trackSelect .track-card::before{
  content:"";position:absolute;inset:0 0 75px;z-index:-1;
  background:url('./learning-adventure-world-v2.webp') 15% 55%/auto 340px no-repeat;
  border-bottom:3px solid #fff;opacity:.9;
}
body.learning-world #trackSelect .track-card.english{--tile:#ec7844}
body.learning-world #trackSelect .track-card.math{--tile:#198fa8}
body.learning-world #trackSelect .track-card.tilawa{--tile:#8164ba}
body.learning-world #trackSelect .track-card.english::before{background-position:40% 65%}
body.learning-world #trackSelect .track-card.math::before{background-position:90% 75%}
body.learning-world #trackSelect .track-card.tilawa::before{background-position:5% 35%}
body.learning-world #trackSelect .track-pill{position:absolute;top:12px;inset-inline-end:12px;background:var(--tile);color:#fff}
body.learning-world #trackSelect .track-icon{
  width:88px;height:88px;display:grid;place-items:center;margin:32px 0 20px;
  border:4px solid white;border-radius:24px;background:#fffffff2;
  box-shadow:0 7px 0 #274c492e;font-size:50px;animation:none;
}
body.learning-world #trackSelect .track-card h2{font-size:22px;line-height:1.5;margin:0;color:var(--tile);overflow-wrap:anywhere}
body.learning-world .levels.show #welcomeCard{
  padding:18px!important;background:#f9fffcf5!important;border:3px solid white!important;
  border-top:7px solid var(--world-accent)!important;box-shadow:0 8px 0 #245c5830!important;
}
body.learning-world .levels.show #welcomeCard::before{
  display:block;float:none;width:76px;height:80px;margin:0 auto 8px;
  background:url('./bayan-mascot-v1.webp') center/contain no-repeat;animation:none;
}
body.learning-world .levels.show #welcomeCard h2{font-size:22px;text-align:center;margin:0}
body.learning-world .levels.show #welcomeCard p{font-size:12px;line-height:1.8}
body.learning-world .levels.show #welcomeCard .achievement-strip{display:flex;flex-wrap:wrap;gap:6px}
body.learning-world .levels.show #welcomeCard .achievement-badge{flex:1 1 100px;padding:7px;background:#e8f5f0;box-shadow:none;font-size:12px}
body.learning-world .levels.show #welcomeCard .reward-box{background:#fff2cf;border:0;border-inline-start:4px solid #ecb340;box-shadow:none;padding:12px}
body.learning-world .levels.show #welcomeCard .reward-title{flex-wrap:wrap;font-size:13px}
body.learning-world .levels.show #welcomeCard .reward-next{font-size:13px}
body.learning-world .levels.show #welcomeCard .btn{min-height:48px}
@media(max-width:600px){
  body.learning-world #trackSelect .track-head{padding:18px!important}
  body.learning-world #trackSelect .track-head::after{position:static;display:block;width:65px;height:70px;margin:12px auto 0;animation:none}
  body.learning-world #trackSelect .track-grid{gap:12px}
  body.learning-world #trackSelect .track-card{min-height:230px;padding:12px 7px}
  body.learning-world #trackSelect .track-card h2{font-size:17px}
  body.learning-world #trackSelect .track-icon{width:64px;height:64px;font-size:37px;margin:25px 0 16px}
  body.learning-world .levels.show #welcomeCard::before{float:right;width:55px;height:62px;margin:0 0 6px 10px}
  body.learning-world .levels.show #welcomeCard h2{font-size:19px;text-align:start}
  .companion-world .topbar{flex-wrap:wrap;padding:12px}
  .companion-world .hero-head{flex-wrap:wrap}
  .companion-world .hero,.companion-world .panel{padding:18px}
}
@media print{
  body.companion-world{background:#fff!important}
  .companion-world .hero,.companion-world .panel,.companion-world .activity,.companion-world .topbar{box-shadow:none;border:0;background:#fff}
}
