/* Fold-unfolded presentation only. Reuse the existing buttons and handlers.
   Every selector requires the runtime Fold-wide flag: phones, tablets and
   desktops keep their established layout. */
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) repeat(4, max-content) !important;
  grid-auto-flow: row;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader > h2 {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader > .studentHeaderRosterActions,
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader > .studentHeaderRosterActions.hasInactiveStudents {
  display: contents !important;
}
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader :is([data-student-roster-action], .studentHeaderSave) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  max-width: none !important;
  width: max-content !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  text-align: center !important;
}
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader [data-student-roster-action="add"] { grid-column: 2 !important; grid-row: 1 !important; }
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader [data-student-roster-action="sync"] { grid-column: 3 !important; grid-row: 1 !important; }
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader [data-student-roster-action="delete"] { grid-column: 4 !important; grid-row: 1 !important; }
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader > .studentHeaderSave { grid-column: 5 !important; grid-row: 1 !important; }
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > .studentManagementHeader [data-student-inactive-toggle] { grid-column: 2 / -1 !important; grid-row: 2 !important; justify-self: end; }
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen > :is(.studentRosterTools, .studentRosterToolsSpacer),
html[data-pe-fold-wide="true"][data-pe-tab="students"] body:has(#mobileStudentSelector) #app.studentScreen > :is(.studentRosterTools, .studentRosterToolsSpacer) { display: none !important; }
html[data-pe-fold-wide="true"][data-pe-tab="students"] #app.studentScreen #studentList > .empty {
  padding-inline: 6px;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Give the English labels a common first row and every title/action a common
   second row. Equal padding preserves the three existing card columns. */
html[data-pe-fold-wide="true"] body.homeDashboardApp #app :is(.homeSchedulePane, .homeSportsCard) > header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: 14px 44px !important;
  align-items: center !important;
  column-gap: 6px !important;
  row-gap: 4px !important;
  padding: 14px 8px 10px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
html[data-pe-fold-wide="true"] body.homeDashboardApp #app :is(.homeSchedulePane, .homeSportsCard) > header > div:first-child { display: contents !important; }
html[data-pe-fold-wide="true"] body.homeDashboardApp #app :is(.homeSchedulePane, .homeSportsCard) > header small {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  line-height: 14px !important;
  align-self: center !important;
}
html[data-pe-fold-wide="true"] body.homeDashboardApp #app :is(.homeSchedulePane, .homeSportsCard) > header h2 {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: center !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
html[data-pe-fold-wide="true"] body.homeDashboardApp #app .homeTodayPane > header > .homeTodayHeaderActions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  grid-column: 2 !important;
  grid-row: 2 !important;
  height: 44px;
}
html[data-pe-fold-wide="true"] body.homeDashboardApp #app :is(.homeScheduleCount, #homeUpcomingAll, .homeSportsTerm) {
  grid-column: 2 !important;
  grid-row: 2 !important;
  align-self: center !important;
  justify-self: end !important;
  margin: 0 !important;
  transform: none !important;
}
html[data-pe-fold-wide="true"] body.homeDashboardApp #app #homeUpcomingAll {
  min-height: 44px !important;
  padding: 0 !important;
  white-space: nowrap !important;
}
