:root {
  --ink: #20384d;
  --muted: #617486;
  --line: #e7e1db;
  --soft: #f7f3ee;
  --panel: #ffffff;
  --brand: #b62330;
  --brand-dark: #7f1721;
  --green: #19734c;
  --green-bg: #e8f2ec;
  --orange: #965014;
  --orange-bg: #fff1df;
  --red: #b3261e;
  --red-bg: #fdebea;
  --blue: #235d9f;
  --blue-bg: #e7f1f8;
  --shadow: 0 8px 28px rgba(32, 56, 77, 0.06);
  --canvas: #fbf7f2;
  --blush: #f8e8ee;
  --autumn-red: #b95748;
  --autumn-amber: #d9a15a;
  --radius-panel: 16px;
  --radius-control: 9px;
  --font-page: 24px;
  --font-section: 18px;
  --font-card: 16px;
  --font-body: 14px;
  --font-secondary: 12px;
  --control-height: 32px;
  --term-padding: 8px;
  --term-gap: 6px;
}

.effective-session-schedule {
  display: block;
  margin-bottom: 3px;
  color: #19734c;
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
}

.effective-session-schedule.schedule-marker-label {
  margin-top: 0;
  margin-bottom: 3px;
}

.timetable-effective-date-time {
  display: grid;
  width: 100%;
  min-width: 0;
  justify-items: center;
  gap: 2px;
}

