.camp-promo-rail{min-width:0;display:grid;gap:12px}
.china-camp-ad{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;margin:0;padding:13px 15px;border:1px solid #f0cf8e;border-radius:16px;background:linear-gradient(135deg,#fff8e8,#f5f1ff);box-shadow:0 6px 18px rgba(35,50,71,.07)}
.china-camp-ad[hidden]{display:none!important}.china-camp-ad-icon{font-size:1.65rem;line-height:1}.china-camp-ad-copy{min-width:0}.china-camp-ad-copy strong{display:block;color:#473b9f;font-size:.98rem;line-height:1.25}.china-camp-ad-copy span{display:block;margin-top:3px;color:#6b6171;font-size:.82rem;line-height:1.4}.china-camp-ad-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 11px;border-radius:11px;background:#5d56d8;color:#fff;text-decoration:none;font-weight:800;font-size:.84rem;white-space:nowrap}.china-camp-ad-link:hover,.china-camp-ad-link:focus-visible{background:#493bbd;color:#fff}.china-camp-ad-link:focus-visible{outline:3px solid #c8c4ff;outline-offset:2px}
.camp-promo-showcase{margin:20px auto;padding:18px;border:1px solid #e5e0f8;border-radius:20px;background:linear-gradient(135deg,#fffdf7,#f8f6ff);box-shadow:0 8px 24px rgba(35,50,71,.06)}.camp-promo-showcase[hidden]{display:none!important}.camp-promo-showcase-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}.camp-promo-showcase-head h2{margin:0;color:#302a69;font-size:1.25rem}.camp-promo-showcase-head p{margin:4px 0 0;color:#68758d;line-height:1.45;font-size:.9rem}.camp-promo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.camp-promo-showcase .china-camp-ad{height:100%;box-sizing:border-box}.camp-promo-showcase--dashboard{margin:0 0 18px}.camp-promo-showcase--dashboard .camp-promo-showcase-head h2{font-size:1.08rem}
@media(min-width:1400px){.teacher-dashboard-layout,.parent-dashboard-layout,.hm-home-dashboard-layout{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:18px;align-items:start}.teacher-dashboard-content,.parent-dashboard-content,.hm-home-dashboard-content{grid-column:1;grid-row:1}.teacher-dashboard-layout>.camp-promo-rail,.parent-dashboard-layout>.camp-promo-rail,.hm-home-dashboard-layout>.camp-promo-rail{grid-column:2;grid-row:1;position:sticky;top:18px}.teacher-dashboard-layout>.camp-promo-rail .china-camp-ad,.parent-dashboard-layout>.camp-promo-rail .china-camp-ad,.hm-home-dashboard-layout>.camp-promo-rail .china-camp-ad{grid-template-columns:1fr;align-items:start;padding:16px}.teacher-dashboard-layout>.camp-promo-rail .china-camp-ad-icon,.parent-dashboard-layout>.camp-promo-rail .china-camp-ad-icon,.hm-home-dashboard-layout>.camp-promo-rail .china-camp-ad-icon{font-size:2rem}.teacher-dashboard-layout>.camp-promo-rail .china-camp-ad-link,.parent-dashboard-layout>.camp-promo-rail .china-camp-ad-link,.hm-home-dashboard-layout>.camp-promo-rail .china-camp-ad-link{width:100%;box-sizing:border-box;margin-top:2px}}
@media(max-width:1399px){.teacher-dashboard-layout,.parent-dashboard-layout,.hm-home-dashboard-layout{display:flex;flex-direction:column}.teacher-dashboard-layout>.camp-promo-rail,.parent-dashboard-layout>.camp-promo-rail,.hm-home-dashboard-layout>.camp-promo-rail{order:-1;margin-bottom:18px}}
@media(max-width:760px){.camp-promo-grid{grid-template-columns:1fr}.camp-promo-showcase-head{align-items:flex-start;flex-direction:column}}
@media(max-width:620px){.china-camp-ad{grid-template-columns:auto minmax(0,1fr)}.china-camp-ad-link{grid-column:1/-1;width:100%;box-sizing:border-box}}

.hm-interest-ad{box-sizing:border-box}
.studio-partner-side-rail{position:fixed;right:12px;top:104px;width:172px;z-index:20}.studio-partner-side-rail .studio-partner-ad{max-height:calc(100vh - 124px);overflow:auto;grid-template-columns:1fr;align-items:start;gap:9px;padding:44px 12px 14px}.studio-partner-side-rail .china-camp-ad-icon{font-size:1.45rem}.studio-partner-side-rail .china-camp-ad-copy strong{font-size:.9rem;line-height:1.28}.studio-partner-side-rail .china-camp-ad-copy span{font-size:.76rem;line-height:1.45}.studio-partner-side-rail .china-camp-ad-link{width:100%;box-sizing:border-box;min-height:44px;padding:8px 9px;white-space:normal;text-align:center;font-size:.78rem}
@media(max-width:1399px){.studio-partner-side-rail{position:static;width:min(920px,calc(100% - 28px));margin:18px auto}.studio-partner-side-rail .studio-partner-ad{max-height:none;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;padding:42px 15px 13px}.studio-partner-side-rail .china-camp-ad-link{width:auto;white-space:nowrap}.camp-promo-rail>.studio-partner-ad{order:-10;margin-bottom:0}}
@media(min-width:1400px){body.hm-partner-promo-visible{box-sizing:border-box;padding-right:190px}body.hm-partner-promo-visible.hm-shell-app:not(.hm-app){padding-right:0}body.hm-partner-promo-visible.hm-shell-app:not(.hm-app) .app-main{box-sizing:border-box;padding-right:190px}.camp-promo-rail>.studio-partner-ad{position:sticky;top:18px}.teacher-dashboard-layout>.camp-promo-rail>.studio-partner-ad,.parent-dashboard-layout>.camp-promo-rail>.studio-partner-ad,.hm-home-dashboard-layout>.camp-promo-rail>.studio-partner-ad{grid-template-columns:1fr;align-items:start;padding:16px}.camp-promo-rail>.studio-partner-ad .china-camp-ad-link{width:100%;box-sizing:border-box}}

/* Closable Homework Magic partner invitation. */
.studio-partner-ad{position:relative;padding-top:42px}
.studio-partner-ad .hm-interest-ad-close{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:12px;background:rgba(255,255,255,.9);color:#514a6d;font:800 1.55rem/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;box-shadow:0 1px 5px rgba(35,50,71,.12)}
.studio-partner-ad .hm-interest-ad-close:hover{background:#fff;color:#332a79}
.studio-partner-ad .hm-interest-ad-close:focus-visible{outline:3px solid #c8c4ff;outline-offset:2px}

/* Key Stage articles: use the right-hand gutter without covering the text.
   On narrow screens the invitation follows the article in normal flow. */
body.hm-partner-promo-article.hm-partner-promo-visible { padding-right: 0 !important; }
body.hm-partner-promo-article .studio-partner-side-rail {
  position: static; width: min(900px, calc(100% - 40px));
  margin: 18px auto 26px; z-index: 1;
}
@media (min-width: 1320px) {
  body.hm-partner-promo-article .studio-partner-side-rail {
    position: absolute; top: 136px; left: calc(50% + 465px); right: auto;
    width: min(170px, calc(50vw - 480px)); margin: 0;
  }
  body.hm-partner-promo-article .studio-partner-ad {
    max-height: none; grid-template-columns: 1fr; padding: 44px 12px 14px;
  }
}
/* Maggie stays reachable at bottom-right, above the safe-area inset. */
body.hm-partner-promo-article .hm-wh-root.hm-wh-floating {
  position: fixed !important; top: auto !important; left: auto !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
}
