/* Compact phone layout; desktop teaching pages keep their existing dimensions. */
@media (max-width: 600px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body.academy-app .app-header { min-height: 52px; padding-inline: 8px; }
  body.academy-app .app-header strong { font-size: 16px; }
  body.academy-app .app-header svg { width: 22px; height: 22px; }
  body.academy-app .app-header:has(.app-class-title) { min-height: 60px; }
  body.academy-app .app-class-title { font-size: 14px; }
  body.academy-app .app-class-title small { font-size: 11px; }
  body.academy-app .app-header:has(.app-home-download) { grid-template-columns: 72px minmax(0,1fr) 72px; }
  body.academy-app .app-home-download { font-size: 11px; white-space: nowrap; }
  body.academy-app main.wrap.academy-main,
  body.academy-app main.wrap.teaching-workbench,
  body.academy-app main.wrap.academy-mobile,
  body.academy-app main.wrap.narrow { padding: 12px 14px 82px; min-height: calc(100dvh - 52px); }
  body.academy-app .app-bottom-nav { min-height: 58px; padding: 6px 0 max(6px,env(safe-area-inset-bottom)); }
  body.academy-app .app-bottom-nav a { font-size: 11px; gap: 2px; min-height: 44px; justify-content: center; }
  body.academy-app .app-bottom-nav svg { width: 22px; height: 22px; }
  body.academy-app .app-menu-row { min-height: 64px; padding: 11px 0; gap: 12px; }
  body.academy-app .app-menu-row>span:not(.app-tile) { font-size: 14px; }
  body.academy-app .app-tile { width: 33px; height: 33px; border-radius: 10px; }
  body.academy-app .app-tile svg { width: 20px; height: 20px; }
  body.academy-app .app-detail-row { min-height: 58px; padding: 13px 0; font-size: 14px; }
  body.academy-app .app-detail-row>small { font-size: 13px; }
  body.academy-app .app-group-heading,
  body.academy-app .app-settings { margin-inline: -14px; padding-inline: 14px; }
  body.academy-app .mobile-activity-editor { margin: -12px -14px 0; }
  body.academy-app .app-section-heading { padding: 20px 0 12px; }
  body.academy-app .app-section-heading h2 { font-size: 16px; }
  body.academy-app .app-search { margin-bottom: 4px; }
  body.academy-app .app-search input { min-width: 0; min-height: 44px; padding: 10px 15px; font-size: 14px; }
  body.academy-app .app-search button { min-height: 44px; font-size: 13px; padding-inline: 10px; }
  body.academy-app .guest-category-tabs { padding: 10px 0 14px; gap: 8px; }
  body.academy-app .guest-category-tabs a { min-height: 40px; display: flex; align-items: center; padding: 7px 12px; font-size: 13px; }
  body.academy-app .guest-course-feed { margin-inline: -14px; }
  body.academy-app .guest-course-cover { min-height: clamp(145px,43vw,190px); gap: 10px; padding: 20px; }
  body.academy-app .guest-course-cover>strong { font-size: 19px; line-height: 1.5; }
  body.academy-app .guest-course-cover>span { font-size: 11px; }
  body.academy-app .guest-course-cover>svg { width: 65px; height: 65px; right: 16px; bottom: 16px; }
  body.academy-app .guest-course-cover:has(img) { padding: 0; min-height: 0; }
  body.academy-app .guest-course-cover img { max-height: 220px; }
  body.academy-app .guest-course-caption { padding: 15px 14px 17px; gap: 10px; }
  body.academy-app .guest-course-caption a { font-size: 14px; line-height: 1.5; }
  body.academy-app .guest-course-caption p { margin-top: 7px; }
  body.academy-app .guest-course-caption small { margin-top: 5px; line-height: 1.6; }
  body.academy-app .guest-profile-login { padding: 18px 14px; margin-inline: -14px; gap: 18px; }
  body.academy-app .guest-profile-login strong { font-size: 18px; }
  body.academy-app .guest-default-avatar { width: 48px; height: 48px; flex: none; }
  body.academy-app .guest-default-avatar svg { width: 36px; height: 36px; }
  body.academy-app .guest-settings-link { margin-inline: -14px; padding-inline: 14px; }
  body.academy-app .app-profile-card { padding: 20px 14px; margin-inline: -14px; gap: 17px; }
  body.academy-app .app-profile-avatar { width: 48px; height: 48px; font-size: 24px; flex: none; }
  body.academy-app .app-profile-card h1 { font-size: 18px; }
  body.academy-app .guest-settings-list { margin: -12px -14px 0; }
  body.academy-app .guest-settings-list>a,
  body.academy-app .guest-settings-disabled { min-height: 56px; padding: 14px; font-size: 14px; }
  body.academy-app .guest-switch-account { margin-inline: -14px; padding: 17px; font-size: 14px; }
  body.academy-app .app-contacts-link { margin-inline: -14px; padding-inline: 14px; }
  body.academy-app .app-message-row { padding-block: 16px; }
  body.academy-app .app-chat-avatar { width: 36px; height: 36px; font-size: 19px; }
  body.academy-app .app-message-copy strong { font-size: 14px; }
  body.academy-app .app-message-copy small { font-size: 12px; margin-top: 6px; }
  body.academy-app .app-activity-row { padding-block: 14px; gap: 12px; }
  body.academy-app .app-activity-row strong { font-size: 14px; }
  body.academy-app .app-activity-icon { width: 36px; height: 36px; font-size: 14px; }
  body.academy-app .app-tool-grid { gap: 24px 6px; }
  body.academy-app .app-tool-grid a { gap: 9px; font-size: 12px; }
  body.academy-app .app-tool-grid svg { width: 26px; height: 26px; }
  body.academy-app .app-hero { min-height: 140px; padding: 18px; }
  body.academy-app .app-hero h1 { font-size: 20px; }
  body.academy-app .app-hero-icon { width: 62px; height: 62px; }
  body.academy-app .app-chat-log { margin-inline: -14px; }
  /* Keep the user's explicit large-text preference available. */
  .academy-large-font body.academy-app .app-menu-row>span:not(.app-tile) { font-size: 18px; }
  .academy-large-font body.academy-app .app-message-copy strong { font-size: 19px; }
}

