/* MR LEE 2026-10-28 · Fix: scholarship / live leaderboard not clipped
   by legacy 98-112px rows; score badge lives inside leaderboard and contact dock
   is user-expanded instead of covering the cards. */
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair{
  display:grid!important;
  grid-template-columns:minmax(220px,32%) minmax(0,1fr)!important;
  align-items:stretch!important;gap:12px!important;
  width:100%!important;min-width:0!important;
  height:auto!important;min-height:155px!important;max-height:none!important;
  overflow:visible!important;margin:0!important;padding:0!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship,
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking{
  position:relative!important;box-sizing:border-box!important;
  height:auto!important;min-height:155px!important;max-height:none!important;
  width:100%!important;min-width:0!important;
  margin:0!important;border-radius:16px!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship{
  overflow:hidden!important;padding:16px 19px!important;
  display:flex!important;align-items:flex-start!important;
  flex-direction:column!important;justify-content:center!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,rgba(255,244,251,.77) 0%,rgba(255,244,251,.32) 45%,transparent 70%);
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship>img{
  width:66%!important;height:100%!important;right:0!important;top:0!important;
  object-fit:cover!important;object-position:center!important;opacity:.94!important;
  -webkit-mask-image:linear-gradient(90deg,transparent,black 43%)!important;
  mask-image:linear-gradient(90deg,transparent,black 43%)!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship>b{
  z-index:2!important;font-size:clamp(17px,1.35vw,24px)!important;
  line-height:1.14!important;max-width:60%!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship>span{
  z-index:3!important;position:relative!important;
  bottom:auto!important;left:auto!important;
  display:inline-flex!important;align-items:center!important;
  margin-top:12px!important;padding:8px 12px!important;
  min-height:34px!important;font-size:11px!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 76px!important;
  grid-template-rows:auto minmax(75px,1fr)!important;
  gap:8px 10px!important;padding:12px 14px!important;
  align-items:stretch!important;
  overflow:hidden!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title{
  grid-column:1/-1!important;grid-row:1!important;
  display:flex!important;align-items:center!important;
  justify-content:flex-start!important;flex-wrap:wrap!important;
  gap:6px 10px!important;min-width:0!important;min-height:0!important;
  max-height:none!important;height:auto!important;overflow:visible!important;
  padding:0!important;margin:0!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title>.cup{
  flex:none!important;font-size:26px!important;line-height:1!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title>div{
  flex:1 1 340px!important;display:flex!important;align-items:center!important;
  flex-wrap:wrap!important;gap:4px 9px!important;
  min-width:0!important;width:auto!important;height:auto!important;
  max-height:none!important;overflow:visible!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title h2{
  display:inline!important;margin:0!important;padding:0!important;
  white-space:nowrap!important;font:850 clamp(12px,.88vw,16px)/1.35 "Be Vietnam Pro",system-ui,sans-serif!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title p{
  display:none!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title a{
  position:static!important;display:inline-flex!important;
  flex:none!important;width:auto!important;height:auto!important;
  min-height:22px!important;padding:3px 5px!important;
  margin:0!important;background:transparent!important;
  font:750 10px/1.4 "Be Vietnam Pro",system-ui,sans-serif!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .mrlee-rank-live-status{
  position:static!important;display:inline!important;margin:0!important;
  white-space:nowrap!important;font-size:10px!important;line-height:1.45!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-strip-wrap{
  grid-column:1!important;grid-row:2!important;
  display:block!important;align-self:stretch!important;min-height:76px!important;
  max-height:none!important;width:100%!important;min-width:0!important;
  overflow:hidden!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking #rankSlider{
  display:flex!important;flex-direction:row!important;align-items:stretch!important;
  width:100%!important;height:100%!important;min-height:76px!important;
  gap:9px!important;overflow-x:auto!important;overflow-y:hidden!important;
  scroll-snap-type:x proximity!important;scrollbar-width:none!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .mrlee-rank-v304-card{
  flex:0 0 clamp(166px,17vw,218px)!important;
  min-width:0!important;max-width:none!important;
  min-height:76px!important;max-height:95px!important;
  padding:10px!important;overflow:hidden!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .mrlee-rank-v304-card .student-info{
  min-width:0!important;max-width:100%!important;overflow:hidden!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .mrlee-rank-v304-card .student-name{
  display:block!important;width:100%!important;max-width:100%!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-controls{
  grid-column:2!important;grid-row:2!important;
  position:static!important;display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:center!important;
  gap:7px!important;margin:0!important;padding:0!important;
  min-width:0!important;width:76px!important;height:auto!important;
}
html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-controls>button{
  display:grid!important;place-items:center!important;
  flex:0 0 32px!important;width:32px!important;height:32px!important;
  border-radius:50%!important;font-size:22px!important;line-height:1!important;
}
/* Make weekly score part of the leaderboard instead of covering it as a floating banner. */
html[data-mrlee-v303="reference"] #ranking .rank-title>#mrleeV12Widget{
  position:static!important;inset:auto!important;z-index:2!important;
  display:inline-flex!important;align-items:center!important;flex:0 1 auto!important;
  min-width:0!important;max-width:min(240px,100%)!important;
  min-height:28px!important;padding:5px 9px!important;
  margin:0 0 0 auto!important;gap:3px!important;
  border-radius:10px!important;box-shadow:none!important;
  font:750 11px/1.4 "Be Vietnam Pro",system-ui,sans-serif!important;
}
html[data-mrlee-v303="reference"] #ranking .rank-title>#mrleeV12Widget>a{
  display:block!important;min-width:0!important;max-width:100%!important;
  padding:0!important;color:#fff!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  font-size:11px!important;text-decoration:none!important;
}
html[data-mrlee-v303="reference"] #ranking .rank-title>#mrleeV12Widget>a strong{
  font-weight:800!important;
}
html[data-mrlee-v303="reference"] #ranking .rank-title>#mrleeV12Widget #mrleeV12Status{
  max-width:155px!important;font-size:10px!important;line-height:1.3!important;
  white-space:normal!important;
}
/* Default compact contact trigger; full five contacts only after the learner taps it. */
#mrleeContactDock{bottom:max(92px,calc(env(safe-area-inset-bottom) + 78px))!important;right:max(12px,env(safe-area-inset-right))!important;z-index:10020!important}
#mrleeContactDock>.mrlee-contact-links{display:none!important}
#mrleeContactDock[data-open="true"]>.mrlee-contact-links{display:flex!important}
#mrleeContactDock>.mrlee-contact-toggle{display:inline-flex!important}
/* Keep the real roster cards and their controls accessible on narrower screens. */
@media(max-width:1080px){
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair{
   grid-template-columns:minmax(200px,34%) minmax(0,1fr)!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking{
   grid-template-columns:minmax(0,1fr) 70px!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-controls{width:70px!important}
}
@media(max-width:760px){
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair{
   grid-template-columns:minmax(0,1fr)!important;
   height:auto!important;min-height:0!important;gap:10px!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.scholarship{
   min-height:135px!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking{
   min-height:210px!important;height:auto!important;
   grid-template-columns:minmax(0,1fr) 76px!important;
   grid-template-rows:auto minmax(80px,1fr)!important;
   padding:12px!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title{
   grid-column:1/-1!important;grid-row:1!important;padding:0!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-title>div{
   flex-basis:calc(100% - 44px)!important;gap:4px 8px!important;
 }
 html[data-mrlee-v303="reference"] #ranking .rank-title>#mrleeV12Widget{
   margin:0!important;max-width:100%!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-strip-wrap{
   grid-row:2!important;grid-column:1!important;min-width:0!important;
 }
 html[data-mrlee-v303="reference"] #mainContent>.mrlee-bottom-pair>.ranking .rank-controls{
   grid-row:2!important;grid-column:2!important;
 }
}
@media(prefers-reduced-motion:reduce){
 html[data-mrlee-v303="reference"] #ranking .mrlee-rank-v304-card{
   transition:none!important;
 }
}
