/* VIDLIK home — dedicated phone layout. Loaded last so desktop stays untouched. */
@media (max-width:760px){
  .portal-shell.home-balanced .portal-content{
    width:100%;
    max-width:none;
    padding:10px 8px 24px!important;
  }

  .portal-shell.home-balanced .portal-top{
    height:68px;
    min-height:68px;
    padding:0 10px;
  }
  .portal-shell.home-balanced .portal-top h1{
    font-size:20px;
    line-height:1.08;
  }

  /* 4 KPI cards become one compact 2x2 phone panel. */
  .portal-shell.home-balanced .dash-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0!important;
    margin:0 0 8px!important;
    border:1px solid #dce7e2;
    border-radius:13px;
    background:#fff;
    overflow:hidden;
  }
  .portal-shell.home-balanced .dash-grid::before{
    content:'МІЙ ПРОГРЕС';
    grid-column:1/-1;
    padding:8px 10px 7px;
    border-bottom:1px solid #e5ede9;
    color:#5d786e;
    font-size:8px;
    font-weight:900;
    letter-spacing:.14em;
  }
  .portal-shell.home-balanced .dash-stat{
    min-width:0!important;
    min-height:64px!important;
    padding:8px 9px!important;
    gap:7px!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  .portal-shell.home-balanced .dash-stat:nth-child(odd){border-left:1px solid #e5ede9!important}
  .portal-shell.home-balanced .dash-stat:nth-child(n+3){border-top:1px solid #e5ede9!important}
  .portal-shell.home-balanced .dash-stat-icon{
    width:28px!important;
    height:28px!important;
    flex:0 0 28px!important;
    border-radius:8px!important;
    font-size:13px!important;
  }
  .portal-shell.home-balanced .dash-stat span{font-size:8px!important;line-height:1.1!important}
  .portal-shell.home-balanced .dash-stat b{font-size:16px!important;line-height:1!important;margin:2px 0 0!important}
  .portal-shell.home-balanced .dash-stat small{display:none!important}

  /* Continue learning: only the useful information survives on a phone. */
  .portal-shell.home-balanced .home-focus-grid{gap:8px;margin-bottom:8px}
  .portal-shell.home-balanced .quick-card.resume-learning-card{
    display:block!important;
    width:100%;
    min-height:0!important;
    padding:12px 12px 11px!important;
    border-radius:13px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-copy{padding-left:0!important}
  .portal-shell.home-balanced .resume-course-badge{
    position:static!important;
    width:32px!important;
    height:32px!important;
    margin:0 0 6px!important;
    border-radius:9px!important;
    font-size:11px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .quick-kicker{display:none!important}
  .portal-shell.home-balanced .quick-card.resume-learning-card p::after{content:none!important;display:none!important}
  .portal-shell.home-balanced .resume-learning-card h2{
    margin:0 0 3px!important;
    font-size:18px!important;
    line-height:1.08!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-location{
    margin:0!important;
    font-size:9px!important;
    line-height:1.2!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-lesson-title{
    margin:4px 0 0!important;
    font-size:11px!important;
    line-height:1.2!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-overall{
    justify-content:flex-end!important;
    margin-top:8px!important;
    font-size:8px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-overall span{display:none!important}
  .portal-shell.home-balanced .resume-learning-card .resume-overall b{font-size:9px!important;line-height:1!important}
  .portal-shell.home-balanced .resume-learning-card .resume-track{
    height:4px!important;
    margin-top:4px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-actions{
    margin-top:8px!important;
    gap:6px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-primary{
    width:100%!important;
    min-width:0!important;
    padding:9px 11px!important;
    font-size:10px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-format,
  .portal-shell.home-balanced .resume-module-button,
  .portal-shell.home-balanced .resume-meta-panel,
  .portal-shell.home-balanced .resume-learning-card .resume-visual{
    display:none!important;
  }

  /* Today: title only, no explanatory prose. */
  .portal-shell.home-balanced .today-panel{
    display:grid!important;
    grid-template-columns:1fr!important;
    min-height:0!important;
    border-radius:13px!important;
    overflow:hidden;
  }
  .portal-shell.home-balanced .today-head{display:contents!important}
  .portal-shell.home-balanced .today-head>div:first-child{
    grid-column:1!important;
    grid-row:1!important;
    padding:10px 12px 8px!important;
  }
  .portal-shell.home-balanced .today-head .section-kicker{
    font-size:9px!important;
    letter-spacing:.12em!important;
  }
  .portal-shell.home-balanced .today-head h2,
  .portal-shell.home-balanced .today-head p{display:none!important}

  .portal-shell.home-balanced .today-missions{
    grid-column:1!important;
    grid-row:2!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    border-top:1px solid #e4ece8;
  }
  .portal-shell.home-balanced .today-mission{
    min-height:52px!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    gap:8px!important;
    padding:8px 11px 15px!important;
    border:0!important;
    border-top:1px solid #edf2ef!important;
  }
  .portal-shell.home-balanced .today-mission:first-child{border-top:0!important}
  .portal-shell.home-balanced .today-mission-status{
    width:30px!important;
    height:30px!important;
    border-radius:8px!important;
    font-size:10px!important;
  }
  .portal-shell.home-balanced .today-mission-copy small,
  .portal-shell.home-balanced .today-mission-copy em{display:none!important}
  .portal-shell.home-balanced .today-mission-copy b{font-size:11px!important;line-height:1.1!important}
  .portal-shell.home-balanced .today-mission-progress{
    left:49px!important;
    right:11px!important;
    bottom:7px!important;
    height:3px!important;
  }
  .portal-shell.home-balanced .today-mission-progress small{
    bottom:5px!important;
    font-size:6px!important;
  }

  .portal-shell.home-balanced .today-summary{
    grid-column:1!important;
    grid-row:3!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0!important;
    padding:0!important;
    border-left:0!important;
    border-top:1px solid #e4ece8!important;
  }
  .portal-shell.home-balanced .today-summary-item{
    grid-template-columns:24px minmax(0,1fr)!important;
    gap:6px!important;
    padding:7px 9px!important;
    border:0!important;
    min-height:46px!important;
  }
  .portal-shell.home-balanced .today-summary-item:nth-child(2){display:none!important}
  .portal-shell.home-balanced .today-summary-item:last-child{border-left:1px solid #e4ece8!important}
  .portal-shell.home-balanced .today-summary-icon{
    width:24px!important;
    height:24px!important;
    flex-basis:24px!important;
    border-radius:7px!important;
    font-size:10px!important;
  }
  .portal-shell.home-balanced .today-summary-item small{display:none!important}
  .portal-shell.home-balanced .today-summary-item b{font-size:9px!important;line-height:1.1!important}
  .portal-shell.home-balanced .today-summary-item em{font-size:6px!important;line-height:1.1!important}

  /* Courses: title + percent + progress only. */
  .portal-shell.home-balanced .home-route{
    padding:11px 11px 12px!important;
    border-radius:13px!important;
  }
  .portal-shell.home-balanced .home-route>.section-kicker{display:none!important}
  .portal-shell.home-balanced .home-route .section-head{margin-bottom:0!important}
  .portal-shell.home-balanced .home-route .section-head h2{
    margin:0!important;
    font-size:19px!important;
    line-height:1.1!important;
  }
  .portal-shell.home-balanced .home-route .text-link{display:none!important}
  .portal-shell.home-balanced .route-list{
    grid-template-columns:1fr!important;
    gap:6px!important;
    margin-top:8px!important;
  }
  .portal-shell.home-balanced .route-row{
    grid-template-columns:38px minmax(0,1fr) 28px!important;
    gap:8px!important;
    min-height:60px!important;
    padding:8px!important;
    border-radius:10px!important;
  }
  .portal-shell.home-balanced .route-num{
    width:36px!important;
    height:36px!important;
    border-radius:9px!important;
    font-size:10px!important;
  }
  .portal-shell.home-balanced .route-row b{font-size:11px!important;line-height:1.15!important}
  .portal-shell.home-balanced .route-row small{font-size:7px!important;line-height:1!important;margin-top:2px!important}
  .portal-shell.home-balanced .route-track{height:3px!important;margin-top:5px!important}
  .portal-shell.home-balanced .route-row strong{
    min-width:28px!important;
    width:28px!important;
    height:28px!important;
    padding:0!important;
    border-radius:8px!important;
    font-size:0!important;
  }
  .portal-shell.home-balanced .route-row strong::after{
    content:'→';
    font-size:15px;
    line-height:1;
  }
}

@media (max-width:360px){
  .portal-shell.home-balanced .portal-content{padding-left:7px!important;padding-right:7px!important}
  .portal-shell.home-balanced .dash-stat{padding:7px!important;gap:5px!important}
  .portal-shell.home-balanced .dash-stat b{font-size:15px!important}
  .portal-shell.home-balanced .quick-card.resume-learning-card{padding:11px!important}
  .portal-shell.home-balanced .resume-learning-card h2{font-size:17px!important}
  .portal-shell.home-balanced .today-summary-item{padding-left:7px!important;padding-right:7px!important}
}