/* Shared App typography, including classroom editors and dynamically loaded lists. */
body.academy-app{font-size:14px;font-family:system-ui,-apple-system,"Microsoft YaHei",sans-serif}
@media(max-width:600px){
 body.academy-app .app-header strong{font-size:16px!important}
 body.academy-app .app-header{min-height:48px}
 body.academy-app .app-header a,body.academy-app .app-header button{min-width:44px;min-height:44px;display:grid;place-items:center}
 body.academy-app .app-header svg{width:20px;height:20px}
 body.academy-app .app-bottom-nav svg{width:22px;height:22px}
 body.academy-app .app-menu-row>span:not(.app-tile),body.academy-app .app-message-copy strong,body.academy-app .app-activity-row strong,body.academy-app .app-course-name{font-size:14px!important}
 body.academy-app .app-member-row,body.academy-app .app-detail-row,body.academy-app .app-chat-bubble p,body.academy-app .app-chat-composer textarea{font-size:14px!important}
 body.academy-app .app-section-heading h2,body.academy-app .app-tool-section h2{font-size:16px!important}
 body.academy-app .app-tool-grid a{font-size:12px!important;min-height:60px}
 body.academy-app .app-tool-grid svg{width:26px!important;height:26px!important}
 body.academy-app .app-tile{width:33px!important;height:33px!important}
 body.academy-app .app-tile svg{width:20px!important;height:20px!important}
 body.academy-app .interaction-setting,body.academy-app .interaction-prompt textarea,body.academy-app .question-prompt>textarea,body.academy-app .question-option,body.academy-app .question-editor-head select,body.academy-app .rating-score-row{font-size:14px!important}
 body.academy-app .interaction-setting select,body.academy-app .interaction-setting input:not([type=checkbox]),body.academy-app .interaction-header-action{font-size:14px!important}
 body.academy-app .interaction-editor-dock>button,body.academy-app .questionnaire-add button{font-size:16px!important;min-height:44px}
 body.academy-app .interaction-round-button{font-size:25px!important}
 body.academy-app .interaction-photo-button svg{width:24px!important;height:24px!important}
 body.academy-app .questionnaire-answer-card h2,body.academy-app .questionnaire-answer-card label,body.academy-app .notice-body,body.academy-app .notice-content,body.academy-app .notice-subject,body.academy-app .notice-recipient{font-size:14px!important}
 body.academy-app .notice-toolbar button,body.academy-app .notice-toolbar label{font-size:23px!important;min-width:44px;min-height:44px;box-sizing:border-box}
 body.academy-app .chat-management-setting>span,body.academy-app .chat-management-link,body.academy-app .group-task-editor summary{font-size:15px!important}
 body.academy-app .activity-library-row a{font-size:15px!important}
 body.academy-app .activity-library-row>span{width:38px;height:38px;font-size:12px}
 body.academy-app .class-link-dialog header{font-size:17px!important}
 body.academy-app .class-link-dialog input,body.academy-app .class-link-dialog textarea{font-size:14px!important}
 body.academy-app .temporary-message,body.academy-app .group-work-card p,body.academy-app .group-work-form textarea{font-size:14px!important}
 html.academy-large-font body.academy-app .app-menu-row>span:not(.app-tile),html.academy-large-font body.academy-app .app-message-copy strong{font-size:19px!important}
}

@media(max-width:600px){body.academy-app input[type=file]{font-size:12px!important}body.academy-app .temporary-composer label{font-size:12px;font-weight:400;color:#8b9fac}body.academy-app .group-task-editor summary{color:#333;text-decoration:none}body.academy-app .chat-management-setting>span{color:#333;text-decoration:none}}
