/* VIDLIK mobile home v6 — app-like visual pass based on the approved phone mockup.
   Phone-only: desktop remains untouched. */
@media (max-width:760px){
  html,body{background:#f2f7f4}
  .portal-shell.home-balanced{background:#f2f7f4!important}
  .portal-shell.home-balanced .portal-main{padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))}
  .portal-shell.home-balanced .portal-content{
    width:100%;max-width:none!important;
    padding:10px 10px 20px!important;
  }

  /* Header */
  .portal-shell.home-balanced .portal-top{
    height:72px!important;min-height:72px!important;
    padding:0 12px!important;gap:11px!important;
    background:rgba(255,255,255,.97)!important;
    border-bottom:1px solid #e4ece8!important;
  }
  .portal-shell.home-balanced .portal-top .portal-menu{
    width:38px!important;height:38px!important;flex:0 0 38px!important;
    border:0!important;border-radius:11px!important;
    background:#eef6f2!important;color:#163b30!important;
    font-size:20px!important;
  }
  .portal-shell.home-balanced .portal-top h1{
    margin:0!important;font-size:22px!important;line-height:1.08!important;
    font-weight:800!important;letter-spacing:-.025em!important;color:#0d201a!important;
  }
  .portal-shell.home-balanced .portal-top h1:after{display:none!important}

  /* KPI: four independent, readable cards. */
  .portal-shell.home-balanced .dash-grid{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;margin:0 0 10px!important;padding:0!important;
    border:0!important;border-radius:0!important;background:transparent!important;
    overflow:visible!important;
  }
  .portal-shell.home-balanced .dash-grid::before{display:none!important;content:none!important}
  .portal-shell.home-balanced .dash-stat{
    min-width:0!important;min-height:76px!important;
    padding:12px 11px!important;gap:9px!important;
    border:1px solid #dfe9e4!important;border-radius:15px!important;
    background:#fff!important;box-shadow:0 5px 14px rgba(18,61,47,.035)!important;
    align-items:center!important;
  }
  .portal-shell.home-balanced .dash-stat:nth-child(n){border-left:1px solid #dfe9e4!important;border-top:1px solid #dfe9e4!important}
  .portal-shell.home-balanced .dash-stat-icon{
    width:38px!important;height:38px!important;flex:0 0 38px!important;
    border-radius:11px!important;font-size:17px!important;
  }
  .portal-shell.home-balanced .dash-stat>div:last-child{min-width:0!important}
  .portal-shell.home-balanced .dash-stat span{
    display:block!important;font-size:10px!important;line-height:1.05!important;
    color:#70827a!important;white-space:nowrap!important;
  }
  .portal-shell.home-balanced .dash-stat b{
    display:block!important;margin:3px 0 0!important;
    font-size:20px!important;line-height:1.05!important;letter-spacing:-.025em!important;
    color:#0c2019!important;white-space:nowrap!important;
  }
  .portal-shell.home-balanced .dash-stat small{display:none!important}

  /* Stable home flow. */
  .portal-shell.home-balanced .home-focus-grid{display:grid!important;gap:10px!important;margin:0 0 10px!important}

  /* Continue learning hero */
  .portal-shell.home-balanced .quick-card.resume-learning-card{
    display:block!important;width:100%!important;min-height:0!important;
    padding:16px!important;border-radius:18px!important;
    border:1px solid rgba(255,255,255,.07)!important;
    background:linear-gradient(135deg,#073f30 0%,#07513a 58%,#116646 100%)!important;
    box-shadow:0 12px 28px rgba(8,62,44,.13)!important;overflow:hidden!important;
  }
  .portal-shell.home-balanced .quick-card.resume-learning-card:after{
    content:''!important;position:absolute!important;right:-64px!important;bottom:-78px!important;
    width:230px!important;height:230px!important;opacity:.2!important;
    background:linear-gradient(45deg,transparent 45%,rgba(255,255,255,.08) 46%,rgba(255,255,255,.08) 48%,transparent 49%),linear-gradient(-45deg,transparent 45%,rgba(255,255,255,.055) 46%,rgba(255,255,255,.055) 48%,transparent 49%)!important;
    background-size:48px 48px!important;pointer-events:none!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-copy{
    position:relative!important;z-index:2!important;padding:0!important;
    display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;
    grid-template-areas:
      'kicker kicker'
      'badge title'
      'badge location'
      'lesson lesson'
      'overall overall'
      'track track'
      'actions actions'!important;
    column-gap:12px!important;
  }
  .portal-shell.home-balanced .resume-learning-card .quick-kicker{
    display:block!important;grid-area:kicker!important;margin:0 0 11px!important;
    color:#d4ff77!important;font-size:11px!important;line-height:1!important;
    font-weight:900!important;letter-spacing:.08em!important;
  }
  .portal-shell.home-balanced .resume-course-badge{
    grid-area:badge!important;position:static!important;
    width:56px!important;height:56px!important;margin:0!important;
    border-radius:15px!important;background:#dff2e9!important;color:#0e6449!important;
    box-shadow:none!important;font-size:17px!important;font-weight:950!important;
  }
  .portal-shell.home-balanced .resume-learning-card h2{
    grid-area:title!important;align-self:end!important;
    margin:0 0 2px!important;color:#fff!important;
    font-size:21px!important;line-height:1.05!important;font-weight:800!important;
    letter-spacing:-.02em!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-location{
    grid-area:location!important;align-self:start!important;
    margin:0!important;color:#c9dfd6!important;font-size:11px!important;line-height:1.2!important;font-weight:700!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-lesson-title{
    grid-area:lesson!important;margin:11px 0 0!important;
    color:#f4fbf8!important;font-size:15px!important;line-height:1.2!important;font-weight:650!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-overall{
    grid-area:overall!important;display:flex!important;justify-content:flex-end!important;
    margin:13px 0 0!important;color:#d7e8e1!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:12px!important;color:#fff!important}
  .portal-shell.home-balanced .resume-learning-card .resume-track{
    grid-area:track!important;width:100%!important;max-width:none!important;height:7px!important;
    margin:5px 0 0!important;border-radius:999px!important;background:rgba(255,255,255,.2)!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-track i{
    border-radius:999px!important;background:linear-gradient(90deg,#55c79a,#baf44a)!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-actions{
    grid-area:actions!important;display:block!important;margin:13px 0 0!important;
  }
  .portal-shell.home-balanced .resume-learning-card .resume-primary{
    width:100%!important;min-width:0!important;padding:12px 14px!important;
    border:0!important;border-radius:999px!important;
    background:linear-gradient(90deg,#baf543,#8be86b)!important;color:#103a2d!important;
    font-size:13px!important;font-weight:900!important;box-shadow:none!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}
  .portal-shell.home-balanced .quick-card.resume-learning-card p::after{content:none!important;display:none!important}

  /* Hero skeleton mirrors the final card so loading never looks broken. */
  .portal-shell.home-balanced .quick-card[aria-busy='true']{min-height:196px!important}
  .portal-shell.home-balanced .home-resume-skeleton{
    display:grid!important;grid-template-columns:50px minmax(0,1fr)!important;gap:12px!important;align-items:start!important;
  }
  .portal-shell.home-balanced .home-resume-skeleton-badge{
    width:50px!important;height:50px!important;border-radius:14px!important;background:rgba(220,244,233,.24)!important;
  }
  .portal-shell.home-balanced .home-resume-skeleton>div{display:grid!important;gap:8px!important;min-width:0!important}
  .portal-shell.home-balanced .home-resume-skeleton-line,
  .portal-shell.home-balanced .home-resume-skeleton-track,
  .portal-shell.home-balanced .home-resume-skeleton-button{
    display:block!important;border-radius:999px!important;background:rgba(225,243,235,.18)!important;
    animation:vidlikMobilePulse 1.35s ease-in-out infinite alternate!important;
  }
  .portal-shell.home-balanced .home-resume-skeleton-line.wide{width:78%!important;height:13px!important}
  .portal-shell.home-balanced .home-resume-skeleton-line.mid{width:58%!important;height:10px!important}
  .portal-shell.home-balanced .home-resume-skeleton-line.short{width:68%!important;height:10px!important;margin-top:4px!important}
  .portal-shell.home-balanced .home-resume-skeleton-track{grid-column:1/-1!important;width:100%!important;height:7px!important;margin-top:12px!important}
  .portal-shell.home-balanced .home-resume-skeleton-button{grid-column:1/-1!important;width:100%!important;height:42px!important;margin-top:5px!important;background:rgba(178,240,80,.32)!important}
  @keyframes vidlikMobilePulse{from{opacity:.55}to{opacity:1}}

  /* Today */
  .portal-shell.home-balanced .today-panel{
    display:grid!important;grid-template-columns:1fr!important;min-height:0!important;
    border:1px solid #dfe9e4!important;border-radius:17px!important;background:#fff!important;
    box-shadow:0 5px 14px rgba(18,61,47,.03)!important;overflow:hidden!important;
  }
  .portal-shell.home-balanced .today-head{display:contents!important}
  .portal-shell.home-balanced .today-head>div:first-child{
    position:relative!important;grid-column:1!important;grid-row:1!important;
    padding:13px 14px 11px!important;border-bottom:1px solid #e7eeea!important;
  }
  .portal-shell.home-balanced .today-head .section-kicker{
    font-size:0!important;letter-spacing:0!important;color:#10251d!important;
  }
  .portal-shell.home-balanced .today-head .section-kicker::after{
    content:'Сьогодні';font-size:20px;line-height:1;font-weight:850;letter-spacing:-.02em;color:#10251d;
  }
  .portal-shell.home-balanced .today-head>div:first-child::after{
    content:'План на день  ›';position:absolute;right:14px;top:14px;
    color:#71857c;font-size:11px;font-weight:700;
  }
  .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;
    padding:0 12px!important;background:#fff!important;border:0!important;
  }
  .portal-shell.home-balanced .today-mission{
    position:relative!important;display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;
    gap:10px!important;align-items:center!important;min-height:58px!important;
    padding:10px 0 17px!important;border:0!important;border-top:1px solid #edf2ef!important;
    background:#fff!important;border-radius:0!important;box-shadow:none!important;
  }
  .portal-shell.home-balanced .today-mission:first-child{border-top:0!important}
  .portal-shell.home-balanced .today-mission-status{
    width:34px!important;height:34px!important;border-radius:10px!important;
    background:#e8f6ef!important;color:#177756!important;font-size:11px!important;font-weight:900!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:13px!important;line-height:1.15!important;color:#13271f!important}
  .portal-shell.home-balanced .today-mission-progress{
    left:46px!important;right:0!important;bottom:8px!important;height:5px!important;
    background:#e7eeeb!important;border-radius:999px!important;
  }
  .portal-shell.home-balanced .today-mission-progress i{background:#4ab58a!important;border-radius:999px!important}
  .portal-shell.home-balanced .today-mission-progress small{
    display:block!important;right:0!important;bottom:9px!important;font-size:8px!important;color:#6d8078!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:8px!important;
    padding:10px 12px 12px!important;border:0!important;border-top:1px solid #edf2ef!important;background:#fff!important;
  }
  .portal-shell.home-balanced .today-summary-item{
    display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;
    min-height:54px!important;padding:8px!important;border:1px solid #e1ebe6!important;border-radius:12px!important;background:#fff!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 #e1ebe6!important}
  .portal-shell.home-balanced .today-summary-icon{
    width:32px!important;height:32px!important;border-radius:9px!important;background:#edf7f2!important;color:#19765a!important;font-size:14px!important;
  }
  .portal-shell.home-balanced .today-summary-item small{display:none!important}
  .portal-shell.home-balanced .today-summary-item b{font-size:11px!important;line-height:1.1!important;color:#12261e!important}
  .portal-shell.home-balanced .today-summary-item em{font-size:9px!important;line-height:1.1!important;color:#75887f!important;margin-top:2px!important}

  /* Courses */
  .portal-shell.home-balanced .home-route{
    padding:14px!important;border:1px solid #dfe9e4!important;border-radius:17px!important;
    background:#fff!important;box-shadow:0 5px 14px rgba(18,61,47,.03)!important;
  }
  .portal-shell.home-balanced .home-route>.section-kicker{display:none!important}
  .portal-shell.home-balanced .home-route .section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin:0!important}
  .portal-shell.home-balanced .home-route .section-head h2{
    margin:0!important;font-size:20px!important;line-height:1!important;font-weight:850!important;letter-spacing:-.02em!important;color:#10251d!important;
  }
  .portal-shell.home-balanced .home-route .text-link{
    display:inline-flex!important;color:#61776d!important;font-size:11px!important;font-weight:750!important;white-space:nowrap!important;
  }
  .portal-shell.home-balanced .route-list{
    display:grid!important;grid-template-columns:1fr!important;gap:0!important;margin-top:10px!important;border-top:1px solid #edf2ef!important;
  }
  .portal-shell.home-balanced .route-row{
    display:grid!important;grid-template-columns:44px minmax(0,1fr) 28px!important;gap:10px!important;align-items:center!important;
    min-height:66px!important;padding:10px 0!important;border:0!important;border-top:1px solid #edf2ef!important;border-radius:0!important;background:#fff!important;
  }
  .portal-shell.home-balanced .route-row:first-child{border-top:0!important}
  .portal-shell.home-balanced .route-num{
    width:42px!important;height:42px!important;border-radius:12px!important;border:0!important;
    background:#dff1e9!important;color:#0f704f!important;font-size:12px!important;font-weight:900!important;
  }
  .portal-shell.home-balanced .route-row b{font-size:13px!important;line-height:1.15!important;color:#11251d!important}
  .portal-shell.home-balanced .route-row small{font-size:9px!important;line-height:1!important;margin-top:3px!important;color:#72857c!important}
  .portal-shell.home-balanced .route-track{height:5px!important;margin-top:7px!important;border-radius:999px!important;background:#e2ebe7!important}
  .portal-shell.home-balanced .route-track i{border-radius:999px!important;background:#4ab58a!important}
  .portal-shell.home-balanced .route-row strong{
    display:grid!important;place-items:center!important;min-width:28px!important;width:28px!important;height:28px!important;padding:0!important;
    border:0!important;border-radius:9px!important;background:transparent!important;color:#0e7050!important;font-size:0!important;
  }
  .portal-shell.home-balanced .route-row strong::after{content:'›';font-size:24px!important;line-height:1!important;font-weight:600!important}

  /* Bottom app navigation */
  .mobile-bottom-nav{
    position:fixed;left:0;right:0;bottom:0;z-index:90;
    display:grid;grid-template-columns:repeat(5,1fr);align-items:start;
    min-height:66px;padding:7px 5px calc(7px + env(safe-area-inset-bottom,0px));
    background:rgba(255,255,255,.96);border-top:1px solid #dfe8e4;
    box-shadow:0 -8px 26px rgba(12,48,37,.07);backdrop-filter:blur(14px);
  }
  .mobile-bottom-nav button{
    appearance:none;border:0;background:transparent;color:#64776f;
    display:grid;justify-items:center;gap:3px;padding:2px 1px;min-width:0;cursor:pointer;
    font-family:inherit;font-size:9px;line-height:1;font-weight:700;
  }
  .mobile-bottom-nav .mobile-nav-icon{
    width:30px;height:28px;display:grid;place-items:center;border-radius:9px;color:currentColor;
  }
  .mobile-bottom-nav .mobile-nav-icon svg{width:22px;height:22px;display:block;stroke:currentColor}
  .mobile-bottom-nav button.active{color:#0c6c4c}
  .mobile-bottom-nav button.active .mobile-nav-icon{background:#edf7f2;color:#0c6c4c}
  .mobile-bottom-nav button span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:68px}
}

@media (max-width:360px){
  .portal-shell.home-balanced .portal-content{padding-left:8px!important;padding-right:8px!important}
  .portal-shell.home-balanced .portal-top{padding-left:10px!important;padding-right:10px!important}
  .portal-shell.home-balanced .portal-top h1{font-size:20px!important}
  .portal-shell.home-balanced .dash-grid{gap:7px!important}
  .portal-shell.home-balanced .dash-stat{min-height:72px!important;padding:10px 9px!important;gap:7px!important}
  .portal-shell.home-balanced .dash-stat-icon{width:34px!important;height:34px!important;flex-basis:34px!important}
  .portal-shell.home-balanced .dash-stat b{font-size:18px!important}
  .portal-shell.home-balanced .resume-learning-card h2{font-size:19px!important}
  .portal-shell.home-balanced .resume-learning-card .resume-lesson-title{font-size:14px!important}
  .portal-shell.home-balanced .today-head .section-kicker::after{font-size:18px!important}
  .mobile-bottom-nav button{font-size:8px}
}

@media (min-width:761px){.mobile-bottom-nav{display:none!important}}
