/* JulyLearn V13.03 RC39 · Mobile Experience Pass
   Shared mobile-only refinements. Desktop layout is intentionally untouched. */
@media(max-width:820px){
  html{scroll-padding-top:72px}
  body{padding-bottom:env(safe-area-inset-bottom,0)}
  .container{width:min(calc(100% - 32px),var(--container))}
  .site-header{padding-top:env(safe-area-inset-top,0)}
  .nav{height:64px;min-height:64px}
  .brand{font-size:19px;gap:9px}.brand-mark{width:25px;height:25px;border-radius:8px}
  .menu-btn{min-width:42px;min-height:42px;display:grid;place-items:center;margin-left:auto;border-radius:10px;font-size:23px}
  .site-header.menu-open .nav{min-height:64px;padding:11px 0 14px}
  .site-header.menu-open .nav-links{gap:3px;padding:7px 0 8px}
  .site-header.menu-open .nav-links a{padding:11px 12px;font-size:14px}
  .site-header.menu-open .nav-actions{padding-bottom:2px}
  .btn,.filter,button{touch-action:manipulation}
  .footer{padding-bottom:calc(28px + env(safe-area-inset-bottom,0))}
  .footer-row{align-items:flex-start}.footer-links{gap:10px 16px;flex-wrap:wrap}
  .legal-page-links{padding-bottom:calc(12px + env(safe-area-inset-bottom,0))}

  /* Shared inner-page rhythm */
  .inner-mast{padding-top:30px}
  .section,.join-section{padding-top:52px;padding-bottom:52px}
  .section-head{margin-bottom:24px;gap:10px}.section-head h2{font-size:30px}.section-head p{font-size:14px;line-height:1.75}
  .page-hero{padding:42px 0 26px}.page-hero p{font-size:14px}
  .feature-card,.account-card,.plan-box,.result-card{border-radius:17px}

  /* Course library */
  .library-v08-hero{padding-top:14px!important}
  .library-v08-frame{padding:28px 22px 22px!important;border-radius:20px!important}
  .library-v08-heading h1{font-size:40px!important;line-height:1!important}
  .library-v08-heading h2{font-size:19px!important;line-height:1.35!important;margin-top:13px!important}
  .library-v08-heading p{font-size:12px!important;line-height:1.7!important}
  .library-v08 .knowledge-search-box{height:50px!important}
  .library-v08-filter-row{gap:9px!important}
  .library-v08-filter-group,.library-v08 .library-mode-row{scrollbar-width:none}
  .library-v08-filter-group::-webkit-scrollbar,.library-v08 .library-mode-row::-webkit-scrollbar{display:none}
  .library-v08-content{padding-top:22px!important}

  /* Knowledge */
  .knowledge-page-shell{padding-top:22px!important}
  .knowledge-hero-head h1{font-size:34px!important;line-height:1.08!important}
  .knowledge-tree-panel{max-height:220px!important}
  .knowledge-content-panel{padding:19px 16px!important}
  .my-learning-summary-grid{gap:14px!important}

  /* Join */
  .join-hero{padding:46px 0 50px!important}
  .join-hero-grid{gap:30px!important}
  .join-hero .join-fit-title{font-size:37px!important;line-height:1.08!important}
  .join-hero p{font-size:16px!important;line-height:1.75!important}
  .join-hero-panel{padding:26px 22px!important;border-radius:22px!important}
  .join-hero-panel strong{font-size:25px!important}
  .join-benefit-card{padding:24px 20px!important;border-radius:19px!important}
  .join-benefit-card h3{font-size:22px!important;margin-top:18px!important}
  .join-benefit-card>p{font-size:14px!important}
  .join-use-grid>div{padding:19px 2px!important}.join-use-grid strong{font-size:20px!important}
  .join-faq{padding:5px 18px!important;border-radius:19px!important}.join-faq summary{font-size:16px!important}
  .join-contact-card{padding:28px 21px!important;border-radius:22px!important}.join-contact-box{padding:22px!important}

  /* Wishes / feedback */
  .wishes-hero{padding-top:26px!important}
  .wishes-hero-grid{gap:18px!important}
  .wishes-hero h1{font-size:44px!important;line-height:1.02!important}
  .wishes-board{padding-bottom:54px!important}
  .feedback-modal{align-items:end!important;padding:0!important}
  .feedback-modal-card,.feedback-modal-card.compact,.feedback-modal-card.wish-form-card{max-height:88dvh!important;padding-bottom:calc(24px + env(safe-area-inset-bottom,0))!important}

  /* Routes */
  .route-minimal-hero{padding:32px 0 46px!important}
  .route-minimal-heading h1{font-size:36px!important}
  .route-choice-area{margin-top:26px!important;gap:25px!important}
  .route48-hero{padding-top:34px!important}
  .route48-hero h1{font-size:40px!important}

  /* Learning page: compact, player-first experience. */
  .learning-main{padding-bottom:calc(48px + env(safe-area-inset-bottom,0))}
  .learning-container{width:min(calc(100% - 24px),1360px)!important}
  .learning-coursebar{padding:15px 0 14px!important}
  .coursebar-inner{gap:15px!important}
  .learning-back-row{margin-bottom:10px!important;gap:11px!important}.learning-back{font-size:11px!important}
  .coursebar-title-row{display:flex!important;align-items:flex-end!important;gap:12px!important}
  .coursebar-copy h1{font-size:22px!important;line-height:1.14!important}
  .coursebar-stats{margin-top:0!important;gap:6px!important}.coursebar-stats span{padding:5px 8px!important;font-size:10px!important}
  .course-progress{padding:0!important}.course-progress-head{margin-bottom:6px!important;font-size:10px!important}.course-progress-track{height:5px!important}
  .learning-workspace{grid-template-columns:1fr!important;gap:14px!important;padding-top:14px!important}
  .learning-content{order:2}.lesson-sidebar{order:1!important;position:static!important;border-radius:14px!important;box-shadow:none!important}
  .sidebar-head{align-items:center!important;padding:12px 14px!important}.sidebar-head .learning-kicker{display:none}.sidebar-head h2{font-size:16px!important}.sidebar-head>span{margin-left:auto;padding:0 4px!important;font-size:10px!important}
  .mobile-directory-toggle{display:inline-flex!important;align-items:center;justify-content:center;min-height:36px;margin-left:8px;padding:7px 10px;border:1px solid #ddd9d2;border-radius:9px;background:#fff;color:#49443f;font-size:11px;font-weight:800}
  .lesson-sidebar:not(.is-open) .lesson-sidebar-body{display:none!important}
  .lesson-sidebar.is-open .mobile-directory-toggle{background:#17171b;color:#fff;border-color:#17171b}
  .learning-sidebar-tabs{margin:0 12px 10px!important}.lesson-search{margin:0 12px 10px!important;padding:10px 11px!important}
  .lesson-list-learning{max-height:min(52vh,420px)!important}.lesson-list-learning button{padding:13px 12px!important;grid-template-columns:31px minmax(0,1fr) auto!important}.lesson-list-title{font-size:12px!important}.lesson-duration{font-size:9px!important}
  .sidebar-note{display:none!important}
  .video-stage{padding:6px!important;border-radius:15px!important;box-shadow:0 14px 36px rgba(22,20,30,.14)!important}.video-topline{padding:3px 4px 7px!important}
  .video-player-shell{border-radius:10px!important}
  .mobile-lesson-transport{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:9px;align-items:center;margin:10px 0 0}
  .mobile-lesson-transport button{min-height:44px;border:1px solid #ddd9d2;border-radius:11px;background:#fff;color:#25221f;font-weight:800;font-size:13px;padding:9px 12px}
  .mobile-lesson-transport button:last-child{background:#17171b;color:#fff;border-color:#17171b}
  .mobile-lesson-transport button:disabled{opacity:.34;background:#f2f0ec;color:#8c867e;border-color:#e2ded8}
  .mobile-lesson-transport span{font-size:10px;color:#88827a;white-space:nowrap;text-align:center}
  .lesson-headline{padding:19px 2px 15px!important}.lesson-headline .learning-kicker{margin-bottom:6px!important}.lesson-headline h2{font-size:23px!important;line-height:1.2!important}
  .clip-bookmark-bar{margin:0 0 16px!important;padding:16px!important;border-radius:15px!important;gap:13px!important}.clip-bookmark-copy strong{font-size:15px!important}.clip-bookmark-copy small{font-size:11px!important;line-height:1.55!important}
  .clip-bookmark-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px!important}.clip-bookmark-actions button{min-height:43px;padding:9px 8px!important;font-size:12px!important}.clip-bookmark-actions .clip-save{grid-column:1/-1}
  .support-section{margin-bottom:15px!important;padding:19px 16px!important;border-radius:16px!important}.support-heading{padding-bottom:16px!important;gap:9px!important}.support-heading h2{font-size:22px!important}.support-status{font-size:9px!important}
  .support-intro{padding:19px 0!important;gap:11px!important}.support-intro p{font-size:15px!important;line-height:1.72!important}
  .support-grid{padding-top:17px!important}.support-card,.support-card:first-child,.support-card:nth-child(3){padding:16px 0!important}.support-card:first-child{padding-top:0!important}.support-card li{font-size:12px!important;line-height:1.65!important}
  .course-resource-panel{padding:20px!important;border-radius:15px!important;gap:15px!important}.course-resource-panel h3{font-size:18px!important}.resource-actions{display:grid!important;grid-template-columns:1fr;width:100%!important}
  .learning-toast{bottom:calc(18px + env(safe-area-inset-bottom,0))!important;max-width:calc(100% - 32px);text-align:center}
}

@media(max-width:560px){
  .container{width:min(calc(100% - 28px),var(--container))}
  .site-header .brand{font-size:18px}
  .section{padding-top:46px;padding-bottom:46px}
  .section-head h2{font-size:28px}
  .library-v08-frame{padding:25px 18px 20px!important}
  .library-v08-heading h1{font-size:36px!important}
  .library-v08 .course-all .course-card{border-radius:16px!important}
  .join-hero .join-fit-title{font-size:35px!important}
  .wishes-hero h1{font-size:40px!important}
  .learning-container{width:min(calc(100% - 20px),1360px)!important}
  .coursebar-title-row{align-items:flex-start!important;flex-direction:column!important}.coursebar-stats{margin-top:3px!important}
  .mobile-lesson-transport{grid-template-columns:1fr 70px 1fr}
}

.mobile-directory-toggle,.mobile-lesson-transport{display:none}

@media(max-width:700px){
  /* Homepage: reduce decorative vertical weight on phones. */
  .hero-editorial{padding:48px 0 44px!important}
  .hero-editorial .editorial-grid{gap:28px!important}
  .hero-editorial .hero-positioning-title{font-size:38px!important;line-height:1.08!important}
  .hero-editorial .lead{font-size:15px!important;line-height:1.75!important;margin-bottom:16px!important}
  .hero-editorial .hero-actions{margin-top:22px!important;gap:9px!important}
  .hero-editorial .editorial-stack{height:285px!important}
  .editorial-stack .cover.one{width:184px!important;height:235px!important}
  .editorial-stack .cover.two{width:168px!important;height:207px!important}
  .editorial-stack .cover.three{width:154px!important;height:188px!important}
  .feature-card{padding:23px 20px!important;min-height:0!important;border-radius:17px!important}
  .feature-icon{margin-bottom:18px!important}
  .home-join-split .join-main,.home-join-split .join-side{padding:29px 22px!important}
}

@media(max-width:820px){
  /* Mobile controls added after theme.css must keep dark-mode parity. */
  html[data-theme="dark"] .mobile-directory-toggle{background:#142138!important;border-color:rgba(151,171,217,.18)!important;color:#dbe5f4!important}
  html[data-theme="dark"] .lesson-sidebar.is-open .mobile-directory-toggle{background:#edf2f8!important;border-color:#edf2f8!important;color:#101a2d!important}
  html[data-theme="dark"] .mobile-lesson-transport button{background:#142138!important;border-color:rgba(151,171,217,.18)!important;color:#e6edf7!important}
  html[data-theme="dark"] .mobile-lesson-transport button:last-child{background:#edf2f8!important;border-color:#edf2f8!important;color:#101a2d!important}
  html[data-theme="dark"] .mobile-lesson-transport button:disabled{background:#111c30!important;border-color:rgba(151,171,217,.12)!important;color:#65758c!important}
}
