:root {
  --canvas: #f4f6f8;
  --navy: #0e2038;
  --wine: #8e1d32;
  --wine-dark: #741629;
  --wine-soft: #f7e9ed;
  --paper: #fcfcfd;
  --ink: #1a1f29;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d9dee7;
  --white: #ffffff;
  --control: #ffffff;
  --controls-bg: rgb(244 246 248 / 94%);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 16px 48px rgb(14 32 56 / 8%);
}

:root[data-theme="dark"] {
  --canvas: #0b1728;
  --navy: #102039;
  --wine: #982b47;
  --wine-dark: #ff9aae;
  --wine-soft: #34212f;
  --paper: #14263d;
  --ink: #edf3fa;
  --muted: #b8c5d5;
  --line: #30445e;
  --line-strong: #3a506c;
  --control: #14263d;
  --controls-bg: rgb(11 23 40 / 94%);
  --shadow: 0 16px 48px rgb(0 0 0 / 24%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  background: var(--canvas);
  scroll-behavior: smooth;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(100%, 1920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.masthead {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 482px);
  min-height: 154px;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.masthead__brand {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 32px 26px;
}

.brand-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 44px;
}

.wordmark {
  color: var(--white);
  font-size: 44px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.wordmark:focus-visible {
  outline: 3px solid #f3c9d2;
  outline-offset: 5px;
  border-radius: 4px;
}

.college-name {
  color: #e8edf4;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
}

.masthead h1 {
  margin: 18px 0 0;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.schedule-title-short {
  display: none;
}

.masthead__date {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  text-align: center;
  background: var(--wine);
}

.masthead__date strong {
  max-width: 100%;
  white-space: nowrap;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0.01em;
}

.masthead__date > span {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.theme-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgb(255 255 255 / 90%);
  background: rgb(7 20 38 / 38%);
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms ease,
    border-color 180ms ease;
}

.theme-toggle:hover {
  transform: scale(1.08);
  background: rgb(7 20 38 / 66%);
  border-color: rgb(255 255 255 / 60%);
}

.theme-toggle:active {
  transform: scale(0.9);
}

.theme-toggle:focus-visible {
  background: rgb(7 20 38 / 66%);
  border-color: rgb(255 255 255 / 75%);
  outline: none;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 30%);
}

.att-icon {
  overflow: visible;
  transform: rotate(0deg);
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.att-body {
  transform: scale(0.56);
  transform-origin: 12px 12px;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.att-mask-cutout {
  transform: translate(0, 0);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.att-rays {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transform-origin: 12px 12px;
  transition:
    opacity 180ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle[aria-pressed="true"] .att-icon {
  transform: rotate(270deg);
}

.theme-toggle[aria-pressed="true"] .att-body {
  transform: scale(1);
}

.theme-toggle[aria-pressed="true"] .att-mask-cutout {
  transform: translate(-16px, 8px);
}

.theme-toggle[aria-pressed="true"] .att-rays {
  opacity: 0;
  transform: scale(0) rotate(-30deg);
}

.controls {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
  align-items: end;
  gap: 16px;
  margin: 22px 0 12px;
}

.schedule-navigation {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  gap: 8px;
}

.quick-views {
  display: grid;
  width: min(100%, 360px);
  max-width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.action-button,
.college-button {
  min-height: 44px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: 160ms ease;
}

.action-button {
  cursor: pointer;
}

.action-button:hover,
.action-button:focus-visible,
.college-button:hover,
.college-button:focus-visible {
  color: var(--wine);
  border-color: var(--wine);
  outline: none;
}

.action-button[aria-pressed="true"] {
  color: var(--white);
  background: var(--wine);
  border-color: var(--wine);
}

.quick-view {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--control);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
  transition: none;
}

.quick-view:last-child {
  border-right: 0;
}

.quick-view:hover:not([aria-selected="true"]) {
  color: var(--wine);
  background: var(--canvas);
}

.quick-view:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: -2px;
}

.quick-view[aria-selected="true"]:focus-visible {
  outline-color: var(--white);
  outline-offset: -4px;
}

.quick-view[aria-selected="true"] {
  color: var(--white);
  background: var(--wine);
}

.quick-view:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.action-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.search-actions {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
}

.search-combobox {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.entity-search-results {
  position: absolute;
  z-index: 30;
  top: 54px;
  right: 0;
  left: 0;
  max-height: min(460px, 70vh);
  overflow-y: auto;
  padding: 7px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: 0 20px 48px rgb(14 32 56 / 20%);
}

.entity-search-section + .entity-search-section {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.entity-search-section p,
.entity-search-empty {
  margin: 0;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-search-empty {
  display: grid;
  min-height: 86px;
  align-content: center;
  gap: 4px;
  text-align: center;
  text-transform: none;
}

.entity-search-empty strong {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
}

.entity-search-empty span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.entity-search-section button {
  display: grid;
  width: 100%;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name type";
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
}

.entity-search-option__name {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-search-option__type {
  grid-area: type;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entity-search-section button:hover,
.entity-search-section button:focus-visible,
.entity-search-section button[aria-selected="true"] {
  color: var(--wine);
  background: var(--wine-soft);
  outline: none;
}

.entity-search-section button[aria-selected="true"] .entity-search-option__type {
  color: var(--wine);
  border-color: color-mix(in srgb, var(--wine) 28%, var(--line));
}

.college-button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.college-button:hover,
.college-button:focus-visible {
  color: var(--white);
  background: var(--wine);
}

.date-switcher {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.date-tabs {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 52px;
  gap: 6px;
  padding-inline: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.date-tabs::-webkit-scrollbar {
  display: none;
}

.date-tab,
.icon-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.date-tab {
  flex: 0 0 calc((100% - 24px) / 5);
  min-width: 0;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.1;
  text-transform: uppercase;
  transition: 160ms ease;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.date-tab span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.date-tab:hover,
.date-tab:focus-visible {
  border-color: var(--wine);
  outline: none;
}

.date-tab[aria-selected="true"] {
  color: var(--white);
  background: var(--wine);
  border-color: var(--wine);
}

.date-tab[aria-selected="true"] span {
  color: #f3c9d2;
}

.icon-button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.icon-button svg {
  display: block;
  width: 20px;
  height: 20px;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.search-box {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 15px;
  background: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgb(14 32 56 / 7%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

/* Uiverse CodeM7710/new-dolphin-33 pattern: static gradient shadow + shortcut key. */
.search-box::before {
  position: absolute;
  z-index: -1;
  right: 12px;
  bottom: -5px;
  left: 12px;
  height: 16px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgb(142 29 50 / 36%), rgb(14 32 56 / 28%));
  border-radius: 999px;
  filter: blur(9px);
  opacity: 0.38;
  transition: opacity 160ms ease;
}

.search-box:focus-within {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgb(142 29 50 / 11%), 0 8px 22px rgb(14 32 56 / 9%);
}

.search-box:focus-within::before {
  opacity: 0.58;
}

.search-box__icon {
  width: 16px;
  height: 16px;
  border: 2px solid #98a2b3;
  border-radius: 50%;
  position: relative;
}

.search-box__icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  content: "";
  background: #98a2b3;
  transform: rotate(45deg);
}

.search-box input {
  min-width: 0;
  flex: 1;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: #98a2b3;
}

.search-box__shortcut {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  color: #98a2b3;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 7px;
  box-shadow: 0 1px 0 var(--line-strong);
  font-size: 11px;
  font-family: inherit;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.search-box__shortcut span + span {
  padding-left: 4px;
  border-left: 1px solid var(--line);
}

.status-row {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.status-row p {
  margin: 0;
}

.status-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.status-actions {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  position: relative;
}

.action-toolbar {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 7px 22px rgb(14 32 56 / 8%);
}

.action-toolbar__button {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}

.action-toolbar__button:hover,
.action-toolbar__button:focus-visible {
  color: var(--wine);
  background: var(--wine-soft);
  outline: none;
}

.action-toolbar__button:focus-visible,
.more-actions summary:focus-visible,
.action-menu__item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--wine);
}

.action-toolbar__button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.action-toolbar__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.more-actions {
  position: relative;
}

.more-actions > summary {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  list-style: none;
  transition: 160ms ease;
}

.more-actions > summary::-webkit-details-marker {
  display: none;
}

.more-actions > summary:hover,
.more-actions > summary:focus-visible,
.more-actions[open] > summary {
  color: var(--wine);
  background: var(--wine-soft);
  outline: none;
}

.more-actions__menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 9px);
  right: 0;
  width: min(300px, calc(100vw - 24px));
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgb(14 32 56 / 18%);
}

.action-menu__item {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 720;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.action-menu__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.action-menu__external {
  margin-left: auto;
}

.action-menu__submenu > summary {
  display: flex;
  width: 100%;
  min-height: 44px;
  height: auto;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
  letter-spacing: normal;
  list-style: none;
}

.action-menu__submenu > summary::-webkit-details-marker {
  display: none;
}

.action-menu__chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform 160ms ease;
}

.action-menu__submenu[open] .action-menu__chevron {
  transform: rotate(90deg);
}

.action-menu__submenu-list {
  display: grid;
  gap: 2px;
  margin: 2px 0 5px 28px;
  padding: 2px 0 2px 9px;
  border-left: 1px solid var(--line);
}

.action-menu__subitem {
  min-height: 44px;
  padding-block: 7px;
  font-size: 11px;
}

.action-menu__item:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.action-menu__item[aria-current="true"] {
  color: var(--wine);
  background: var(--wine-soft);
}

.action-menu__separator {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}

.action-menu__item:hover,
.action-menu__item:focus-visible {
  color: var(--wine);
  background: var(--wine-soft);
  outline: none;
}

.action-menu__item + .action-menu__item:not([hidden]) {
  margin-top: 2px;
}

.freshness-warning,
.connection-status {
  color: #8a4b00;
  font-weight: 700;
}

.connection-status {
  color: var(--wine);
}

.text-button {
  padding: 4px 0;
  color: var(--wine);
  background: transparent;
  font-weight: 700;
}

.period-times-panel {
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.period-times-panel summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style-position: inside;
}

.period-times-panel summary span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.period-times {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.period-time {
  min-width: 0;
  padding: 9px 10px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
}

.period-time strong,
.period-time span {
  display: block;
}

.period-time strong {
  color: var(--wine);
  font-size: 12px;
}

.period-time span {
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.period-time--empty {
  opacity: 0.62;
}

.period-times__hint {
  grid-column: 1 / -1;
  margin: 0;
  padding: 4px 3px 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.schedule-content {
  min-height: max(440px, calc(100svh - 430px));
}

.workload-panel {
  margin: 16px 0;
}

.workload-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 8px 28px rgb(14 32 56 / 5%);
}

.workload-card__header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 14px;
}

.workload-card__header > div {
  min-width: 0;
}

.workload-card__header span,
.workload-card__header time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.workload-card__header h2 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.workload-card__header time {
  flex: 0 0 auto;
}

.workload-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.workload-summary > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--control);
}

.workload-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.workload-summary strong {
  color: var(--wine-dark);
  font-size: 21px;
  white-space: nowrap;
}

.workload-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
}

.workload-progress > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--wine-soft);
}

.workload-progress > div > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--wine);
}

.workload-progress > strong {
  min-width: 42px;
  color: var(--wine-dark);
  text-align: right;
  font-size: 14px;
}

.workload-details {
  border-top: 1px solid var(--line);
}

.workload-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  list-style: none;
}

.workload-details > summary::-webkit-details-marker {
  display: none;
}

.workload-details > summary::after {
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.workload-details[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.workload-details > summary > span:last-of-type {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--wine-dark);
  background: var(--wine-soft);
  font-size: 12px;
}

.workload-details > summary:hover,
.workload-details > summary:focus-visible {
  background: color-mix(in srgb, var(--wine-soft) 45%, transparent);
}

.workload-details > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--wine) 35%, transparent);
  outline-offset: -3px;
}

.workload-list {
  border-top: 1px solid var(--line);
}

.workload-item {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) minmax(300px, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}

.workload-item:last-child {
  border-bottom: 0;
}

.workload-item__description,
.workload-item__related,
.workload-item__actions {
  min-width: 0;
}

.workload-item__description > strong,
.workload-item__description > span {
  display: block;
}

.workload-item__description > strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.workload-item__description > span,
.workload-item__related,
.workload-item__actions > span {
  color: var(--muted);
  font-size: 12px;
}

.workload-item__related {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 2px;
}

.workload-item__related .entity-link {
  min-height: 36px;
  padding-block: 6px;
  text-align: left;
}

.workload-item__hours {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
  margin: 0;
}

.workload-item__hours > div {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--control);
}

.workload-item__hours dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.workload-item__hours dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.workload-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.workload-item__actions button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--wine-dark);
  background: var(--control);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.workload-item__actions button:hover,
.workload-item__actions button:focus-visible {
  border-color: var(--wine);
  outline: none;
}

.workload-item__actions button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine) 25%, transparent);
}

