/* ONIX v7 — mobile app experience. Loaded last on dashboard and public index. */
@media (max-width: 760px){
  html{font-size:13px!important;overflow-x:hidden}
  body{overflow-x:hidden!important}
  body.dashboard-body{--mobile-gap:10px;--mobile-radius:18px;min-width:0!important}
  body.dashboard-body .dashboard-layout{display:block!important;width:100%!important;min-height:100dvh!important}
  body.dashboard-body .dashboard-main{width:100%!important;max-width:100%!important;margin:0!important;padding:calc(8px + env(safe-area-inset-top)) 10px calc(76px + env(safe-area-inset-bottom))!important;overflow:visible!important}
  body.dashboard-body .dashboard-topbar{position:relative!important;inset:auto!important;width:100%!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) 40px!important;gap:8px!important;padding:13px 14px!important;margin:0 0 10px!important;border-radius:20px!important;overflow:hidden!important}
  body.dashboard-body .mobile-appbar-brand{display:none!important}
  body.dashboard-body .smart-header{min-width:0!important}
  body.dashboard-body .smart-header .topbar-label{font-size:9px!important;letter-spacing:.22em!important}
  body.dashboard-body .smart-header h2{font-size:21px!important;line-height:1.05!important;letter-spacing:-.035em!important;white-space:normal!important;overflow-wrap:anywhere!important;margin:4px 0!important}
  body.dashboard-body .smart-header p{font-size:10px!important;line-height:1.2!important}
  body.dashboard-body .smart-header strong{display:block!important;font-size:10px!important;line-height:1.3!important;margin-top:3px!important}
  body.dashboard-body .notification-btn{position:relative!important;inset:auto!important;align-self:start!important;width:40px!important;height:40px!important;border-radius:13px!important}
  body.dashboard-body .tour-replay-btn,body.dashboard-body .dashboard-launch-actions,body.dashboard-body .dashboard-support-btn,body.dashboard-body .topbar-profile{display:none!important}

  body.dashboard-body .dash-section{width:100%!important;max-width:100%!important;padding:0!important;margin:0!important}
  body.dashboard-body .dash-section>*,body.dashboard-body .onix-today-grid,body.dashboard-body .dashboard-status-strip,body.dashboard-body .onix-statistics-grid,body.dashboard-body .dash-grid,body.dashboard-body .goals-grid,body.dashboard-body .profile-grid{max-width:100%!important;min-width:0!important}
  body.dashboard-body .onix-today-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  body.dashboard-body :is(.onix-today-card,.onix-ai-card,.onix-live-command,.onix-statistics-card,.dash-card,.goal-card,.activity-card,.profile-main-card,.profile-option-card,.session-management-card,.level-card){padding:14px!important;border-radius:18px!important;min-height:0!important}
  body.dashboard-body :is(.onix-today-card,.onix-ai-card) h2{font-size:21px!important;line-height:1.05!important}
  body.dashboard-body :is(.onix-live-command,.onix-statistics-card,.dash-card,.goal-card,.activity-card,.profile-main-card,.profile-option-card,.session-management-card,.level-card) h1{font-size:25px!important;line-height:1.05!important}
  body.dashboard-body :is(.onix-live-command,.onix-statistics-card,.dash-card,.goal-card,.activity-card,.profile-main-card,.profile-option-card,.session-management-card,.level-card) h2{font-size:20px!important;line-height:1.1!important}
  body.dashboard-body p,body.dashboard-body li{font-size:12px!important;line-height:1.48!important}
  body.dashboard-body .today-actions{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  body.dashboard-body .today-actions button{width:100%!important;min-height:42px!important;padding:9px 11px!important;font-size:10px!important;letter-spacing:.13em!important}
  body.dashboard-body .assistant-actions{grid-template-columns:1fr 1fr!important;gap:7px!important}
  body.dashboard-body .assistant-actions button{min-width:0!important;min-height:42px!important;padding:8px 5px!important;font-size:9px!important}
  body.dashboard-body .assistant-open-btn{min-height:43px!important}
  body.dashboard-body .dashboard-status-strip{grid-template-columns:1fr!important;gap:6px!important}
  body.dashboard-body .dashboard-status-strip>*{padding:9px 11px!important;min-height:44px!important}
  body.dashboard-body .onix-statistics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.dashboard-body .onix-statistics-grid>*{min-width:0!important;padding:12px!important}

  /* Bottom navigation: real app bar, never a desktop sidebar squeezed into the phone. */
  body.dashboard-body .dashboard-sidebar{position:fixed!important;z-index:9000!important;left:8px!important;right:8px!important;bottom:calc(6px + env(safe-area-inset-bottom))!important;top:auto!important;width:auto!important;height:62px!important;min-height:62px!important;max-height:62px!important;padding:5px!important;margin:0!important;border-radius:20px!important;overflow:hidden!important;background:rgba(7,9,12,.94)!important;border:1px solid rgba(var(--accent-rgb,244,244,245),.14)!important;box-shadow:0 16px 45px rgba(0,0,0,.42)!important;backdrop-filter:blur(22px)!important}
  body.dashboard-body .dashboard-logo,body.dashboard-body .sidebar-plan,body.dashboard-body .sidebar-install-trigger,body.dashboard-body .dashboard-social-links,body.dashboard-body .dashboard-home-link{display:none!important}
  body.dashboard-body .dashboard-menu{height:100%!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;margin:0!important;padding:0!important}
  body.dashboard-body .dashboard-menu .dash-link{width:100%!important;height:52px!important;min-height:52px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:3px!important;padding:4px 1px!important;margin:0!important;border:0!important;border-radius:14px!important;background:transparent!important;color:var(--text-soft,#a3a3aa)!important;box-shadow:none!important}
  body.dashboard-body .dashboard-menu .dash-link svg{width:18px!important;height:18px!important;flex:none!important}
  body.dashboard-body .dashboard-menu .dash-link span{display:block!important;max-width:100%!important;font-size:8.5px!important;font-weight:700!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.dashboard-body .dashboard-menu .dash-link.active{color:var(--accent,#fff)!important;background:rgba(var(--accent-rgb,244,244,245),.10)!important}

  /* Education cards/modals fit a phone instead of behaving like desktop sheets. */
  body.dashboard-body :is(.education-shell,.education-panel,.education-card,.level-card,.lesson-card,.concept-card){max-width:100%!important}
  body.dashboard-body dialog,body.dashboard-body :is(.goal-modal,.education-modal,.exam-modal,.rules-modal){max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 96px)!important;margin:auto!important;border-radius:20px!important;overflow:auto!important}

  /* Themes control the whole mobile surface and keep readable contrast. */
  body.dashboard-body.theme-sapphire{background:#030711!important;color:#f5f8ff!important}
  body.dashboard-body.theme-sapphire .dashboard-sidebar{background:rgba(4,12,28,.96)!important;border-color:rgba(110,168,255,.28)!important}
  body.dashboard-body.theme-sapphire :is(.dashboard-topbar,.onix-today-card,.onix-ai-card,.onix-live-command,.onix-statistics-card,.dash-card,.goal-card,.activity-card,.level-card){background:linear-gradient(145deg,rgba(8,22,47,.96),rgba(5,13,28,.94))!important;border-color:rgba(110,168,255,.25)!important;color:#f5f8ff!important}
  body.dashboard-body.theme-gold{background:#080704!important;color:#fffaf0!important}
  body.dashboard-body.theme-gold .dashboard-sidebar{background:rgba(18,14,6,.96)!important;border-color:rgba(226,189,91,.30)!important}
  body.dashboard-body.theme-gold :is(.dashboard-topbar,.onix-today-card,.onix-ai-card,.onix-live-command,.onix-statistics-card,.dash-card,.goal-card,.activity-card,.level-card){background:linear-gradient(145deg,rgba(31,25,11,.96),rgba(14,12,7,.95))!important;border-color:rgba(226,189,91,.27)!important;color:#fffaf0!important}
  body.dashboard-body.theme-pearl{background:#f2f4f7!important;color:#111318!important}
  body.dashboard-body.theme-pearl .dashboard-sidebar{background:rgba(255,255,255,.96)!important;border-color:rgba(17,24,39,.14)!important}
  body.dashboard-body.theme-pearl :is(.dashboard-topbar,.onix-today-card,.onix-ai-card,.onix-live-command,.onix-statistics-card,.dash-card,.goal-card,.activity-card,.level-card){background:linear-gradient(145deg,#fff,#eef1f5)!important;border-color:rgba(17,24,39,.13)!important;color:#111318!important}
  body.dashboard-body.theme-pearl .dashboard-menu .dash-link{color:#667085!important}body.dashboard-body.theme-pearl .dashboard-menu .dash-link.active{color:#111318!important;background:#e9edf2!important}

  /* Public index: compact phone-first composition. */
  body.public-index-v23 .public-header{width:calc(100% - 16px)!important;min-height:58px!important;margin:8px!important;padding:7px 9px!important;border-radius:18px!important}
  body.public-index-v23 .public-header .public-brand span{display:none!important}
  body.public-index-v23 .public-header-actions{gap:5px!important}
  body.public-index-v23 .public-header-actions .public-btn{min-height:38px!important;padding:8px 9px!important;font-size:10px!important}
  body.public-index-v23 .public-hero{width:calc(100% - 24px)!important;min-height:0!important;padding:34px 0 38px!important;gap:20px!important}
  body.public-index-v23 .public-hero-copy h1{font-size:clamp(34px,10.5vw,45px)!important;line-height:.96!important;letter-spacing:-.05em!important;margin:12px 0 14px!important}
  body.public-index-v23 .public-hero-copy>p{font-size:13px!important;line-height:1.5!important}
  body.public-index-v23 .public-hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-top:17px!important}
  body.public-index-v23 .public-hero-actions .public-btn{width:100%!important;justify-content:center!important}
  body.public-index-v23 .public-dashboard-preview{padding:10px!important;border-radius:18px!important;overflow:hidden!important}
  body.public-index-v23 .public-section{width:calc(100% - 24px)!important;padding:42px 0!important}
  body.public-index-v23 .public-section h2{font-size:30px!important;line-height:1.02!important}
  body.public-index-v23 .public-feature-grid,body.public-index-v23 .public-plan-grid{grid-template-columns:1fr!important;gap:9px!important}
  body.public-index-v23 .public-feature-grid article,body.public-index-v23 .public-plan-card{padding:17px!important;border-radius:18px!important}
  body.public-index-v23 .public-footer{padding-bottom:28px!important}
}
@media(max-width:380px){body.dashboard-body .smart-header h2{font-size:19px!important}body.dashboard-body .onix-statistics-grid{grid-template-columns:1fr!important}body.public-index-v23 .public-hero-copy h1{font-size:33px!important}}
