/* CI 8 mobile working views. All data and controls remain in their original flow. */
@media screen and (max-width:600px) {
  /* User-approved 15% smaller mobile type; pixel-sized touch targets stay intact.
     Relative root sizing also respects the user's default browser text size. */
  html { scroll-padding-block:16px; font-size:85%; }
  html body { font-size:1rem; }
  /* Bring legacy pixel-sized display labels onto the same relative type scale. */
  html #calendarSidebar,html #calendarSidebar button,html #calendarSidebar .sidebar-session strong,html .calendar-count-badge { font-size:.8125rem; }
  html #calendarSidebar summary { font-size:.875rem; }
  html #calendarSidebar .sidebar-session small,html #calendarSidebar :is(.sidebar-group-calendars,.sidebar-athlete-calendars)>h3 { font-size:.75rem; }
  html #trainingTimeline :is(.calendar-add,.calendar-range-menu) { font-size:1.25rem; }
  html #calendarDayOverlayTitle { font-size:1rem; }
  html #primaryNav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  html #primaryNav>a,html #primaryNav>details>summary { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:48px; padding:8px 4px; margin:0; font-size:.8rem; font-weight:600; white-space:normal; overflow-wrap:anywhere; }
  
  
  
  
  
  
  
  
  
  
  /* These controls move out of the inverse header into a themed menu. */
  
  html #mainContent #calendarView>.page-heading { flex-direction:row; }
  html #mainContent #calendarView>.page-heading>div:first-child { width:auto; }
  
  html #calendarView>.page-heading .eyebrow { margin:0 0 4px; font-size:.7rem; }
  
  
  
  html #calendarView .calendar-navigation { grid-template-columns:44px minmax(44px,1fr) 44px; flex:1; }
  html #calendarView .calendar-toolbar>.segmented-control { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); flex:1 0 100%; }
  html #calendarView .segmented-control button { min-width:0; width:auto; }
  html #mobileCalendarDays:not([hidden]) { grid-template-columns:repeat(7,minmax(44px,1fr)); gap:0; margin:0 0 12px; padding:4px 0; border-block:1px solid var(--fliq-border-subtle); }
  html .mobile-calendar-day { display:grid; justify-items:center; gap:4px; min-width:44px; margin:0; border:0; background:transparent; color:var(--fliq-text-secondary); }
  html .mobile-calendar-day span { font-size:.7rem; line-height:1.2; }
  html .mobile-calendar-day strong { font-size:1.15rem; line-height:1.2; font-weight:650; color:var(--fliq-text-primary); }
  html .mobile-calendar-day small { font-size:.7rem; line-height:1.2; }
  html #mobileCalendarDays { overflow-x:auto; }
  html .mobile-calendar-day { align-content:start; }
  html .mobile-calendar-types { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px; width:100%; min-width:0; }
  html .mobile-calendar-day .mobile-calendar-types .session-training-type { padding:2px 3px; white-space:normal; overflow-wrap:anywhere; }
  html .mobile-calendar-day[aria-pressed=true] { color:var(--fliq-text-primary); }
  html #trainingTimeline.week-view .calendar-weekday:not(.mobile-selected-day) { display:none; }
  html #trainingTimeline.week-view :is(.calendar-day,.calendar-weekday,.calendar-week-actions) { grid-row:auto; }
  html #trainingTimeline.week-view .calendar-weekday.mobile-selected-day { display:none; }
  html #trainingTimeline.week-view .calendar-weekday.mobile-selected-day>span { display:none; }
  html #trainingTimeline.week-view .session-card-trigger { padding:12px; }
  html #trainingTimeline.week-view .session-title { font-size:.95rem; font-weight:650; line-height:1.4; }
  html #trainingTimeline.week-view .calendar-week-actions { border:0; background:transparent; }

  /* Compact session chrome; one scroll surface, with the current action close to its value. */
  html #executionDialog { scroll-padding:16px; }
  html #executionForm>.dialog-heading { min-height:56px; margin:0; padding:max(8px,env(safe-area-inset-top)) 16px 8px; }
  html #executionDialog .dialog-heading h2 { font-size:1rem; letter-spacing:-.02em; }
  html #executionDialog .session-summary-title::before { display:none; }
  html #executionDialog .session-summary-title dd { font-size:.95rem; line-height:1.4; font-weight:650; }
  
  
  
  
  
  html #executionDialog { overflow-anchor:none; }
  /* Each effort owns a full-width heading; status and source cannot squeeze its route. */
  html .unit-view .unit-comparison .unit-value-item>th { display:block; min-width:0; padding:12px 8px; }
  html .unit-value-item .unit-effort-title { display:block; line-height:1.5; }
  html .unit-value-item .unit-video-link { display:flex; width:max-content; max-width:100%; margin-top:8px; }
  html .unit-value-item .unit-card-completion { display:inline-flex; width:auto; max-width:100%; margin-top:8px; overflow-wrap:normal; }
  html .unit-value-item .unit-source { margin:8px 0 0; line-height:1.5; }
  html .unit-value-item .effort-route { width:100%; margin:12px 0; gap:8px; }
  html .unit-value-item .effort-route-point strong { font-size:1rem; overflow-wrap:normal; }
  html .unit-view .unit-comparison td { display:grid; grid-template-columns:minmax(64px,.4fr) minmax(0,1fr); gap:12px; }
  html .unit-view .unit-comparison td::before { min-width:0; overflow-wrap:anywhere; }
  html .unit-cell-values { min-width:0; text-align:left; }
  
  
  html .unit-detail-meta>span { gap:4px; flex-wrap:wrap; min-width:0; }
  html #executionDialog .block-execution-editor { padding:0; }
  html #executionDialog .documentation-section { padding:0; border:0; }
  html #executionDialog .mobile-current-step .documentation-section>summary,html #executionDialog .mobile-current-step :is(.documentation-section,.documentation-block,.documentation-item-row):not(.mobile-current-item) { display:none; }
  html #executionDialog .documentation-item strong { font-size:.9rem; line-height:1.4; }
  html #executionDialog .documentation-item small { font-size:.75rem; }
  /* The individual fields already say "optional"; retain the fuller hint for assistive technology. */
  html #executionDialog .documentation-editor-card>.supporting { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  html #executionDialog .documentation-editor-card .session-timer-step-meta { display:flex; flex-wrap:wrap; gap:4px; }
  html #executionDialog .documentation-editor-card .session-timer-step-meta>span { padding:4px 8px; font-size:.75rem; }
  html #executionDialog .documentation-actual-row:has(.session-videos-inline) { grid-column:1/-1; }
  html #executionDialog .documentation-actual-field>span { font-size:.8rem; }
  html #executionDialog .documentation-actual-field small { font-size:.7rem; }
  html #executionDialog [data-documentation-block-done] { min-height:44px; margin:4px 0; padding:8px 12px; font-size:.8rem; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  html #executionDialog :is(input,textarea,select) { scroll-margin-block:16px; }
  
}
@media screen and (min-width:360px) and (max-width:600px) {
  html #executionDialog [data-documentation-item] { scroll-margin-block-start:80px; }
}
@media screen and (max-width:359px) {
  html #mobileCalendarDays:not([hidden]) { grid-template-columns:repeat(4,minmax(44px,1fr)); }
  html #calendarView>.page-heading { flex-wrap:wrap; }
  html #executionDialog .documentation-actual-grid { grid-template-columns:minmax(0,1fr); }
}
@media print {
  #mobileCalendarDays,#mobileCalendarScope { display:none!important; }
}
