/* Grade 2 has four learning entrances; small screens keep them in document flow. */
.four-subject-home{height:auto;min-height:100dvh;overflow:visible;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,auto);align-content:start;gap:18px 16px;padding:108px max(24px,calc((100vw - 1280px)/2)) calc(115px + env(safe-area-inset-bottom,0px));background:linear-gradient(#c4eaff,#e3f5e5 70%,#e5edcc)}
.four-subject-home .reference-heading{position:relative;inset:auto;grid-column:1/-1;grid-row:1;padding:0 15px;margin:8px 0 0;font-size:clamp(30px,3.5vw,48px);white-space:normal;line-height:1.12}
.four-subject-home .reference-scenery{position:relative;inset:auto;grid-column:1/-1;grid-row:2;z-index:0;width:100%;height:auto;max-height:450px;aspect-ratio:1672/941;max-width:1280px;justify-self:center;background-image:url('assets/four-subjects-labeled-world.webp');background-size:cover;background-position:center;mask-image:linear-gradient(transparent,#000 5%,#000 94%,transparent);-webkit-mask-image:linear-gradient(transparent,#000 5%,#000 94%,transparent)}
.four-subject-home .house-entry{position:relative;inset:auto;grid-row:3;width:100%;height:100px;min-height:100px;max-height:none;margin:-34px 0 0;padding:36px 6px 5px;z-index:1;border-radius:27px;font-size:clamp(22px,2vw,30px);gap:7px}
.four-subject-home .house-subject{top:8px;left:4px;right:4px;font-size:clamp(15px,1.7vw,22px);white-space:normal;line-height:1.08;text-align:center}
.four-subject-home .math-entry{grid-column:1}.four-subject-home .viet-entry{grid-column:2}.four-subject-home .english-entry{grid-column:3}.four-subject-home .science-entry{grid-column:4}
.science-entry{background:linear-gradient(#9ddd6b,#55bd61 55%,#339b51);border-color:#c9f4a3;box-shadow:inset 0 3px 8px #e7ffc88a,0 5px 0 #26773c,0 9px 15px #25583338;text-shadow:0 3px 1px #256a3e80}
.four-subject-home .reference-daily{position:relative;inset:auto;grid-row:4;grid-column:1/-1;justify-self:center;width:min(100%,850px);height:auto;min-height:96px;max-height:none;margin:0;padding:10px 22px 10px 8px;gap:15px;border-radius:28px}
.four-subject-home .reference-daily-art{width:22%;height:78px}.four-subject-home .reference-daily h2{white-space:normal;font-size:clamp(21px,2.4vw,30px);line-height:1.1}.four-subject-home .daily-start{height:60px;min-height:60px;font-size:clamp(18px,2vw,25px);padding:5px 20px}.four-subject-home .garden-sparkle{display:none}
.science-scene{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;padding:14px 0}.science-scene figure{margin:0;display:grid;justify-items:center;gap:6px;max-width:150px;min-width:85px;background:#f0f6e8;border:1px solid #dce8d1;padding:15px;border-radius:22px}.science-scene .science-emoji{font-size:clamp(38px,6vw,60px);line-height:1.2}.science-scene figcaption{font-weight:800;text-align:center;font-size:17px;overflow-wrap:anywhere}.science-diagram{display:block;width:100%;max-width:600px;max-height:400px;margin:16px auto;font-family:Nunito,sans-serif}.science-diagram text{fill:#214c43;font-weight:800;font-size:20px}
.science-lab-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.science-sort-card{border:2px solid #dce9d2;border-radius:22px;padding:16px;background:#fcfff8;min-width:0}.science-sort-card.correct{border-color:#74b978;background:#eff9e6}.science-sort-card h3{font-size:20px;margin:8px 0}.science-sort-emoji{font-size:42px}.science-group-choices{display:flex;flex-wrap:wrap;gap:7px}.science-group-choices button{border:1px solid #d2dfc7;background:#fff;border-radius:13px;padding:10px 12px;font:inherit;font-size:15px;font-weight:800;min-height:44px;color:#2c614d}.science-group-choices button[aria-pressed=true]{background:#d9efc8;border-color:#6ca761}.science-card-feedback{font-size:15px;line-height:1.6;margin:10px 0 0}.science-practice-steps{padding-left:24px;line-height:1.85}.science-model-note{background:#f0f7e8;padding:16px;border-radius:16px}.science-lab button:focus-visible{outline:3px solid #e4ab37;outline-offset:3px}
@media(max-width:900px){.four-subject-home{padding-top:100px;gap:16px 12px}.four-subject-home .reference-heading{font-size:34px}.four-subject-home .house-entry{font-size:24px}.four-subject-home .house-subject{font-size:18px}}
@media(max-width:700px){.four-subject-home{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,auto);padding:132px 12px calc(100px + env(safe-area-inset-bottom,0px));gap:13px 12px}.four-subject-home .reference-heading{font-size:clamp(26px,7vw,31px);margin:0;padding:0 10px}.four-subject-home .reference-scenery{width:calc(100% + 24px);margin-left:0;aspect-ratio:1672/941;max-height:none;background-size:cover}.four-subject-home .house-entry{height:94px;min-height:94px;margin:0;font-size:25px;padding-top:34px;border-radius:23px}.four-subject-home .house-subject{font-size:18px;top:7px}.four-subject-home .math-entry{grid-row:3;grid-column:1}.four-subject-home .viet-entry{grid-row:3;grid-column:2}.four-subject-home .english-entry{grid-row:4;grid-column:1}.four-subject-home .science-entry{grid-row:4;grid-column:2}.four-subject-home .reference-daily{grid-row:5;padding:8px 10px 8px 4px;gap:7px;min-height:88px;border-radius:22px}.four-subject-home .reference-daily-art{height:64px;width:21%}.four-subject-home .reference-daily h2{font-size:21px}.four-subject-home .daily-start{min-height:52px;height:52px;font-size:16px;padding:5px 10px;gap:4px}.four-subject-home .house-entry svg{width:20px;height:20px}.science-lab-grid{grid-template-columns:1fr}.science-sort-card{padding:14px}.science-diagram text{font-size:19px}}
@media(max-height:600px) and (orientation:landscape){.four-subject-home{padding-top:82px}.four-subject-home .reference-heading{font-size:30px}.four-subject-home .reference-scenery{max-height:320px}.four-subject-home .house-entry{margin:0}}

@media(min-width:701px){.source-coverage:has(> :nth-child(4)),.plan-subjects:has(> :nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}}

.grade-two .reference-brand,.grade-two .reference-brand-copy{min-width:0}.grade-two .reference-brand-copy small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.science-takeaway{font-size:24px;line-height:1.7;letter-spacing:0;text-align:left;padding:16px}.order-tile{max-width:100%;white-space:normal;overflow-wrap:anywhere}

/* Match grade 1's full-viewport garden on desktop. The artwork's four houses
   anchor the entrances while the daily card stays above the fixed navigation. */
@media(min-width:701px){
 .reference-home.four-subject-home{display:block;height:100vh;height:100dvh;min-height:670px;padding:0;overflow:hidden}
 .four-subject-home .reference-scenery{position:absolute;inset:0;z-index:-2;width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;margin:0;background-size:100% 100%;mask-image:none;-webkit-mask-image:none}
 .four-subject-home .reference-heading{position:absolute;top:clamp(96px,11.5vh,132px);left:8%;right:8%;margin:0;padding:0;font-size:clamp(28px,3vw,46px);white-space:nowrap}
 .reference-home.four-subject-home .house-entry.two-row-entry{position:absolute;top:59%;bottom:auto;width:20%;height:clamp(90px,11.5vh,116px);min-height:90px;max-height:none;margin:0;padding:8px 6px}
 .four-subject-home .math-entry{left:10%;right:auto}
 .four-subject-home .viet-entry{left:30.5%;right:auto}
 .four-subject-home .english-entry{left:52%;right:auto}
 .four-subject-home .science-entry{left:76%;right:auto}
 .four-subject-home .science-entry .house-subject-name{font-size:clamp(16px,1.5vw,24px)}
 .four-subject-home .reference-daily{position:absolute;left:23%;top:74%;bottom:auto;width:54%;height:clamp(96px,13vh,130px);min-height:96px;max-height:130px;margin:0}
 .four-subject-home .reference-daily-art{height:100%;max-height:88px}
}
@media(min-width:701px) and (max-height:600px) and (orientation:landscape){
 .reference-home.four-subject-home{min-height:375px}
 .four-subject-home .reference-heading{top:60px;font-size:clamp(20px,2.8vw,28px)}
 .reference-home.four-subject-home .house-entry.two-row-entry{top:calc(74% - 90px);height:56px;min-height:56px;padding:3px 5px}
 .reference-home.four-subject-home .house-entry-copy{gap:2px}
 .reference-home.four-subject-home .house-subject-name{font-size:clamp(16px,2vw,22px)}
 .reference-home.four-subject-home .science-entry .house-subject-name{font-size:clamp(14px,1.6vw,18px)}
 .reference-home.four-subject-home .house-enter-text{font-size:13px;line-height:1.1;gap:4px}
 .reference-home.four-subject-home .house-entry.two-row-entry svg{width:12px;height:12px}
 .four-subject-home .reference-daily{top:auto;bottom:calc(var(--ref-footer) + 10px);height:56px;min-height:56px;max-height:56px;padding:4px 12px;gap:10px}
 .four-subject-home .reference-daily h2{font-size:clamp(18px,2.4vw,26px)}
 .four-subject-home .daily-start{height:42px;min-height:40px;font-size:16px;padding:4px 14px;gap:5px}
}
