/* Reserve the mobile viewport for the timetable; settings open on demand. */
.schedule-mobile-bar {
  display: none;
}
@media screen and (max-width: 767px), screen and (max-width: 1366px) and (any-pointer: coarse) {
  .workspace-shell > .workspace:has(.schedule-controls) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .workspace:has(.schedule-controls) > .topbar,
  .workspace:has(.schedule-controls) > .main > .page-heading,
  .workspace:has(.schedule-controls) .mobile-shortcuts,
  .workspace:has(.schedule-controls) .mobile-shortcuts-space {
    display: none;
  }
  .workspace:has(.schedule-controls) > .main {
    flex: 1;
    height: 100%;
    min-height: 0;
    padding: 0 4px max(4px, env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .schedule-mobile-bar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 48px;
    padding: 4px 0;
  }
  .schedule-mobile-bar .btn {
    min-height: 40px;
    padding: 6px 10px;
    font-size: 13px;
  }
  .schedule-mobile-bar strong {
    min-width: 0;
    font-size: 14px;
  }
  .schedule-controls.no-print {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: 42dvh;
    overflow: auto;
    padding: 0 0 4px;
  }
  .schedule-controls:not(.mobile-controls-open) > .schedule-control-row,
  .schedule-controls:not(.mobile-controls-open) > .schedule-zoom-controls {
    display: none;
  }
  .schedule-controls > .schedule-department-row {
    justify-content: flex-start;
  }
  .schedule-weekday-nav {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }
  .schedule-weekday-nav .btn {
    min-height: 40px;
    padding: 4px 1px;
    font-size: 12px;
  }
  .schedule-workspace.with-unassigned {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(90px, 25%);
  }
}

.assignment-mobile-controls {
  display: none;
}
@media screen and (max-width: 767px), screen and (max-width: 1366px) and (any-pointer: coarse) {
  .workspace-shell > .workspace:has(.users-workspace, .assignment-workspace) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .workspace:has(.users-workspace, .assignment-workspace) > .topbar {
    min-height: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 2px 6px;
    flex-wrap: nowrap;
  }
  .workspace:has(.users-workspace, .assignment-workspace)
    > .topbar
    > .header-right,
  .workspace:has(.users-workspace, .assignment-workspace)
    > .main
    > .page-heading,
  .workspace:has(.users-workspace, .assignment-workspace) .mobile-shortcuts,
  .workspace:has(.users-workspace, .assignment-workspace)
    .mobile-shortcuts-space,
  .workspace:has(.users-workspace, .assignment-workspace) .app-footer {
    display: none;
  }
  .workspace:has(.users-workspace, .assignment-workspace) > .main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0 4px 4px;
    overflow: hidden;
  }
  .users-workspace,
  .assignment-workspace {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 4px;
    overflow: hidden;
  }
  .users-workspace > * + * {
    margin-top: 0;
  }
  .users-workspace > .users-controls.panel {
    flex-shrink: 0;
    padding: 2px;
    margin: 0;
    border: 0;
    max-height: 45dvh;
    overflow: auto;
  }
  .users-search-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }
  .users-controls .users-search {
    flex: 1;
    min-width: 0;
    width: 0;
    min-height: 40px;
    padding: 5px 7px;
  }
  .users-controls .users-settings-toggle {
    min-height: 40px;
    padding: 5px 8px;
    font-size: 12px;
  }
  .users-workspace:not(.users-settings-open) .users-results-strip,
  .users-workspace:not(.users-settings-open) .users-table-guide {
    display: none;
  }
  .users-control-actions {
    flex-basis: 100%;
  }
  .users-workspace > .users-table-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    margin: 0;
  }
  .users-table-panel > .users-table-scroll {
    flex: 1;
    height: 100%;
    min-height: 0;
    max-height: none;
  }
  .workspace:has(.users-workspace:not(.users-settings-open)) .mobile-register {
    display: none;
  }
  .workspace:has(.users-settings-open) .mobile-register {
    flex-shrink: 0;
    margin: 4px 0 0;
    min-height: 40px;
  }
  .users-active-filters,
  .users-scope {
    max-height: 100px;
    overflow: auto;
    flex-shrink: 0;
  }
  .assignment-mobile-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 44px;
    flex-shrink: 0;
    font-size: 13px;
  }
  .assignment-mobile-controls .btn {
    min-height: 40px;
    padding: 5px 8px;
  }
  .assignment-workspace:not(.assignment-settings-open)
    > .assignment-display-settings {
    display: none;
  }
  .assignment-display-settings {
    flex-shrink: 0;
    max-height: 45dvh;
    overflow: auto;
  }
  .assignment-workspace > .assignment-layout {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin: 0;
    align-items: stretch;
  }
  .assignment-workspace > .assignment-layout .assignment-column {
    min-height: 0;
    max-height: none;
  }
  .assignment-workspace > .assignment-note {
    flex-shrink: 0;
    margin: 0;
    font-size: 12px;
  }
}
@media screen and (max-width: 767px), screen and (max-width: 1366px) and (any-pointer: coarse) {
  .assignment-workspace > .assignment-layout { grid-auto-rows: max-content; align-content: start; align-items: start; }
  .assignment-workspace > .assignment-layout .assignment-column { height: auto; }
}

.users-control-actions[hidden],.handoff-registration[hidden]{display:none}.users-settings-toggle{flex-shrink:0;min-height:40px}.handoff-view-actions{display:flex;justify-content:flex-end;margin-bottom:12px}.handoff-board-open{display:inline-flex;align-items:center;gap:8px;padding:0;border:0;color:inherit;background:none;font:inherit;text-align:left;cursor:pointer}.handoff-board-open:focus-visible{outline:2px solid #245f4b;outline-offset:4px}
@media screen and (max-width: 767px), screen and (max-width: 1366px) and (any-pointer: coarse){.users-workspace:not(.users-settings-open) .users-toolbar-title,.users-workspace:not(.users-settings-open) .users-search-toolbar>.users-result-count{display:none}.users-table-panel>.users-table-scroll{height:100%!important;max-height:none!important}.workspace:has(.users-workspace,.assignment-workspace)>footer{display:none}}