/* Home only. Insets remain zero in ordinary browsers; never guess a native status bar. */
body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] {
  --wf-safe-top: env(safe-area-inset-top, 0px);
  --wf-safe-bottom: env(safe-area-inset-bottom, 0px);
  --wf-study-nav-height: calc(74px + var(--wf-safe-bottom));
  --wf-home-top-gap: 24px;
  --wf-home-nav-gap: 14px;
}
body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #knowledgeStudyPanel.active-mobile-panel {
  padding-top: max(22px, calc(var(--wf-safe-top) + var(--wf-home-top-gap))) !important;
  padding-bottom: calc(var(--wf-study-nav-height) + var(--wf-home-nav-gap)) !important;
}
body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #mobileStudyNav:not(.knowledge-module-dock) {
  height: var(--wf-study-nav-height) !important;
  padding-bottom: calc(7px + var(--wf-safe-bottom)) !important;
}
body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #studentAssistantFab.student-planner-fab {
  bottom: var(--wf-study-nav-height) !important;
}

@media (max-width: 699px) {
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] {
    --wf-home-top-gap: 12px;
  }
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #knowledgeStudyPanel.active-mobile-panel {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 100svh !important;
    max-height: none !important;
    gap: 10px !important;
  }
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #knowledgeStudyPanel.active-mobile-panel > .museum-course-masthead {
    flex: 0 0 auto;
  }
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #museumRefinedCover {
    flex: 1 0 auto;
    grid-template-rows: minmax(min-content, 1fr) auto;
    align-content: stretch;
    row-gap: 16px;
  }
  /* Share spare height around the original-ratio paper, not by stretching the artwork. */
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #museumRefinedCover > .mr-archive {
    grid-row: 1;
    align-self: center;
  }
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #museumRefinedCover > .mr-wheel-timeline {
    grid-row: 1;
    align-self: stretch;
  }
  body.student-page.museum-refined.mr-cover-visible[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="list"] #museumRefinedCover > .mr-continue {
    grid-row: 2;
    grid-column: 1 / -1;
    align-self: end;
    justify-self: center !important;
    margin-inline: 0 !important;
  }
}
