/* Phone enhancements for the opted-in portal pages only. Canvas/Studio and
   printed worksheets keep their own layout and input sizing. */
.mobile-only, .mobile-jumps, .mobile-scroll-hint { display: none !important; }
@media screen and (max-width: 767px) {
  .mobile-workspace :is(input:not([type]), input[type=text], input[type=search],
    input[type=email], input[type=tel], input[type=url], input[type=password],
    input[type=number], input[type=date], input[type=time], input[type=datetime-local],
    input[type=file], select, textarea) {
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    font-size: 16px;
    border: 1px solid #d9ccd0;
    border-radius: 8px;
    padding: 9px 10px;
  }
  .mobile-workspace button:not([hidden]), .mobile-workspace .attendance-action,
  .mobile-workspace .class-tabs a, .mobile-workspace .mobile-jumps a {
    min-height: 44px;
  }
  .mobile-workspace :is(button, a, input, select, textarea):focus-visible {
    outline: 2px solid #a6384d;
    outline-offset: 2px;
  }
  .mobile-workspace .mobile-only { display: inline-flex !important; align-items: center; }
  .mobile-workspace .mobile-jumps {
    display: flex !important; flex-wrap: wrap; gap: 6px;
    margin: 8px 0 14px;
  }
  .mobile-workspace .mobile-jumps a {
    display: inline-flex; align-items: center; padding: 8px 10px;
    border: 1px solid #d9ccd0; border-radius: 8px;
    background: white; color: #923b50; font-size: 14px;
  }
  .mobile-workspace .mobile-scroll-hint { display: block !important; font-size: 13px; color: #67565c; margin-bottom: 8px; }
  .mobile-workspace :is(.class-tabs, .oral-tabs) { scrollbar-width: thin; }
  .mobile-workspace .lesson-card a { display: inline-flex; align-items: center; min-height: 44px; }
  /* Keep the existing save handlers and controls; header links scroll to them. */
  .mobile-workspace .fixed[id$="-modal"] { z-index: 400; }
  #lead-modal > div { max-height: 94vh; max-height: 94dvh; overscroll-behavior: contain; }
  #lead-modal .lead-mobile-header {
    position: sticky; top: 0; z-index: 5; background: white;
    padding: 12px 16px; gap: 8px; align-items: flex-start;
  }
  #lead-modal .lead-mobile-header .mobile-jumps { margin-bottom: 0; }
  #lead-modal-close { min-width: 44px; flex-shrink: 0; font-size: 24px; }
  #lead-modal :is(#lead-details-fields, #lead-trial-fields, #lead-notes-section, #lead-save-actions) {
    scroll-margin-top: 190px;
  }
  #lead-save-actions { padding: 12px 0; border-block: 1px solid #eee8eb; }
  #lead-modal .space-y-6 { padding: 16px; }
  #followup-workspace .fu-view-tabs { flex-wrap: wrap; }
  /* Keep identity compact and put the existing homework/feedback panel first. */
  .student-dashboard-hero { margin-bottom: 12px; border-radius: 12px; }
  .student-dashboard-hero > .relative { padding: 14px; }
  .student-dashboard-hero .flex.flex-col { flex-direction: row; align-items: center; gap: 12px; }
  .student-dashboard-hero .flex-shrink-0 { padding: 0; }
  .student-dashboard-hero .flex-shrink-0 > :is(img, div) { width: 44px; height: 44px; }
  .student-dashboard-hero .flex-shrink-0 span { font-size: 18px; }
  .student-dashboard-hero .text-center { text-align: left; min-width: 0; }
  .student-dashboard-hero h1 { font-size: 19px; line-height: 1.3; margin-bottom: 4px; }
  .student-dashboard-hero h2 { font-size: 14px; line-height: 1.4; margin-bottom: 0; }
  .student-dashboard-hero p { display: none; }
  #student-next-steps, #student-lesson-search { scroll-margin-top: 76px; }
  .resource-tile .download-btn { opacity: 1; transform: none; }
  #ca-hub .mobile-jumps { align-items: center; }
  #ca-hub :is(#ca-content, #ca-practice, #ca-message) { scroll-margin-top: 76px; }
  #ca-hub.ca-dedicated .ca-masthead { margin-bottom: 12px; }
}
@media print {
  .mobile-only, .mobile-jumps, .mobile-scroll-hint { display: none !important; }
}