.workload-item__actions button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.65;
}

.workload-empty {
  display: grid;
  gap: 5px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.workload-empty strong {
  color: var(--ink);
}

.workload-journal-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(780px, calc(100svh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 80px rgb(0 0 0 / 28%);
}

.workload-journal-dialog::backdrop {
  background: rgb(5 14 26 / 62%);
}

.workload-journal-dialog__surface {
  display: flex;
  max-height: min(780px, calc(100svh - 32px));
  flex-direction: column;
}

.workload-journal-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.workload-journal-dialog__header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.workload-journal-dialog__header h2 {
  margin: 3px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.workload-journal-dialog__close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--control);
  cursor: pointer;
}

.workload-journal-dialog__close svg {
  width: 20px;
  height: 20px;
}

.workload-journal-dialog__close:hover,
.workload-journal-dialog__close:focus-visible {
  border-color: var(--wine);
  color: var(--wine-dark);
  outline: none;
}

.workload-journal-dialog__meta {
  padding: 11px 22px;
  color: var(--muted);
  background: var(--wine-soft);
  font-size: 13px;
  font-weight: 650;
}

.workload-journal-dialog__content {
  min-height: 0;
  padding: 16px 22px 22px;
  overflow: auto;
}

.workload-journal-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.workload-journal-table__row {
  display: grid;
  grid-template-columns: 116px 64px minmax(100px, 0.7fr) minmax(180px, 1.2fr) minmax(90px, 0.65fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.workload-journal-table__row:last-child {
  border-bottom: 0;
}

.workload-journal-table__row > span {
  min-width: 0;
  padding: 11px 12px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.workload-journal-table__row > span + span {
  border-left: 1px solid var(--line);
}

.workload-journal-table__row small {
  display: block;
  color: var(--muted);
}

.workload-journal-table__row--head {
  color: var(--muted);
  background: var(--control);
  font-weight: 750;
}

@media (prefers-reduced-motion: reduce) {
  .workload-details > summary::after {
    transition: none;
  }
}

.schedule-grid.entity-board-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.entity-board-card {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgb(14 32 56 / 5%);
}

.entity-board-card__heading {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--wine);
}

.entity-board-card__heading h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.25;
}

.entity-board-card__heading > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--wine);
  background: var(--white);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.entity-board-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entity-board-item {
  display: grid;
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: stretch;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.entity-board-item:last-child {
  border-bottom: 0;
}

.entity-board-item__period {
  display: grid;
  min-width: 0;
  place-content: center;
  padding: 8px 4px;
  color: var(--wine);
  background: var(--wine-soft);
  text-align: center;
}

.entity-board-item__period b,
.entity-board-item__period small {
  display: block;
}

.entity-board-item__period b {
  font-size: 20px;
  line-height: 1;
}

.entity-board-item__period small {
  margin-top: 4px;
  font-size: 8px;
  font-weight: 750;
}

.entity-board-item__content {
  min-width: 0;
  align-self: center;
  padding: 10px 12px;
}

.entity-board-item__content > strong,
.entity-board-item__content > small,
.entity-board-item__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
}

.entity-board-item__content > strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.entity-board-item__content > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.entity-board-item__meta {
  gap: 3px 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.entity-board-item__separator {
  color: var(--muted);
}

.entity-board-card .entity-link {
  color: var(--wine);
  font-size: inherit;
}

.schedule-panel {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.schedule-panel table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
}

.schedule-panel th,
.schedule-panel td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.schedule-panel tr:last-child td {
  border-bottom: 0;
}

.schedule-panel th:last-child,
.schedule-panel td:last-child {
  border-right: 0;
}

.schedule-panel th {
  height: 40px;
  padding: 6px 4px;
  color: var(--white);
  background: var(--wine);
  font-size: 13px;
  font-weight: 750;
}

.schedule-panel th:first-child,
.schedule-panel td:first-child {
  width: 54px;
}

.schedule-panel td {
  min-height: 72px;
  padding: 6px 4px;
  color: var(--ink);
  background: var(--paper);
  font-size: 9px;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.lesson-entry + .lesson-entry {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line-strong);
}

.schedule-panel td.period-cell {
  color: var(--wine);
  background: var(--wine-soft);
  font-size: 25px;
  font-weight: 800;
}

.schedule-panel--single {
  width: min(100%, 1040px);
  margin-inline: auto;
}

.schedule-panel--single td:not(.period-cell) {
  padding: 12px 14px;
  font-size: 13px;
}

.lesson-subject {
  display: block;
  font-weight: 750;
  line-height: 1.35;
}

.lesson-time {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.lesson-room {
  display: block;
  margin-top: 8px;
  color: var(--wine);
  font-size: 8px;
  font-weight: 700;
}

.lesson-subgroup {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.lesson-related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
  margin-top: 4px;
  color: var(--muted);
}

.entity-link {
  position: relative;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 0;
  padding: 3px;
  color: var(--wine);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.entity-link[data-open-entity="room"] {
  white-space: nowrap;
}

.entity-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 160ms ease;
}

.entity-link:hover,
.entity-link:focus-visible {
  color: var(--wine);
  background: transparent;
}

.entity-link:hover::after,
.entity-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.entity-link:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.lesson-empty {
  color: transparent;
}

.lesson-change {
  position: relative;
  background: #fffaf0 !important;
  box-shadow: inset 3px 0 0 #d97706;
}

.lesson-change--cancelled {
  background: #fff1f3 !important;
  box-shadow: inset 3px 0 0 var(--wine);
}

.lesson-change--added {
  background: #effaf4 !important;
  box-shadow: inset 3px 0 0 #18864b;
}

.change-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 5px;
  color: #935b00;
  background: #ffedc2;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.change-badge--added {
  color: #12683b;
  background: #d8f3e3;
}

.change-badge--cancelled {
  color: var(--wine-dark);
  background: #f7dce2;
}

.mobile-schedule {
  display: none;
}

.week-view {
  max-width: 100%;
  min-width: 0;
}

.week-panel {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.week-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  color: var(--white);
  background: var(--navy);
}

.week-panel__heading span {
  color: #dce3ed;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.week-panel__heading h2 {
  margin: 3px 0 0;
  font-size: 27px;
}

.week-table-wrap {
  overflow-x: auto;
}

.week-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
}

.week-table th,
.week-table td {
  height: 84px;
  padding: 9px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.week-table thead th {
  height: 40px;
  color: var(--white);
  background: var(--wine);
  font-size: 12px;
}

.week-table tbody th {
  width: 84px;
  color: var(--wine);
  background: var(--wine-soft);
}

.week-table tbody th strong,
.week-table tbody th span {
  display: block;
}

.week-table tbody th span {
  margin-top: 3px;
  font-size: 11px;
}

.week-table td {
  font-size: 11px;
}

.notice {
  padding: 20px;
  color: var(--wine-dark);
  background: var(--wine-soft);
  border: 1px solid #f3c9d2;
  border-radius: var(--radius-md);
}

.notice strong,
.notice span {
  display: block;
}

.notice span {
  margin-top: 6px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state span {
  margin-top: 8px;
  color: var(--muted);
}

.empty-state__action {
  min-height: 44px;
  margin-top: 18px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--wine);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.empty-state__action:hover,
.empty-state__action:focus-visible {
  background: var(--wine-dark);
  outline: 2px solid color-mix(in srgb, var(--wine) 35%, transparent);
  outline-offset: 2px;
}

.footer-bar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding: 10px 18px;
  color: #e8edf4;
  background: var(--navy);
  border-radius: 12px;
  font-size: 12px;
}

.footer-bar strong {
  color: var(--white);
  text-transform: uppercase;
}

.footer-bar a {
  color: var(--white);
  font-weight: 700;
}

@media (max-width: 1500px) {
  .page-shell {
    padding: 16px;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .schedule-grid.entity-board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .schedule-panel {
    overflow-x: auto;
  }
}

@media (min-width: 1101px) and (max-width: 1500px) {
  .date-tab {
    min-width: 0;
    flex-basis: calc((100% - 42px) / 8);
    padding-inline: 6px;
  }
}

@media (min-width: 1501px) {
  .controls {
    margin-top: 14px;
    margin-bottom: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 520px);
  }

  .schedule-navigation {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: center;
  }

  .status-row {
    margin-bottom: 8px;
  }

  .period-times-panel {
    margin-bottom: 10px;
  }

  .schedule-panel table {
    min-width: 0;
  }

  .schedule-panel td {
    height: 58px;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .page-shell {
    padding: 12px;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 124px;
  }

  .masthead__brand {
    padding: 16px 24px 18px;
  }

  .brand-row {
    gap: 24px;
  }

  .wordmark {
    font-size: 36px;
  }

  .college-name {
    font-size: 14px;
  }

  .masthead h1 {
    margin-top: 12px;
    font-size: 32px;
  }

  .masthead__date {
    gap: 16px;
    padding: 18px;
  }

  .masthead__date strong {
    font-size: 32px;
  }

  .masthead__date > span {
    font-size: 14px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    margin-top: 14px;
  }

  .date-tab {
    min-width: 0;
    flex-basis: calc((100% - 36px) / 7);
    padding-inline: 6px;
  }

  .schedule-panel td {
    height: 64px;
  }

  .schedule-grid.entity-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .schedule-content {
    min-height: max(440px, calc(100svh - 410px));
  }

  .page-shell {
    padding: 10px;
  }

  .masthead {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 18px;
  }

  .masthead__brand {
    min-height: 46px;
    flex-direction: row;
    align-items: center;
    padding: 6px 16px;
  }

  .brand-row {
    gap: 0;
  }

  .wordmark {
    font-size: 27px;
  }

  .college-name {
    display: none;
  }

  .masthead h1 {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
  }

  .schedule-title-full {
    display: none;
  }

  .schedule-title-short {
    display: inline;
  }

  .masthead__date {
    flex-direction: row;
    justify-content: space-between;
    gap: 6px;
    min-height: 50px;
    padding: 4px 12px 4px 16px;
  }

  .masthead__date strong {
    flex: 0 0 auto;
    font-size: 20px;
  }

  .masthead__date > span {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 10px;
  }

  .theme-toggle {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  .controls {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    margin: 10px 0 8px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .schedule-navigation,
  .search-actions {
    width: 100%;
  }

  .search-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-views {
    order: 2;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-view {
    min-height: 44px;
  }

  .period-times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box {
    flex-basis: auto;
    width: 100%;
  }

  .search-box__shortcut {
    display: none;
  }

  .date-switcher {
    width: 100%;
    min-height: 52px;
  }

  .date-tabs {
    flex: 1 1 auto;
  }

  .date-tab {
    min-width: 0;
    flex-basis: calc((100% - 12px) / 3);
    padding-inline: 4px;
  }

  .entity-search-results {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin-top: 8px;
  }

  .icon-button {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .schedule-grid {
    display: none;
  }

  .schedule-grid.entity-board-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .mobile-schedule {
    display: grid;
    gap: 12px;
  }

  .status-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 10px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .status-copy {
    overflow-wrap: anywhere;
  }

  .status-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .action-toolbar {
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .action-toolbar__button {
    padding-inline: 8px;
  }

  .action-toolbar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .action-toolbar__button:not([hidden]) + .more-actions {
    border-left: 1px solid var(--line);
    padding-left: 4px;
  }

  .group-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .group-card h2 {
    margin: 0;
    padding: 13px 16px;
    color: var(--white);
    background: var(--wine);
    font-size: 17px;
  }

  .mobile-lesson {
    display: grid;
    min-height: 56px;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 0;
    border-bottom: 1px solid var(--line);
  }

  .mobile-lesson:last-child {
    border-bottom: 0;
  }

  .mobile-period {
    align-self: stretch;
    display: grid;
    place-items: center;
    color: var(--wine);
    background: var(--wine-soft);
    font-size: 20px;
    font-weight: 800;
  }

  .mobile-period b {
    display: block;
  }

  .mobile-lesson__content strong,
  .mobile-lesson__content span {
    display: block;
  }

  .mobile-lesson__content .lesson-entry + .lesson-entry {
    margin-top: 8px;
    padding-top: 8px;
  }

  .mobile-lesson__content .lesson-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
  }

  .mobile-lesson__content .lesson-entry:has(> .change-badge) {
    display: block;
  }

  .mobile-lesson__content .lesson-related {
    line-height: 1.7;
  }

  .mobile-lesson__content .entity-link {
    min-height: 44px;
    margin: -8px 0;
    padding: 8px 3px;
    font-size: 12px;
    font-weight: 650;
  }

  .entity-board-card .entity-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-block: -10px;
    padding: 10px 2px;
  }

  .mobile-lesson__content strong,
  .mobile-lesson__content .lesson-subject {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
  }

  .mobile-lesson__content span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-lesson__content .lesson-time {
    order: 2;
    flex: 0 0 auto;
    margin: 0;
    font-size: 12px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .mobile-lesson__content .lesson-subject {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
    color: var(--ink);
    font-weight: 750;
    font-size: 15px;
  }

  .mobile-lesson__content .lesson-subgroup,
  .mobile-lesson__content .lesson-related {
    order: 3;
    flex-basis: 100%;
  }

  .mobile-room {
    color: var(--wine);
    font-size: 12px;
    font-weight: 750;
  }

  .mobile-empty {
    color: #98a2b3;
    font-size: 13px;
  }

  .footer-bar {
    flex-wrap: wrap;
    gap: 5px 9px;
    margin-top: 12px;
    text-align: center;
  }
}

@media (max-width: 350px) {
  .mobile-lesson__content .lesson-time {
    order: 1;
    margin-left: auto;
  }

  .mobile-lesson__content .lesson-subject {
    order: 2;
    flex-basis: 100%;
  }
}

:root[data-theme="dark"] .date-tab span,
:root[data-theme="dark"] .search-box input::placeholder,
:root[data-theme="dark"] .search-box__shortcut,
:root[data-theme="dark"] .mobile-empty {
  color: #afbed0;
}

:root[data-theme="dark"] .page-shell .entity-link,
:root[data-theme="dark"] .page-shell .lesson-room,
:root[data-theme="dark"] .page-shell .mobile-room,
:root[data-theme="dark"] .page-shell .entity-board-item__period,
:root[data-theme="dark"] .page-shell .mobile-period,
:root[data-theme="dark"] .page-shell .schedule-panel td.period-cell {
  color: var(--wine-dark);
}

:root[data-theme="dark"] .page-shell .entity-link:hover,
:root[data-theme="dark"] .page-shell .entity-link:focus-visible {
  color: #ffd0da;
}

:root[data-theme="dark"] .search-box::before {
  background: linear-gradient(90deg, rgb(180 42 72 / 46%), rgb(82 121 166 / 34%));
}

:root[data-theme="dark"] .entity-search-section button:hover,
:root[data-theme="dark"] .entity-search-section button:focus-visible,
:root[data-theme="dark"] .entity-search-section button[aria-selected="true"],
:root[data-theme="dark"] .entity-search-section button[aria-selected="true"] .entity-search-option__type {
  color: var(--wine-dark);
}

:root[data-theme="dark"] .lesson-change {
  background: #302613 !important;
}

:root[data-theme="dark"] .lesson-change--cancelled {
  background: #321722 !important;
}

:root[data-theme="dark"] .lesson-change--added {
  background: #102d24 !important;
}

.png-export-stage {
  position: fixed;
  z-index: -1;
  top: 0;
  left: -20000px;
  width: 1920px;
  pointer-events: none;
}

.png-export-page {
  --canvas: #f4f6f8;
  --navy: #0e2038;
  --wine: #8e1d32;
  --wine-dark: #741629;
  --wine-soft: #f7e9ed;
  --paper: #fcfcfd;
  --ink: #1a1f29;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d9dee7;
  --white: #ffffff;
  --header-height: 128px;
  --footer-height: 42px;
  --qr-size: 96px;
  --header-title-size: 40px;
  --wordmark-size: 42px;
  --college-size: 16px;
  --date-size: 38px;
  --day-size: 15px;
  --panel-gap: 16px;
  --panel-header-height: 32px;
  --panel-label-size: 11px;
  --period-label-size: 22px;
  --board-font-size: 10px;
  --board-related-size: 9px;
  --board-line-height: 1.12;
  --board-entry-gap: 4px;
  --board-cell-padding: 4px 2px;
  --card-heading-height: 52px;
  --card-item-height: 56px;
  --card-title-size: 15px;
  --card-subject-size: 14px;
  --card-secondary-size: 12px;
  --card-period-size: 19px;
  --card-content-padding: 8px 10px;
  --footer-font-size: 11px;
  position: relative;
  display: block;
  width: 1920px;
  height: 1080px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.png-export-page--density-normal {
  --header-height: 112px;
  --footer-height: 36px;
  --qr-size: 88px;
  --header-title-size: 36px;
  --wordmark-size: 38px;
  --college-size: 15px;
  --date-size: 35px;
  --day-size: 14px;
  --panel-gap: 14px;
  --panel-header-height: 28px;
  --panel-label-size: 10px;
  --period-label-size: 20px;
  --board-font-size: 8px;
  --board-related-size: 7px;
  --board-line-height: 1.06;
  --board-entry-gap: 2px;
  --board-cell-padding: 3px 1px;
  --card-heading-height: 46px;
  --card-item-height: 48px;
  --card-title-size: 14px;
  --card-subject-size: 13px;
  --card-secondary-size: 11px;
  --card-period-size: 18px;
  --card-content-padding: 6px 9px;
  --footer-font-size: 10px;
}

.png-export-page--density-dense {
  --header-height: 96px;
  --footer-height: 30px;
  --qr-size: 78px;
  --header-title-size: 31px;
  --wordmark-size: 35px;
  --college-size: 13px;
  --date-size: 31px;
  --day-size: 12px;
  --panel-gap: 10px;
  --panel-header-height: 24px;
  --panel-label-size: 9px;
  --period-label-size: 18px;
  --board-font-size: 6.5px;
  --board-related-size: 5.8px;
  --board-line-height: 1.02;
  --board-entry-gap: 1px;
  --board-cell-padding: 2px 1px;
  --card-heading-height: 40px;
  --card-item-height: 42px;
  --card-title-size: 13px;
  --card-subject-size: 12px;
  --card-secondary-size: 10px;
  --card-period-size: 16px;
  --card-content-padding: 4px 8px;
  --footer-font-size: 9px;
}

.png-export-page .masthead {
  position: absolute;
  top: 20px;
  left: 24px;
  grid-template-columns: minmax(0, 1420px) 452px;
  width: 1872px;
  height: var(--header-height);
  min-height: 0;
  margin: 0;
  border-radius: 22px;
  box-shadow: none;
}

.png-export-page .masthead__brand {
  height: var(--header-height);
  min-height: 0;
  justify-content: center;
  gap: 5px;
  padding: 7px 30px;
}

.png-export-page .wordmark {
  font-size: var(--wordmark-size);
}

.png-export-page .college-name {
  font-size: var(--college-size);
}

.png-export-page .masthead h1 {
  margin-top: 3px;
  font-size: var(--header-title-size);
}

.png-export-page .masthead__date {
  height: var(--header-height);
  min-height: 0;
  gap: 8px;
  padding: 10px 18px;
}

.png-export-page .masthead__date strong {
  font-size: var(--date-size);
}

.png-export-page .masthead__date > span {
  font-size: var(--day-size);
}

.png-export-qr {
  position: absolute;
  top: 50%;
  left: 696px;
  z-index: 1;
  width: calc(102px + var(--qr-size) + 16px);
  height: calc(var(--qr-size) + 16px);
  transform: translateY(-50%);
  color: #e8edf4;
}

.png-export-qr__caption {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.png-export-qr__code {
  position: absolute;
  top: 0;
  left: 102px;
  display: grid;
  width: calc(var(--qr-size) + 16px);
  height: calc(var(--qr-size) + 16px);
  padding: 8px;
  place-items: center;
  background: #ffffff;
  border-radius: 12px;
}

.png-export-qr__code svg {
  display: block;
  width: var(--qr-size);
  height: var(--qr-size);
  shape-rendering: crispEdges;
}

.png-export-context {
  position: absolute;
  top: calc(38px + var(--header-height));
  left: 30px;
  display: flex;
  width: 1860px;
  min-width: 0;
  height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
  color: var(--navy);
  font-size: 15px;
}

.png-export-context strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.png-export-context span {
  color: var(--muted);
  font-weight: 700;
}

.png-export-content {
  position: absolute;
  top: calc(70px + var(--header-height));
  left: 20px;
  width: 1880px;
  height: calc(976px - var(--header-height) - var(--footer-height));
  min-height: 0;
  overflow: hidden;
}

.png-export-page .schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: var(--panel-gap);
}

.png-export-page--current-day .schedule-grid {
  grid-template-columns: minmax(0, 1fr);
}

.png-export-page--all-groups .png-export-content {
  align-self: stretch;
  height: calc(976px - var(--header-height) - var(--footer-height));
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--panel-gap);
  overflow: visible;
}

.png-export-page--all-groups .schedule-panel {
  align-self: stretch;
  height: auto;
  min-height: 0;
  overflow: visible;
  border-radius: 14px;
}

.png-export-page--all-groups .schedule-panel table {
  width: 100%;
  height: 100%;
  min-height: 0;
  table-layout: fixed;
}

.png-export-page--all-groups .schedule-panel thead {
  height: var(--panel-header-height);
}

.png-export-page--all-groups .schedule-panel tbody {
  height: calc(100% - var(--panel-header-height));
}

.png-export-page--all-groups .schedule-panel tbody tr {
  height: calc((100% - var(--panel-header-height)) / var(--period-count));
}

.png-export-page--all-groups .schedule-panel th {
  height: var(--panel-header-height);
  padding: 2px;
  font-size: var(--panel-label-size);
  line-height: 1;
}

.png-export-page--all-groups .schedule-panel td {
  height: auto;
  min-height: 0;
  padding: var(--board-cell-padding);
  font-size: var(--board-font-size);
  line-height: var(--board-line-height);
}

.png-export-page--all-groups .schedule-panel td.period-cell {
  font-size: var(--period-label-size);
}

.png-export-page--all-groups .lesson-entry + .lesson-entry {
  margin-top: var(--board-entry-gap);
  padding-top: var(--board-entry-gap);
}

.png-export-page--all-groups .lesson-subgroup,
.png-export-page--all-groups .lesson-related,
.png-export-page--all-groups .entity-link {
  font-size: var(--board-related-size);
  line-height: var(--board-line-height);
}

.png-export-page--all-groups .lesson-subgroup {
  margin-top: 1px;
}

.png-export-page--all-groups .lesson-related {
  gap: 1px 3px;
  margin-top: 1px;
}

.png-export-page--all-groups .entity-link {
  min-height: 0;
  padding: 0;
}

.png-export-page .schedule-grid.entity-board-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: var(--panel-gap);
}

.png-export-page .schedule-panel {
  overflow: hidden;
  border-radius: 14px;
}

.png-export-page .schedule-panel table,
.png-export-page .week-table {
  min-width: 0;
}

.png-export-page .schedule-panel td {
  height: 55px;
  min-height: 0;
  padding: 4px 3px;
}

.png-export-page.png-export-page--all-groups .schedule-panel td {
  height: auto;
  padding: var(--board-cell-padding);
}

.png-export-page .entity-board-card {
  border-radius: 12px;
  box-shadow: none;
}

.png-export-page .entity-board-card__heading {
  min-height: var(--card-heading-height);
  padding: 7px 12px;
}

.png-export-page .entity-board-card__heading h2 {
  font-size: var(--card-title-size);
}

.png-export-page .entity-board-item {
  min-height: var(--card-item-height);
  grid-template-columns: 38px minmax(0, 1fr);
}

.png-export-page .entity-board-item__period b {
  font-size: var(--card-period-size);
}

.png-export-page .entity-board-item__content {
  padding: var(--card-content-padding);
}

.png-export-page .entity-board-item__content > strong {
  font-size: var(--card-subject-size);
}

.png-export-page .entity-board-item__meta {
  margin-top: 2px;
  font-size: var(--card-secondary-size);
}

.png-export-page .entity-link {
  min-height: 0;
  margin: 0;
  padding: 1px 0;
}

.png-export-page .footer-bar {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 1880px;
  height: var(--footer-height);
  min-height: var(--footer-height);
  margin: 0;
  padding: 5px 16px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: var(--footer-font-size);
  line-height: 1.1;
}

/* TV export: the board owns the canvas; identity, date and QR live in a compact footer. */
.png-export-page--all-groups {
  --footer-height: 68px;
  --qr-size: 48px;
}

.png-export-page--all-groups .png-export-context {
  top: 18px;
  left: 24px;
  width: 1872px;
  height: 30px;
  font-size: 18px;
}

.png-export-page--all-groups .png-export-context strong {
  font-size: 22px;
  text-transform: uppercase;
}

.png-export-page--all-groups .png-export-context span {
  color: var(--wine);
  font-size: 17px;
}

.png-export-page--all-groups .png-export-content {
  top: 58px;
  height: calc(982px - var(--footer-height));
}

.png-export-page--all-groups.png-export-page--density-comfort {
  --board-font-size: 11px;
  --board-related-size: 9.5px;
}

.png-export-page--all-groups.png-export-page--density-normal {
  --board-font-size: 9.5px;
  --board-related-size: 8.3px;
}

.png-export-page--all-groups.png-export-page--density-dense {
  --board-font-size: 7.4px;
  --board-related-size: 6.5px;
}

.png-export-page--all-groups .footer-bar {
  justify-content: flex-start;
  gap: 10px;
  padding: 2px 12px 2px 18px;
  font-size: 10px;
}

.png-export-page--all-groups .png-export-qr--footer {
  position: static;
  display: flex;
  width: auto;
  height: calc(var(--qr-size) + 16px);
  align-items: center;
  gap: 10px;
  margin-left: auto;
  transform: none;
  color: #e8edf4;
}

.png-export-page--all-groups .png-export-qr--footer .png-export-qr__caption,
.png-export-page--all-groups .png-export-qr--footer .png-export-qr__code {
  position: static;
  transform: none;
}

.png-export-page--all-groups .png-export-qr--footer .png-export-qr__caption {
  width: auto;
  font-size: 10px;
  text-align: right;
}

.png-export-page--all-groups .png-export-qr--footer .png-export-qr__code {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}

@media (max-width: 900px) {
  .workload-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .workload-item__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .workload-panel {
    margin-block: 12px;
  }

  .workload-card__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 15px 16px 12px;
  }

  .workload-card__header h2 {
    font-size: 18px;
  }

  .workload-summary > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 11px 10px;
  }

  .workload-summary span {
    font-size: 11px;
  }

  .workload-summary strong {
    font-size: 17px;
  }

  .workload-progress,
  .workload-details > summary {
    padding-inline: 16px;
  }

  .workload-item {
    padding: 13px 16px;
  }

  .workload-item__related .entity-link,
  .workload-item__actions button {
    min-height: 44px;
  }

  .workload-item__hours {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .workload-item__hours > div {
    padding-inline: 7px;
  }

  .workload-journal-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
  }

  .workload-journal-dialog__surface {
    max-height: calc(100svh - 20px);
  }

  .workload-journal-dialog__header {
    padding: 16px 16px 12px;
  }

  .workload-journal-dialog__header h2 {
    font-size: 19px;
  }

  .workload-journal-dialog__meta,
  .workload-journal-dialog__content {
    padding-inline: 16px;
  }

  .workload-journal-table {
    border: 0;
    border-radius: 0;
  }

  .workload-journal-table__row--head {
    display: none;
  }

  .workload-journal-table__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--control);
  }

  .workload-journal-table__row:last-child {
    border-bottom: 1px solid var(--line);
  }

  .workload-journal-table__row > span {
    padding: 6px 8px;
    border: 0 !important;
  }

  .workload-journal-table__row > span::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  html,
  body {
    color: #111827 !important;
    background: #fff !important;
  }

  .controls,
  .status-actions,
  .freshness-warning,
  .connection-status,
  .theme-toggle,
  .period-times-panel,
  .college-button {
    display: none !important;
  }

  .page-shell {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .masthead {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #d1d5db;
    border-radius: 0;
  }

  .masthead__brand,
  .masthead__date {
    min-height: 0;
    padding: 10px 14px;
    color: #111827 !important;
    background: #fff !important;
  }

  .wordmark,
  .college-name,
  .masthead h1,
  .masthead__date strong,
  .masthead__date > span {
    color: #111827 !important;
  }

  .masthead h1 {
    margin-top: 4px;
    font-size: 22px;
  }

  .wordmark,
  .masthead__date strong {
    font-size: 24px;
  }

  .status-row {
    display: block !important;
    min-height: 0;
    margin: 10px 0;
    padding: 0;
    border: 0;
  }

  .status-row p {
    color: #111827 !important;
  }

  .schedule-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-grid[hidden] {
    display: none !important;
  }

  .schedule-panel,
  .week-panel {
    overflow: visible;
    break-inside: avoid;
    color: #111827 !important;
    background: #fff !important;
    border-color: #d1d5db;
    border-radius: 0;
  }

  .schedule-panel table,
  .week-table {
    min-width: 0;
  }

  .schedule-panel th,
  .week-table thead th {
    color: #fff !important;
    background: #8e1d32 !important;
    print-color-adjust: exact;
  }

  .schedule-panel td,
  .week-table td {
    color: #111827 !important;
    background: #fff !important;
  }

  .mobile-schedule {
    display: none !important;
  }

  .week-view:not([hidden]) {
    display: block !important;
  }

  .footer-bar {
    min-height: 0;
    margin-top: 12px;
    padding: 8px 0;
    color: #374151 !important;
    background: #fff !important;
    border-top: 1px solid #d1d5db;
    border-radius: 0;
  }

  .footer-bar strong,
  .footer-bar a {
    color: #111827 !important;
  }
}