.timetable-effective-time,
.timetable-effective-end-date {
  display: block;
  width: 100%;
  margin: 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.timetable-effective-end-date {
  font-size: 9px;
  white-space: normal;
}

.private-reschedule-student { margin-top: 16px; }
.private-reschedule-student h2 { margin-top: 18px; }
.private-reschedule-student details ul { margin: 10px 0 0; padding-left: 22px; }
.private-reschedule-student td .btn + .btn { margin-left: 6px; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  background: linear-gradient(135deg, #fff, #f2f5f7 48%, #e7edf1);
}

.login-card {
  align-self: center;
  margin: 48px;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-mark {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  background: white;
  border-radius: 6px;
}

.brand-title {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-card p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  color: #33404a;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}
.password-input-row { display: flex; align-items: stretch; gap: 8px; }
.password-input-row input { flex: 1; min-width: 0; }
.login-forgot-link { align-self: center; color: var(--primary); font-weight: 700; }
.password-visibility-toggle { flex: 0 0 auto; }

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 20px;
  color: #33404a;
  font-size: 14px;
}

.btn,
.app-compact-shell .private-v2-class .session-text-button:not(.has-note) {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
  font-weight: 720;
}

.btn.primary {
  background: var(--brand);
  color: white;
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.ghost,
.app-compact-shell .private-v2-class .session-text-button:not(.has-note) {
  border-color: var(--line);
}

.btn.small,
.app-compact-shell .private-v2-class .session-text-button:not(.has-note) {
  padding: 7px 10px;
  font-size: 13px;
}

.btn.danger {
  color: #a51d2d;
  border-color: #d9a8ae;
  background: #fff;
}

.btn.makeup-book {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.btn.makeup-booked {
  color: #fff;
  border-color: #16804b;
  background: #16804b;
}

.btn.makeup-booking-closed {
  color: #66727f;
  border-color: #cbd2d9;
  background: #e8ecef;
}

.student-makeup-cell-status,
.student-makeup-summary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.student-makeup-page,
.teacher-makeup-page {
  display: grid;
  gap: 16px;
}

.makeup-credit-grid,
.makeup-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.makeup-credit-card,
.makeup-participant-list > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
}

.makeup-credit-card small,
.teacher-makeup-slot small,
.makeup-participant-list span {
  color: var(--muted);
  font-size: 11px;
}

.makeup-participant-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.teacher-makeup-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.teacher-makeup-summary h2,
.teacher-makeup-slot h3,
.teacher-makeup-empty h3 {
  margin: 0;
}

.teacher-makeup-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.teacher-makeup-slot {
  padding: 14px;
}

.teacher-makeup-slot-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.teacher-makeup-slot-heading small,
.teacher-makeup-class-heading small {
  display: block;
}

.teacher-makeup-slot-heading h3 {
  margin-top: 2px;
  font-size: 17px;
}

.teacher-makeup-class-list {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.teacher-makeup-class-group {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.teacher-makeup-class-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.teacher-makeup-class-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.teacher-makeup-empty {
  padding: 20px;
  text-align: center;
}

/* Final frozen Teacher timetable: read-only Make-Up facts are not interactive. */
.group-teacher-class-card .group-class-entry.read-only .group-grid-cell.makeup-cell:hover {
  background: #fff2cc;
}

.student-group-term-card .group-class-entry.read-only .group-grid-cell.makeup-cell:hover {
  background: #fff2cc;
}

.group-grid-cell.makeup-cell:hover {
  background: #ffe9a6;
}

.makeup-settings-grid {
  align-items: end;
}

@media (max-width: 760px) {
  .makeup-credit-grid,
  .makeup-settings-grid { grid-template-columns: 1fr; }
  .teacher-makeup-summary,
  .teacher-makeup-class-heading { align-items: flex-start; flex-direction: column; }
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.login-help {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.staging-auth-error {
  margin-top: 16px;
}

.staging-data-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #d59d22;
  border-radius: 6px;
  background: #fff7df;
  color: #5f4300;
}

.staging-data-notice span {
  line-height: 1.45;
}

.staging-teaching-inline-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid #d59d22;
  border-radius: 6px;
  background: #fff7df;
  color: #5f4300;
}

.login-visual {
  padding: 48px;
  display: flex;
  align-items: center;
}

.preview-board {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px;
}

.mini-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 16px;
  min-height: 118px;
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
}

.mini-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  background: #172026;
  color: white;
  padding: 22px 16px;
}

.sidebar .brand-mark {
  margin-bottom: 26px;
}

.sidebar .brand-subtitle {
  color: #b7c3cc;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-parent-group, .responsive-nav-panel { display: contents; }

.nav-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #dce4e9;
  padding: 11px 12px;
  border-radius: 6px;
  font-weight: 680;
}

.nav-group-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-caret {
  color: #b7c3cc;
  font-size: 12px;
}

.nav-sub-btn {
  padding-left: 28px;
  font-size: 13px;
}

.nav-btn.active,
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 70px;
  padding: 0 24px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
}

.topbar-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.notification-btn {
  position: relative;
}

.badge-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.content {
  padding: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.card h2,
.card h3 {
  margin: 0 0 12px;
}

.card h2 {
  font-size: 18px;
}

.card h3 {
  font-size: 16px;
}

.stat {
  display: grid;
  gap: 6px;
}

.stat-value {
  font-size: 27px;
  font-weight: 800;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.status-stat.ok {
  border-color: #bfe6cf;
  background: var(--green-bg);
}

.status-stat.ok .stat-value,
.status-stat.ok .stat-label strong {
  color: var(--green);
}

.status-stat.warn {
  border-color: #f1b8b5;
  background: var(--red-bg);
}

.status-stat.warn .stat-value,
.status-stat.warn .stat-label strong {
  color: var(--red);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 720;
}

.tab-btn.active {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.term-sections {
  display: grid;
  gap: 18px;
}

.term-section {
  display: grid;
  gap: 10px;
}

.term-section h2 {
  margin: 0;
  font-size: 18px;
}

.accordion-list {
  display: grid;
  gap: 10px;
}

.term-accordion {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.term-summary {
  width: 100%;
  border: 0;
  background: #f8fafb;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  text-align: left;
}

.term-summary strong,
.term-summary span {
  display: block;
}

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

.term-summary span {
  color: var(--muted);
  margin-top: 4px;
}

.term-summary-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.term-summary-side .pill {
  display: inline-flex;
}

.chevron {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: white;
  font-weight: 850;
}

.term-accordion.open .term-summary {
  background: white;
  border-bottom: 1px solid var(--line);
}

.term-panel {
  padding: 16px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.delivery-table-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 0 0 8px;
}

.email-delivery-scroll {
  max-height: 448px;
  overflow: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.email-delivery-scroll:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.email-delivery-scroll::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.email-delivery-scroll::-webkit-scrollbar-track {
  background: #eef1f3;
}

.email-delivery-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f3;
  border-radius: 999px;
  background: #9ca3af;
}

.email-delivery-table {
  min-width: 1120px;
  table-layout: fixed;
}

.email-delivery-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafb;
  box-shadow: inset 0 -1px 0 var(--line);
}

.email-delivery-table tbody tr {
  height: 64px;
}

.email-delivery-table th,
.email-delivery-table td {
  padding: 7px 9px;
  vertical-align: middle;
}

.email-delivery-table td {
  overflow: hidden;
}

.email-delivery-table td:nth-child(2),
.email-delivery-table td:nth-child(4),
.email-delivery-table td:nth-child(5),
.email-delivery-table td:nth-child(6),
.email-delivery-table td:nth-child(7) {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-delivery-table td:first-child small {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.email-delivery-table th:nth-child(1) { width: 170px; }
.email-delivery-table th:nth-child(2) { width: 150px; }
.email-delivery-table th:nth-child(3) { width: 260px; }
.email-delivery-table th:nth-child(4) { width: 75px; }
.email-delivery-table th:nth-child(5) { width: 100px; }
.email-delivery-table th:nth-child(6) { width: 70px; }
.email-delivery-table th:nth-child(7) { width: 150px; }
.email-delivery-table th:nth-child(8) { width: 160px; }
.email-delivery-table th:nth-child(9) { width: 70px; }

.delivery-class-session {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.delivery-class-session strong,
.delivery-class-session small,
.delivery-safe-failure {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-attempt-count {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.delivery-safe-failure {
  display: block;
  max-width: 160px;
}

.availability-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  margin-bottom: 14px;
}

.availability-table {
  --availability-day-width: 110px;
  --availability-slot-width: 28px;
  --availability-timeline-width: 1792px;
  width: 100%;
  min-width: calc(var(--availability-day-width) + var(--availability-timeline-width));
  table-layout: fixed;
  border-collapse: collapse;
}

/* Safari may shrink a fixed-layout table whose intrinsic minimum is expressed
 * through custom-property arithmetic. Teacher Availability historically used
 * a literal table minimum, which reliably gives its single native viewport a
 * real overflow range. Keep Zoom's shared timeline sizing unchanged. */
.teacher-availability-wrap {
  --availability-day-width: 110px;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.teacher-availability-table {
  min-width: 1902px;
}

.weekly-occupied-timeline-wrap {
  width: 100%;
  max-width: 100%;
}

.weekly-occupied-timeline {
  min-width: 1902px;
}

.zoom-all-host-weekly {
  display: grid;
  gap: 16px;
}

.zoom-schedule-host.inactive {
  opacity: .78;
}

.zoom-teacher-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.zoom-teacher-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.zoom-teacher-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--zoom-teacher-bg);
  border: 1px solid color-mix(in srgb, var(--zoom-teacher-fg) 45%, transparent);
}

.zoom-teacher-occupancy {
  background: var(--zoom-teacher-bg) !important;
  color: var(--zoom-teacher-fg) !important;
  border-color: color-mix(in srgb, var(--zoom-teacher-fg) 35%, white) !important;
}

.zoom-teacher-occupancy > span {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
}

.zoom-block-label {
  display: grid;
  gap: 1px;
  line-height: 1.08;
}

.zoom-block-label strong,
.zoom-block-label small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zoom-block-label strong {
  font-size: 11px;
  font-weight: 800;
}

.zoom-block-label small {
  font-size: 10px;
  font-weight: 650;
}

.teacher-availability-block-label {
  display: grid;
  gap: 1px;
  max-width: 100%;
  line-height: 1.05;
}

.teacher-availability-block-label strong,
.teacher-availability-block-label small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-availability-block-label strong {
  font-size: 10px;
  font-weight: 800;
}

.teacher-availability-block-label small {
  font-size: 9px;
  font-weight: 650;
}

.availability-table .availability-day-col {
  width: var(--availability-day-width);
}

.availability-table .availability-slot-col {
  width: var(--availability-slot-width);
}

.availability-table th,
.availability-table td {
  box-sizing: border-box;
  text-align: center;
  padding: 8px 5px;
}

.availability-table thead th {
  position: relative;
}

.availability-table thead th:first-child,
.availability-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--line);
  box-shadow: 3px 0 5px rgba(28, 40, 49, .08);
}

.availability-table thead th:first-child {
  z-index: 3;
  background: #f8fafb;
}

.availability-table thead th.availability-ruler-tick::after,
.availability-table thead th.availability-ruler-hour::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  background: #c6cdd2;
  transform: translateX(-50%);
}

.availability-table thead th.availability-ruler-hour::after {
  width: 2px;
  height: 7px;
}

.availability-table thead th.availability-ruler-end::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 7px;
  background: #c6cdd2;
  transform: translateX(50%);
}

.availability-table thead th.availability-ruler-tick-short::after {
  width: 1px;
  height: 4px;
}

.availability-table thead th.availability-ruler-tick-medium::after {
  width: 1px;
  height: 7px;
}

.availability-ruler-label {
  position: absolute;
  left: 0;
  top: 50%;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

/* Safari clips overflowing content at a collapsed fixed-layout table cell's
 * paint boundary even when computed overflow is visible. Paint only the first
 * Teacher Availability label in the scroll content layer, outside the 28px
 * cell; the canonical tick and every time column remain in the table. */
.teacher-availability-ruler-start-overlay {
  position: absolute;
  top: 16px;
  left: calc(var(--availability-day-width) + 6px);
  z-index: 1;
  color: #33404a;
  font-size: 12px;
  font-weight: 750;
  line-height: 14px;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.availability-ruler-end-label {
  right: 0;
  left: auto;
  transform: translate(50%, -50%);
}

.availability-table tbody th {
  text-align: left;
  background: #f8fafb;
  color: #33404a;
  font-size: 13px;
  text-transform: none;
}

.availability-table td {
  height: 46px;
  color: var(--muted);
  font-size: 9px;
}

.availability-table td.available {
  color: var(--green);
  background: var(--green-bg);
  font-weight: 780;
}

.availability-table td.unavailable {
  color: inherit;
  background: transparent;
  font-weight: inherit;
}

.availability-table td.occupied {
  color: #52606b;
  background: #e8ecef;
  font-weight: 780;
}

.availability-table td.availability-neutral {
  background: white;
  color: transparent;
}

.availability-occupancy {
  cursor: help;
}

.teacher-occupancy-tooltip {
  position: fixed;
  z-index: 140;
  width: max-content;
  max-width: 280px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #202a32;
  color: white;
  box-shadow: 0 5px 18px rgb(25 37 47 / 20%);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: pre-line;
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 2px;
}

.teacher-schedule-select {
  min-width: 240px;
  margin-bottom: 0;
}

.day-cell-btn {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  text-align: left;
}

.day-cell-label {
  display: block;
}

.day-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.availability-editor {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.availability-editor .field {
  margin-bottom: 0;
}

.teacher-irregular-leave-form {
  display: grid;
  gap: 12px;
}

.irregular-leave-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.irregular-leave-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.teacher-irregular-leave-form .group-activity-date-selector {
  width: 100%;
}

.irregular-leave-time-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.irregular-leave-conflicts {
  display: grid;
  gap: 3px;
  color: #34424d;
  font-size: 0.86rem;
  line-height: 1.35;
}

.irregular-leave-conflicts > strong {
  color: #202a31;
  font-size: 0.9rem;
}

.irregular-leave-conflict-row {
  padding-left: 8px;
  border-left: 2px solid #d5dde3;
}

.irregular-leave-grid-header,
.irregular-leave-row.session-row {
  display: grid;
  grid-template-columns: minmax(32px, 0.22fr) minmax(230px, 1.25fr) minmax(300px, 1.75fr) minmax(150px, max-content) minmax(170px, max-content);
  gap: 14px;
  align-items: center;
}

.irregular-leave-list {
  container-name: irregular-leave-list;
  container-type: inline-size;
}

.irregular-leave-local-message {
  margin: 8px 0 4px;
}

.irregular-leave-local-message .app-message {
  margin: 0;
}

.irregular-leave-grid-header {
  padding: 0 13px 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.irregular-leave-row.session-row {
  padding: 11px 13px;
}

.irregular-leave-detail {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.irregular-leave-detail > strong {
  line-height: 1.3;
}

.irregular-leave-detail > .muted {
  font-size: 0.86rem;
}

.irregular-leave-conflict-column {
  min-width: 0;
}

.irregular-leave-no-conflict {
  color: var(--muted);
}

.irregular-leave-status,
.irregular-leave-action {
  justify-self: end;
  min-width: 0;
}

.irregular-leave-action {
  align-items: center;
  justify-content: flex-end;
}

.irregular-leave-action .btn {
  align-self: center;
}

@container irregular-leave-list (max-width: 1280px) {
  .irregular-leave-grid-header {
    display: none;
  }

  .irregular-leave-row.session-row {
    grid-template-columns: 32px minmax(0, 1fr) minmax(240px, 0.75fr);
    grid-template-areas:
      "number leave status"
      "number conflicts action";
    align-items: start;
  }

  .irregular-leave-number { grid-area: number; }
  .irregular-leave-detail { grid-area: leave; }
  .irregular-leave-conflict-column { grid-area: conflicts; }
  .irregular-leave-status { grid-area: status; }
  .irregular-leave-action { grid-area: action; }
}

@media (max-width: 1120px) {
  .irregular-leave-grid-header {
    display: none;
  }

  .irregular-leave-row.session-row {
    grid-template-columns: 32px minmax(0, 1fr) minmax(240px, 0.75fr);
    grid-template-areas:
      "number leave status"
      "number conflicts action";
    align-items: start;
  }

  .irregular-leave-number { grid-area: number; }
  .irregular-leave-detail { grid-area: leave; }
  .irregular-leave-conflict-column { grid-area: conflicts; }
  .irregular-leave-status { grid-area: status; }
  .irregular-leave-action { grid-area: action; }
}

@media (max-width: 640px) {
  .irregular-leave-row.session-row {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas:
      "number leave"
      "number conflicts"
      "number status"
      "number action";
  }

  .irregular-leave-status,
  .irregular-leave-action {
    justify-self: start;
  }
}

.history-details {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  overflow: hidden;
}

.history-details summary {
  padding: 12px 14px;
  color: #33404a;
  font-weight: 780;
  cursor: pointer;
}

.history-details .session-list {
  padding: 0 12px 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.private-students-table th:nth-child(4),
.private-students-table td:nth-child(4) {
  text-align: center;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #44515c;
  background: #f8fafb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.th-sub {
  display: inline-block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
}

.td-sub {
  display: inline-block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td,
.clickable-row.active td {
  background: #f8fafb;
}

.expanded-row td {
  background: #fbfcfd;
}

.student-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 4px 0;
}

.student-detail-grid div {
  display: grid;
  gap: 3px;
}

.student-detail-grid strong {
  color: #44515c;
  font-size: 12px;
  text-transform: uppercase;
}

.student-detail-grid span {
  color: var(--ink);
}

.detail-field {
  margin-bottom: 0;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  background: var(--green-bg);
}

.pill.blue {
  color: #175ca8;
  background: #e5f0ff;
}

.student-homework-sections {
  display: grid;
  gap: 20px;
}

.student-homework-sections section {
  display: grid;
  gap: 10px;
}

.student-homework-term {
  padding: 0;
  overflow: hidden;
}

.student-homework-table th,
.student-homework-table td {
  padding: 8px;
  vertical-align: top;
  font-size: 13px;
}

.homework-workflow-dialog {
  width: min(360px, calc(100vw - 40px));
}

.homework-workflow-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.homework-workflow-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homework-workflow-file-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 430px);
  overflow-y: auto;
  padding-right: 4px;
}

.homework-submission-file {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.homework-file-name-wrap { min-width: 0; }
.homework-file-name {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.homework-file-name:hover,
.homework-file-name:focus-visible { color: var(--blue); text-decoration: underline; }
.homework-upload-meta { display: flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; }
.homework-upload-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.homework-upload-time { color: var(--muted); font-size: 12px; line-height: 1.35; white-space: nowrap; }
.homework-file-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.homework-file-actions button,
.homework-file-actions a { font-size: 12px; }
.homework-delete-blocked { color: var(--muted); }
.homework-submission-file.expired { background: #f5f6f7; color: var(--muted); }
.homework-submission-file.expired .homework-file-name { color: var(--muted); cursor: default; text-decoration: none; }
.homework-expired-label { display: inline-flex; width: fit-content; padding: 2px 8px; border-radius: 999px; background: #e8ebed; color: var(--muted); font-size: 11px; font-weight: 700; }
.homework-retention-notice { display: grid; gap: 2px; color: var(--muted); }
.homework-upload-button { width: 100%; margin-top: 4px; }
.homework-upload-button span {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #b9c6d2;
  border-radius: 7px;
  background: #f7f9fb;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.homework-upload-button:hover span { border-color: var(--red); color: var(--red); text-decoration: none; }
.homework-commit-actions { margin-top: 10px; }

.homework-preview-dialog { width: min(760px, calc(100vw - 40px)); }
.homework-preview-image { display: block; max-width: 100%; max-height: 55vh; margin: auto; object-fit: contain; }
.homework-preview-pdf { width: 100%; height: min(58vh, 560px); border: 1px solid var(--line); }
.homework-preview-text { max-height: 55vh; overflow: auto; padding: 12px; background: #f7f9fb; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.homework-preview-info { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fb; }
.homework-preview-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 10px; }
.homework-preview-loading { padding: 40px 20px; color: var(--muted); text-align: center; }
.homework-secondary-dialog { z-index: 30; }
@media (hover: none), (max-width: 640px) {
  .homework-workflow-dialog,
  .homework-preview-dialog { width: calc(100vw - 24px); }
  .homework-file-actions { gap: 14px; }
}

.pill.orange {
  color: var(--orange);
  background: var(--orange-bg);
}

.pill.red {
  color: var(--red);
  background: var(--red-bg);
}

.pill.blue {
  color: var(--blue);
  background: var(--blue-bg);
}

.pill.gray {
  color: #55636e;
  background: #eef2f4;
}
.pill.obsolete { color: #65556f; background: #eee8f1; border: 1px solid #d8cddd; }
.directory-tabs { margin-bottom: 12px; }
.directory-card-list { display: grid; gap: 6px; min-width: 0; }
.app-compact-shell .directory-card-list .directory-record { margin: 0; min-width: 0; }
.app-compact-shell .directory-summary.class-summary {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(90px, .7fr) minmax(0, 1.5fr) auto 14px;
}
.directory-summary .row-caret { justify-self: end; }
.app-compact-shell .account-toolbar > .account-authoritative-filters { flex: 1 1 480px; flex-wrap: wrap; min-width: 0; }
.app-compact-shell .account-toolbar > .btn { margin-inline-start: auto; }
.app-compact-shell .account-authoritative-filters input { flex: 1 1 220px; min-width: 0; }
.app-compact-shell .account-card-list .account-card { margin: 0; min-width: 0; }
.app-compact-shell .accounts-summary.class-summary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(70px, .6fr) minmax(0, 1fr) auto auto; cursor: pointer; }
.accounts-summary > span { min-width: 0; overflow-wrap: anywhere; }
.accounts-summary .account-row-actions { justify-content: flex-end; }
@media (max-width: 1099px) {
  .app-compact-shell .accounts-summary.class-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .accounts-summary > [aria-label="Name"] { grid-column: 1; grid-row: 1; }
  .accounts-summary > [aria-label="Email"] { grid-column: 1 / 3; grid-row: 2; }
  .accounts-summary > [aria-label="Role"] { grid-column: 2; grid-row: 1; }
  .accounts-summary > [aria-label="Linked profile"] { grid-column: 1 / 3; grid-row: 3; }
  .accounts-summary > [aria-label="Status"] { grid-column: 3; grid-row: 1; }
  .accounts-summary > .account-row-actions { grid-column: 3; grid-row: 2 / 4; }
}
.directory-card-list .directory-inline-detail { width: 100%; max-width: none; margin: 0; border-top: 1px solid var(--line); box-shadow: none; }
.directory-card-list .directory-compact-grid > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .app-compact-shell .directory-summary.class-summary { grid-template-columns: minmax(0, 1fr) auto 14px; gap: 4px 8px; }
  .directory-summary > [aria-label="Name"] { grid-column: 1; grid-row: 1; }
  .directory-summary > [aria-label="SASA ID"] { grid-column: 1; grid-row: 2; }
  .directory-summary > [aria-label="Email"] { grid-column: 1; grid-row: 3; }
  .directory-summary > [aria-label="Status"] { grid-column: 2; grid-row: 1 / 4; }
  .directory-summary > .row-caret { grid-column: 3; grid-row: 1 / 4; }
}
.directory-detail-row > td { padding: 0 12px 16px; background: #f7f9fa; }
.directory-inline-detail { width: min(980px, 100%); margin: 0 auto; padding: 16px 18px; border-top-left-radius: 0; border-top-right-radius: 0; }
.directory-inline-detail .section-head { margin-bottom: 10px; }
.directory-inline-detail .section-head h2,
.directory-inline-detail .section-head p { margin: 0; }
.directory-compact-grid { gap: 8px 14px; padding: 0; }
.directory-compact-grid .field { gap: 4px; margin-bottom: 0; }
.directory-compact-grid .field input,
.directory-compact-grid .field textarea { padding: 7px 9px; min-height: 0; }
.directory-compact-grid .field textarea { min-height: 64px; resize: vertical; }
.directory-detail-actions { justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.directory-command-error { color: var(--red); border-left: 4px solid var(--red); background: var(--red-bg); }
.directory-command-error[hidden] { display: none; }
@media (max-width: 680px) { .directory-compact-grid { grid-template-columns: 1fr; } .directory-inline-detail { padding: 14px; } }
.directory-obsolete-metadata { display: grid; gap: 4px; margin-top: 14px; padding: 12px; background: #f4f1f5; border-radius: 8px; }
.directory-table-wrap { overflow-x: visible; }
.directory-table { width: 100%; min-width: 0; table-layout: fixed; }
.directory-table th,
.directory-table td { padding: 8px 9px; overflow-wrap: anywhere; word-break: break-word; vertical-align: middle; }
.directory-table th:nth-child(1) { width: 22%; }
.directory-table th:nth-child(2) { width: 31%; }
.directory-table th:nth-child(3) { width: 34%; }
.directory-table th:nth-child(4) { width: 13%; }
@media (max-width: 680px) {
  .directory-table thead { display: none; }
  .directory-table,
  .directory-table tbody,
  .directory-table tr,
  .directory-table td { display: block; width: 100%; }
  .directory-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .directory-table td { border: 0; padding: 5px 9px; }
  .directory-detail-row { padding: 0; }
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.private-class-toolbar {
  justify-content: space-between;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  min-width: 190px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
}

.private-reschedule-management-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  container-name: private-reschedule-management;
  container-type: inline-size;
}

.private-reschedule-management-header,
.private-reschedule-management-row {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(115px, .8fr) minmax(165px, 1.1fr) minmax(165px, 1.1fr) minmax(58px, .38fr) minmax(140px, .85fr) minmax(170px, auto);
  gap: 12px;
  align-items: center;
}

.private-reschedule-management-header {
  padding: 10px 12px;
  color: #44515c;
  background: #f8fafb;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.private-reschedule-management-row {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: .9rem;
}

.private-reschedule-management-row > div {
  min-width: 0;
}

.private-reschedule-student,
.private-reschedule-lesson,
.private-reschedule-date,
.private-reschedule-status {
  display: grid;
  gap: 3px;
}

.private-reschedule-management-row .private-reschedule-student {
  margin-top: 0;
}

.private-reschedule-student > strong {
  font-size: .95rem;
  font-weight: 700;
}

.private-reschedule-lesson > span,
.private-reschedule-date > span {
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.3;
}

.private-reschedule-student > span,
.private-reschedule-status > small {
  color: var(--muted);
  font-size: .86rem;
}

.private-reschedule-date > span:last-child {
  color: var(--muted);
}

.private-reschedule-status {
  justify-items: start;
}

.private-reschedule-status .pill {
  width: max-content;
  max-width: 100%;
}

.private-reschedule-type {
  width: max-content;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  color: #52606b;
  background: #eef2f4;
  font-size: .72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.private-reschedule-actions {
  display: grid;
  gap: 6px;
  justify-content: flex-end;
  align-self: start;
}

@container private-reschedule-management (max-width: 1050px) {
  .private-reschedule-management-header {
    display: none;
  }

  .private-reschedule-management-row {
    grid-template-columns: minmax(170px, 1fr) minmax(150px, .85fr) minmax(180px, 1fr);
    grid-template-areas:
      "student lesson status"
      "from to peers"
      "action action action";
    align-items: start;
  }

  .private-reschedule-student { grid-area: student; }
  .private-reschedule-lesson { grid-area: lesson; }
  .private-reschedule-management-row > div:nth-child(3) { grid-area: from; }
  .private-reschedule-management-row > div:nth-child(4) { grid-area: to; }
  .private-reschedule-peers { grid-area: peers; }
  .private-reschedule-status { grid-area: status; }
  .private-reschedule-actions { grid-area: action; }

  .private-reschedule-management-row > div::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    content: attr(data-label);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .private-reschedule-actions {
    display: flex;
  }
}

@container private-reschedule-management (max-width: 640px) {
  .private-reschedule-management-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "student lesson"
      "from to"
      "peers status"
      "action action";
  }
}

@container private-reschedule-management (max-width: 440px) {
  .private-reschedule-management-row {
    grid-template-columns: 1fr;
    grid-template-areas: "student" "lesson" "from" "to" "peers" "status" "action";
  }

  .private-reschedule-actions {
    display: grid;
    justify-content: stretch;
  }

  .private-reschedule-actions .btn {
    width: 100%;
  }
}

.session-number {
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.create-details {
  width: fit-content;
  margin-bottom: 16px;
}

.toolbar .create-details {
  margin: 0;
}

.toolbar-create {
  position: relative;
}

.toolbar-create .create-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 5;
}

.zoom-management-toolbar h2,
.zoom-management-toolbar p,
.zoom-schedule-intro h2,
.zoom-schedule-intro p { margin: 0; }

.zoom-host-list,
.zoom-schedule-hosts,
.zoom-schedule-items { display: grid; gap: 12px; }
.zoom-host-entry { min-width: 0; }

.zoom-host-summary {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(180px, 1.4fr) minmax(130px, .8fr) auto auto;
  align-items: center;
  gap: 14px;
}

.zoom-host-summary h3,
.zoom-schedule-host h3 { margin: 0; }

.zoom-host-summary small,
.zoom-host-summary strong { display: block; }

.zoom-host-card > .zoom-host-summary { cursor: pointer; list-style: none; width: 100%; box-sizing: border-box; min-height: 56px; }
.zoom-host-card > .zoom-host-summary::-webkit-details-marker { display: none; }
.zoom-host-card > .zoom-host-summary:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 4px; }
.zoom-host-card > .zoom-host-summary > * { min-width: 0; overflow-wrap: anywhere; }
.zoom-host-card[open] > .zoom-host-summary .zoom-host-chevron { transform: rotate(180deg); }
.zoom-host-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.zoom-host-header-actions .btn { white-space: normal; }
.zoom-host-panel { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.zoom-host-panel > .actions { margin: 12px 0; }
.zoom-teacher-multiselect { max-width: 420px; }
.zoom-teacher-multiselect > summary { cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.zoom-teacher-multiselect .zoom-teacher-options { display: grid; padding: 10px; max-height: 240px; overflow: auto; }
.zoom-teacher-multiselect:not([open]) > .zoom-teacher-options { display: none; }

.zoom-provider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: .86rem;
  margin-top: 10px;
}
.zoom-provider-ids { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.zoom-provider-meta > *, .zoom-provider-ids > * { min-width: 0; overflow-wrap: anywhere; }
.zoom-provider-ids > span { color: inherit; font: inherit; }

.zoom-host-edit {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.zoom-host-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zoom-host-active { align-self: end; min-height: 42px; }
.zoom-preferred-teachers { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; padding: 12px; }
.zoom-preferred-teachers p { margin: 2px 0 10px; }
.zoom-teacher-options { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.zoom-host-create-panel { width: min(620px, calc(100vw - 48px)) !important; }
.zoom-host-meetings { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.zoom-host-meetings .zoom-existing-meetings { box-shadow: none; margin: 0; }
.zoom-existing-meetings > header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.zoom-schedule-item.zoom-existing-meeting { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 16px 24px; padding: 14px 0; }
.zoom-meeting-identity { min-width: 0; overflow-wrap: anywhere; }
.zoom-meeting-identity > strong, .zoom-meeting-identity > small { display: block; }
.zoom-meeting-identity > small { margin-top: 5px; }
.zoom-meeting-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.zoom-meeting-controls > select { flex: 1 1 160px; min-width: 0; max-width: 280px; }
.zoom-meeting-controls > .btn { flex: 0 1 auto; white-space: normal; }
.zoom-meeting-controls > span { overflow-wrap: anywhere; }

.zoom-schedule-intro { margin-bottom: 16px; }
.zoom-schedule-host { min-width: 0; }
.zoom-schedule-host header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.zoom-schedule-host header small { display: block; }
.zoom-schedule-weekly { min-width: 0; margin: 14px 0; }
.zoom-schedule-weekly h4 { margin: 0 0 8px; }
.zoom-schedule-weekly .availability-wrap { margin-bottom: 0; }
.zoom-schedule-item { display: grid; gap: 3px; border-top: 1px solid var(--line); padding-top: 10px; }
.zoom-schedule-item:first-child { border-top: 0; padding-top: 0; }
.zoom-schedule-item span,
.zoom-schedule-item small { color: var(--muted); }
.zoom-unallocated { margin-top: 16px; }

.zoom-preview { margin-top: 16px; }
.zoom-preview-form { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(135px, .8fr)) auto; gap: 10px; align-items: end; }
.zoom-preview-result { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.zoom-preview-result h3,
.zoom-preview-result p { margin: 0 0 8px; }
.zoom-preview-result ol { margin-bottom: 0; }

@media (max-width: 1000px) {
  .zoom-host-summary { grid-template-columns: minmax(0, 1fr) auto; }
  .zoom-host-summary > :first-child { grid-column: 1; grid-row: 1; }
  .zoom-host-summary > .zoom-host-header-actions { grid-column: 2; grid-row: 1; }
  .zoom-host-summary > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .zoom-host-summary > :nth-child(3) { grid-column: 1; grid-row: 3; }
  .zoom-host-summary > :nth-child(4) { grid-column: 2; grid-row: 3; justify-self: end; }
  .zoom-host-summary .actions { grid-column: 1 / -1; }
  .zoom-host-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zoom-preview-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .zoom-schedule-item.zoom-existing-meeting { grid-template-columns: minmax(0, 1fr); }
  .zoom-meeting-controls { justify-content: flex-start; }
}

@media (max-width: 650px) {
  .zoom-host-form-grid,
  .zoom-preview-form { grid-template-columns: minmax(0, 1fr); }
}

.create-details summary {
  list-style: none;
}

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

.create-details .create-panel {
  width: min(380px, calc(100vw - 48px));
  margin-top: 12px;
  padding: 11px;
  font-size: 0.8rem;
}

.create-details .create-panel h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

.create-panel .field {
  gap: 5px;
  margin-bottom: 9px;
}

.create-panel .field input,
.create-panel .field select,
.create-panel .field textarea {
  padding: 7px 8px;
  font-size: 12px;
}

.create-panel .field label {
  font-size: 10px;
}

.create-panel .btn {
  padding: 8px 10px;
  font-size: 12px;
}

.create-details .student-create-panel {
  width: min(760px, calc(100vw - 48px));
}

.create-details .teacher-create-panel {
  width: min(860px, calc(100vw - 48px));
}

.create-details .private-create-panel {
  width: min(620px, calc(100vw - 48px));
}

.create-details .group-create-panel {
  width: min(520px, calc(100vw - 48px));
}

.group-level-list {
  display: grid;
  gap: 14px;
}

.group-architecture-sections,
.group-architecture-list,
.group-architecture-content,
.draft-term-list,
.historical-term-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.group-class-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.group-section-heading {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #f4f6f8;
  text-align: left;
}

.group-section-heading h2 {
  margin: 0;
  font-size: 17px;
}

.group-section-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.closed-toggle {
  cursor: pointer;
}

.closed-toggle > span:last-child {
  margin-left: auto;
}

.group-architecture-list {
  padding: 10px;
}

.group-architecture-class {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.group-architecture-row {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(110px, .8fr) minmax(180px, 1.1fr) minmax(100px, .7fr) auto 20px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.private-ongoing-row {
  cursor: default;
}

.group-architecture-class.expanded > .group-architecture-row {
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
}

.row-caret {
  color: var(--muted);
  text-align: right;
}

.group-architecture-content {
  width: 100%;
  max-width: 100%;
  padding: 14px;
}

.group-term-area {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.group-term-area + .group-term-area {
  margin-top: 24px;
}

.group-term-area h4 {
  margin: 0;
  font-size: 14px;
}

.group-term-area.current-term {
  border-color: #bddbc9;
  background: #f5fbf7;
  box-shadow: inset 3px 0 0 #9fcbb0;
}

.group-term-area.draft-terms {
  border-color: #cbddeb;
  background: #f6faff;
}

.group-term-area.term-history {
  border-color: #d8dde2;
  background: #f7f8f9;
}

.group-empty-state {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #fafbfc;
}

.group-empty-state p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.group-term-heading,
.group-parent-actions,
.draft-term-actions,
.term-lifecycle-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-term-heading {
  justify-content: space-between;
  margin-bottom: 10px;
}

.group-term-area.draft-terms > .group-term-heading,
.group-term-area.term-history > .group-term-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.group-term-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.term-section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.term-section-pill.active {
  color: #17643b;
  background: #dff2e7;
}

.term-section-pill.planning {
  color: #285f88;
  background: #e1eef8;
}

.term-section-pill.archive {
  color: #5f6973;
  background: #e7eaed;
}

.group-parent-actions,
.draft-term-actions,
.term-lifecycle-actions {
  justify-content: flex-end;
}

.draft-term-card {
  display: grid;
  gap: 4px;
}

.draft-term-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.draft-term-toggle.term-aligned-inline-header {
  grid-template-columns: 207px minmax(0, 1fr) auto 18px;
}

.draft-term-toggle:hover,
.draft-term-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.45);
}

.draft-term-caret {
  justify-self: end;
  padding-right: 2px;
  color: var(--muted);
}

.draft-term-content {
  min-width: 0;
}

.draft-term-toggle .term-aligned-actions {
  align-self: center;
  white-space: nowrap;
}

.draft-term-card + .draft-term-card {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.term-aligned-inline-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 207px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.term-aligned-identity {
  min-height: 34px;
  justify-content: flex-end;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.term-aligned-identity,
.term-aligned-details,
.term-aligned-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-aligned-details {
  display: grid;
  justify-content: start;
  min-width: 0;
  gap: 2px;
}

.term-aligned-details small {
  color: var(--muted);
  font-size: inherit;
}

.term-aligned-actions {
  justify-content: flex-end;
}

.current-term-inline-header .term-aligned-actions {
  min-width: 0;
  flex-wrap: wrap;
}

.current-term-inline-header .term-aligned-actions > .term-primary-actions,
.current-term-inline-header .term-aligned-actions > .term-lifecycle-actions {
  flex-wrap: wrap;
}

.management-current-term-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.draft-term-row,
.historical-term-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, .8fr) minmax(105px, .7fr) minmax(160px, 1.1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: inherit;
}

.draft-term-row {
  grid-template-columns: minmax(140px, 1fr) minmax(120px, .85fr) minmax(180px, 1.15fr) auto;
}

.historical-term-row {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.historical-term-row.term-aligned-inline-header {
  grid-template-columns: 207px minmax(0, 1fr) auto 18px;
  gap: 14px;
}

.historical-term-row.term-aligned-inline-header.with-completed-date {
  grid-template-columns: 207px minmax(0, 1fr) minmax(150px, auto) auto 18px;
}

.historical-term-row .term-aligned-actions {
  align-self: center;
  white-space: nowrap;
}

.historical-term-row .history-ended {
  display: grid;
  justify-content: start;
  gap: 2px;
  color: var(--ink);
  white-space: nowrap;
}

.historical-term-row .history-ended small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.historical-term-row .history-caret {
  justify-self: end;
  padding-right: 2px;
  color: var(--muted);
}

.historical-term {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.historical-term.expanded .historical-term-row {
  background: transparent;
}

.historical-completed-date {
  display: grid;
  gap: 2px;
}

.historical-completed-date small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.historical-term-content {
  padding: 4px 0 0;
  border-top: 0;
  background: transparent;
}

.historical-term-content,
.historical-term-content > .group-class-entry,
.historical-term-content > .private-v2-term-entry,
.historical-term-content .group-timetable-shell,
.historical-term-content .group-timetable-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.historical-term-content .group-timetable-scroll {
  overflow-x: scroll;
  scrollbar-gutter: auto;
}

.historical-term-content .group-timetable-scroll::-webkit-scrollbar {
  height: 10px;
}

.historical-term-content .group-timetable-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef1f3;
}

.historical-term-content .group-timetable-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f3;
  border-radius: 999px;
  background: #b8bdc2;
}

/* Term sections already provide their own visual surface. Keep the timetable's
 * border, but remove the redundant card around Current, Draft, and History. */
.group-term-area .term-timetable-surface {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.draft-term-content > .group-class-entry > .group-entry-actions,
.historical-term-content > .group-class-entry > .group-entry-actions,
.draft-term-content > .private-v2-term-entry > .group-entry-actions,
.historical-term-content > .private-v2-term-entry > .group-entry-actions {
  position: static;
  inset: auto;
  margin: 0 2px 8px;
}

@media (max-width: 900px) {
  .group-architecture-row,
  .draft-term-row {
    grid-template-columns: 1fr 1fr;
  }

  .term-aligned-inline-header {
    grid-template-columns: 1fr auto;
  }

  .draft-term-toggle.term-aligned-inline-header {
    grid-template-columns: 1fr auto;
  }

  .draft-term-toggle .term-aligned-actions {
    grid-column: 2;
    grid-row: 2;
  }

  .term-aligned-identity {
    justify-content: flex-start;
    padding-right: 0;
    border-right: 0;
  }

  .term-aligned-details {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .historical-term-row.term-aligned-inline-header {
    grid-template-columns: 1fr auto 18px;
  }

  .historical-term-row .term-aligned-details {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .historical-term-row .history-ended {
    grid-column: 1;
    grid-row: 3;
  }

  .historical-term-row .term-aligned-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .historical-term-row .history-caret {
    grid-column: 3;
    grid-row: 1;
  }

  .group-architecture-row .row-caret {
    grid-column: 2;
  }
}

.group-level-card {
  display: grid;
  gap: 10px;
  padding-top: 0;
  overflow: hidden;
}

.group-level-card h2 {
  margin: 0 -14px 2px;
  padding: 10px 14px;
  background: #f4f6f8;
  border-bottom: 1px solid var(--line);
}

.group-course-block {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.group-course-block h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.group-class-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.group-teacher-class-card + .group-teacher-class-card {
  margin-top: 10px;
}

.student-group-sections,
.student-catalogue-list {
  display: grid;
  gap: 12px;
}

/* Keep the Student Private accordion on the available content track. The
 * timetable grid retains its intrinsic width and the existing timetable
 * scroll wrapper owns the horizontal overflow. */
.student-group-sections,
.student-group-sections > section,
.student-private-term-card,
.student-private-term-card .teacher-group-expanded,
.student-private-term-card .private-portal-term-entry,
.student-private-term-card .group-timetable-shell,
.student-private-term-card .group-timetable-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.student-private-term-card .group-timetable-scroll {
  overflow-x: scroll;
  scrollbar-gutter: auto;
}

.private-portal-term-history {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 16px;
}

.private-portal-term-history .historical-term-list,
.private-portal-term-history .historical-term,
.private-portal-term-history .historical-term-row,
.private-portal-term-history .historical-term-content,
.private-portal-history-entry,
.private-portal-history-entry .group-timetable-shell,
.private-portal-history-entry .group-timetable-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.student-group-sections > section + section {
  margin-top: 10px;
}

.student-group-term-card + .student-group-term-card {
  margin-top: 10px;
}

.student-catalogue-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.25fr) minmax(120px, .8fr) minmax(130px, .9fr) auto;
  align-items: center;
  gap: 12px;
}

.student-catalogue-row > span {
  display: grid;
  gap: 2px;
}

.student-catalogue-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.student-catalogue-row strong {
  font-size: 13px;
}

.student-class-empty {
  color: var(--muted);
}

.teacher-group-summary {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(120px, .75fr) minmax(230px, 1.45fr) minmax(190px, 1.25fr) minmax(68px, .35fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.teacher-group-summary > span:not(.teacher-group-caret) {
  display: grid;
  gap: 2px;
}

/* No reserved special-lessons column on an empty Private summary. */
.teacher-group-summary.private-teacher-summary:not(.has-special-lessons) {
  grid-template-columns: minmax(120px, .75fr) minmax(230px, 1.45fr) minmax(68px, .35fr) 18px;
}

.teacher-summary-specials { min-width: 0; }
.teacher-summary-specials .teacher-special-lesson { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: var(--font-secondary, 12px); line-height: 1.4; }

.teacher-group-caret {
  color: var(--muted);
  text-align: right;
}

.student-profile-class-history {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.student-profile-history-section,
.student-profile-history-list,
.student-profile-history-class,
.student-profile-history-class-terms,
.student-profile-history-term,
.student-profile-history-timetable,
.student-profile-history-timetable .group-timetable-shell,
.student-profile-history-timetable .group-timetable-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.student-profile-history-section,
.student-profile-history-list {
  display: grid;
  gap: 12px;
}

/* A colspan cell otherwise contributes the timetable grid's max-content width
 * to the parent Student table. Constrain that contribution so the timetable's
 * own viewport—not the page or outer Student table—owns horizontal scrolling. */
.student-profile-expanded-cell {
  width: 100%;
  max-width: 0;
  overflow: hidden;
}

.student-profile-history-class {
  margin: 0;
  padding: 14px;
}

.student-profile-history-summary {
  grid-template-columns: minmax(150px, 1.15fr) minmax(130px, .8fr) minmax(190px, 1.15fr) minmax(130px, .8fr) minmax(90px, .55fr) 18px;
  cursor: pointer;
}

.student-profile-history-summary:not(.has-completion) {
  grid-template-columns: minmax(150px, 1.15fr) minmax(130px, .8fr) minmax(190px, 1.15fr) minmax(90px, .55fr) 18px;
}

.student-profile-history-class.expanded {
  border-color: #cfdde8;
}

.student-profile-history-class-terms {
  display: grid;
  gap: 22px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.student-profile-history-term + .student-profile-history-term {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.student-profile-history-term-heading {
  margin-bottom: 10px;
}

.student-profile-history-term-heading > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
}

.student-profile-history-term-heading small {
  color: var(--muted);
}

.student-profile-history-timetable {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.student-profile-history-timetable .group-timetable-shell {
  margin-top: 0;
}

.student-profile-history-timetable .group-timetable-scroll {
  overflow-x: scroll;
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: touch;
}

.student-profile-history-timetable .group-timetable-scroll::-webkit-scrollbar {
  height: 10px;
}

.student-profile-history-timetable .group-timetable-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef1f3;
}

.student-profile-history-timetable .group-timetable-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f3;
  border-radius: 999px;
  background: #b8bdc2;
}

.student-history-unavailable {
  margin: 0;
}

.teacher-group-expanded {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.teacher-current-term-card {
  padding: 12px;
  border: 1px solid #cfe3d5;
  border-radius: 8px;
  background: #f7fcf8;
}

.teacher-current-term-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.teacher-current-term-heading h2 {
  margin: 0;
  font-size: 15px;
}

.student-my-group-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr) minmax(0, 1fr) 18px;
  align-items: start;
  column-gap: clamp(10px, 1.5vw, 18px);
}

.student-my-group-summary > span:not(.teacher-group-caret) {
  min-width: 0;
  align-content: start;
}

.student-my-group-summary span > small:last-child:not(:first-child) {
  line-height: 1.3;
}

.student-my-group-summary .student-summary-date,
.student-my-group-summary .student-summary-time {
  display: block;
}

@media (max-width: 900px) {
  .student-my-group-summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .student-my-group-summary > span:not(.teacher-group-caret) {
    grid-column: 1;
  }

  .student-my-group-summary .teacher-group-caret {
    grid-column: 2;
    grid-row: 1 / span 5;
  }
}

@media (max-width: 760px) {
  .teacher-group-summary {
    grid-template-columns: 1fr 18px;
  }

  .teacher-group-summary.private-teacher-summary:not(.has-special-lessons) {
    grid-template-columns: 1fr 18px;
  }

  .private-teacher-summary:not(.has-special-lessons) > .teacher-group-caret {
    grid-row: 1 / span 3;
  }

  .teacher-group-summary > span:not(.teacher-group-caret) {
    grid-column: 1;
  }

  .teacher-group-caret {
    grid-column: 2;
    grid-row: 1 / span 4;
  }

  .student-profile-history-summary {
    grid-template-columns: 1fr 18px;
  }

  .student-profile-history-summary:not(.has-completion) {
    grid-template-columns: 1fr 18px;
  }

  .student-profile-history-summary .teacher-group-caret {
    grid-row: 1 / span 5;
  }

  .student-my-group-summary {
    grid-template-columns: 1fr 18px;
  }

  .student-my-group-summary .teacher-group-caret {
    grid-row: 1 / span 5;
  }

  .student-catalogue-row {
    grid-template-columns: 1fr 1fr;
  }
}

.group-entry-actions {
  grid-column: 2;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.group-save-error {
  margin: 0 12px 8px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
}

.compact-term-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.term-primary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-term-actions > .term-lifecycle-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.private-v2-class .historical-term.private-history-editing .private-v2-term-entry.group-class-entry > .group-class-info {
  padding-right: 0;
}

.private-v2-class .historical-term.private-history-editing .private-v2-term-entry.group-class-entry > .group-entry-actions {
  position: static;
  inset: auto;
  max-width: none;
  margin: 0;
}

.group-class-info {
  min-width: 0;
}

.group-class-readonly {
  display: grid;
  gap: 2px;
}

.group-class-readonly span {
  color: var(--muted);
}

.group-class-edit-fields {
  display: grid;
  width: min(100%, 450px);
  gap: 7px;
}

.group-edit-field-row {
  display: grid;
  gap: 7px;
}

.group-edit-primary-row {
  grid-template-columns: minmax(210px, 1.2fr) minmax(170px, 1fr);
}

.group-edit-schedule-row {
  grid-template-columns: minmax(115px, 1.15fr) repeat(3, minmax(80px, .85fr));
}

.group-edit-schedule-row.with-start-date {
  grid-template-columns: minmax(120px, 1.1fr) minmax(95px, .9fr) repeat(3, minmax(70px, .75fr));
}

.group-edit-schedule-summary {
  grid-template-columns: minmax(125px, 1.25fr) minmax(95px, .8fr) minmax(85px, .75fr);
}

.group-weekly-edit {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}

.group-weekly-edit-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.group-weekly-edit-row {
  display: grid;
  grid-template-columns: 66px minmax(110px, 1.2fr) minmax(78px, .8fr) minmax(78px, .8fr);
  gap: 7px;
  align-items: end;
}

.group-weekly-edit-row > strong {
  align-self: center;
  font-size: 12px;
  white-space: nowrap;
}

.group-course-edit-field small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.group-class-edit-fields .field,
.group-zoom-edit .field {
  gap: 3px;
  margin: 0;
}

.group-class-edit-fields label,
.group-zoom-edit label {
  color: #52606c;
  font-size: 10px;
  font-weight: 700;
}

.group-class-edit-fields select,
.group-class-edit-fields input,
.group-zoom-edit input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  height: 31px;
  padding: 3px 6px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
}

.completed-term-delete-dialog {
  width: min(500px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
}

.completed-term-delete-dialog h2,
.completed-term-delete-dialog dl,
.completed-term-delete-dialog p {
  margin: 0;
}

.completed-term-delete-dialog dl {
  display: grid;
  gap: 6px;
}

.completed-term-delete-dialog dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}

.completed-term-delete-dialog dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.completed-term-delete-dialog dd {
  margin: 0;
}

.completed-term-delete-dialog .delete-warning {
  padding: 10px;
  border: 1px solid #efc0c4;
  border-radius: 6px;
  color: #84232c;
  background: #fff4f5;
  font-size: 12px;
}

.delete-class-dialog textarea {
  min-height: 88px;
  resize: vertical;
}

.group-class-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(120px, .85fr)) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.group-management-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(105px, .82fr) minmax(105px, .82fr) minmax(95px, .72fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.private-management-toolbar {
  grid-template-columns: minmax(150px, 1.25fr) repeat(4, minmax(100px, .82fr)) auto auto auto;
}

.group-management-toolbar .group-class-filter-bar {
  display: contents;
}

.group-management-toolbar .group-class-filter-bar input,
.group-management-toolbar .group-class-filter-bar select,
.group-management-toolbar .group-class-filter-bar > .btn {
  height: 34px;
  min-width: 0;
  padding: 5px 8px;
  font-size: 13px;
}

.group-management-toolbar .toolbar-create > summary {
  min-width: 138px;
  min-height: 34px;
  padding: 7px 11px;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .group-management-toolbar {
    grid-template-columns: minmax(135px, 1.25fr) repeat(3, minmax(100px, 1fr));
  }

  .private-management-toolbar {
    grid-template-columns: minmax(135px, 1.25fr) repeat(4, minmax(100px, 1fr));
  }

  .group-management-toolbar .group-class-filter-bar > .btn {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .group-management-toolbar .group-class-filter-count {
    grid-column: 2 / span 2;
    grid-row: 2;
    justify-self: start;
  }

  .group-management-toolbar .toolbar-create {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
  }

  .private-management-toolbar .toolbar-create {
    grid-column: 5;
  }
}

.group-class-filter-bar input,
.group-class-filter-bar select {
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
}

.group-class-filter-count {
  color: var(--muted);
  white-space: nowrap;
}

.group-class-filter-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.group-class-filter-empty p {
  margin: 0;
}

@media (max-width: 760px) {
  .group-management-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-management-toolbar .group-class-filter-bar input {
    grid-column: 1 / -1;
  }

  .group-management-toolbar .group-class-filter-bar > .btn,
  .group-management-toolbar .group-class-filter-count,
  .group-management-toolbar .toolbar-create {
    grid-row: auto;
  }

  .group-management-toolbar .group-class-filter-bar > .btn { grid-column: 1; }
  .group-management-toolbar .group-class-filter-count { grid-column: 2; }
  .group-management-toolbar .toolbar-create { grid-column: 2; justify-self: end; }

  .group-class-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .group-class-filter-bar input {
    grid-column: 1 / -1;
  }

  .group-edit-primary-row,
  .group-edit-schedule-row,
  .group-edit-schedule-row.with-start-date,
  .group-edit-schedule-summary {
    grid-template-columns: 1fr 1fr;
  }

  .group-weekly-edit-row {
    grid-template-columns: 58px minmax(100px, 1fr) minmax(72px, .75fr) minmax(72px, .75fr);
  }

  .group-class-entry.editing {
    grid-template-columns: minmax(0, 1fr);
  }

  .group-class-entry.editing .group-entry-actions {
    grid-column: 1;
    justify-content: flex-start;
    align-items: flex-start;
  }
}

.group-zoom-details {
  position: relative;
}

.group-zoom-details summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.group-edit-btn {
  width: fit-content;
}

.group-zoom-details summary::-webkit-details-marker {
  display: none;
}

.zoom-info-grid {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  width: min(520px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}

.zoom-info-grid div {
  display: grid;
  gap: 3px;
}

.zoom-info-grid strong {
  color: #44515c;
  font-size: 11px;
  text-transform: uppercase;
}

.zoom-info-grid span {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.group-timetable-shell {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-y: hidden;
  background: #fff;
}

.group-timetable-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 5px 8px;
  border-bottom: 1px solid #d8dde3;
  color: #66717c;
  background: #f8fafb;
  font-size: 11px;
}

.group-timetable-scroll {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

/* The catalogue opts into a DOM scrollbar so Safari/macOS native scrollbar
 * auto-visibility cannot delay the only visible horizontal affordance. The
 * timetable viewport above remains the single scrollLeft authority. */
.group-timetable-persistent-scroll-enabled {
  scrollbar-width: none;
}

.group-timetable-scroll.group-timetable-persistent-scroll-enabled::-webkit-scrollbar {
  height: 0;
}

.group-timetable-persistent-scrollbar {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 5px 8px;
  border-top: 1px solid #d8dde3;
  background: #f8fafb;
  cursor: pointer;
  touch-action: none;
}

.group-timetable-persistent-scrollbar[hidden] {
  display: none;
}

.group-timetable-persistent-scrollbar:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.group-timetable-persistent-scrollbar-track {
  position: relative;
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e3e7ea;
}

.group-timetable-persistent-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  box-sizing: border-box;
  min-width: 32px;
  height: 10px;
  border: 2px solid #e3e7ea;
  border-radius: 999px;
  background: #8d969e;
  cursor: grab;
  will-change: transform;
}

.group-timetable-persistent-scrollbar-thumb:active {
  cursor: grabbing;
}

/* Current Group timetables use the same visible native scrollbar treatment
 * as the proven Private timetable viewport. Keep overflow conditional so a
 * timetable that fits does not gain an unnecessary horizontal scrollbar. */
.group-current-timetable-scroll::-webkit-scrollbar,
.teacher-availability-wrap::-webkit-scrollbar {
  height: 10px;
}

.group-current-timetable-scroll::-webkit-scrollbar-track,
.teacher-availability-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef1f3;
}

.group-current-timetable-scroll::-webkit-scrollbar-thumb,
.teacher-availability-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f3;
  border-radius: 999px;
  background: #b8bdc2;
}

.group-timetable-grid {
  display: grid;
  width: max-content;
  min-width: 100%;
  color: #171717;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.group-grid-cell {
  min-width: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-right: 1px solid #d9dde1;
  border-bottom: 1px solid #d9dde1;
  background: #fff;
  text-align: center;
}

.group-grid-cell.frozen-index,
.group-grid-cell.frozen-label {
  position: sticky;
  z-index: 3;
  background: #fff;
}

.group-grid-cell.frozen-index {
  left: 0;
}

.group-grid-cell.frozen-label {
  left: 27px;
  z-index: 4;
  box-shadow: 1px 0 0 #c6cbd1;
}

.group-grid-cell.row-label {
  justify-content: flex-end;
  padding-right: 10px;
  font-weight: 650;
}

.group-parent-identity {
  display: grid;
  gap: 2px;
}

.group-parent-identity small,
.closed-class-date {
  color: var(--muted);
  font-size: 10px;
}

.group-parent-status {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.group-class-action-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.group-class-section:has(.class-action-menu-popover),
.group-architecture-class:has(.class-action-menu-popover) {
  position: relative;
  z-index: 150;
  overflow: visible;
}

.class-action-menu-trigger {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.class-action-menu-dismiss {
  position: fixed;
  inset: 0;
  z-index: 150;
  border: 0;
  background: transparent;
  cursor: default;
}

.class-action-menu-popover {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 151;
  min-width: 130px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .16);
}

.class-action-menu-item {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 8px 10px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.class-action-menu-item.danger {
  color: var(--brand);
}

.class-action-menu-item:hover {
  background: var(--soft);
}

.group-grid-cell.session-meta-cell {
  background: #fff2cc;
  font-weight: 500;
}

.group-grid-cell.management-note-spacer,
.group-grid-cell.management-note-label,
.group-grid-cell.management-session-note-cell,
.group-grid-cell.management-note-intersection {
  min-height: 30px;
  padding: 2px 4px;
  background: #f7f9fb;
}

.group-grid-cell.management-column-header {
  font-size: 11px;
  font-weight: 700;
}

.management-note-cell {
  min-height: 24px;
  font-size: 11px;
}

.complete-term-grid-button {
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.group-grid-cell.date-cell,
.group-grid-cell.session-number-cell {
  min-height: 28px;
}

.group-grid-cell.date-cell.effective-date-cell,
.group-grid-cell.date-cell.schedule-marker-date-cell {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.group-grid-cell.date-cell.spmk-date-cell,
.group-grid-cell.date-cell.trial-date-cell {
  position: relative;
  z-index: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.group-grid-cell.date-cell.spmk-date-cell > *,
.group-grid-cell.date-cell.trial-date-cell > * {
  display: block;
  width: 100%;
  text-align: center;
}

.group-activity-header {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  line-height: 1.15;
}

.group-activity-type,
.group-activity-date,
.group-activity-time {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.group-activity-time {
  font-size: 10px;
  font-weight: 500;
}

.group-timetable-date-action {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  padding: 3px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.group-timetable-date-action:hover,
.group-timetable-date-action:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.58);
  outline: none;
}

.group-timetable-date-action:focus-visible {
  box-shadow: 0 0 0 2px rgba(181, 35, 47, 0.2);
}

.group-roster-student { display: flex; min-width: 0; flex-direction: column; gap: 2px; text-align: left; }
.group-roster-student small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.trial-only-student { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 6px; }
.trial-only-student small { grid-column: 1 / -1; }
.trial-badge { color: #c62828; font-size: .66rem; font-weight: 800; letter-spacing: .06em; }
.trial-index,.trial-student-name,.trial-attendance-cell { background: #fff8f8; }
.trial-neutral-cell { color: var(--muted); }
.group-roster-action { width: 100%; min-height: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 0; color: inherit; cursor: pointer; }
.group-roster-action:focus-visible { border-radius: 4px; outline: 2px solid rgba(181, 35, 47, 0.45); outline-offset: 2px; }
.group-assign-student-button { width: 100%; }
.authoritative-student-assignment-dialog { width: min(560px, calc(100vw - 32px)); }
.student-assignment-candidates { max-height: 220px; overflow: auto; display: grid; gap: 6px; margin: 10px 0 14px; }
.student-assignment-candidate { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--border, #d8dee8); border-radius: 8px; background: var(--surface, #fff); padding: 9px 10px; text-align: left; cursor: pointer; }
.student-assignment-candidate.selected { border-color: var(--primary, #2457d6); box-shadow: 0 0 0 1px var(--primary, #2457d6); }
.student-assignment-candidate small { color: var(--muted); }
.student-assignment-profile { border-radius: 8px; background: #f6f8fb; padding: 10px; }
.dropped-students-section { margin: 10px 0 0; border: 1px solid var(--border, #d8dee8); border-radius: 8px; padding: 8px 10px; }
.dropped-students-section summary { cursor: pointer; font-weight: 650; }
.dropped-students-section p { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; }
.dropped-students-section span { color: var(--muted); }

.group-schedule-staged-pill {
  display: inline-flex;
  width: max-content;
  padding: 1px 5px;
  border-radius: 999px;
  color: #805b08;
  background: #fff0bd;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}

.session-substitute-indicator {
  display: block;
  width: 100%;
  margin: 0 0 2px;
  color: #24734d;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.session-substitute-date-stack {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.session-substitute-date-stack .session-date-label {
  display: block;
  width: 100%;
  text-align: center;
}

.substitute-teacher-summary {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.substitute-teacher-summary div {
  display: grid;
  gap: 0.15rem;
}

.substitute-teacher-summary dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.substitute-teacher-summary dd {
  margin: 0;
}

.group-schedule-marker-tooltip {
  display: grid;
  width: 100%;
  justify-items: center;
  outline-offset: 2px;
}

.group-schedule-readonly-time {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--soft);
}

.group-activity-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  pointer-events: none;
}

.group-activity-action-popover {
  position: fixed;
  z-index: 1;
  width: 168px;
  pointer-events: auto;
}

.group-grid-cell.date-cell.effective-date-cell .effective-session-schedule,
.group-grid-cell.date-cell.effective-date-cell .session-date-label,
.group-grid-cell.date-cell.schedule-marker-date-cell .schedule-marker-label,
.group-grid-cell.date-cell.schedule-marker-date-cell .session-date-label {
  display: block;
  width: 100%;
  text-align: center;
}

.group-grid-cell.makeup-cell {
  min-height: 30px;
  user-select: none;
}

.makeup-toggle {
  width: 100%;
  align-self: stretch;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  background: transparent;
  font: inherit;
}

.makeup-toggle.makeup-yes {
  color: #e21919;
}

.group-grid-cell.student-index {
  font-size: 13px;
}

.group-grid-cell.student-name {
  min-height: 36px;
  display: grid;
  justify-items: stretch;
  align-content: center;
  gap: 1px;
  text-align: left;
}

.group-grid-cell.student-name small {
  color: #68737d;
  font-size: 11px;
  line-height: 1.15;
}

/* Keep cell whitespace inside each enrolled/Trial Student's semantic menu button.
   Grid align-content:center otherwise leaves a content-height button, and
   cell padding itself is outside the button's pointer/keyboard hit area. */
.group-grid-cell.student-name.group-roster-action-cell {
  display: flex;
  align-items: stretch;
  padding: 0;
}

.group-roster-action-cell > .group-roster-action {
  flex: 1;
  min-height: 0;
  padding: 2px 4px;
}

/* Group timetable presentation only; empty Assign Student cells are excluded. */
.group-student-identity-cell > .group-roster-action { justify-content: center; }
.group-student-identity-cell .group-roster-student {
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}
.group-student-identity-cell .trial-only-student {
  grid-template-columns: minmax(0, auto) auto;
  justify-content: center;
}

.group-timetable-grid input,
.group-timetable-grid select,
.group-timetable-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 3px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: center;
}

.group-timetable-grid input,
.group-timetable-grid select {
  min-height: 24px;
}

.group-grid-cell.session-meta-cell input,
.group-grid-cell.session-number-cell {
  font-weight: 600;
}

.group-timetable-grid input:hover,
.group-timetable-grid select:hover,
.group-timetable-grid textarea:hover,
.group-timetable-grid input:focus,
.group-timetable-grid select:focus,
.group-timetable-grid textarea:focus {
  border-color: #c8a63d;
  outline: none;
  background: #fffdf5;
}

.group-timetable-grid .group-student-select {
  min-height: 20px;
  padding: 1px 2px;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

.app-compact-shell .group-timetable-grid.group-timetable-grid .attendance-select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  min-height: calc(32px / var(--timetable-scale, 1));
  padding: calc(2px / var(--timetable-scale, 1)) calc(12px / var(--timetable-scale, 1)) calc(2px / var(--timetable-scale, 1)) calc(2px / var(--timetable-scale, 1));
  font-size: calc(16px / var(--timetable-scale, 1));
  line-height: 1.2;
  border: 1px solid #b6bec6;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #52616b 50%), linear-gradient(135deg, #52616b 50%, transparent 50%);
  background-position: right calc(6px / var(--timetable-scale, 1)) center, right calc(3px / var(--timetable-scale, 1)) center;
  background-size: calc(3px / var(--timetable-scale, 1)) calc(3px / var(--timetable-scale, 1));
  background-repeat: no-repeat;
  cursor: pointer;
}
.group-timetable-grid .attendance-select:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.group-timetable-grid .attendance-select:disabled { cursor: default; opacity: .65; }
.attendance-control:has(.attendance-select) { gap: 2px; }
.attendance-control:has(.attendance-select) .attendance-note-button { position: static; transform: none; }

.attendance-control {
  position: relative;
  width: 100%;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.homework-status-cell-marker {
  position: absolute;
  left: 1px;
  bottom: 0;
  z-index: 1;
  display: block;
  color: #08783f;
  background: rgba(232, 246, 238, .94);
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.1px;
  white-space: nowrap;
  pointer-events: none;
}

.attendance-note-button {
  position: absolute;
  right: 1px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #b6bec6;
  border-radius: 3px;
  padding: 0;
  cursor: pointer;
  color: #4e5d6b;
  background: #fff;
  font-size: 12px;
  line-height: 1;
}

.attendance-control.has-homework-status .student-makeup-cell-status {
  position: absolute;
  left: 1px;
  top: 0;
  margin: 0;
}

.attendance-note-button:hover,
.attendance-note-button.has-note {
  border-color: #8b7224;
  color: #6d570f;
  background: #fff2cc;
}

.attendance-read-only {
  display: block;
  min-width: 0;
  text-align: center;
}

.read-only-student {
  font-size: 13px;
  text-align: center;
}

.session-text-cell.read-only {
  cursor: pointer;
}

.session-text-cell.read-only:hover,
.session-text-cell.read-only:focus {
  border-color: transparent;
  background: #f8fafb;
}

.session-text-cell.admin-view-only,
.session-text-cell.admin-view-only:hover,
.session-text-cell.admin-view-only:focus {
  cursor: default;
  border-color: transparent;
  background: transparent;
}

.read-only-note {
  min-height: 100px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  white-space: pre-wrap;
}

.attendance-note-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
}

.attendance-note-backdrop:has(.close-class-dialog) {
  z-index: 200;
}

.attendance-note-dialog {
  width: min(420px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d4d9de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
}

.attendance-note-dialog h2 {
  margin: 0;
  font-size: 18px;
}

.group-activity-dialog {
  box-sizing: border-box;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}

.group-activity-dialog > h2 {
  flex: none;
}

.group-activity-dialog-body {
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  padding: 2px 4px 24px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.attendance-note-dialog .group-activity-context {
  margin: 0;
  line-height: 1.35;
}

.group-activity-dialog > .attendance-note-actions {
  padding-top: 2px;
}

/* Same bounded activity modal shell; long hours choices cannot widen it. */
.spmk-reschedule-dialog { width: min(460px, calc(100vw - 40px)); min-width: 0; }
.spmk-reschedule-dialog .group-activity-dialog-body { overflow-x: hidden; gap: 8px; padding-bottom: 8px; }
.spmk-reschedule-dialog .spmk-reschedule-fields,
.spmk-reschedule-dialog fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.spmk-reschedule-dialog :is(.field, label, fieldset > p) { min-width: 0; overflow-wrap: anywhere; }
.spmk-reschedule-dialog label { display: grid; gap: 4px; }
.spmk-reschedule-dialog input[type="checkbox"] { width: auto; min-height: 0; }
.spmk-reschedule-dialog :is(input:not([type="checkbox"]), select, textarea) { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font: inherit; }
.spmk-reschedule-dialog :is(input:not([type="checkbox"]), select) { min-height: 32px; height: 32px; padding: 4px 6px; }
.spmk-reschedule-dialog textarea { min-height: 64px; }
.spmk-reschedule-dialog .attendance-note-actions { flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 600px) {
  .spmk-reschedule-dialog :is(input:not([type="checkbox"]), select, textarea) { font-size: 16px; }
  .spmk-reschedule-dialog :is(input:not([type="checkbox"]), select, .btn) { min-height: 40px; }
}

.group-activity-date-selector {
  position: relative;
}

.group-activity-date-trigger {
  width: 100%;
  min-height: 42px;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.group-activity-date-trigger.has-value { color: var(--ink); }
.group-activity-date-trigger:focus-visible {
  border-color: #9b7b20;
  outline: 2px solid #fff2cc;
}

.group-activity-calendar {
  position: fixed;
  z-index: 130;
  width: min(280px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  overflow-y: auto;
}

.group-activity-calendar-header {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  text-align: center;
}

.group-activity-calendar-header button,
.group-activity-calendar-day,
.group-activity-calendar-clear {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.group-activity-start-time-field {
  align-self: start;
}

.group-activity-start-time-options {
  min-height: 0;
  max-height: 230px;
  gap: 4px;
  padding: 6px;
}

.group-activity-start-time-options .private-reschedule-availability-slot {
  min-height: 34px;
  padding: 6px 10px;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.group-activity-start-time-empty {
  min-height: 42px;
  display: flex;
  align-items: center;
}

.group-activity-date-trigger,
.group-activity-start-time-empty {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font: inherit;
}

.group-activity-calendar-header button { height: 32px; font-size: 22px; }
.group-activity-calendar-header button:hover,
.group-activity-calendar-day:hover { background: var(--surface-soft); }

.group-activity-calendar-weekdays,
.group-activity-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 2px;
}

.group-activity-calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.group-activity-calendar-day { min-height: 30px; }
.group-activity-calendar-day.is-today { box-shadow: inset 0 0 0 1px var(--brand); }
.group-activity-calendar-day.is-selected {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.group-activity-calendar-day.is-selected:hover { background: var(--brand); }
.group-activity-calendar-clear {
  justify-self: end;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 12px;
}

.attendance-note-dialog p {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.attendance-note-dialog textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  font: inherit;
}

.attendance-note-dialog textarea:focus {
  border-color: #9b7b20;
  outline: 2px solid #fff2cc;
}

.spmk-student-grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 10px 20px;
  justify-content: start;
}

.spmk-student-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
  white-space: nowrap;
}

.spmk-student-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.trial-student-selector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trial-student-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 32px;
  margin-bottom: 10px;
}

.trial-student-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  white-space: nowrap;
}

.trial-student-chip button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.trial-student-chip button:hover { background: var(--border); }
.trial-student-search-label { display: grid; gap: 6px; }

.trial-student-results {
  display: grid;
  gap: 5px;
  max-height: 150px;
  margin-top: 7px;
  overflow-y: auto;
}

.trial-student-results button {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.trial-student-results button:hover { background: var(--surface-soft); }

@media (max-width: 640px) {
  .spmk-student-grid {
    grid-template-columns: repeat(2, max-content);
  }
}

@media (max-width: 420px) {
  .spmk-student-grid {
    grid-template-columns: max-content;
  }
}

.attendance-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.group-grid-cell.editable-footer {
  min-height: 32px;
  align-items: stretch;
}

.group-grid-cell.footer-label {
  justify-content: center;
  padding-right: 4px;
}

.group-grid-cell.homework-cell,
.group-grid-cell.note-cell {
  min-height: 40px;
}

.session-text-cell {
  width: 100%;
  min-height: 30px;
  max-height: 34px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 2px 3px;
  cursor: pointer;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
}

.session-text-cell:hover,
.session-text-cell:focus {
  border-color: #c8a63d;
  outline: none;
  background: #fffdf5;
}

.session-text-placeholder {
  color: #929ba3;
  font-size: 10px;
}

.group-timetable-grid textarea {
  resize: vertical;
  min-height: 32px;
  line-height: 1.15;
}

.material-actions {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto;
  place-items: center;
  gap: 1px 5px;
}

.material-upload {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.material-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.material-upload span {
  color: #3365a3;
  font-size: 10px;
  white-space: nowrap;
}

.material-upload:hover span {
  text-decoration: underline;
}
.shared-upload-area { max-width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; gap: 4px; border: 1px dashed var(--line); border-radius: var(--radius-control); background: rgba(255,255,255,.55); }
.shared-upload-area:focus-visible, .shared-upload-area.drag-active { outline: 2px solid var(--red); outline-offset: 2px; background: #fff8f8; }
#shared-window-drop-overlay { position: fixed; inset: 8px; z-index: 100000; display: grid; place-items: center; padding: 20px; border: 2px dashed var(--red); border-radius: 12px; background: rgba(255,250,250,.88); color: var(--red); font-size: 18px; text-align: center; pointer-events: none; }
.shared-window-drop-selection { position: fixed; right: 12px; bottom: 12px; z-index: 100001; width: min(420px, calc(100vw - 24px)); max-height: 40vh; overflow: auto; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 4px 20px #0002; font-size: 13px; overflow-wrap: anywhere; }
.shared-window-drop-selection p { margin: 0 0 8px; }
.shared-window-drop-selection button { margin: 3px; white-space: normal; max-width: 100%; }
.shared-upload-area :is(.shared-upload-hint,.shared-upload-status) { font-size: 12px; font-weight: 400; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.shared-upload-status { color: var(--muted); }
.shared-upload-status[role=alert] { color: var(--red); }
.application-loading-overlay { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; padding: 20px; background: rgba(25,39,50,.55); }
.application-loading-content { display: grid; justify-items: center; gap: 12px; color: #fff; font-size: 14px; }
.application-loading-content img { width: 76px; height: 76px; object-fit: contain; border-radius: 8px; }
.application-loading-spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: application-loading-spin .8s linear infinite; }
@keyframes application-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .application-loading-spinner { animation: none; border-top-color: var(--red); } }
@media (max-width: 768px) { .app-compact-shell .group-timetable-grid.group-timetable-grid .attendance-select { min-height: calc(44px / var(--timetable-scale, 1)); } }

.material-file-name {
  grid-column: 1 / -1;
  max-width: 96px;
  overflow: hidden;
  color: #66717c;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-download {
  padding: 0;
  border: 0;
  background: transparent;
  color: #3365a3;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.material-download:hover {
  text-decoration: underline;
}

.material-download.disabled {
  color: #929ba3;
  cursor: not-allowed;
  pointer-events: none;
}

.material-file-row,
.template-material-file { display: flex; align-items: center; gap: 5px; min-width: 0; flex-wrap: wrap; }
.material-remove { appearance: none; border: 0; background: transparent; color: var(--red); padding: 0; font: inherit; font-size: 11px; cursor: pointer; }
.materials-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.materials-tab { appearance: none; border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 10px 16px; color: var(--muted); font: inherit; font-weight: 750; cursor: pointer; }
.materials-tab.active { color: var(--red); border-bottom-color: var(--red); }
.materials-empty { padding: 28px; }
.group-template-level + .group-template-level { margin-top: 24px; }
.group-template-level > h2 { margin-bottom: 10px; }
.group-course-template + .group-course-template { margin-top: 12px; }
.template-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.template-heading h3 { margin: 0; }
.template-grid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.template-grid { display: grid; grid-template-columns: 63px repeat(12, minmax(69px, 1fr)); min-width: 891px; }
.template-cell { min-height: 21px; padding: 3px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.template-session-heading,
.template-label { display: flex; align-items: center; justify-content: center; font-weight: 750; background: #f7f9fb; }
.template-content textarea { width: 100%; min-height: 24px; resize: vertical; padding: 2px 3px; font: inherit; }
.template-material-list { display: grid; gap: 6px; }
.template-material-file > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 105px; }
.template-conflict-dialog { width: min(560px, calc(100vw - 32px)); background: white; border-radius: 12px; padding: 22px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25); }
.template-conflict-dialog h2 { margin-top: 0; }
.template-conflict-options { display: grid; gap: 8px; margin-top: 18px; }

.homework-attachments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.homework-attachment-list {
  display: grid;
  gap: 6px;
}

.homework-attachment {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, auto);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.homework-attachment > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homework-attachment-upload {
  justify-self: start;
}

.homework-file-count {
  display: block;
  margin-top: 2px;
  color: #53687a;
  font-size: 10px;
  line-height: 1;
}

.form-section-title {
  margin: 11px 0 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: #33404a;
  font-size: 10px;
  font-weight: 800;
  grid-column: 1 / -1;
}

.private-student-selectors {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.private-v2-list {
  padding: 0;
  overflow: visible;
}

.private-v2-list > h2 {
  padding: 16px 18px 10px;
  margin: 0;
}

.private-v2-rows {
  display: grid;
  gap: 12px;
  padding: 0 12px 14px;
  min-width: 0;
}

/*
 * Keep the Private architecture wrappers inside the available page track.
 * The timetable grid intentionally keeps its intrinsic width; its existing
 * scroll wrapper, rather than an ancestor, must own the horizontal overflow.
 */
.private-v2-class,
.private-v2-term-entry,
.private-v2-term-entry .group-timetable-shell,
.private-v2-term-entry .group-timetable-scroll {
  min-width: 0;
  max-width: 100%;
}

/* Private history is a nested grid. Keep every accordion ancestor on the
 * available class track so the timetable—not the history header—owns its
 * intrinsic horizontal width. */
.private-v2-class .group-architecture-content,
.private-v2-class .term-history,
.private-v2-class .historical-term-list,
.private-v2-class .historical-term,
.private-v2-class .historical-term-row,
.private-v2-class .historical-term-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.private-v2-term-entry .group-timetable-shell,
.private-v2-term-entry .group-timetable-scroll {
  width: 100%;
}

.private-v2-term-entry .group-timetable-scroll {
  overflow-x: scroll;
  scrollbar-gutter: auto;
}

.private-v2-term-entry .group-timetable-scroll::-webkit-scrollbar {
  height: 10px;
}

.private-v2-term-entry .group-timetable-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef1f3;
}

.private-v2-term-entry .group-timetable-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f3;
  border-radius: 999px;
  background: #b8bdc2;
}

.private-v2-summary {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(90px, .6fr) minmax(115px, .75fr) minmax(180px, 1.15fr) minmax(85px, .55fr) auto 20px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  color: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.private-v2-summary strong {
  font-size: 13px;
}

.private-v2-summary > span {
  display: grid;
  gap: 2px;
}

.private-v2-summary small {
  color: var(--muted);
  font-size: 11px;
}

.private-v2-class .group-term-area + .group-term-area {
  margin-top: 16px;
}

.private-v2-term-entry {
  position: relative;
}

.private-v2-term-entry > .group-class-info {
  padding-right: 330px;
}

.private-v2-term-entry > .group-entry-actions {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
}

.private-term-edit-fields {
  width: min(100%, 720px);
}

.private-v2-term-entry > .private-current-term-edit-fields {
  padding: 12px 0;
}

.group-class-entry > .management-current-term-edit-fields {
  padding: 12px 0;
}

.private-term-primary-row,
.private-term-configuration-row,
.private-term-edit-fields .group-edit-schedule-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.private-term-actions {
  max-width: 310px;
}

@media (max-width: 900px) {
  .private-v2-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .private-v2-term-entry > .group-class-info { padding-right: 0; }
  .private-v2-term-entry > .group-entry-actions { position: static; padding: 8px 12px; }
}

@media (max-width: 760px) {
  .private-term-primary-row,
  .private-term-configuration-row,
  .private-term-edit-fields .group-edit-schedule-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .private-term-primary-row,
  .private-term-configuration-row,
  .private-term-edit-fields .group-edit-schedule-summary {
    grid-template-columns: 1fr;
  }

  .private-term-actions {
    max-width: none;
  }
}

.private-student-selector {
  margin: 0;
}

.student-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  gap: 8px;
}

.student-contact-row select,
.student-contact-row input {
  min-width: 0;
}

.contact-method-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.5fr) minmax(116px, 0.55fr) minmax(0, 1.15fr);
  gap: 8px;
}

.contact-method-row select,
.contact-method-row input {
  min-width: 0;
}

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

.account-toolbar {
  align-items: center;
  margin-bottom: 16px;
}

.account-toolbar h2,
.account-toolbar p { margin: 0; }

.account-table-wrap { background: var(--panel); overflow-x: visible; }
.account-table { min-width: 0; table-layout: fixed; }
.account-table th,
.account-table td { padding: 8px 9px; overflow-wrap: anywhere; vertical-align: middle; }
.account-table th:nth-child(1) { width: 20%; }
.account-table th:nth-child(2) { width: 25%; }
.account-table th:nth-child(3) { width: 11%; }
.account-table th:nth-child(4) { width: 20%; }
.account-table th:nth-child(5) { width: 13%; }
.account-table th:nth-child(6) { width: 11%; }
.account-row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.account-list-loading { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); }
.account-master-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-bg);
  font-size: 11px;
  font-weight: 750;
}

.account-dialog { width: min(820px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow-y: auto; }
.account-form-grid { gap: 12px; }
.account-profile-field { grid-column: 1 / -1; }
.account-role-permission-note { margin: 12px 0 0; }
.account-permissions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-permissions-heading h3 { margin: 0 0 4px; }
.account-permissions-heading p { margin: 0; color: var(--muted); }
[data-account-permission-feedback] .app-message { margin: 10px 0 0; padding: 8px 10px; }
.account-permission-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.account-permission-group { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.account-permission-group legend { padding: 0 5px; font-weight: 800; color: var(--muted); }
.account-permission-option { display: flex; align-items: flex-start; gap: 8px; margin: 7px 0; font-weight: 650; }
.account-permission-option input { width: auto; margin-top: 3px; }
.account-master-note,
.account-validation-error {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 7px;
}
.account-master-note { color: var(--blue); background: var(--blue-bg); }
.account-validation-error { color: var(--red); border-left: 4px solid var(--red); background: var(--red-bg); }
.account-obsolete-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 14px; border: 1px solid var(--red); border-radius: 8px; background: var(--red-bg); }
.account-obsolete-action p { margin: 4px 0 0; color: var(--muted); }
.account-validation-error span,
.account-master-note span { font-size: 13px; }

@media (max-width: 640px) {
  .account-form-grid { grid-template-columns: 1fr; }
  .account-profile-field { grid-column: auto; }
  .account-permission-groups { grid-template-columns: 1fr; }
}

.teacher-profile-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.9fr) minmax(92px, 0.55fr) minmax(180px, 1.5fr);
  gap: 8px;
}

.contact-row select,
.contact-row input {
  min-width: 0;
}

[hidden] {
  display: none !important;
}

.weekly-time-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.8fr) minmax(88px, 1fr) minmax(88px, 1fr);
  gap: 8px;
}

.weekly-time-row select {
  min-width: 0;
}

.weekly-time-row [data-weekly-start],
.weekly-time-row [data-weekly-end],
.group-weekly-schedule-row [data-group-weekly-start],
.group-weekly-schedule-row [data-group-weekly-end] {
  width: 100%;
  min-width: 0;
}

.group-weekly-schedule-field {
  grid-column: 1 / -1;
}

.group-weekly-schedule-rows {
  display: grid;
  gap: 7px;
}

.group-weekly-schedule-row {
  display: grid;
  grid-template-columns: 72px minmax(110px, 1fr) minmax(88px, .8fr) minmax(88px, .8fr);
  align-items: center;
  gap: 8px;
}

.group-weekly-schedule-row strong {
  color: var(--muted);
  font-size: 11px;
}

.group-weekly-schedule-row select {
  min-width: 0;
}

.create-class-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.group-create-schedule-warning,
.group-edit-schedule-warning {
  margin: 6px 0 0;
  padding: 7px 9px;
  border: 1px solid #ead7a4;
  border-radius: 6px;
  color: #765813;
  background: #fff9e8;
  font-size: 11px;
  line-height: 1.35;
}

.group-create-panel [data-group-create-error] {
  margin: 6px 0 0;
}

.class-creation-regular-error {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e8a5aa;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  color: #781a22;
  background: #fff2f3;
}

.class-creation-regular-error-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.class-creation-regular-error-heading > span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.class-creation-regular-error p { margin: 0; color: #8b2931; }
.class-creation-regular-error-list { display: grid; gap: 8px; }

.class-creation-blocking-error { margin: 0; }

.class-creation-regular-error-item {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #efc4c7;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.class-creation-regular-error-item small { color: #8b454b; }

.class-creation-conflict-dialog {
  width: min(680px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.class-creation-conflict-dialog-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 1px 4px 8px 0;
}

.class-creation-conflict-dialog-body > p { margin: 0; }
.class-creation-conflict-list { display: grid; gap: 12px; }

.class-creation-conflict-card {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.class-creation-conflict-when {
  display: grid;
  justify-items: start;
  gap: 3px;
  margin-bottom: 3px;
}

.class-creation-conflict-date,
.class-creation-conflict-time { font-size: 15px; }
.class-creation-conflict-type { color: var(--brand); font-weight: 750; }
.class-creation-conflict-term { font-size: 14px; }
.class-creation-conflict-card small { color: var(--muted); }

.class-creation-conflict-card label {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  font-weight: 700;
}

.class-creation-conflict-card select { width: 100%; min-width: 0; }

.class-creation-conflict-actions {
  flex: none;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.group-edit-schedule-message.group-save-error {
  margin: 6px 0 0;
  padding: 7px 9px;
  border: 1px solid #efb4b4;
  border-radius: 6px;
  color: #b91c1c;
  background: #fff1f1;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .group-weekly-schedule-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .group-weekly-schedule-row strong {
    grid-column: 1 / -1;
  }
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  margin-bottom: 16px;
}

.alert.success {
  color: var(--green);
  background: var(--green-bg);
  border-color: #bfe6cf;
}

.alert.info {
  color: var(--blue);
  background: var(--blue-bg);
  border-color: #bfd7ef;
}

.alert.warning {
  color: #8a4b08;
  background: #fff7e8;
  border-color: #efd39f;
}

.alert.error {
  color: var(--red);
  background: var(--red-bg);
  border-color: #efb0b5;
}

.app-message { display: grid; gap: 3px; }

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: white;
}

@media (max-width: 920px) {
  .login-page,
  .shell,
  .split,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .contact-method-row {
    grid-template-columns: 1fr;
  }

  .availability-editor {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .teacher-schedule-select {
    min-width: 0;
  }

  .toolbar {
    align-items: flex-start;
  }

  .toolbar-create .create-panel {
    position: static;
  }

  .login-visual {
    display: none;
  }

  .login-card {
    margin: 22px;
  }

  .sidebar {
    position: static;
  }

  .session-row {
    grid-template-columns: 1fr;
  }
}
.student-private-reschedule-page {
  display: grid;
  gap: 16px;
}

.student-private-reschedule-page > h2,
.student-private-reschedule-detail h3 {
  margin: 0;
}

.student-private-reschedule-classes {
  display: grid;
  gap: 12px;
}

.student-private-reschedule-class {
  padding: 0;
  overflow: hidden;
}

.student-private-reschedule-summary {
  width: 100%;
}

.student-private-reschedule-detail {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.private-reschedule-rules {
  margin: 0;
}

.private-reschedule-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.46);
}

.private-reschedule-modal {
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
}

.private-reschedule-modal h2,
.private-reschedule-modal p {
  margin: 0;
}

.private-reschedule-modal .actions {
  justify-content: flex-end;
}

.private-reschedule-session-context,
.private-reschedule-selected {
  display: grid;
  gap: 4px;
}

.private-reschedule-session-context span,
.private-reschedule-selected span {
  color: var(--muted);
}

.private-reschedule-availability-field {
  display: grid;
  gap: 8px;
}

.private-reschedule-availability-field > label {
  font-weight: 700;
}

.private-reschedule-availability {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.private-reschedule-availability-slot {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #9fd8b6;
  border-radius: 8px;
  background: #edf9f2;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.private-reschedule-availability-slot:hover,
.private-reschedule-availability-slot.selected {
  border-color: #16834f;
  background: #dff3e8;
  box-shadow: 0 0 0 2px rgba(22, 131, 79, 0.16);
}

.private-reschedule-availability-empty {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.private-reschedule-selected {
  padding: 10px 12px;
  border-left: 3px solid #16834f;
  border-radius: 4px;
  background: #edf9f2;
}

.private-reschedule-confirm-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.private-reschedule-confirm-comparison > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.private-reschedule-confirm-comparison small,
.private-reschedule-confirm-comparison span {
  color: var(--muted);
}

@media (max-width: 620px) {
  .private-reschedule-confirm-comparison {
    grid-template-columns: 1fr;
  }
}

.private-reschedule-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.private-reschedule-history {
  display: grid;
  gap: 10px;
}

.private-reschedule-history small {
  display: block;
  margin-top: 4px;
}

.private-schedule-marker {
  color: var(--muted);
  background: #f6f7f8;
  font-style: italic;
}

.private-schedule-marker.proposed {
  background: #fff8df;
  color: #7b5a00;
}

.private-reschedule-completed-row {
  background: #f3f4f6;
}

.private-reschedule-completed-label {
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 760px) {
  .student-private-reschedule-summary {
    grid-template-columns: 1fr 1fr auto;
  }

  .student-private-reschedule-summary > span:nth-child(3) {
    grid-column: 1 / -1;
  }
}
.lesson-hours-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.test-clock-control {
  margin-bottom: 14px;
  border: 1px solid #e2b45d;
  border-radius: 9px;
  background: #fff8e8;
  padding: 10px 12px;
}

.test-clock-control > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #76510b;
}

.test-clock-control > div {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.test-clock-control label { display: grid; gap: 4px; font-weight: 700; }
.test-clock-control input { min-height: 36px; padding: 5px 8px; border: 1px solid #d4b66f; border-radius: 6px; font: inherit; }
.test-clock-control small { flex-basis: 100%; color: #76510b; }

.lesson-hours-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted, #657280);
  font-weight: 700;
}

.lesson-hours-toolbar select {
  min-width: 190px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d4dde4;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.lesson-hours-management-note {
  margin-bottom: 12px;
  color: var(--muted, #657280);
}

.lesson-hours-list {
  display: grid;
  gap: 12px;
}

.lesson-hours-teacher-row {
  padding: 16px;
}

.lesson-hours-teacher-summary {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) minmax(140px, .7fr) auto;
  align-items: center;
  gap: 16px;
}

.lesson-hours-teacher-summary > div:not(.actions) {
  display: grid;
  gap: 4px;
}

.lesson-hours-teacher-summary small {
  color: var(--muted, #657280);
}

.lesson-hours-blockers {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #efc3c3;
  border-radius: 8px;
  background: #fff7f7;
}

.lesson-hours-blockers ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 900px) {
  .lesson-hours-teacher-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-hours-teacher-summary .actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .lesson-hours-teacher-summary { grid-template-columns: 1fr; }
}
.structured-date-controls {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(120px, 1.2fr) minmax(72px, 0.65fr);
  gap: 8px;
}

[data-month-year] .structured-date-controls {
  grid-template-columns: minmax(140px, 1fr) minmax(100px, 0.7fr);
}

@media (max-width: 640px) {
  .structured-date-controls { grid-template-columns: 1fr; }
}
.student-curriculum-list { display:grid; gap:14px; }
.student-curriculum-level { padding:16px; }
.student-curriculum-level > h3 { margin:0 0 10px; }
.student-curriculum-subentries { display:grid; gap:0; }
.student-curriculum-entry { padding:10px 0; border-top:1px solid var(--line, #d9dee7); }
.student-curriculum-entry:first-child { border-top:0; padding-top:2px; }
.student-curriculum-entry > h4 { margin:0 0 6px; font-size:14px; }
.student-catalogue-empty { margin:0; font-size:13px; }
.student-catalogue-class-list { display:grid; gap:10px; }
.student-catalogue-class { border:1px solid var(--line, #d9dee7); border-radius:10px; overflow:hidden; background:var(--surface, #fff); }
.student-catalogue-class-header { width:100%; display:grid; grid-template-columns:minmax(150px,1.2fr) minmax(130px,1fr) minmax(170px,1.25fr) 76px 24px; gap:12px; align-items:center; padding:13px 14px; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.student-catalogue-class-header span { display:grid; gap:3px; }
.student-catalogue-class-header small { color:var(--muted, #687386); }
.student-catalogue-count { text-align:right; }
.student-catalogue-enrolled { color:var(--primary, #3157d5) !important; font-weight:700; }
@media (max-width:760px) { .student-catalogue-class-header { grid-template-columns:1fr 1fr; } .student-catalogue-class-header .teacher-group-caret { position:absolute; right:18px; } }

/* Shared Japanese visual foundation. Static original vector artwork, local
   data URLs only: no font CDN, animation, sound, markup or interactive layer.
   Future seasons can replace these two asset tokens without altering layouts. */
:root {
  --season-landscape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 480'%3E%3Cpath fill='%23e8ede7' d='M0 310Q200 260 390 340T850 332T1250 320T1600 286V480H0Z'/%3E%3Cpath fill='%23ede5db' d='M0 390Q270 325 550 389T1120 370T1600 384V480H0Z'/%3E%3Cpath fill='%23cedce4' d='M180 365L436 100L689 365Z'/%3E%3Cpath fill='%23fbf7f2' d='M366 172L436 100L504 172L468 163L450 186L430 168L407 185L390 165Z'/%3E%3Cpath fill='none' stroke='%23b95748' stroke-width='7' stroke-linejoin='round' d='M1330 369L1379 130L1428 369M1345 296H1414M1355 246H1403M1367 187H1391M1360 246L1414 296M1403 246L1345 296M1345 296L1428 369M1414 296L1330 369M1367 187L1403 246M1391 187L1355 246M1379 130V97'/%3E%3Cpath fill='%23d9a15a' d='M127 391l10-10 3 13 12 4-13 6-3 13-7-13-13-1zM1480 408l9-8 4 12 13 2-12 7-1 13-9-11-13 1z'/%3E%3C/svg%3E");
  --season-branch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 290'%3E%3Cpath fill='none' stroke='%2398806a' stroke-width='3' d='M360 10Q300 80 220 99T60 185M278 69L251 24M225 97L178 48M167 124L166 178M113 152L76 113M320 47L326 105'/%3E%3Cg fill='%23b95748'%3E%3Cpath id='m' d='M0 18l-16-6 8-4-10-14 13 3 5-17 5 17 13-3-10 14 8 4z' transform='translate(251 28) rotate(-15)'/%3E%3Cuse href='%23m' transform='translate(-77 27) rotate(5 178 48)'/%3E%3Cuse href='%23m' transform='translate(70 72) rotate(25 326 105)'/%3E%3C/g%3E%3Cg fill='%23d9a15a'%3E%3Cpath d='M0 18l-16-6 8-4-10-14 13 3 5-17 5 17 13-3-10 14 8 4z' transform='translate(166 178) rotate(-24)'/%3E%3Cpath d='M0 18l-16-6 8-4-10-14 13 3 5-17 5 17 13-3-10 14 8 4z' transform='translate(76 113) rotate(15)'/%3E%3Cpath d='M0 12l-10-4 5-3-7-9 9 2 3-12 3 12 9-2-7 9 5 3z' transform='translate(49 238) rotate(-35)'/%3E%3C/g%3E%3C/svg%3E");
}
body { position: relative; isolation: isolate; }
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; background-repeat: no-repeat; }
body::before { inset: auto 0 0; height: min(420px, 45vh); background-image: var(--season-landscape); background-size: cover; background-position: center bottom; opacity: .62; }
body::after { top: 76px; right: 0; width: 280px; height: 240px; background-image: var(--season-branch); background-size: contain; opacity: .48; }
.sidebar { background: var(--ink); padding: 26px 18px; }
.sidebar .nav-btn { font-weight: 500; border-radius: var(--radius-control); min-height: 44px; }
.sidebar .nav-btn.active { background: #fff; color: var(--ink); font-weight: 650; }
.sidebar .nav-btn:not(.active):hover { background: #ffffff18; }
.topbar { height: auto; min-height: 90px; padding: 18px 28px; gap: 16px; flex-wrap: wrap; }
.topbar h1 { font-size: var(--font-page); font-weight: 650; letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere; }
.topbar-meta, .brand-subtitle { font-size: 14px; }
.content { padding: 28px; }
.card, .group-architecture-class, .directory-inline-detail { background: var(--panel); border-radius: var(--radius-panel); box-shadow: var(--shadow); }
.card { padding: 22px; }
.card h2 { font-size: var(--font-section); line-height: 1.35; font-weight: 650; }
.card h3 { font-size: var(--font-card); line-height: 1.4; font-weight: 600; }
.group-section-heading h2, .toolbar h2 { font-size: var(--font-section); font-weight: 650; }
.group-term-title h4 { font-size: 17px; font-weight: 600; }
.group-term-area { background: var(--panel); }
.group-architecture-content { padding: 18px; background: var(--panel); }
.group-architecture-list { padding: 14px; }
.group-class-section { border-radius: var(--radius-panel); background: var(--panel); }
.group-section-heading { background: var(--blue-bg); padding: 14px 18px; }
.field label { color: var(--ink); font-size: 14px; font-weight: 550; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select { font-size: 16px; min-height: 44px; border-radius: var(--radius-control); }
.field input, .field textarea { line-height: 1.5; }
.directory-compact-grid .field input, .directory-compact-grid .field select { min-height: 44px; font-size: 16px; }
.table-wrap:not(.availability-wrap) > table th { font-size: 14px; font-weight: 600; }
.table-wrap:not(.availability-wrap) > table td { font-size: 15px; }
.btn { font-weight: 600; border-radius: var(--radius-control); min-height: 42px; }
.btn.small { font-size: 14px; }
.btn.ghost:hover,
.app-compact-shell .private-v2-class .session-text-button:not(.has-note):hover { background: var(--soft); }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
:where(.group-timetable-shell, .availability-wrap) .btn { min-height: revert; }
.pill { width: fit-content; max-width: 100%; justify-self: start; align-self: center; font-size: 14px; line-height: 1.4; font-weight: 550; white-space: normal; }
.tab-btn { min-height: 44px; font-size: 15px; font-weight: 550; }
.tabs { gap: 8px; }
.zoom-host-summary > .pill { width: fit-content; }
.zoom-host-summary > :first-child > strong { font-size: 19px; font-weight: 650; }
.zoom-provider-meta, .zoom-preferred-teachers p { font-size: 14px; }
.zoom-preferred-teachers { border: 0; padding: 0; }
.zoom-preferred-teachers legend { font-size: 15px; font-weight: 550; }
.zoom-teacher-multiselect { background: var(--panel); border-radius: var(--radius-control); }
.zoom-teacher-multiselect > summary { min-height: 44px; font-size: 15px; }
.zoom-teacher-options .inline-check { min-height: 36px; margin: 0; padding: 5px 0; }
.zoom-host-edit-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 8px; }
.zoom-host-edit-footer > .actions { margin: 0; }
.zoom-host-secondary-actions { margin-left: auto; padding-left: 22px; border-left: 1px solid var(--line); }
.zoom-host-status-action { color: var(--muted); background: var(--soft); border-color: transparent; font-size: 14px; font-weight: 500; min-height: 44px; }
.zoom-meeting-controls .pill { flex: 0 1 auto; }
.zoom-existing-meetings .zoom-meeting-identity strong { font-weight: 600; }
/* Class identity, actions and metadata use the existing semantic children;
   no data duplication, new labels, routing or timetable re-layout. */
.master-group-class-summary, .private-v2-summary { grid-template-columns: minmax(0, 1fr) auto auto 18px; gap: 12px 20px; padding: 20px; background: var(--panel); font-size: 15px; }
.master-group-class-summary > .group-parent-identity, .private-v2-summary > :first-child { grid-column: 1; grid-row: 1; }
.master-group-class-summary > .group-parent-status { grid-column: 2; grid-row: 1; }
.master-group-class-summary > .authoritative-class-action-slot, .private-v2-summary > :nth-child(6) { grid-column: 3; grid-row: 1; }
.master-group-class-summary > .row-caret, .private-v2-summary > .row-caret { grid-column: 4; grid-row: 1; }
.master-group-class-summary > :nth-child(2), .private-v2-summary > :nth-child(2) { grid-column: 1; grid-row: 2; }
.master-group-class-summary > :nth-child(3), .private-v2-summary > :nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
.private-v2-summary > :nth-child(5) { grid-column: 2; grid-row: 1; }
.private-v2-summary > :nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
.master-group-class-summary .group-parent-identity > strong, .private-v2-summary > :first-child > strong { font-size: 20px; font-weight: 650; line-height: 1.45; }
.master-group-class-summary > span, .private-v2-summary > span { min-width: 0; overflow-wrap: anywhere; }
.master-group-class-summary small, .private-v2-summary small { font-size: 14px; font-weight: 400; color: var(--muted); }
.master-group-class-summary > :nth-child(2) strong, .master-group-class-summary > :nth-child(3) strong { font-size: 15px; font-weight: 500; }
.master-group-class-summary > :nth-child(2), .master-group-class-summary > :nth-child(3) { display: grid; gap: 4px; }
/* Two calm toolbar rows avoid clipped Create actions as typography grows.
   Existing controls, filter dispatch and anchored Create panels are unchanged. */
.group-management-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; }
.group-management-toolbar .group-class-filter-bar input,
.group-management-toolbar .group-class-filter-bar select,
.group-management-toolbar .group-class-filter-bar > .btn { height: auto; min-height: 44px; font-size: 15px; }
.group-management-toolbar .group-class-filter-bar > .btn { grid-column: 1; grid-row: 2; justify-self: start; }
.group-management-toolbar .group-class-filter-count { grid-column: 2 / 4; grid-row: 2; }
.group-management-toolbar .toolbar-create { grid-column: 4; grid-row: 2; justify-self: end; }
.private-management-toolbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.private-management-toolbar .toolbar-create { grid-column: 4 / 6; }
.term-aligned-inline-header { row-gap: 12px; padding: 10px 0 16px; font-size: 15px; }
.term-aligned-identity > strong { font-size: 17px; font-weight: 600; }
.term-aligned-details > strong { font-weight: 500; }
.group-class-readonly { gap: 6px; }
.group-class-readonly > strong { font-weight: 550; }
.group-timetable-grid { font-family: inherit; color: var(--ink); }
.group-timetable-help { color: var(--muted); background: var(--soft); font-size: 12px; }
.group-timetable-grid .group-grid-cell { line-height: 1.35; }
.group-timetable-grid .student-name { font-size: 13px; }
.template-conflict-dialog, .attendance-note-dialog, .session-text-dialog, .completed-term-delete-dialog { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); }
.template-conflict-dialog h2 { font-size: var(--font-section); }
.login-page { background: transparent; }
.login-card { border-radius: var(--radius-panel); }
@media (max-width: 900px) {
  .content { padding: 18px; }
  .master-group-class-summary, .private-v2-summary { padding: 16px; column-gap: 12px; }
}
@media (max-width: 640px) {
  .topbar { padding: 18px; }
  .topbar h1 { font-size: 28px; }
  .content { padding: 14px; }
  .card { padding: 16px; }
  .group-architecture-content, .group-architecture-list { padding: 10px; }
  .master-group-class-summary, .private-v2-summary { grid-template-columns: minmax(0, 1fr) auto 18px; gap: 12px; }
  .master-group-class-summary > .group-parent-identity, .private-v2-summary > :first-child { grid-column: 1 / 3; grid-row: 1; }
  .master-group-class-summary > .row-caret, .private-v2-summary > .row-caret { grid-column: 3; grid-row: 1; }
  .master-group-class-summary > .group-parent-status, .private-v2-summary > :nth-child(5) { grid-column: 1; grid-row: 2; }
  .master-group-class-summary > .authoritative-class-action-slot, .private-v2-summary > :nth-child(6) { grid-column: 2 / 4; grid-row: 2; justify-self: end; }
  .master-group-class-summary > :nth-child(2), .private-v2-summary > :nth-child(2) { grid-column: 1 / -1; grid-row: 3; }
  .master-group-class-summary > :nth-child(3), .private-v2-summary > :nth-child(3) { grid-column: 1 / -1; grid-row: 4; }
  .private-v2-summary > :nth-child(4) { grid-column: 1 / -1; grid-row: 5; }
  .zoom-host-edit-footer { align-items: stretch; }
  .zoom-host-secondary-actions { padding-left: 12px; }
  .group-management-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-management-toolbar .group-class-filter-bar input { grid-column: 1 / -1; }
  .group-management-toolbar .group-class-filter-bar > .btn,
  .group-management-toolbar .group-class-filter-count { grid-column: auto; grid-row: auto; }
  .group-management-toolbar .toolbar-create { grid-column: 1 / -1; grid-row: auto; }
  body::after { width: 170px; opacity: .3; }
}

/* Focused polish: contiguous Class metadata, quiet secondary Term headings.
   Existing semantic children, event handlers and timetable dimensions remain. */
:root {
  --season-landscape: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201600%20480%22%3E%3Cpath%20fill%3D%22%23e8ede7%22%20d%3D%22M0%20335Q180%20275%20390%20337T850%20334T1270%20310T1600%20315V480H0Z%22%2F%3E%3Cpath%20fill%3D%22%23e9e1d6%22%20d%3D%22M0%20406Q220%20347%20520%20399T1080%20385T1600%20388V480H0Z%22%2F%3E%3Cg%20transform%3D%22translate(440%20380)%20scale(1.25)%20translate(-440%20-380)%22%3E%3Cpath%20fill%3D%22%23d7e1e5%22%20d%3D%22M128%20380Q225%20319%20306%20231L430%20113Q441%20102%20452%20114L565%20230Q638%20312%20728%20380Z%22%2F%3E%3Cpath%20fill%3D%22%23fcfaf6%22%20d%3D%22M362%20184L430%20113Q441%20102%20452%20114L519%20184L491%20175L471%20195L449%20179L430%20193L408%20177L387%20194Z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(1393%20380)%20scale(1.2)%20translate(-1393%20-380)%22%20fill%3D%22none%22%20stroke%3D%22%23b98073%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20stroke-width%3D%225%22%20d%3D%22M1341%20380Q1379%20284%201385%20178H1401Q1407%20284%201445%20380M1393%20178V89M1372%20275H1414M1357%20331H1429M1381%20220H1405M1367%20288L1429%20331M1419%20288L1357%20331M1357%20331L1445%20380M1429%20331L1341%20380M1381%20220L1414%20275M1405%20220L1372%20275%22%2F%3E%3Cpath%20stroke-width%3D%223%22%20d%3D%22M1384%20157H1402M1387%20132H1399M1374%20276H1412M1378%20266H1408%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --season-landscape-mobile: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20600%20480%22%3E%3Cg%20transform%3D%22translate(0%20150)%20scale(.375)%22%3E%3Cpath%20fill%3D%22%23e8ede7%22%20d%3D%22M0%20335Q180%20275%20390%20337T850%20334T1270%20310T1600%20315V480H0Z%22%2F%3E%3Cpath%20fill%3D%22%23e9e1d6%22%20d%3D%22M0%20406Q220%20347%20520%20399T1080%20385T1600%20388V480H0Z%22%2F%3E%3Cg%20transform%3D%22translate(440%20380)%20scale(1.1)%20translate(-440%20-380)%22%3E%3Cpath%20fill%3D%22%23d7e1e5%22%20d%3D%22M128%20380Q225%20319%20306%20231L430%20113Q441%20102%20452%20114L565%20230Q638%20312%20728%20380Z%22%2F%3E%3Cpath%20fill%3D%22%23fcfaf6%22%20d%3D%22M362%20184L430%20113Q441%20102%20452%20114L519%20184L491%20175L471%20195L449%20179L430%20193L408%20177L387%20194Z%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(1393%20380)%20scale(1.08)%20translate(-1393%20-380)%22%20fill%3D%22none%22%20stroke%3D%22%23b98073%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20stroke-width%3D%225%22%20d%3D%22M1341%20380Q1379%20284%201385%20178H1401Q1407%20284%201445%20380M1393%20178V89M1372%20275H1414M1357%20331H1429M1381%20220H1405M1367%20288L1429%20331M1419%20288L1357%20331M1357%20331L1445%20380M1429%20331L1341%20380M1381%20220L1414%20275M1405%20220L1372%20275%22%2F%3E%3Cpath%20stroke-width%3D%223%22%20d%3D%22M1384%20157H1402M1387%20132H1399M1374%20276H1412M1378%20266H1408%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3Cpath%20fill%3D%22%23e9e1d6%22%20d%3D%22M0%20330H600V480H0Z%22%2F%3E%3C%2Fsvg%3E");
  --season-branch: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20360%20290%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23a18b75%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20stroke-width%3D%222.2%22%20d%3D%22M363%200Q311%2075%20234%20101T72%20181%22%2F%3E%3Cpath%20stroke-width%3D%221.2%22%20d%3D%22M308%2057L279%2024M267%2086L252%20139M220%20108L184%2062M175%20133L161%20193M127%20157L88%20125M323%2035L333%2096%22%2F%3E%3C%2Fg%3E%3Cg%20stroke%3D%22%23b58063%22%20stroke-width%3D%22.7%22%3E%3Cpath%20fill%3D%22%23b76f5c%22%20d%3D%22M0%2022L-4%2012L-19%2015L-13%207L-29%200L-18-3L-24-17L-10-10L-9-29L0-16L9-29L10-10L24-17L18-3L29%200L13%207L19%2015L4%2012Z%22%20transform%3D%22translate(279%2024)%20rotate(-27)%20scale(.7)%22%2F%3E%3Cpath%20fill%3D%22%23cc9b62%22%20d%3D%22M0%2022L-4%2012L-19%2015L-13%207L-29%200L-18-3L-24-17L-10-10L-9-29L0-16L9-29L10-10L24-17L18-3L29%200L13%207L19%2015L4%2012Z%22%20transform%3D%22translate(252%20139)%20rotate(145)%20scale(.6)%22%2F%3E%3Cpath%20fill%3D%22%23b76f5c%22%20d%3D%22M0%2022L-4%2012L-19%2015L-13%207L-29%200L-18-3L-24-17L-10-10L-9-29L0-16L9-29L10-10L24-17L18-3L29%200L13%207L19%2015L4%2012Z%22%20transform%3D%22translate(184%2062)%20rotate(-36)%20scale(.8)%22%2F%3E%3Cpath%20fill%3D%22%23c79a68%22%20d%3D%22M0%2022L-4%2012L-19%2015L-13%207L-29%200L-18-3L-24-17L-10-10L-9-29L0-16L9-29L10-10L24-17L18-3L29%200L13%207L19%2015L4%2012Z%22%20transform%3D%22translate(161%20193)%20rotate(160)%20scale(.7)%22%2F%3E%3Cpath%20fill%3D%22%23b76f5c%22%20d%3D%22M0%2022L-4%2012L-19%2015L-13%207L-29%200L-18-3L-24-17L-10-10L-9-29L0-16L9-29L10-10L24-17L18-3L29%200L13%207L19%2015L4%2012Z%22%20transform%3D%22translate(88%20125)%20rotate(-40)%20scale(.7)%22%2F%3E%3Cpath%20fill%3D%22%23c79a68%22%20d%3D%22M0%2022L-4%2012L-19%2015L-13%207L-29%200L-18-3L-24-17L-10-10L-9-29L0-16L9-29L10-10L24-17L18-3L29%200L13%207L19%2015L4%2012Z%22%20transform%3D%22translate(333%2096)%20rotate(135)%20scale(.6)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
.master-group-class-summary, .private-v2-summary {
  grid-template-columns: minmax(0, 280px) minmax(0, 280px) minmax(0, 1fr) auto auto 18px;
  gap: 8px 18px; padding: 16px 18px; align-items: center;
}
.master-group-class-summary > .group-parent-identity, .private-v2-summary > :first-child { grid-column: 1 / 4; grid-row: 1; }
.master-group-class-summary > .group-parent-status, .private-v2-summary > :nth-child(5) { grid-column: 4; grid-row: 1; }
.master-group-class-summary > .authoritative-class-action-slot, .private-v2-summary > :nth-child(6) { grid-column: 5; grid-row: 1; }
.master-group-class-summary > .row-caret, .private-v2-summary > .row-caret { grid-column: 6; grid-row: 1; }
.master-group-class-summary > :nth-child(2), .private-v2-summary > :nth-child(2) { grid-column: 1; grid-row: 2; }
.master-group-class-summary > :nth-child(3), .private-v2-summary > :nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
.private-v2-summary > :nth-child(4) { grid-column: 1 / 4; grid-row: 3; }
.group-parent-status > small { display: none; }
.group-term-title h4, .group-term-title strong { font-size: 16px; font-weight: 600; }
.group-term-heading { margin-bottom: 10px; }
.group-term-area.current-term { background: #f8fbf9; }
.current-term-inline-header .term-aligned-identity strong { font-size: 16px; font-weight: 550; }
.current-term-inline-header .term-aligned-details strong { font-size: 14px; font-weight: 400; }
.zoom-management-toolbar > :first-child { min-width: 0; }
.zoom-management-toolbar > details { flex-shrink: 0; }
.zoom-management-toolbar > details > summary { white-space: nowrap; }
/* Delivery tables only: never target attendance/timetable controls. */
.email-delivery-table { min-width: 1445px; }
.email-delivery-table th { white-space: normal; overflow-wrap: normal; }
.email-delivery-scroll .email-delivery-table td { overflow-wrap: anywhere; white-space: normal; }
.email-delivery-table th:nth-child(1) { width: 215px; }
.email-delivery-table th:nth-child(4) { width: 90px; }
.email-delivery-table th:nth-child(5) { width: 140px; }
.email-delivery-table th:nth-child(6) { width: 95px; }
.email-delivery-table :is(td:first-child small,.delivery-class-session strong,.delivery-class-session small,.delivery-safe-failure) { white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; }
.table-wrap:has([data-reminder-policy]) { overflow: auto; }
.table-wrap:has([data-reminder-policy]) > table { min-width: 1230px; table-layout: fixed; }
.table-wrap:has([data-reminder-policy]) th { white-space: normal; }
[data-reminder-policy] td { vertical-align: top; overflow-wrap: anywhere; padding: 12px; }
.table-wrap:has([data-reminder-policy]) th:first-child { width: 240px; }
.table-wrap:has([data-reminder-policy]) th:nth-child(2) { width: 84px; }
.table-wrap:has([data-reminder-policy]) th:nth-child(3) { width: 150px; }
.table-wrap:has([data-reminder-policy]) th:nth-child(4) { width: 215px; }
.table-wrap:has([data-reminder-policy]) th:nth-child(5) { width: 245px; }
.table-wrap:has([data-reminder-policy]) th:nth-child(6) { width: 170px; }
.table-wrap:has([data-reminder-policy]) th:nth-child(7) { width: 145px; }
[data-reminder-policy] :is(input:not([type=checkbox]),select) { width: 100%; min-width: 0; min-height: 44px; padding: 8px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: white; color: var(--ink); }
[data-reminder-policy] input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); margin: 11px; }
[data-reminder-policy] .btn { margin-top: 8px; }
@media (max-width: 1099px) {
  /* Reflow the existing role-aware nav; all destinations remain reachable. */
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { padding: 10px 14px; min-width: 0; }
  .sidebar .brand-mark { align-items: center; margin-bottom: 8px; gap: 8px; }
  .sidebar .brand-logo { width: 30px; height: 30px; }
  .sidebar .brand-title { font-size: 17px; }
  .sidebar .brand-subtitle { font-size: 12px; }
  .sidebar .brand-mark > div { display: flex; align-items: baseline; gap: 10px; }
  .sidebar .nav-group { display: flex; gap: 4px; overflow-x: auto; padding: 3px 3px 7px; -webkit-overflow-scrolling: touch; }
  .sidebar .nav-group .nav-btn { flex: 0 0 auto; white-space: nowrap; width: auto; min-width: 0; font-size: 13px; }
  .sidebar .responsive-nav-panel { display: none; }
  .sidebar .responsive-nav-panel.mobile-open { display: grid; gap: 2px; position: fixed; z-index: 3000; padding: 6px; overflow-y: auto; overscroll-behavior: contain; background: var(--ink); border: 1px solid #ffffff35; border-radius: 8px; box-shadow: 0 6px 18px #20384d25; }
  .sidebar .responsive-nav-panel .nav-sub-btn { width: 100%; white-space: normal; text-align: left; }
  .sidebar .nav-sub-btn { padding-left: 14px; }
  .topbar { padding: 12px 16px; min-height: 72px; gap: 8px; }
  .topbar > :first-child { flex: 1 1 200px; min-width: 0; }
  .topbar h1 { font-size: 25px; }
  .top-actions .btn { min-height: 44px; padding: 8px 12px; }
}
@media (max-width: 640px) {
  .content { padding: 12px; }
  .topbar h1 { font-size: 23px; }
  .topbar-meta { font-size: 13px; }
  .master-group-class-summary, .private-v2-summary { grid-template-columns: minmax(0, 1fr) auto auto 18px; gap: 8px 10px; padding: 12px; }
  .master-group-class-summary > .group-parent-identity, .private-v2-summary > :first-child { grid-column: 1; grid-row: 1; }
  .master-group-class-summary > .row-caret, .private-v2-summary > .row-caret { grid-column: 4; grid-row: 1; }
  .master-group-class-summary > .group-parent-status, .private-v2-summary > :nth-child(5) { grid-column: 2; grid-row: 1; }
  .master-group-class-summary > .authoritative-class-action-slot, .private-v2-summary > :nth-child(6) { grid-column: 3; grid-row: 1; }
  .master-group-class-summary > :nth-child(2), .private-v2-summary > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .master-group-class-summary > :nth-child(3), .private-v2-summary > :nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
  .private-v2-summary > :nth-child(4) { grid-column: 1 / -1; grid-row: 4; }
  .master-group-class-summary .group-parent-identity > strong, .private-v2-summary > :first-child > strong { font-size: 18px; }
  .zoom-management-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .zoom-management-toolbar > details { align-self: flex-start; }
  .zoom-management-toolbar > details > summary { min-height: 44px; }
}

/* Soft glass preview: one outer surface, with solid working areas inside.
   Base declarations are the readable no-backdrop-filter fallback. */
:root {
  --sasa-glass-bg: rgba(255, 255, 255, 0.20);
  --sasa-glass-fallback-bg: rgba(255, 255, 255, 0.96);
  --sasa-glass-border: rgba(255, 255, 255, 0.65);
  --sasa-glass-blur: 1px;
  --sasa-glass-shadow:
    0 6px 20px rgba(32, 56, 77, 0.05),
    -4px -2px 14px rgba(232, 197, 187, 0.10),
    4px 3px 14px rgba(193, 216, 224, 0.10);
}
:is(.group-class-section, .student-group-term-card, .zoom-host-card,
    .content > .card:has(.email-delivery-scroll),
    .content > .card:has([data-reminder-policy])) {
  --muted: #354b5e; /* Readable over current artwork at only 20% white. */
  background: var(--sasa-glass-fallback-bg);
  border-color: var(--sasa-glass-border);
  box-shadow: var(--sasa-glass-shadow);
}
/* GLASS_FILTER_ENHANCEMENT_START */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(.group-class-section, .student-group-term-card, .zoom-host-card,
      .content > .card:has(.email-delivery-scroll),
      .content > .card:has([data-reminder-policy])) {
    background: var(--sasa-glass-bg);
    -webkit-backdrop-filter: blur(var(--sasa-glass-blur));
    backdrop-filter: blur(var(--sasa-glass-blur));
  }
}
/* GLASS_FILTER_ENHANCEMENT_END */
/* Filtering creates a containing block for fixed descendants. Temporarily use
   the fallback while the existing viewport-wide Class-menu dismiss layer is
   mounted, preserving its original hit area and stacking authority. */
.content .group-class-section:has(.class-action-menu-popover) {
  background: var(--sasa-glass-fallback-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.group-class-section > .group-architecture-list { background: transparent; }
.group-class-section .group-architecture-class { box-shadow: none; }
.group-class-section :is(.group-architecture-class, .group-architecture-content,
    .group-architecture-row, .private-v2-summary, .group-term-area, .term-timetable-surface, .draft-term-card,
    .draft-term-content, .historical-term-content),
.student-group-term-card :is(.group-term-area, .term-timetable-surface) {
  background: transparent;
  box-shadow: none;
}
.group-class-section .group-architecture-class.expanded > .group-architecture-row {
  background: transparent;
}
.group-timetable-grid, .email-delivery-table,
.table-wrap:has([data-reminder-policy]) > table,
.zoom-teacher-options, .zoom-host-form .field :is(input, select, textarea) {
  background: #fff;
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), print {
  :is(.group-class-section, .student-group-term-card, .zoom-host-card,
      .content > .card:has(.email-delivery-scroll),
      .content > .card:has([data-reminder-policy])) {
    background: var(--sasa-glass-fallback-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
}

/* Desktop summary: identity / Teacher / schedule / status / action / caret.
   The existing Private course text remains directly under its identity. */
@media (min-width: 1100px) {
  .master-group-class-summary, .private-v2-summary {
    grid-template-columns: minmax(160px, 1.05fr) minmax(150px, 1fr) minmax(180px, 1.2fr) auto auto 18px;
    gap: 4px 18px; padding: 12px 16px;
  }
  .master-group-class-summary > .group-parent-identity,
  .private-v2-summary > :first-child { grid-column: 1; grid-row: 1; }
  .master-group-class-summary > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .master-group-class-summary > :nth-child(3) { grid-column: 3; grid-row: 1; }
  .private-v2-summary > :nth-child(2) { grid-column: 1; grid-row: 2; font-size: 14px; color: var(--muted); }
  .private-v2-summary > :nth-child(3) { grid-column: 2; grid-row: 1 / 3; }
  .private-v2-summary > :nth-child(4) { grid-column: 3; grid-row: 1 / 3; }
  .master-group-class-summary > .group-parent-status,
  .private-v2-summary > :nth-child(5) { grid-column: 4; grid-row: 1 / 3; }
  .master-group-class-summary > .authoritative-class-action-slot,
  .private-v2-summary > :nth-child(6) { grid-column: 5; grid-row: 1 / 3; }
  .master-group-class-summary > .row-caret,
  .private-v2-summary > .row-caret { grid-column: 6; grid-row: 1 / 3; }
  .private-v2-summary > :nth-child(3)::before,
  .private-v2-summary > :nth-child(4)::before { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
  .private-v2-summary > :nth-child(3)::before { content: "Teacher"; }
  .private-v2-summary > :nth-child(4)::before { content: "Schedule"; }
}
@media (max-width: 640px) {
  /* Fit both landmarks to the available width, rather than cropping a
     desktop enlargement blindly into a phone-sized background. */
  body::before { background-image: var(--season-landscape-mobile); background-size: 100% auto; }
}

/* Layout/readability polish: presentation only; retain all working surfaces. */
.topbar h1 { font-size: 28px; }
.sidebar .nav-group { gap: 3px; }
.sidebar .nav-sub-btn { padding-top: 8px; padding-bottom: 8px; }
.sidebar .nav-group-button.active { background: #ffffff18; color: #f6f3eb; font-weight: 550; }
.sidebar .nav-btn[data-nav-page].active { background: #fff; color: var(--ink); font-weight: 650; }
.zoom-host-summary {
  grid-template-columns: minmax(260px, 1fr) fit-content(230px) max-content auto auto;
  gap: 12px;
}
.zoom-host-summary > :first-child { overflow-wrap: normal; word-break: normal; }
.zoom-host-summary > :first-child strong { overflow-wrap: break-word; line-height: 1.45; }
.zoom-host-summary > .pill { justify-self: start; width: fit-content; }
.zoom-host-header-actions .btn { white-space: nowrap; }
.zoom-host-summary > :nth-child(3) { font-size: 14px; }
.zoom-host-summary small, .zoom-provider-meta { color: var(--muted); }
.class-directory-tabs { margin: 0 0 10px; gap: 8px; }
.class-tab-count { display: inline-block; margin-left: 5px; font-variant-numeric: tabular-nums; font-weight: 500; }
.group-class-section > .group-architecture-list { padding: 8px; }
.group-class-section .group-architecture-content { padding: 8px 12px 12px; }
/* Term geometry and typography have one shared authority below. Keep every
   existing section heading visible; no role uses a clipped heading shortcut. */
.group-management-toolbar, .private-management-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.group-management-toolbar .toolbar-create { order: -1; flex: 0 0 auto; margin-left: auto; }
.group-management-toolbar .toolbar-create > summary { white-space: nowrap; min-height: 44px; }
.group-management-toolbar .group-class-filter-bar { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 8px; }
.group-management-toolbar .group-class-filter-bar input { flex: 1.4 1 190px; }
.group-management-toolbar .group-class-filter-bar select { flex: 1 1 125px; }
.group-management-toolbar .group-class-filter-bar :is(input, select, button) {
  box-sizing: border-box; height: 44px; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 15px; line-height: 1.3;
}
.group-management-toolbar .group-class-filter-bar > .btn { flex: 0 0 auto; }
.group-management-toolbar .group-class-filter-count { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.main:has(.group-management-toolbar) .content { padding-top: 12px; }
body::before {
  background-position: center bottom;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000);
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000);
}
body::after { top: 220px; right: -38px; -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 95%); mask-image: linear-gradient(to left, #000 20%, transparent 95%); }
@media (max-width: 1350px) {
  .zoom-host-summary { grid-template-columns: minmax(260px, 1fr) auto auto; }
  .zoom-host-summary > :first-child { grid-column: 1 / 3; grid-row: 1; }
  .zoom-host-summary > .zoom-host-header-actions { grid-column: 3; grid-row: 1; }
  .zoom-host-summary > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .zoom-host-summary > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .zoom-host-summary > :nth-child(4) { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (max-width: 640px) {
  .topbar h1 { font-size: 23px; }
  .zoom-host-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .zoom-host-summary > :first-child { grid-column: 1 / -1; grid-row: 1; }
  .zoom-host-summary > :first-child strong { font-size: 18px; }
  .zoom-host-summary > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .zoom-host-summary > :nth-child(3) { grid-column: 1; grid-row: 3; }
  .zoom-host-summary > :nth-child(4) { grid-column: 2; grid-row: 3; }
  .zoom-host-summary > .zoom-host-header-actions { grid-column: 1 / -1; grid-row: 4; justify-self: end; }
  .group-management-toolbar .group-class-filter-bar input { flex-basis: 100%; }
  .group-management-toolbar .group-class-filter-bar select { flex-basis: calc(50% - 8px); }
  .group-management-toolbar .toolbar-create { max-width: 100%; }
  .group-class-section .group-architecture-content { padding: 8px; }
  .group-class-section .staging-management-structure > [data-term-header="current"] { grid-template-columns: 1fr; }
  .group-class-section .staging-management-structure > [data-term-header="current"] .term-aligned-actions { justify-self: start; }
  body::after { top: 260px; right: -70px; }
}

/* Shared compact components: presentation is independent of account role. */
.compact-class-list-heading { display: none; }
.app-compact-shell .topbar h1 { font-size: 28px; }
.app-compact-shell .content h2 { font-size: 20px; }
.app-compact-shell :is(.zoom-management-toolbar, .zoom-class-host-assignments) > p { font-size: 14px; }
.app-compact-shell .group-management-toolbar { gap: 8px; }
.app-compact-shell .group-management-toolbar .group-class-filter-bar { gap: 6px; }
.app-compact-shell .group-management-toolbar .group-class-filter-bar :is(input, select, button),
.app-compact-shell .group-management-toolbar .toolbar-create > summary {
  height: 38px; min-height: 38px; padding: 7px 10px; font-size: 14px; line-height: 22px;
}
.app-compact-shell .group-management-toolbar .toolbar-create > summary { min-width: 0; }
.app-compact-shell .class-directory-tabs > .btn { height: 36px; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.app-compact-shell .group-class-filter-count { font-size: 13px; white-space: nowrap; }
.app-compact-shell .master-group-class-summary,
.app-compact-shell .private-v2-summary { font-size: 14px; }
.app-compact-shell :is(.master-group-class-summary, .private-v2-summary) :is(small, .pill) { font-size: 13px; }
.app-compact-shell .group-parent-status .pill,
.app-compact-shell .private-v2-summary > :nth-child(5) .pill { white-space: nowrap; overflow-wrap: normal; }
.app-compact-shell :is(.master-group-class-summary, .private-v2-summary) > :first-child > strong { font-size: 17px; line-height: 1.4; }

/* A pseudo-surface supplies the same glass without becoming a containing
   block for the existing fixed outside-click layer. Menu open/close therefore
   changes neither the surrounding paint nor its readable fallback. */
.app-compact-shell .content .group-class-section,
.app-compact-shell .content .group-class-section:has(.class-action-menu-popover) {
  position: relative; isolation: isolate; background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.app-compact-shell .group-class-section::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none; background: var(--sasa-glass-fallback-bg);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-compact-shell .group-class-section::before {
    background: var(--sasa-glass-bg); -webkit-backdrop-filter: blur(var(--sasa-glass-blur)); backdrop-filter: blur(var(--sasa-glass-blur));
  }
}
.app-compact-shell .class-action-menu-popover { background: #fff; box-shadow: 0 5px 16px rgba(32, 56, 77, .12); }
.app-compact-shell .class-action-menu-item { min-height: 36px; font-size: 14px; }
.app-compact-shell .zoom-host-list { gap: 8px; }
.app-compact-shell .zoom-host-card { padding: 12px 16px; }
.app-compact-shell .zoom-host-summary { min-height: 44px; gap: 8px 12px; }
.app-compact-shell .zoom-host-summary > :first-child strong { font-size: 17px; }
.app-compact-shell .zoom-host-summary :is(small, .pill) { font-size: 13px; }
.app-compact-shell .zoom-host-summary .btn { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.app-compact-shell .zoom-host-panel { margin-top: 8px; padding-top: 8px; }
.app-compact-shell .zoom-class-host-assignments { padding: 14px 16px; }
.app-compact-shell .zoom-class-host-assignments > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; cursor: pointer; }
.app-compact-shell .zoom-class-host-assignments > summary > strong { font-size: 18px; }
.app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, .9fr) minmax(260px, 1.3fr);
  align-items: center; gap: 10px 20px; padding: 12px 0;
}
.app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] strong { color: var(--ink); font-size: 14px; font-weight: 550; }
.app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] > .actions {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin: 0; min-width: 0;
}
.app-compact-shell .zoom-class-host-assignments :is(select, .btn) { width: auto; min-width: 0; min-height: 38px; font-size: 14px; }
.app-compact-shell .zoom-class-host-assignments select { width: 100%; }
@media (min-width: 1440px) {
  .app-compact-shell .group-management-toolbar { flex-wrap: nowrap; }
  .app-compact-shell .group-management-toolbar .group-class-filter-bar { flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; }
  .app-compact-shell .group-management-toolbar .group-class-filter-bar input { flex: 1.4 1 160px; min-width: 120px; }
  .app-compact-shell .group-management-toolbar .group-class-filter-bar select { flex: 1 1 120px; min-width: 95px; }
  .app-compact-shell .group-management-toolbar .toolbar-create { order: 0; margin-left: 0; }
  .app-compact-shell .private-management-toolbar .group-class-filter-bar input { min-width: 160px; }
  .app-compact-shell .private-management-toolbar select[aria-label="Sessions per Week"] { min-width: 170px; flex-basis: 170px; }
}
@media (min-width: 1200px) {
  .app-compact-shell :is(.compact-class-list-heading, .master-group-class-summary, .private-v2-summary) {
    grid-template-columns: minmax(170px, 1fr) minmax(150px, 1fr) minmax(190px, 1.1fr) 88px 36px 18px;
    gap: 2px 12px; padding: 8px 14px;
  }
  .app-compact-shell .compact-class-list-heading { display: grid; color: var(--muted); font-size: 12px; margin: 0 8px; padding-top: 8px; padding-bottom: 4px; }
  .app-compact-shell :is(.master-group-class-summary, .private-v2-summary) { min-height: 76px; box-sizing: border-box; }
  .app-compact-shell .master-group-class-summary > span > small:first-child:not(:last-child),
  .app-compact-shell .master-group-class-summary > :nth-child(2) > small,
  .app-compact-shell .master-group-class-summary > :nth-child(3) > small,
  .app-compact-shell .master-group-class-summary > .group-parent-status > small,
  .app-compact-shell .private-v2-summary > :nth-child(3)::before,
  .app-compact-shell .private-v2-summary > :nth-child(4)::before {
    display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .app-compact-shell .private-v2-summary > :nth-child(2) { font-size: 13px; }
  .app-compact-shell .master-group-class-summary > :nth-child(2) strong,
  .app-compact-shell .master-group-class-summary > :nth-child(3) strong { font-size: 14px; }
}
@media (max-width: 1100px) {
  .app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] > .actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .app-compact-shell .topbar h1 { font-size: 26px; }
  .app-compact-shell .group-management-toolbar .group-class-filter-bar :is(input, select, button),
  .app-compact-shell .group-management-toolbar .toolbar-create > summary,
  .app-compact-shell .class-directory-tabs > .btn { height: 40px; min-height: 40px; }
  .app-compact-shell .zoom-host-summary > :first-child strong { font-size: 17px; }
  .app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] { grid-template-columns: minmax(0, 1fr); }
  .app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] > .actions { grid-column: 1; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), print {
  .app-compact-shell .group-class-section::before { background: var(--sasa-glass-fallback-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Phase 1.1: existing ghost controls in Private note cells, not new actions. */
.app-compact-shell .private-v2-class .session-text-button:not(.has-note) {
  font: inherit; font-size: 12px; font-weight: 550; line-height: 1.3;
  border-radius: var(--radius-control); padding: 4px 7px; min-height: 28px;
  max-width: 100%; white-space: normal; cursor: pointer;
}
@media (min-width: 1200px) {
  .app-compact-shell .private-v2-class .draft-term-toggle.term-aligned-inline-header {
    grid-template-columns: minmax(330px, 1.1fr) minmax(180px, 1fr) auto 18px;
  }
  .app-compact-shell .private-v2-class .draft-term-toggle .term-aligned-identity { justify-content: flex-start; }
}
@media (max-width: 640px) {
  /* Keep enough visible width beside the existing 27px + 180px sticky
     columns for a complete 104px Session track on 375/390px phones. */
  .app-compact-shell .group-architecture-class:not(.private-v2-class) > .group-architecture-content > .current-term { padding-inline: 0; }
}

/* Phase 2 list-specific density; shared role surfaces are defined below.
   Existing list class names describe presentation, not access permissions.
   Shell density has one shared authority, not a separate MASTER override. */
.app-compact-shell .class-management-directory { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; }
.app-compact-shell .class-management-directory > .group-management-toolbar { display: contents; }
.app-compact-shell .class-management-directory .group-class-filter-bar { grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0; gap: 6px; margin: 0; }
.app-compact-shell .class-management-directory .class-directory-tabs { grid-column: 1; grid-row: 2; margin: 0; gap: 6px; align-self: center; }
.app-compact-shell .class-management-directory .toolbar-create { grid-column: 2; grid-row: 2; justify-self: end; order: initial; margin: 0; }
.app-compact-shell .class-management-directory > :is(.group-architecture-sections, .card) { grid-column: 1 / -1; grid-row: 3; min-width: 0; }
.app-compact-shell .group-management-toolbar .group-class-filter-bar :is(input, select, button),
.app-compact-shell .group-management-toolbar .toolbar-create > summary,
.app-compact-shell .class-directory-tabs > .btn,
.app-compact-shell .zoom-management-toolbar > details > summary {
  box-sizing: border-box; height: 32px; min-height: 32px; padding: 5px 9px; font-size: 13px; line-height: 20px;
}
.app-compact-shell .group-class-filter-count { font-size: 12px; }
.app-compact-shell .class-tab-count { margin-left: 3px; }
.app-compact-shell .group-class-section > .group-architecture-list { padding: 4px; gap: 4px; }
.app-compact-shell .group-architecture-content { padding: 6px 8px 8px; }
.app-compact-shell .group-term-area { padding: 8px; }
.app-compact-shell .group-term-area + .group-term-area { margin-top: 10px; }
.app-compact-shell .group-term-heading { margin-bottom: 6px; gap: 6px; }
.app-compact-shell :is(.group-term-heading h4, [data-term-header] .term-aligned-identity > strong) { font-size: 14px; }
.app-compact-shell [data-term-header] { padding-block: 4px; row-gap: 4px; }
.app-compact-shell [data-term-header] :is(.term-aligned-details, .term-aligned-details strong) { font-size: 12px; line-height: 1.4; }
.app-compact-shell .group-architecture-content .btn:not(.group-student-drop-cell) { min-height: var(--control-height); padding: 5px 9px; font-size: 13px; line-height: 20px; }
.app-compact-shell .group-grid-cell { padding: 4px 6px; }
.app-compact-shell .group-grid-cell:not(.frozen-index) { font-size: 12px; }
.app-compact-shell .private-v2-class .session-text-button:not(.has-note) { min-height: 28px; padding: 4px 5px; white-space: nowrap; }
.app-compact-shell :is(.master-group-class-summary, .private-v2-summary) { font-size: var(--font-body); padding: 8px 10px; row-gap: 4px; }
.app-compact-shell .master-group-class-summary > :nth-child(2) strong,
.app-compact-shell .master-group-class-summary > :nth-child(3) strong { font-size: var(--font-body); line-height: 1.4; }
.app-compact-shell :is(.master-group-class-summary, .private-v2-summary) > :first-child > strong { font-size: 14px; line-height: 1.3; }
.app-compact-shell :is(.master-group-class-summary, .private-v2-summary) :is(small, .pill) { font-size: var(--font-secondary); line-height: 1.4; }
.app-compact-shell .zoom-management-toolbar { margin-bottom: 8px; gap: 8px 12px; }
.app-compact-shell .zoom-management-toolbar h2 { margin-block: 0 4px; font-size: 18px; }
.app-compact-shell .zoom-management-toolbar p { margin-block: 0; font-size: 12px; }
.app-compact-shell .zoom-host-list { gap: 6px; }
.app-compact-shell .zoom-host-card { padding: 10px 12px; }
.app-compact-shell .zoom-host-summary { min-height: 42px; gap: 6px 8px; }
.app-compact-shell .zoom-host-summary > :first-child strong { font-size: 14px; line-height: 1.35; }
.app-compact-shell .zoom-host-summary :is(small, .pill),
.app-compact-shell .zoom-host-summary > :nth-child(3) { font-size: 11px; line-height: 1.35; }
.app-compact-shell .zoom-host-summary .btn { min-height: 32px; padding: 5px 8px; font-size: 12px; line-height: 20px; }
.app-compact-shell .zoom-class-host-assignments { padding: 10px 12px; }
.app-compact-shell .zoom-class-host-assignments > p { font-size: 12px; line-height: 1.4; margin-block: 6px; }
.app-compact-shell .zoom-class-host-assignments > summary { gap: 6px 12px; font-size: 12px; }
.app-compact-shell .zoom-class-host-assignments > summary > strong { font-size: 16px; }
.app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] { padding: 8px 0; gap: 6px 12px; font-size: 12px; }
.app-compact-shell .zoom-class-host-assignments [data-zoom-class-assignment] strong { font-size: 13px; }
.app-compact-shell .zoom-class-host-assignments :is(select, .btn) { min-height: 32px; padding: 5px 8px; font-size: 12px; line-height: 20px; }
@media (min-width: 1100px) {
  .app-compact-shell .zoom-host-summary { grid-template-columns: minmax(200px, 1fr) fit-content(200px) max-content auto auto; }
  .app-compact-shell .zoom-host-summary > * { grid-column: auto; grid-row: auto; }
}
@media (min-width: 1100px) {
  .app-compact-shell :is(.compact-class-list-heading, .master-group-class-summary, .private-v2-summary) { gap: 2px 8px; padding: 6px 10px; }
  .app-compact-shell :is(.compact-class-list-heading, .master-group-class-summary) { grid-template-columns: minmax(160px, 1fr) minmax(140px, 1fr) minmax(170px, 1fr) 76px 32px 16px; }
  .app-compact-shell :is(.private-list-heading, .private-v2-summary) { grid-template-columns: minmax(170px, 1.2fr) minmax(120px, .8fr) minmax(130px, .9fr) minmax(150px, 1fr) 76px 32px 16px; }
  .app-compact-shell :is(.master-group-class-summary, .private-v2-summary) { min-height: 60px; }
  .app-compact-shell :is(.master-group-class-summary, .private-v2-summary) > * { grid-row: 1; grid-column: auto; }
  .app-compact-shell .master-group-class-summary > :nth-child(2) strong,
  .app-compact-shell .master-group-class-summary > :nth-child(3) strong { font-size: var(--font-body); line-height: 1.4; }
  .app-compact-shell .private-v2-summary > :nth-child(2) { font-size: 12px; }
  .app-compact-shell .compact-class-list-heading { display: grid; margin: 0 4px; padding-block: 3px; font-size: 11px; line-height: 1.3; }
  /* Keep repeated-label suppression aligned with the shared heading's
     actual breakpoint. Retain labels for compact stacked/mobile layouts. */
  .app-compact-shell .master-group-class-summary > span > small:first-child:not(:last-child),
  .app-compact-shell .master-group-class-summary > :nth-child(2) > small,
  .app-compact-shell .master-group-class-summary > :nth-child(3) > small,
  .app-compact-shell .master-group-class-summary > .group-parent-status > small,
  .app-compact-shell .private-v2-summary > :nth-child(3)::before,
  .app-compact-shell .private-v2-summary > :nth-child(4)::before {
    display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (max-width: 640px) {
  .app-compact-shell .class-management-directory { gap: 6px; grid-template-columns: minmax(0, 1fr); }
  .app-compact-shell .class-management-directory .class-directory-tabs { grid-column: 1; grid-row: 2; flex-wrap: wrap; }
  .app-compact-shell .class-management-directory .toolbar-create { grid-column: 1; grid-row: 3; }
  .app-compact-shell .class-management-directory > :is(.group-architecture-sections, .card) { grid-row: 4; }
  .app-compact-shell .master-group-class-summary > :nth-child(2),
  .app-compact-shell .master-group-class-summary > :nth-child(3) { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
  .app-compact-shell .group-architecture-class:not(.private-v2-class) > .group-architecture-content > .current-term { padding-inline: 0; }
}

/* Shared density for all five roles. Dialogs are shell siblings. Never scale
   the page or change timetable tracks, attendance hits, or scroll ownership. */
.app-compact-shell { font-size: var(--font-body); line-height: 1.45; }
.app-compact-shell .account-profile-menu { position: relative; }
.app-compact-shell .account-profile-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--soft); color: var(--ink); cursor: pointer; }
.app-compact-shell .account-profile-menu > summary::-webkit-details-marker { display: none; }
.account-profile-options { position: absolute; z-index: 50; right: 0; top: calc(100% + 6px); width: 150px; max-width: calc(100vw - 24px); padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-control); background: #fff; box-shadow: 0 5px 16px #20384d1a; }
.account-profile-options .class-action-menu-item { width: 100%; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.account-profile-name { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.account-profile-dialog { margin: auto; width: min(380px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: var(--radius-panel); background: #fff; padding: 18px; color: var(--ink); }
.account-profile-dialog:not([open]) { display: none; }
.account-profile-dialog::backdrop { background: #20384d66; }
.account-profile-dialog h2 { margin-top: 0; font-size: 18px; }
@media (min-width: 1100px) {
  .app-compact-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .app-compact-shell .sidebar.sidebar { padding: 14px 12px; }
  .app-compact-shell .sidebar .brand-mark { align-items: center; margin-bottom: 12px; gap: 8px; }
  .app-compact-shell .sidebar .brand-logo { width: 40px; height: 40px; flex: 0 0 auto; }
  .app-compact-shell .sidebar .brand-title { font-size: 18px; letter-spacing: 0; overflow-wrap: anywhere; }
  .app-compact-shell .sidebar .nav-group { gap: 2px; }
  .app-compact-shell .sidebar.sidebar .nav-btn { min-height: 32px; padding: 6px 8px; }
  .app-compact-shell .sidebar.sidebar .nav-sub-btn { padding-left: 16px; }
}
@media (max-width: 768px) {
  .app-compact-shell .account-profile-menu > summary { width: 44px; height: 44px; }
  .account-profile-options .class-action-menu-item { min-height: 44px; }
}
.app-compact-shell .topbar { min-height: 48px; padding: 8px 18px; gap: 8px 16px; }
.app-compact-shell .topbar h1 { font-size: var(--font-page); line-height: 1.25; }
.app-compact-shell :is(.topbar-meta, .brand-subtitle) { font-size: 12px; line-height: 1.4; }
.app-compact-shell .content { padding: 12px 18px 18px; }
.app-compact-shell .sidebar { padding: 18px 14px; }
.app-compact-shell .sidebar .nav-btn { min-height: 34px; padding: 7px 10px; font-size: 13px; line-height: 1.35; }
.app-compact-shell .content h2 { font-size: var(--font-section); line-height: 1.4; }
.app-compact-shell .content h3 { font-size: var(--font-card); line-height: 1.4; }
.app-compact-shell .card { padding: 14px; min-width: 0; }
.app-compact-shell .grid > * { min-width: 0; }
.app-compact-shell .table-wrap { min-width: 0; max-width: 100%; }
.app-compact-shell :is(.grid, .session-list) { gap: 10px; }
.app-compact-shell .toolbar { gap: 8px 10px; margin-bottom: 10px; }
.app-compact-shell .actions { gap: 6px; }
.app-compact-shell .field { gap: 4px; margin-bottom: 10px; }
.app-compact-shell .field label { font-size: 12px; }
/* Both directories share compact information/edit panels, not class-row overrides. */
.app-compact-shell .directory-toolbar { flex-wrap: wrap; align-items: center; }
.app-compact-shell .directory-toolbar > form.actions { flex: 1 1 360px; flex-wrap: wrap; min-width: 0; }
.app-compact-shell .directory-toolbar input[name="q"] { flex: 1 1 220px; min-width: 0; }
.app-compact-shell .directory-toolbar select { min-width: 0; }
.app-compact-shell .directory-toolbar > .toolbar-create { flex: 0 0 auto; margin-inline-start: auto; }
.app-compact-shell .directory-card-list .directory-inline-detail { padding: 6px 8px; }
.app-compact-shell .directory-inline-detail .directory-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 14px; padding: 0; }
.app-compact-shell .directory-inline-detail .directory-profile-field { grid-template-columns: minmax(96px, .65fr) minmax(0, 1fr); align-items: baseline; gap: 2px 8px; }
.app-compact-shell .directory-profile-field strong { font-size: 12px; font-weight: 500; text-transform: none; line-height: 1.4; color: var(--muted); }
.app-compact-shell .directory-profile-field span { font-size: 13px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-compact-shell .directory-inline-detail .detail-field { margin: 0; gap: 1px; min-width: 0; }
.app-compact-shell .directory-inline-detail .detail-field label { font-size: 12px; line-height: 16px; }
.app-compact-shell .directory-inline-detail .directory-compact-grid .detail-field :is(input, textarea)[name] { box-sizing: border-box; width: 100%; min-width: 0; min-height: 32px; padding: 5px 7px; font-size: 13px; line-height: 20px; }
.app-compact-shell .directory-inline-detail .directory-compact-grid .detail-field textarea[name] { min-height: 42px; padding: 2px 7px; line-height: 18px; resize: vertical; }
.app-compact-shell .directory-info-actions { display: flex; justify-content: flex-end; margin-top: 5px; }
.app-compact-shell .directory-edit-management { padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid var(--line); }
.app-compact-shell .directory-edit-management .directory-action-availability { margin: 3px 0 0; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.app-compact-shell .directory-secondary-actions { flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.app-compact-shell .directory-inline-detail .directory-secondary-actions .btn { min-height: 28px; padding: 3px 7px; font-size: 12px; line-height: 20px; }
.app-compact-shell .directory-info-actions > [data-directory-edit] { margin-inline-start: auto; }
.app-compact-shell .directory-detail-actions { margin-top: 5px; padding-top: 4px; justify-content: flex-end; }
@media (max-width: 768px) {
  .app-compact-shell .directory-inline-detail .directory-compact-grid .detail-field :is(input, textarea)[name] { font-size: 16px; min-height: 44px; }
  .app-compact-shell .directory-inline-detail .directory-compact-grid .detail-field textarea[name] { min-height: 56px; }
  .app-compact-shell .directory-inline-detail .directory-secondary-actions .btn { min-height: 44px; }
}
@media (max-width: 680px) { .app-compact-shell .directory-inline-detail .directory-compact-grid { grid-template-columns: 1fr; } }
.app-compact-shell :is(.muted, small, .pill) { font-size: var(--font-secondary); line-height: 1.45; }
.app-compact-shell :is(.btn, .tab-btn):not(.group-student-drop-cell) { box-sizing: border-box; min-height: var(--control-height); padding: 5px 9px; font-size: 13px; line-height: 20px; }
.app-compact-shell :is(.field, .toolbar, .form-grid, .create-panel) :is(input:not([type=checkbox]):not([type=radio]), select) { box-sizing: border-box; min-height: 32px; padding: 5px 8px; font-size: 14px; line-height: 20px; background-color: #fff; }
.app-compact-shell :is(.field, .form-grid) textarea { min-height: 72px; padding: 6px 8px; font-size: 14px; background-color: #fff; }
.app-compact-shell .table-wrap:not(.availability-wrap) > table th { padding: 6px 8px; font-size: 12px; }
.app-compact-shell .table-wrap:not(.availability-wrap) > table td { padding: 6px 8px; font-size: 13px; }
.app-compact-shell .group-section-heading { padding: 8px 12px; }
.app-compact-shell .group-architecture-list { padding: 8px; }
.app-compact-shell .group-architecture-content { padding: 10px; }
.app-compact-shell .group-term-area { padding: var(--term-padding); }
.app-compact-shell .group-term-heading { gap: var(--term-gap); margin-bottom: var(--term-gap); }
/* The existing Term renderer is shared by management, Teacher and Student.
   Role controls may differ, but not the type scale, alignment or padding. */
.app-compact-shell .group-term-area > .group-term-heading { margin: 0 0 var(--term-gap); padding: 0; }
.app-compact-shell .group-term-title { gap: var(--term-gap); }
.app-compact-shell .group-term-title h4 { margin: 0; font-size: var(--font-body); line-height: 1.4; }
.app-compact-shell .term-section-pill { font-size: var(--font-secondary); line-height: 1.4; padding: 2px 7px; }
.app-compact-shell .term-aligned-inline-header[data-term-header] { padding: 4px 0; gap: 4px 12px; font-size: var(--font-body); }
.app-compact-shell .term-aligned-inline-header[data-term-header="current"] { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) 180px; min-height: 64px; margin-bottom: 0; }
.app-compact-shell .term-timetable-surface:has(> .shared-current-term-header) { row-gap: 8px; }
.app-compact-shell .shared-current-term-header .term-aligned-identity { flex-direction: column; align-items: flex-start; }
.app-compact-shell .shared-current-term-header + .group-timetable-shell { margin-top: 0; }
.app-compact-shell [data-term-header] .term-aligned-identity { min-height: 0; min-width: 0; justify-content: flex-start; flex-wrap: wrap; gap: 4px 8px; padding-right: 0; border-right: 0; }
.app-compact-shell [data-term-header] .term-aligned-identity > strong { font-size: var(--font-body); line-height: 1.4; overflow-wrap: anywhere; }
.app-compact-shell [data-term-header] .term-aligned-identity .pill { font-size: var(--font-secondary); line-height: 1.4; }
.app-compact-shell [data-term-header] :is(.term-aligned-details, .term-aligned-details strong) { font-size: var(--font-body); line-height: 1.4; }
.app-compact-shell [data-term-header] .term-aligned-details { gap: 2px; min-width: 0; }
.app-compact-shell [data-term-header] .term-aligned-details small { font-size: var(--font-secondary); line-height: 1.4; overflow-wrap: anywhere; }
.app-compact-shell [data-term-header] .term-aligned-actions { gap: var(--term-gap); justify-self: end; flex-wrap: wrap; }
.app-compact-shell [data-term-header] :is(.btn, .group-zoom-details > summary) { min-height: var(--control-height); box-sizing: border-box; padding: 5px 9px; font-size: 13px; line-height: 20px; }
.app-compact-shell .teacher-group-expanded { margin-top: 8px; padding-top: 8px; }
.app-compact-shell .group-teacher-class-card > .teacher-group-expanded { margin-top: 4px; padding-top: 0; border-top: 0; }
.app-compact-shell .group-teacher-class-card .group-term-area.current-term {
  background: var(--sasa-glass-bg); border-color: var(--line); box-shadow: var(--shadow);
}
.app-compact-shell .session-substitute-indicator { font-size: 9px; line-height: 1.2; overflow-wrap: anywhere; }
.timetable-view-controls { display: flex; justify-content: flex-end; margin: 4px 0; }
.term-aligned-actions > .timetable-view-controls { margin: 0; flex: 0 0 auto; }
.app-compact-shell .term-aligned-inline-header[data-term-header="current"] { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) minmax(0, auto); }
.app-compact-shell [data-term-header] .term-aligned-actions { flex-wrap: wrap; max-width: 360px; }
/* MASTER uses the existing Teacher-style direct list, without a separate
   heading surface. Keep the original labels readable inside each row. */
.app-compact-shell.master-admin-shell .master-group-class-summary.class-summary > span > small {
  display: block; position: static; width: auto; height: auto; margin: 0;
  overflow: visible; clip-path: none; white-space: normal;
}
.master-admin-shell .group-architecture-sections:not(.private-v2-list) > .group-class-section {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.master-admin-shell .group-architecture-sections:not(.private-v2-list) > .group-class-section::before { content: none; }
.master-admin-shell .group-architecture-sections:not(.private-v2-list) > .group-class-section > .group-architecture-list { padding: 0; }
.app-compact-shell.master-admin-shell .master-group-class-summary.class-summary > span > small:first-child:not(:last-child),
.app-compact-shell.master-admin-shell .master-group-class-summary.class-summary > :is(:nth-child(2), :nth-child(3), .group-parent-status) > small {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.app-compact-shell .teacher-class-directory > .group-teacher-class-card + .group-teacher-class-card { margin-top: 4px; }
/* Shared MASTER/own-Teacher schedule presentation; other cards and Zoom stay unchanged. */
.app-compact-shell .teacher-schedule-card {
  background: transparent; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.teacher-schedule-card .teacher-schedule-heading {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: 8px 12px;
}
.app-compact-shell .teacher-schedule-card .teacher-schedule-heading .field,
.app-compact-shell .teacher-schedule-card > .availability-editor .field { margin-bottom: 0; }
.teacher-schedule-card .teacher-schedule-heading p { margin: 0; }
.teacher-schedule-card .teacher-schedule-select { flex: 0 1 240px; min-width: 0; }
.teacher-schedule-card .teacher-schedule-id { min-height: var(--control-height); display: flex; align-items: center; }
@media (max-width: 768px) { .teacher-schedule-card .teacher-schedule-select { flex: 1 1 140px; } }
.teacher-schedule-card .teacher-availability-table td.occupied {
  --teacher-block-edge: #8a96a0;
  background: #e8ecef; color: #52606b;
  box-shadow: inset 3px 0 0 var(--teacher-block-edge), inset -3px 0 0 var(--teacher-block-edge);
}
.teacher-schedule-card .teacher-availability-table td[data-occupancy-tone="trial"] {
  --teacher-block-edge: var(--red); background: var(--red-bg); color: var(--red);
}
.teacher-schedule-card .teacher-availability-table td[data-occupancy-tone="one-off"] {
  --teacher-block-edge: #a67510; background: #fff2cc; color: #725313;
}
/* MASTER and Student share edge-to-edge expanded framing, not fields/actions.
   The 1px negative margin aligns nested borders; table padding stays intact. */
.master-admin-shell .group-architecture-class > .group-architecture-content,
.app-compact-shell .student-group-term-card > .teacher-group-expanded {
  display: grid; gap: 10px; border-top: 0;
  padding: 4px 0 0; margin: 0 -1px; width: calc(100% + 2px); max-width: none;
}
.master-admin-shell .group-architecture-content > .group-term-area,
.app-compact-shell .student-group-term-card > .teacher-group-expanded > .group-term-area {
  box-shadow: inset 4px 0 0 rgba(32, 56, 77, .18), var(--shadow);
}
.timetable-size-control { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.timetable-size-control select { width: auto; min-height: 32px; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel); color: var(--ink); font: inherit; }
.availability-wrap[data-timetable-scale-scope] .availability-table { width: calc(var(--availability-day-width) + var(--availability-timeline-width)); }
@media (max-width: 768px) { .timetable-size-control select { min-height: 44px; font-size: 16px; } }
.app-compact-shell .teacher-group-summary { font-family: inherit; font-size: var(--font-body); gap: 6px 10px; }
.app-compact-shell .teacher-group-summary strong { font-size: var(--font-body); line-height: 1.4; }
.app-compact-shell :is(.teacher-group-summary, .master-group-class-summary, .private-v2-summary) small { font-size: var(--font-secondary); line-height: 1.4; }
/* One summary presentation contract. Roles choose fields/actions, not a
   separate type scale or card surface. Match the compact management row. */
.app-compact-shell .class-summary.class-summary {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: 60px;
  font-family: inherit; font-size: var(--font-body); font-weight: 400; line-height: 1.45;
  color: var(--ink); background: transparent; border: 0; border-radius: 0;
  padding: 6px 10px; gap: 2px 8px; align-items: center; text-align: left;
}
.app-compact-shell :is(.class-summary.class-summary, .student-catalogue-class-header)[data-class-number] {
  position: relative; padding-inline-start: 40px;
}
.app-compact-shell :is(.class-summary, .student-catalogue-class-header)[data-class-number]::before {
  content: attr(data-class-number); position: absolute; inset-inline-start: 9px; top: 10px;
  display: grid; place-items: center; width: 23px; min-height: 29px; padding-bottom: 3px;
  color: #fff; background: var(--ink); border-top: 3px solid var(--brand); font-size: 12px;
  font-weight: 650; line-height: 1.3; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 54% 100%, 50% 81%, 46% 100%, 0 100%);
}
@media (max-width: 1099px) {
  .app-compact-shell .sidebar.sidebar .nav-btn { min-height: 44px; padding: 11px 10px; font-size: 13px; }
  .app-compact-shell .sidebar.sidebar .nav-sub-btn { padding-inline-start: 20px; }
  .app-compact-shell :is(.class-summary.class-summary, .student-catalogue-class-header)[data-class-number] { padding-inline-start: 40px; }
}
.teacher-special-lesson { display: grid; gap: 2px; min-width: 0; }
.app-compact-shell .class-summary.class-summary > span:not(.row-caret):not(.teacher-group-caret):not(.group-class-action-menu):not(.authoritative-class-action-slot) {
  display: grid; min-width: 0; gap: 2px; align-content: center;
  font-size: var(--font-body); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere;
}
.app-compact-shell .class-summary.class-summary > span > strong {
  font-size: var(--font-body); font-weight: 500; line-height: 1.4; color: var(--ink);
}
.app-compact-shell .class-summary.class-summary > :first-child > strong {
  font-size: var(--font-body); font-weight: 650; line-height: 1.3;
}
.app-compact-shell .class-summary.class-summary > span > small,
.app-compact-shell .class-summary.class-summary > span::before,
.app-compact-shell .compact-class-list-heading {
  font-size: var(--font-secondary); font-weight: 400; line-height: 1.4; color: #354b5e;
}
/* Four shared identity fields, with no empty action slot displacing the caret. */
.app-compact-shell .authoritative-class-summary.class-summary {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.35fr) minmax(65px, .45fr) 16px;
}
.app-compact-shell .authoritative-class-summary.has-class-actions {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.35fr) minmax(65px, .45fr) auto 16px;
}
.app-compact-shell .authoritative-class-summary.class-summary > span { grid-column: auto; grid-row: 1; }
.app-compact-shell .authoritative-class-summary.class-summary > .teacher-group-caret { justify-self: end; align-self: center; }
.student-private-contact { max-width: 640px; }
.student-private-contact h3 { font-size: 16px; }
.student-private-contact dl { display: grid; gap: 12px; margin: 14px 0 0; }
.student-private-contact dt { font-size: var(--font-secondary); color: var(--muted); }
.student-private-contact dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.student-private-line-qr { display: block; width: min(240px, 100%); height: auto; background: #fff; }
@media (max-width: 760px) {
  .app-compact-shell .authoritative-class-summary.class-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 16px; }
  .app-compact-shell .authoritative-class-summary.class-summary > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .app-compact-shell .authoritative-class-summary.class-summary > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .app-compact-shell .authoritative-class-summary.class-summary > :nth-child(3) { grid-column: 1; grid-row: 2; }
  .app-compact-shell .authoritative-class-summary.class-summary > :nth-child(4) { grid-column: 2; grid-row: 2; }
  .app-compact-shell .authoritative-class-summary.class-summary > .authoritative-class-action-slot { grid-column: 1 / 3; grid-row: 3; }
  .app-compact-shell .authoritative-class-summary.class-summary > .teacher-group-caret { grid-column: 3; grid-row: 1 / 3; }
}
.app-compact-shell :is(.group-architecture-class, .card):has(> .class-summary) {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
@media (max-width: 1099px) {
  .app-compact-shell .class-summary.class-summary { padding: 8px 10px; gap: 4px 8px; }
}
.app-compact-shell .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 10px; }
.app-compact-shell .stats > div { display: grid; align-content: start; gap: 2px; }
.app-compact-shell .stats strong { font-size: 22px; }
.app-compact-shell .zoom-provider-meta { font-size: 12px; }
.app-compact-shell [data-reminder-policy] :is(input:not([type=checkbox]),select) { min-height: 32px; padding: 5px 8px; font-size: 14px; line-height: 20px; }
.app-compact-shell .zoom-teacher-multiselect > summary { min-height: 32px; font-size: 14px; }
.staging-restoration-shell .topbar { min-height: 64px; padding: 10px 18px; }
.staging-restoration-shell .topbar h1 { font-size: 24px; }
.staging-restoration-shell .nav-btn { min-height: 34px; padding: 7px 10px; font-size: 13px; }
.login-card { margin: 24px; padding: 20px; font-size: 14px; }
.login-card h1 { font-size: 24px; line-height: 1.3; }
.login-card p { margin-bottom: 14px; }
.login-card .brand-mark { margin-bottom: 20px; }
.login-card .field { gap: 4px; margin-bottom: 10px; }
.login-card .field label { font-size: 12px; }
.login-card .field :is(input,select), .login-card .btn { min-height: 32px; padding: 5px 9px; font-size: 14px; line-height: 20px; }
body:has(.app-compact-shell) :is(.attendance-note-dialog, .session-text-dialog, .completed-term-delete-dialog, .template-conflict-dialog, .homework-workflow-dialog) { padding: 14px; gap: 10px; font-size: 14px; }
body:has(.app-compact-shell) [role=dialog] h2 { font-size: 18px; }
body:has(.app-compact-shell) [role=dialog] .btn { min-height: 32px; padding: 5px 9px; font-size: 13px; line-height: 20px; }
body:has(.app-compact-shell) [role=dialog] :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 14px; min-height: 32px; padding: 5px 8px; background-color: #fff; }
body:has(.app-compact-shell) [role=dialog] textarea { min-height: 72px; }
@media (max-width: 768px) {
  :root { --control-height: 44px; }
  .login-card { margin: 16px; padding: 18px; }
  .login-card .field :is(input,select), .login-card .btn { min-height: 44px; font-size: 16px; }
  .app-compact-shell .topbar { min-height: 60px; padding: 8px 12px; }
  .app-compact-shell .content { padding: 10px; }
  .app-compact-shell .sidebar { padding: 10px 12px; }
  .app-compact-shell .sidebar .nav-btn { min-height: 44px; padding: 11px 10px; }
  .app-compact-shell :is(.btn, .tab-btn):not(.group-student-drop-cell),
  .app-compact-shell .zoom-teacher-multiselect > summary,
  body:has(.app-compact-shell) [role=dialog] .btn { min-height: 44px; height: auto; padding: 11px 10px; }
  .app-compact-shell :is(input:not([type=checkbox]):not([type=radio]), select, textarea),
  body:has(.app-compact-shell) [role=dialog] :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; min-height: 44px; }
  .app-compact-shell :is(.field, .toolbar, .form-grid, .create-panel, [data-reminder-policy]) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; min-height: 44px; }
  .app-compact-shell .group-management-toolbar .group-class-filter-bar :is(input, select, button),
  .app-compact-shell .group-management-toolbar .toolbar-create > summary,
  .app-compact-shell .class-directory-tabs > .btn { min-height: 44px; height: auto; padding: 11px 9px; }
  .app-compact-shell .group-architecture-content .btn:not(.group-student-drop-cell),
  .app-compact-shell .zoom-host-summary .btn,
  .app-compact-shell .zoom-class-host-assignments :is(select, .btn) { min-height: 44px; height: auto; padding: 11px 9px; }
  .app-compact-shell .zoom-class-host-assignments select { font-size: 16px; }
  .app-compact-shell .class-directory-tabs { gap: 6px; }
  .app-compact-shell [data-term-header] :is(.btn, .group-zoom-details > summary) { min-height: var(--control-height); padding: 11px 10px; }
}
@media (max-width: 900px) {
  .app-compact-shell .term-aligned-inline-header[data-term-header="current"] { grid-template-columns: minmax(0, 1fr) auto; }
  .app-compact-shell [data-term-header="current"] .term-aligned-details { grid-column: 1 / -1; grid-row: 2; }
  .app-compact-shell [data-term-header="current"] .term-aligned-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 480px) {
  .app-compact-shell .term-aligned-inline-header[data-term-header="current"] { grid-template-columns: minmax(0, 1fr); }
  .app-compact-shell [data-term-header="current"] .term-aligned-actions { grid-column: 1; grid-row: 3; justify-self: start; }
}
@media (max-width: 640px) {
  /* All roles retain the same extra Session-track space beside sticky labels. */
  .app-compact-shell .group-term-area.current-term { padding-inline: 0; }
}

/* Shared authenticated identity; no role-specific sizing or invented fields. */
.sidebar .brand-mark { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: stretch; }
.sidebar .brand-mark .brand-identity { align-self: stretch; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 0; }
.brand-mark .brand-title { margin: 0; padding: 0; line-height: 1; }
.brand-mark .brand-nickname { margin: 0; padding: 0; font-size: 12px; font-weight: 400; line-height: 1; color: #c7d3dc; overflow-wrap: anywhere; }
.account-profile-options { width: 240px; }
.account-profile-identity { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.account-profile-identity .account-profile-name { padding: 0; border: 0; }
.account-profile-email { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }

/* Every Dates cell starts at the same top edge, regardless of extra metadata. */
.group-timetable-grid .group-grid-cell.date-cell { flex-direction: column; justify-content: flex-start; align-items: center; }
.group-timetable-grid .date-cell :is(.group-timetable-date-action, .group-activity-header, .group-schedule-marker-tooltip, .session-substitute-date-stack, .timetable-effective-date-time) { width: 100%; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 2px; padding-block: 0; }
.group-timetable-grid .date-cell .session-date-label { display: block; line-height: 1.25; }
.app-compact-shell .group-timetable-grid .session-substitute-indicator { margin: 0; font-size: 9px; font-weight: 400; line-height: 1.2; text-wrap: pretty; overflow-wrap: anywhere; }
.display-timezone-label, .display-timezone-control, .schedule-display-zone { color: var(--muted); font-size: 12px; line-height: 1.4; }
.display-timezone-control { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.display-timezone-control > label { display: flex; align-items: center; gap: 4px; min-width: 0; }
.topbar .display-timezone-control { position: relative; padding-inline-end: 22px; }
.topbar .display-timezone-control > .display-timezone-info { position: absolute; inset-inline-end: 0; bottom: 7px; }
.topbar .top-actions > .display-timezone-label { position: relative; padding-inline-end: 22px; white-space: nowrap; }
.topbar .top-actions > .display-timezone-label > .display-timezone-info { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); }
.app-compact-shell .display-timezone-info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); vertical-align: -3px; cursor: pointer; flex: 0 0 18px; }
.display-timezone-info::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; }
.display-timezone-info > span { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 50%; font: 500 10px/1 system-ui, sans-serif; }
.term-schedule-line { display: inline-flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; min-width: 0; }
.term-schedule-line > small { min-width: 0; }
.display-timezone-notice { width: max-content; max-width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 400; line-height: 1.5; pointer-events: auto; }
.display-timezone-dialog { width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
.display-timezone-dialog .field { display: flex; flex-direction: column; gap: 4px; margin-block: 10px; }
.display-timezone-dialog input, .display-timezone-dialog select { width: 100%; min-width: 0; font-size: 14px; }
.display-timezone-dialog select[size] { height: auto; min-height: 180px; padding: 4px; }
.display-timezone-dialog option { padding: 5px 6px; }
.display-timezone-dialog :is(p, option) { overflow-wrap: anywhere; }
.display-timezone-dialog .attendance-note-actions { flex-wrap: wrap; }
.display-country-dropdown { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.display-country-dropdown > summary { padding: 7px 10px; min-height: 32px; cursor: pointer; font-size: 14px; }
.display-country-options { padding: 0 10px 10px; }
.display-country-options select[size] { min-height: 130px; }
.display-country-single { margin-block: 10px; font-size: 14px; }
.topbar .display-timezone-control select { width: auto; min-width: 0; max-width: min(320px, calc(100vw - 64px)); min-height: 32px; padding: 4px 6px; font-size: 12px; background: #fff; }
.group-timetable-grid .date-cell .display-local-session-time { color: var(--muted); }
.group-timetable-grid .date-cell .timetable-effective-time { white-space: normal; overflow-wrap: anywhere; }
.teacher-availability-wrap[data-schedule-display-zone] .teacher-availability-block-label :is(strong,small) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.schedule-display-zone { margin: 4px 0 8px; }
@media (max-width: 768px) {
  .topbar .display-timezone-control select { min-height: 44px; font-size: 16px; }
  .topbar .display-timezone-control > .display-timezone-info { bottom: 13px; }
  .topbar .display-timezone-control > label { flex-direction: column; align-items: flex-start; max-width: 100%; }
  .display-timezone-control { flex-wrap: wrap; }
  .display-timezone-control .btn, .display-timezone-dialog .btn { min-height: 44px; }
  .display-timezone-dialog :is(input, select) { font-size: 16px; }
  .topbar .top-actions:has(.display-timezone-control) { flex-wrap: wrap; max-width: 100%; }
}
