@media (max-width: 920px) {
  :root { --sidebar-width: 210px; }
  .sidebar { padding-inline: 12px; }
  .portrait-frame { width: 70px; height: 70px; }
  .sidebar h1 { font-size: 17px; }
  .course-nav__button { min-height: 58px; padding: 8px; }
  .course-nav__icon { width: 32px; height: 32px; flex-basis: 32px; }
  .course-nav__label strong { font-size: 13px; }
}

@media (max-width: 700px) {
  body { overflow: auto; }
  .app-shell { display: block; height: auto; min-height: 100vh; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-102%); transition: transform .28s var(--ease); }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { min-height: 100vh; padding: 72px 18px 32px; }
  .menu-toggle { position: fixed; z-index: 5; top: 16px; left: 16px; display: grid; gap: 4px; width: 42px; height: 42px; padding: 11px 9px; background: rgba(27, 19, 12, .95); border: 1px solid var(--border); border-radius: 50%; cursor: pointer; }
  .menu-toggle span { display: block; height: 1px; background: var(--gold); }
  .intro-view, .course-view { min-height: calc(100vh - 105px); }
  .intro-view::before { inset: 7% 1%; }
  .intro-view__lead { font-size: 15px; }
  .intro-view__seal { right: 5%; bottom: 5%; width: 58px; height: 58px; font-size: 15px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading__count { text-align: left; }
  .notes-gallery { grid-template-columns: 1fr; gap: 25px; }
  .note-modal__title { font-size: 14px; }
}

@media (min-width: 701px) and (max-width: 980px) {
  .notes-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
