/* Four clear entrances; activity engines and learner data stay in their existing homes. */
body.learning-landing{background:#d9eef0!important;color:#143b48}
body.learning-landing #suite{min-height:100dvh;background:linear-gradient(#10394e18,#0a354b44),url('/learning-entrance/landscape.webp') center/cover fixed!important}
body.learning-landing .suite-header{background:#092b42db!important;backdrop-filter:blur(12px);border-bottom:1px solid #fff3bd55!important}
body.learning-landing #suite>main.home{background:transparent!important;padding:0 clamp(18px,4vw,72px) 28px!important;min-height:calc(100dvh - 82px)}
body.learning-landing main.home>:not(.learning-front):not(.learning-atmosphere){display:none!important}
.learning-front{max-width:1250px;margin:0 auto;padding:clamp(22px,4vh,50px) 0 0;text-align:center}
.learning-welcome{max-width:680px;margin:0 auto 30px;padding:18px 24px;border-radius:30px;background:#f7fdfff0;box-shadow:0 10px 35px #07384a16}
.learning-welcome .learning-kicker{font:700 11px/1.4 Arial,sans-serif;letter-spacing:3px;text-transform:uppercase;color:#37767c}
.learning-welcome h1{font:700 clamp(31px,4vw,52px)/1.12 Georgia,serif;color:#123f51;margin:10px 0 12px;letter-spacing:-.025em}
.learning-welcome p{color:#446774;font-size:16px;line-height:1.5;margin:0}
.learning-portals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;direction:ltr}
body.adventure-home .home button.learning-portal{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;padding:0 0 24px;overflow:hidden;border:1px solid #fff!important;border-radius:30px!important;box-shadow:0 12px 0 #103b4822,0 20px 45px #103b4833!important;background:#fffdf8!important;color:#173e4b!important;transition:transform .2s,box-shadow .2s;text-align:center;isolation:isolate}
body.adventure-home .home button.learning-portal:hover{transform:translateY(-6px);box-shadow:0 16px 0 #103b481b,0 25px 40px #103b4838!important;filter:none}
.learning-portal .portal-scene{width:100%;height:clamp(150px,18vw,225px);position:relative;display:grid;place-items:center;background:linear-gradient(145deg,#d6f5f1,#7cc7bf);overflow:hidden}
.learning-portal .portal-scene:before{content:'';position:absolute;width:220px;height:220px;background:#ffffff32;border:1px solid #ffffff77;border-radius:50%;top:-80px;right:-60px}
.learning-portal .portal-scene:after{content:'';position:absolute;width:180px;height:180px;background:#ffffff25;border-radius:50%;bottom:-135px;left:-30px}
.learning-portal.meaning .portal-scene{background:linear-gradient(145deg,#fff1cc,#edc980)}
.learning-portal.math .portal-scene{background:linear-gradient(145deg,#e1ebff,#b5c4ee)}
.learning-portal.english .portal-scene{background:linear-gradient(145deg,#ffeadf,#f1bbae)}
.portal-emblem{position:relative;display:flex;align-items:center;justify-content:center;width:122px;height:122px;transform:rotate(-7deg);border-radius:27px;background:linear-gradient(145deg,#fffef4,#e2f5ed);border:4px solid #fff6d5;box-shadow:inset 0 -7px 0 #2a7b7620,0 12px 0 #356f7720,0 18px 24px #215d7240;font:800 78px/1 Georgia,serif;color:#126f70;text-shadow:0 2px 0 white}
.meaning .portal-emblem{transform:rotate(6deg);font-size:62px;color:#a56d17;background:#fffaf0}
.math .portal-emblem{transform:rotate(-5deg);color:#596cb3;font-size:53px;letter-spacing:-3px;background:#f3f5ff}
.english .portal-emblem{transform:rotate(6deg);color:#ac514a;font-size:58px;background:#fff6f1;letter-spacing:-4px}
.portal-hebrew{font:700 23px/1.2 Georgia,serif;color:#345a62;margin:22px 10px 6px;direction:rtl}
.portal-name{font:700 clamp(21px,2vw,28px)/1.15 Georgia,serif;margin:0 12px;color:#123f51}
.portal-description{font:14px/1.55 Arial,sans-serif;margin:10px 18px 20px;color:#56717a;min-height:44px;max-width:220px}
.portal-enter{margin-top:auto;display:grid;place-items:center;border-radius:50%;width:38px;height:38px;border:1px solid #d5e7df;background:#eff7f1;color:#2a7069;font:23px/1 Arial,sans-serif}
.learning-footer{display:flex;justify-content:center;gap:12px;align-items:center;margin:30px auto 0;flex-wrap:wrap}
body.adventure-home .home .learning-footer button,body.adventure-home .home .learning-back{background:#0b3b53e8!important;color:#fff9e8!important;border:1px solid #fff1b68c!important;box-shadow:0 3px 12px #0c314820!important;border-radius:30px!important;font-size:14px;padding:11px 20px;min-height:44px}
.learning-footer span{font-size:13px;background:#f7fdffed;color:#355b68;padding:10px 18px;border-radius:30px}
.learning-section-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:8px 0 28px;padding:20px 24px;border:1px solid #dfc9887a;border-radius:24px;background:#0e354cbd;color:#fff4d5}
.learning-section-heading h1{font:700 clamp(25px,4vw,40px)/1.2 Georgia,serif;margin:0 0 6px;color:#ffe4a5}
.learning-section-heading p{margin:0;color:#cee1e9;font-size:14px;line-height:1.5}
.learning-section-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body.learning-subject .world-hero,body.learning-subject #school-demo-link,body.learning-subject .activity-shortcut{display:none!important}
body.learning-subject [data-learning-hidden]{display:none!important}
body.learning-subject .learning-section-heading~.categories [data-category=meaning],body.learning-subject .learning-section-heading~.categories #creative{display:none!important}
body.learning-meaning main.home>.categories,body.learning-meaning main.home>.practice-invitation{display:none!important}
#subject-section{position:fixed;inset:0;z-index:20000;background:#e8f6f5}
#subject-section>iframe{width:100%;height:100%;border:0}
#subject-section>.subject-close{position:absolute;right:12px;top:12px;z-index:2;border-radius:50%;width:46px;height:46px;background:#0c3d54;color:#fff8da;border:2px solid #fff3bd;box-shadow:0 4px 15px #06243c44;font:26px Arial,sans-serif;padding:0}
@media(max-width:1050px){.learning-portals{max-width:900px;margin:auto}.learning-portal .portal-scene{height:155px}.portal-description{min-height:0;margin-bottom:15px}.portal-hebrew{margin-top:16px}.learning-welcome{margin-bottom:22px}.learning-front{padding-top:20px}.learning-section-heading{align-items:flex-start;flex-direction:column}}
@media(max-width:480px){body.learning-landing #suite>main.home{padding-inline:12px!important}.learning-portals{gap:12px}.learning-welcome{padding:17px 14px;border-radius:22px}.learning-welcome h1{font-size:30px}.learning-welcome p{font-size:14px}.learning-portal .portal-scene{height:125px}.portal-emblem{width:88px;height:88px;border-radius:21px;font-size:58px}.meaning .portal-emblem{font-size:44px}.math .portal-emblem,.english .portal-emblem{font-size:41px}.portal-hebrew{font-size:18px}.portal-name{font-size:19px}.portal-description{font-size:12px;margin:9px 10px 12px;min-height:38px}.portal-enter{width:30px;height:30px}.learning-footer{margin-top:24px}.learning-section-heading{padding:16px}.learning-section-actions button{font-size:12px!important}}
@media(prefers-reduced-motion:reduce){body.adventure-home .home button.learning-portal{transition:none}}


.learning-portal.comprehension .portal-scene{background:linear-gradient(145deg,#f5eaff,#c9b6e7)}
.learning-portal.comprehension .portal-emblem{font-size:55px;color:#68528b;background:#fbf5ff}
.learning-portal.skills .portal-scene{background:linear-gradient(145deg,#edf5dd,#bcd7ad)}
.learning-portal.skills .portal-emblem{color:#396951;background:#f8fbef}
body.learning-subject .categories[hidden],body.learning-subject .categories [hidden]{display:none!important}
@media(max-width:480px){
 .learning-portals{gap:8px}
 body.adventure-home .home button.learning-portal{border-radius:18px!important;padding-bottom:12px}
 .learning-portal .portal-scene{height:88px}
 .learning-portal .portal-emblem{width:57px;height:57px;font-size:29px;border-width:2px;border-radius:14px}
 .learning-portal .portal-hebrew{font-size:13px;margin:12px 3px 4px}
 .learning-portal .portal-name{font-size:clamp(12px,3.4vw,17px);margin:0 4px;overflow-wrap:anywhere}
 .learning-portal .portal-description{display:none}
 .learning-portal .portal-enter{margin-top:10px}
}

/* Keep the two entrance menus independent of the legacy category grid. */
body.learning-landing #suite .learning-front .learning-portals {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.learning-landing #suite .learning-portal .portal-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
body.learning-subject #suite main.home > .categories {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.learning-next {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  margin: 0 auto 1rem;
  padding: .65rem 1.2rem;
  border: 1px solid #87aaa0;
  border-radius: 16px;
  background: #f3fff8;
  color: #153f3b;
  cursor: pointer;
}
.learning-next:focus-visible { outline: 3px solid #286f61; outline-offset: 3px; }

.practice-card {
  margin: 1rem auto;
  max-width: 760px;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #a8c5b6;
  border-radius: 24px;
  color: #143d35;
  background: #f4fff7;
  box-shadow: 0 12px 30px #153b3520;
}
.practice-card h3 { margin: .3rem 0 .5rem; font: 700 1.4rem/1.2 Georgia, serif; }
.practice-card p { margin: .5rem 0; line-height: 1.5; }
.practice-kicker { color: #326259; font-size: .75rem; font-weight: 800; letter-spacing: .13em; }
.adventure-trail { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; text-align: start; }
.adventure-trail .learning-next { margin: 0; }
.adventure-emblem {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem;
  border-radius: 50%; background: #ffe9a3; color: #79521a; font-size: 2rem;
}
@media (prefers-reduced-motion: no-preference) {
  .adventure-emblem { animation: discovery-reveal .45s ease-out both; }
  @keyframes discovery-reveal { from { opacity: 0; transform: scale(.8); } }
}

.discovery-album { flex-basis: 100%; padding: .75rem 1rem; border-radius: 14px; background: #e2f3e9; }
.discovery-album summary { cursor: pointer; font-weight: 700; padding-block: .5rem; }
.discovery-album h4 { margin: .75rem 0 .25rem; }

.game-invitation {
 display: flex; align-items: center; gap: .9rem; min-height: 5.5rem;
 margin: .75rem auto; padding: .5rem 1rem .5rem .5rem; cursor: pointer;
 border: 2px solid #a9d6ad; border-radius: 22px; background: #f5fff0; color: #174633;
 text-align: start; box-shadow: 0 8px 24px #163b3324;
}
.game-invitation:focus-visible { outline: 3px solid #236850; outline-offset: 4px; }
.game-invitation strong { display: block; font-size: 1.18rem; }
.game-invitation .invitation-art {
 position: relative; display: grid; place-items: center; flex: 0 0 5rem; width: 5rem; height: 4.5rem;
 padding: 0; border-radius: 14px; background: #d4f2db center / cover no-repeat;
}
.game-invitation:has(.invitation-preview) .invitation-art {
 flex: 0 0 auto; width: clamp(9rem, 48vw, 18rem); height: auto; aspect-ratio: 16 / 10;
}
.invitation-preview {
 position: absolute; inset: 0; width: 100%; height: 100%;
 border: 0; border-radius: inherit; pointer-events: none;
}

.practice-handoff {
 position: fixed; inset: 0; z-index: 2147483639; overflow: hidden;
 background: #184352 center / cover no-repeat;
}
.practice-handoff .invitation-preview { border-radius: 0; }

.practice-handoff [data-loading-navigation] { background: transparent !important; }

/* Shared home and step-by-step subject entrances. */
body.learning-home-v2.learning-landing #suite{background:linear-gradient(135deg,#e9f4f0ed,#e4f0f2e8),url('/learning-entrance/landscape.webp') center/cover fixed!important}
body.learning-home-v2.learning-landing .suite-header{background:#f5faf7ed!important;border-bottom:1px solid #b9d1c7!important;color:#244c49!important}
body.learning-home-v2.learning-landing .suite-account,body.learning-home-v2.learning-landing .suite-account .stars{color:#315b4a!important}
body.learning-home-v2 .learning-front{max-width:1380px;padding-top:26px}
body.learning-home-v2.learning-landing #suite .learning-welcome{position:relative;display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;text-align:start;max-width:none;min-height:170px;margin:0 0 28px;padding:30px 40px;border:1px solid #abc9bc;border-radius:28px;background:linear-gradient(110deg,#f8fcf4,#e2f0e5);box-shadow:0 8px 32px #2046370a;overflow:hidden}
body.learning-home-v2 .learning-welcome h1{font-size:clamp(28px,3.4vw,46px);font-weight:600;max-width:75%;margin:8px 0 12px;color:#214b43}
body.learning-home-v2 .learning-welcome p{font-size:16px;color:#4e6e62;max-width:65%}
body.learning-home-v2 .learning-welcome .learning-kicker{font-size:12px;letter-spacing:2px;color:#3e6c5e}
.welcome-motion{position:absolute;width:245px;height:170px;right:3%;top:10px;pointer-events:none;direction:ltr}
[dir=rtl] .welcome-motion{right:auto;left:3%}
.welcome-motion i{display:grid;place-items:center;position:absolute;font:normal 44px/1 Georgia,serif;width:65px;height:75px;border-radius:18px;background:#f8fff5;color:#397f73;box-shadow:0 8px 22px #2c6b4315;animation:welcome-float 6s ease-in-out infinite}
.welcome-motion i:nth-child(1){left:12px;top:45px}.welcome-motion i:nth-child(2){left:92px;top:15px;animation-delay:-1.3s;color:#8c6e29;background:#fff8de}.welcome-motion i:nth-child(3){left:160px;top:65px;animation-delay:-3s;background:#e3f3f8;color:#386c93}.welcome-motion i:nth-child(4){left:60px;top:115px;width:35px;height:35px;font-size:29px;animation-delay:-2s}.welcome-motion i:nth-child(5){left:190px;top:8px;width:35px;height:35px;font-size:29px;animation-delay:-4s}
@keyframes welcome-float{0%,100%{translate:0 0;rotate:-5deg}50%{translate:0 -11px;rotate:6deg}}
body.learning-home-v2.learning-landing #suite .learning-front .learning-portals{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:18px}
body.learning-home-v2 .home button.learning-portal{border-radius:22px!important;border:1px solid #bed3c9!important;padding:0 0 18px;background:#fcfefa!important;box-shadow:0 5px 0 #bdd2c54d,0 12px 24px #315b4410!important;transition:transform .22s,box-shadow .22s}
body.learning-home-v2 .home button.learning-portal:hover{transform:translateY(-5px);box-shadow:0 7px 0 #bdd2c54d,0 18px 28px #315b4420!important}
body.learning-home-v2 .home button.learning-portal:focus-visible{outline:3px solid #315f51;outline-offset:5px}
body.learning-home-v2 .portal-scene{height:130px;background:linear-gradient(145deg,#dcefe6,#bdded7)}
body.learning-home-v2 .portal-emblem{width:82px;height:86px;font-size:48px;border-width:2px;border-radius:19px;box-shadow:inset 0 -5px 0 #2a7b7612,0 5px 0 #356f771c,0 9px 18px #215d7218;animation:portal-breathe 7s ease-in-out infinite}
@keyframes portal-breathe{0%,100%{translate:0 0;rotate:-4deg}50%{translate:0 -5px;rotate:3deg}}
body.learning-home-v2 .portal-name{margin:18px 12px 0;font-size:clamp(19px,1.6vw,25px);line-height:1.22;font-weight:600;overflow-wrap:anywhere}
body.learning-home-v2 .portal-description{font-size:14px;line-height:1.5;min-height:42px;margin:8px 12px 0;max-width:240px;color:#536d62}
body.learning-home-v2 .portal-enter{display:none}
body.learning-home-v2 .learning-portal.comprehension .portal-scene{background:linear-gradient(145deg,#eee9fb,#d3c7ed)}
body.learning-home-v2 .learning-portal.skills .portal-scene{background:linear-gradient(145deg,#e8f1d2,#d3e5b0)}
body.learning-home-v2 .learning-portal.freeplay .portal-scene{background:linear-gradient(145deg,#ffefd2,#f2dca1)}
body.learning-home-v2 .learning-portal.freeplay .portal-emblem{background:#fffbee;color:#9b6d17}
body.learning-home-v2 .learning-next{background:#f8fcf7!important;color:#214b43!important;border:1px solid #9fbdac!important;box-shadow:none!important;margin:0 0 24px!important;border-radius:18px!important}
body.learning-home-v2 .learning-atmosphere{opacity:.22;pointer-events:none}
body.learning-home-v2.learning-subject{background:#e9f2ec!important}
body.learning-home-v2.learning-subject #suite{background:linear-gradient(140deg,#f1f6ed,#e5efeb)!important;min-height:100dvh}
body.learning-home-v2.learning-picker #suite>main.home{max-width:1200px;margin:auto!important;min-height:calc(100dvh - 100px);background:transparent!important}
body.learning-home-v2.learning-picker #suite>main.home>:not(.learning-section-heading):not(.learning-choice-grid):not(.learning-coming-soon):not(.learning-atmosphere){display:none!important}
body.learning-home-v2 .learning-section-heading{background:#f9fcf6;border:1px solid #b8cfbf;border-radius:24px;padding:24px 28px;box-shadow:0 5px 20px #315b4408;color:#214b43}
body.learning-home-v2 .learning-section-heading h1{color:#214b43;font-size:clamp(28px,3vw,39px)}
body.learning-home-v2 .home .learning-back{background:#f9fcf7!important;color:#294e43!important;border:1px solid #a6bfaf!important;box-shadow:none!important;min-height:44px;font-size:15px;padding:10px 20px}
.learning-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:950px;margin:35px auto;gap:28px;direction:inherit}
body.learning-home-v2 .learning-choice-grid .learning-portal{min-height:235px;padding-bottom:26px!important}
body.learning-home-v2 .learning-choice-grid .portal-scene{height:165px}
body.learning-home-v2 .learning-choice-grid .portal-emblem{font-size:56px;width:96px;height:100px}
.learning-coming-soon{text-align:center;padding:60px 24px 80px;background:#f9fcf5;border:1px solid #b8cfbf;border-radius:28px;margin:35px auto;max-width:740px}
.coming-glyph{font:90px/1.2 Georgia,serif;color:#437b64;display:block}.learning-coming-soon h2{font-size:32px;font-weight:500;color:#214b43;margin:20px 0 30px}
.selection-empty{padding:30px;text-align:center;color:#365e4e;background:#f8fcf6;border-radius:18px}
@media(max-width:1200px){body.learning-home-v2.learning-landing #suite .learning-front .learning-portals{grid-template-columns:repeat(3,minmax(0,1fr))!important}body.learning-home-v2 .learning-portals>.freeplay:last-child{grid-column:1/-1;min-height:140px;display:grid;grid-template-columns:160px 1fr;padding:0!important;align-items:center}body.learning-home-v2 .learning-portals>.freeplay:last-child .portal-scene{grid-row:1/3;height:100%;min-height:140px}}
@media(max-width:650px){body.learning-home-v2.learning-landing #suite .learning-front .learning-portals{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:13px}body.learning-home-v2 .portal-scene{height:110px}body.learning-home-v2 .portal-emblem{width:70px;height:73px;font-size:40px}body.learning-home-v2.learning-landing #suite .learning-welcome{padding:24px 20px;min-height:180px}body.learning-home-v2 .learning-welcome h1{max-width:70%;font-size:28px}.welcome-motion{scale:.63;transform-origin:100% 50%;right:-30px;top:10px}[dir=rtl] .welcome-motion{transform-origin:0 50%;left:-30px}body.learning-home-v2 .learning-welcome .learning-kicker{max-width:68%;font-size:10px;letter-spacing:1px}body.learning-home-v2 .learning-portals>.freeplay:last-child{grid-column:auto;display:flex;padding-bottom:18px!important}body.learning-home-v2 .learning-portals>.freeplay:last-child .portal-scene{height:110px;min-height:0;width:100%}body.learning-home-v2 .learning-section-heading{padding:18px;flex-wrap:wrap}.learning-choice-grid{gap:16px;margin:25px auto}body.learning-home-v2 .learning-choice-grid .learning-portal{min-height:200px}body.learning-home-v2 .learning-choice-grid .portal-scene{height:130px}body.learning-home-v2 .learning-choice-grid .portal-emblem{width:76px;height:80px;font-size:48px}}
@media(prefers-reduced-motion:reduce){body.learning-home-v2 *,body.learning-home-v2 *::before,body.learning-home-v2 *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body.learning-home-v2.learning-landing #suite .learning-front{max-width:1380px!important;padding-top:26px!important}
body.learning-home-v2 .portal-hebrew{display:none}
body.learning-home-v2.learning-subject #suite main.home>.learning-section-heading{display:flex!important;background:transparent;border:0;box-shadow:none;margin:0 0 20px;padding:14px 2px}
body.learning-home-v2 .learning-section-heading .learning-section-actions{display:none}
@media(min-width:1201px){body.learning-home-v2.learning-landing #suite .learning-welcome{min-height:135px;padding:20px 32px;margin-bottom:20px}body.learning-home-v2.learning-landing .learning-portal .portal-scene{height:105px!important}body.learning-home-v2.learning-landing .learning-portal .portal-description{min-height:36px;margin-bottom:0!important}body.learning-home-v2.learning-landing .learning-welcome h1{font-size:36px}}
