@media (max-width:700px), (max-height:500px) and (pointer:coarse) {
  html.learning-mode { scroll-padding-bottom:calc(var(--learn-footer-height,80px) + 16px); overscroll-behavior-y:none; }
  html.learning-mode .learn-player { min-width:0; padding-bottom:calc(var(--learn-footer-height,80px) + 16px); animation:none; }
  html.learning-mode .learn-player > .learn-footer {
    position:fixed; inset-inline:0; bottom:var(--learn-keyboard-offset,0px); z-index:40;
    grid-template-columns:44px minmax(0,1fr); gap:8px; box-sizing:border-box; width:auto; margin:0;
    padding:10px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
    background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; touch-action:manipulation;
  }
  html.learning-mode .learn-footer > small { display:none; }
  html.learning-mode .learn-footer > .btn:first-child { width:44px; min-width:44px; min-height:44px; padding:10px; font-size:0; }
  html.learning-mode .learn-footer > .btn:first-child svg { margin:0; }
  html.learning-mode .learn-footer-actions { min-width:0; max-width:100%; width:100%; justify-self:stretch; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
  html.learning-mode .learn-footer-actions .btn { flex:1 1 108px; min-width:0; max-width:100%; min-height:44px; padding:9px 10px; white-space:normal; overflow-wrap:anywhere; font-size:13px; }
  html.learning-mode .learn-stage :is(input,textarea,select,[contenteditable=true]) { scroll-margin-bottom:calc(var(--learn-footer-height,80px) + 16px); }
  html.learning-mode .support-launcher { bottom:calc(var(--learn-footer-height,80px) + 12px) !important; }
}
