/* VƯỜN NGOẠI NGỮ v6.15.219 — Mobile Student Home Gap Fix
   Targeted regression fix for iOS/Android: remove reserved/offscreen blank space
   from the logged-in home without changing learning/data behavior. */

@media (max-width:900px){
  /* The mobile account card is outside appRoot. Everything below it should flow
     naturally; never reserve a viewport-sized or intrinsic placeholder. */
  body.student-experience #appRoot,
  body.student-experience #view-home,
  body.student-experience #view-home.active,
  body.student-experience #view-home .home-container{
    min-height:0!important;
    height:auto!important;
  }

  body.student-experience #view-home.active{
    display:block!important;
  }

  body.student-experience #view-home .home-container{
    padding-top:8px!important;
    padding-bottom:96px!important;
    margin-top:0!important;
  }

  /* Keep the welcome + today goal directly under the account utility card. */
  body.student-experience #view-home .home-hero{
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
    min-height:0!important;
    height:auto!important;
    margin:0!important;
    padding:8px 0 0!important;
    align-items:stretch!important;
  }

  body.student-experience #view-home .home-hero-copy{
    display:block!important;
    flex:none!important;
    min-height:0!important;
    height:auto!important;
    margin:0 12px!important;
    padding:14px!important;
    border-radius:18px!important;
  }

  body.student-experience #view-home .student-today-hero:not(.hidden){
    display:block!important;
    flex:none!important;
    min-height:0!important;
    height:auto!important;
    margin:0 12px!important;
    padding:16px!important;
    align-self:auto!important;
    border-radius:20px!important;
  }

  /* Main source of the large mobile gap: old performance placeholders reserve
     520px while cards are waiting to paint. On Student Home, render them normally. */
  body.student-experience #view-home .student-dash-card,
  body.student-experience #view-home .home-section{
    content-visibility:visible!important;
    contain-intrinsic-size:none!important;
  }

  body.student-experience #view-home .student-home-dashboard:not(.hidden){
    display:grid!important;
    min-height:0!important;
    height:auto!important;
    margin:10px 12px 0!important;
    padding:0!important;
    gap:10px!important;
  }

  body.student-experience #view-home .student-dashboard-priority,
  body.student-experience #view-home .student-dashboard-learning,
  body.student-experience #view-home .student-dashboard-summary-row,
  body.student-experience #view-home .student-dashboard-bottom,
  body.student-experience #view-home .student-dash-card,
  body.student-experience #view-home .student-progress-banner{
    min-height:0!important;
    height:auto!important;
  }

  /* Neutralize historical mobile spacing from older design layers. */
  body.student-experience #view-home .student-dashboard-priority,
  body.student-experience #view-home .student-dashboard-summary-row,
  body.student-experience #view-home .student-dashboard-bottom{
    margin-top:0!important;
    margin-bottom:0!important;
  }
}

@media (max-width:440px){
  body.student-experience #view-home .home-container{
    padding-top:6px!important;
  }
  body.student-experience #view-home .home-hero{
    padding-top:6px!important;
  }
}
