/* ──────────────────────────────────────────────────────────────
   미아북스 아카데미 · 공용 모바일 정리 (교안 페이지 공통)
   · 상단 머리(로고·배지·제목)가 모바일에서 화면을 너무 많이 먹지 않게 줄입니다.
   · 좌하단 「교안 목록」 버튼을 작게 줄여 본문 버튼과 겹침을 줄입니다.
   ────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }

@media (max-width: 640px) {
  /* 상단 머리 슬림화 */
  header { padding: 16px 16px 15px; }
  header .logo-wrap { margin-bottom: 9px; gap: 9px; }
  header .logo-img { width: 38px; height: 38px; border-radius: 9px; }
  header .logo-title { font-size: 16px; line-height: 1.3; }
  header .logo-sub { font-size: 9px; letter-spacing: 1.3px; }
  header > br { display: none; }
  header .badge {
    font-size: 11px; padding: 4px 11px; margin-bottom: 9px;
    letter-spacing: -0.1px; line-height: 1.5;
  }
  header .badge + h1 {
    font-size: 21px; line-height: 1.38; margin-bottom: 8px; letter-spacing: -0.6px;
  }
  header .header-desc,
  header .subtitle { font-size: 13px; line-height: 1.72; }
  header .author-box { font-size: 11.5px; }
  header .brand-title { font-size: 15px; }
  header .brand-sub { font-size: 8.5px; letter-spacing: 1.2px; }

  /* 좌하단 「교안 목록」 버튼 — 작고 낮게 */
  .mia-back {
    padding: 7px 11px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
    left: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    opacity: 0.95;
  }
}
