/* stage-12-schedules-layer */

#entryModal[data-action="schedule"] .modal-panel {
  width: min(980px, calc(100vw - 32px));
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 24%, var(--glass-border));
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent), transparent 19rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 86%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
}

#entryModal[data-action="schedule"] .modal-fields {
  gap: clamp(12px, 1.6vw, 18px);
}

.managed-shell-schedule {
  display: grid;
  gap: clamp(12px, 1.6vw, 16px);
}

.schedule-managed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 18%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 10%, transparent), transparent 14rem),
    color-mix(in srgb, var(--glass-surface) 78%, transparent);
  box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 12px;
}

.schedule-managed-head .text-link {
  min-height: 42px;
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 26%, var(--glass-border));
  background: color-mix(in srgb, var(--label-schedule, #5f9073) 10%, var(--glass-elevated));
  color: color-mix(in srgb, var(--label-schedule, #5f9073) 84%, var(--text));
}

.schedule-records-list {
  display: grid;
  gap: 14px;
}

.schedule-entry-card {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border-color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 24%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 12%, transparent), transparent 16rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 80%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
  box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 18px 18px 16px 22px;
}

.schedule-entry-card::after {
  position: absolute;
  inset: 16px auto 16px 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--schedule-entry-color, var(--label-schedule, #5f9073)), color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 38%, transparent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 28%, transparent);
  content: "";
}

.schedule-entry-card:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 44%, var(--glass-border));
  box-shadow: var(--focus-shadow), var(--focus-glow);
  transform: translateY(-2px);
}

.schedule-entry-card .dot {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 12%, transparent);
}

.schedule-entry-card small,
.schedule-entry-card p {
  color: var(--muted-strong);
}

.schedule-entry-toggle {
  border-color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 20%, var(--glass-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-surface) 78%, transparent);
}

.schedule-picker-shell,
.schedule-wizard-shell {
  display: grid;
  gap: clamp(12px, 1.6vw, 16px);
}

.schedule-picker-shell .schedule-type-grid {
  gap: 14px;
}

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

.schedule-type-card {
  position: relative;
  isolation: isolate;
  min-height: 124px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--primary) 14%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 16% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent), transparent 15rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 78%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
  box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 18px;
}

.schedule-type-card::before {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--glass-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  content: "";
  opacity: 0.72;
}

.schedule-type-card:hover,
.schedule-type-card:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--glass-border));
  box-shadow: var(--focus-shadow), var(--focus-glow);
  transform: translateY(-2px);
}

.schedule-wizard-shell .wizard-card {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 18%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 10%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 80%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
}

.schedule-wizard-shell .wizard-actions {
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--glass-border));
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--glass-surface) 72%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 8px;
}

.schedule-detail-view {
  display: grid;
  gap: 14px;
}

.schedule-detail-card {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 18%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 78%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
  box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* stage-14-schedule-detail-actions-layer */
.schedule-detail-toolbar {
  align-items: center;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 9%, transparent), transparent 14rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 64%, transparent), color-mix(in srgb, var(--glass-surface) 90%, transparent));
}

.schedule-detail-action-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 18%, var(--glass-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  padding: 5px;
}

.schedule-detail-toolbar :is(.action-image-button, .icon-action) {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 17%, transparent);
  border-radius: 15px;
  background:
    radial-gradient(circle at 35% 12%, color-mix(in srgb, #fff 24%, transparent), transparent 50%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  background-position: center;
  color: color-mix(in srgb, var(--muted-strong) 84%, var(--text));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  padding: 0;
}

.schedule-detail-toolbar .icon-action::before {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--micro-icon, var(--icon-note)) center / contain no-repeat;
  mask: var(--micro-icon, var(--icon-note)) center / contain no-repeat;
}

.schedule-detail-toolbar :is(.action-image-button, .icon-action):is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 36%, var(--glass-border));
  color: color-mix(in srgb, var(--primary) 72%, var(--text));
  box-shadow:
    var(--shadow-xs),
    0 10px 24px color-mix(in srgb, var(--label-schedule, #5f9073) 18%, transparent);
  transform: translateY(-1px) scale(1.03);
}

/* stage-13-schedule-actions-layer */
.schedule-entry-card {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
}

.schedule-entry-card .schedule-entry-head {
  grid-column: 1 / -1;
}

.schedule-entry-card > small,
.schedule-entry-card > p {
  grid-column: 1;
  min-width: 0;
  padding-right: 6px;
}

.schedule-entry-actions {
  grid-column: 2;
  grid-row: 2 / span 5;
  align-self: start;
  justify-self: end;
  display: inline-grid;
  width: max-content;
  max-width: max-content;
  margin-top: 2px;
  z-index: 2;
}

.schedule-entry-card .item-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: max-content;
  max-width: max-content;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 20%, var(--glass-border));
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 58%, transparent), color-mix(in srgb, var(--glass-surface) 86%, transparent));
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 5px;
}

.schedule-entry-card .icon-action {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 16%, transparent);
  border-radius: 14px;
  color: color-mix(in srgb, var(--muted-strong) 86%, var(--text));
  background:
    radial-gradient(circle at 35% 15%, color-mix(in srgb, #fff 22%, transparent), transparent 52%),
    color-mix(in srgb, var(--glass-surface) 74%, transparent);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
}

.schedule-entry-card .icon-action::before {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--micro-icon, var(--icon-note)) center / contain no-repeat;
  mask: var(--micro-icon, var(--icon-note)) center / contain no-repeat;
}

.schedule-entry-card .icon-action:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 38%, var(--glass-border));
  color: color-mix(in srgb, var(--primary) 72%, var(--text));
  background:
    radial-gradient(circle at 35% 15%, color-mix(in srgb, #fff 30%, transparent), transparent 52%),
    color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 13%, var(--glass-elevated));
  box-shadow:
    var(--shadow-xs),
    0 10px 24px color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 18%, transparent);
  transform: translateY(-1px) scale(1.03);
}

.schedule-entry-card .icon-action.delete:is(:hover, :focus-visible) {
  color: color-mix(in srgb, var(--label-birthday, #d96b5f) 78%, var(--text));
}

/* stage-23-schedules-dashboard-layer */
.schedule-managed-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 14px;
  padding: 14px;
}

.schedule-section-hero {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.schedule-section-copy {
  display: grid;
  max-width: 680px;
  gap: 4px;
}

.schedule-section-copy span {
  color: color-mix(in srgb, var(--label-schedule, #5f9073) 74%, var(--muted-strong));
  font-size: 0.78rem;
  font-weight: 760;
}

.schedule-section-copy p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  font-weight: 680;
  line-height: 1.3;
}

.schedule-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-filter-chip {
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
  border-radius: 999px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 54%, transparent), color-mix(in srgb, var(--glass-surface) 90%, transparent));
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0 13px;
  transition:
    color var(--motion-standard),
    border-color var(--motion-standard),
    background var(--motion-standard),
    box-shadow var(--motion-standard),
    transform var(--motion-fast);
}

.schedule-filter-chip:hover,
.schedule-filter-chip:focus-visible,
.schedule-filter-chip.is-active {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 34%, var(--glass-border));
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, #fff 24%, transparent), transparent 54%),
    color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-elevated));
  color: color-mix(in srgb, var(--label-schedule, #5f9073) 78%, var(--text));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--label-schedule, #5f9073) 13%, transparent);
  transform: translateY(-1px);
}

.schedule-add-button {
  align-self: start;
  white-space: nowrap;
}

.schedule-entry-meta {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 7px;
  margin-top: 2px;
}

.schedule-entry-kind-pill,
.schedule-entry-status-pill {
  display: inline-grid;
  min-height: 26px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 16%, var(--glass-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-surface) 72%, transparent);
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 760;
  padding: 0 10px;
}

.schedule-entry-status-pill.is-active {
  border-color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 34%, var(--glass-border));
  background: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 15%, var(--glass-elevated));
  color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 74%, var(--text));
}

.schedule-entry-status-pill.is-paused {
  border-color: color-mix(in srgb, var(--muted) 24%, var(--glass-border));
  background: color-mix(in srgb, var(--muted) 10%, var(--glass-surface));
}

.schedule-entry-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.schedule-empty-filter {
  border-style: dashed;
  color: var(--muted-strong);
}

.schedule-wizard-shell .wizard-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 15%, var(--glass-border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 54%, transparent), color-mix(in srgb, var(--glass-surface) 88%, transparent));
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  padding: 12px 14px;
}

.wizard-step-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.wizard-step-title span,
.wizard-step-count {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 760;
}

.wizard-step-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-step-count {
  white-space: nowrap;
}

.schedule-picker-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.schedule-picker-shell::before {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent), transparent 64%);
  content: "";
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 760px) {
  #entryModal[data-action="schedule"] .modal-panel {
    width: min(100vw - 16px, 620px);
  }

  .schedule-managed-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-add-button {
    justify-self: stretch;
  }

  .schedule-section-copy p {
    font-size: 1rem;
  }

  .schedule-filter-bar {
    gap: 7px;
  }

  .schedule-filter-chip {
    flex: 1 1 auto;
    padding-inline: 10px;
  }

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

  .schedule-managed-head,
  .schedule-entry-card,
  .schedule-type-card {
    border-radius: var(--radius-lg);
  }

  .schedule-entry-card {
    column-gap: 10px;
    padding-right: 14px;
  }

  .schedule-entry-card .item-actions {
    border-radius: 16px;
    gap: 5px;
    padding: 4px;
  }

  .schedule-entry-card .icon-action {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 13px;
  }

  .schedule-detail-toolbar {
    border-radius: var(--radius-lg);
    padding: 7px;
  }

  .schedule-detail-action-cluster {
    border-radius: 16px;
    padding: 4px;
  }

  .schedule-detail-toolbar :is(.action-image-button, .icon-action) {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 14px;
  }

  .schedule-wizard-shell .wizard-actions {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 3;
  }

  .schedule-wizard-shell .wizard-topline {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #entryModal[data-action="schedule"] *,
  .schedule-entry-card,
  .schedule-type-card {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* stage-24-schedule-wizard-interiors */
.schedule-wizard-shell .wizard-card {
  gap: clamp(12px, 1.6vw, 18px);
}

.schedule-wizard-shell .wizard-card-head {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.schedule-wizard-shell .wizard-card-head h3 {
  margin: 0;
}

.schedule-wizard-shell .wizard-card-head p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 540;
  line-height: 1.45;
}

.wizard-step-body {
  display: grid;
  min-width: 0;
  gap: clamp(12px, 1.7vw, 16px);
}

.wizard-step-body .schedule-form-grid,
.wizard-step-body .wizard-add-row,
.wizard-step-body .selected-subjects,
.wizard-step-body .lesson-subject-picker,
.wizard-step-body .wizard-subsection,
.wizard-step-body .mentor-group-picker,
.wizard-step-body .music-practice-builder,
.wizard-step-body .sport-day-builder {
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 12rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 46%, transparent), color-mix(in srgb, var(--glass-surface) 88%, transparent));
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(12px, 1.7vw, 16px);
}

.wizard-step-body .wizard-add-row {
  align-items: center;
}

.wizard-step-body .selected-subjects {
  border-top: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-border));
  margin-top: 0;
}

.wizard-step-body .wizard-chip-row,
.wizard-step-body .wizard-tags,
.wizard-step-body .wizard-option-grid {
  gap: 9px;
}

.wizard-step-body :where(.wizard-chip, .wizard-tag, .wizard-option) {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
  background:
    radial-gradient(circle at 30% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 54%),
    color-mix(in srgb, var(--glass-surface) 82%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

.wizard-step-body :where(.wizard-chip, .wizard-option):is(.selected, :hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 36%, var(--glass-border));
  background:
    radial-gradient(circle at 24% 0%, color-mix(in srgb, #fff 24%, transparent), transparent 56%),
    color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-elevated));
  color: color-mix(in srgb, var(--label-schedule, #5f9073) 78%, var(--text));
  box-shadow:
    var(--shadow-xs),
    0 10px 24px color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent);
  transform: translateY(-1px);
}

.wizard-step-body .wizard-lesson-list {
  display: grid;
  gap: 9px;
}

.wizard-step-body .wizard-lesson,
.wizard-step-body .wizard-person-row {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-border));
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 42%, transparent), color-mix(in srgb, var(--glass-surface) 92%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  padding: 12px;
}

.wizard-step-body .wizard-lesson {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.wizard-step-body .wizard-lesson > .schedule-form-grid {
  grid-column: 1 / -1;
  width: 100%;
}

.wizard-step-body .wizard-lesson strong {
  min-width: 0;
}

.wizard-step-body .wizard-lesson strong small {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 720;
}

.wizard-step-body .wizard-person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.wizard-step-body .mentor-group-picker-row {
  gap: 9px;
}

.wizard-step-body .mentor-group-picker-add {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 12%, var(--glass-border));
}

.wizard-step-body .arts-time-popover {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 16%, var(--glass-border));
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 62%, transparent), color-mix(in srgb, var(--glass-surface) 92%, transparent));
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.wizard-step-body .time-picker-panel {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 16%, var(--glass-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-surface) 86%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

.wizard-step-body .time-picker-column {
  scrollbar-gutter: stable;
}

.wizard-step-body .sport-day-row,
.wizard-step-body .practice-day-row,
.wizard-step-body .arts-day-subject-row {
  align-items: center;
}

.wizard-step-body .sport-day-sessions,
.wizard-step-body .practice-day-sessions {
  min-width: 0;
}

@media (max-width: 760px) {
  #entryModal[data-action="schedule"] .modal-head > div {
    min-width: 0;
    padding-right: 10px;
  }

  #entryModal[data-action="schedule"] .modal-head h2 {
    max-width: calc(100vw - 126px);
    overflow-wrap: anywhere;
  }

  .schedule-wizard-shell .wizard-card-head p {
    font-size: 0.86rem;
  }

  .wizard-step-body .schedule-form-grid,
  .wizard-step-body .wizard-add-row,
  .wizard-step-body .selected-subjects,
  .wizard-step-body .lesson-subject-picker,
  .wizard-step-body .wizard-subsection,
  .wizard-step-body .mentor-group-picker,
  .wizard-step-body .music-practice-builder,
  .wizard-step-body .sport-day-builder {
    border-radius: var(--radius-md);
    padding: 12px;
  }

  .wizard-step-body .wizard-add-row {
    grid-template-columns: 1fr;
  }

  .wizard-step-body .wizard-person-row,
  .wizard-step-body .wizard-lesson {
    border-radius: 16px;
  }

  .wizard-step-body .arts-day-subject-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* stage-25-schedule-preview-details */
.schedule-preview-card {
  --schedule-preview-color: var(--label-schedule, #5f9073);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(12px, 1.6vw, 16px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--schedule-preview-color) 20%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--schedule-preview-color) 13%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 56%, transparent), color-mix(in srgb, var(--glass-surface) 92%, transparent));
  box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: clamp(14px, 2vw, 18px);
}

.schedule-preview-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.schedule-preview-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.schedule-preview-head span:not(.schedule-preview-dot) {
  color: color-mix(in srgb, var(--schedule-preview-color) 72%, var(--muted-strong));
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0;
}

.schedule-preview-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 780;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-preview-card .schedule-preview-meta {
  display: flex;
}

.schedule-preview-card > * {
  grid-column: 1;
}

.schedule-preview-meta span {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--schedule-preview-color) 16%, var(--glass-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-surface) 76%, transparent);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 740;
  padding: 0 11px;
}

.schedule-preview-card > p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.45;
}

.schedule-preview-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
}

.schedule-preview-days .school-preview-day {
  display: grid;
  min-width: 0;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--schedule-preview-color) 13%, var(--glass-border));
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 9rem),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  padding: 11px;
}

.schedule-preview-days .school-preview-day strong {
  color: color-mix(in srgb, var(--schedule-preview-color) 78%, var(--text));
  font-size: 0.86rem;
  font-weight: 780;
}

.schedule-preview-days .school-preview-day small {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 620;
  line-height: 1.35;
}

.schedule-detail-view {
  --schedule-detail-color: var(--label-schedule, #5f9073);
}

.schedule-detail-card {
  display: grid;
  gap: clamp(12px, 1.6vw, 16px);
  padding: clamp(14px, 2vw, 18px);
}

.schedule-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color) 18%, var(--glass-border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--schedule-detail-color) 13%, transparent), transparent 15rem),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
  padding: 14px;
}

.schedule-detail-hero > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.schedule-detail-hero span:not(.schedule-preview-dot) {
  color: color-mix(in srgb, var(--schedule-detail-color) 72%, var(--muted-strong));
  font-size: 0.76rem;
  font-weight: 780;
}

.schedule-detail-hero strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-detail-hero small {
  color: var(--muted-strong);
  font-weight: 680;
}

.schedule-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.schedule-detail-meta-grid span {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color) 12%, var(--glass-border));
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 42%, transparent), color-mix(in srgb, var(--glass-surface) 88%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  padding: 10px 11px;
}

.schedule-detail-meta-grid small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
}

.schedule-detail-meta-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-detail-days {
  display: grid;
  gap: 10px;
}

.schedule-day-detail {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color) 13%, var(--glass-border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, #fff 17%, transparent), transparent 12rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 42%, transparent), color-mix(in srgb, var(--glass-surface) 90%, transparent));
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
  padding: 13px;
}

.schedule-day-detail h3 {
  margin: 0;
  color: color-mix(in srgb, var(--schedule-detail-color) 78%, var(--text));
  font-size: 0.98rem;
  font-weight: 780;
}

.schedule-day-lessons {
  display: grid;
  gap: 8px;
}

.schedule-detail-lesson {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color) 10%, var(--glass-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-surface) 78%, transparent);
  padding: 10px 11px;
}

.schedule-detail-lesson span,
.schedule-detail-lesson strong {
  min-width: 0;
}

.schedule-detail-lesson span {
  color: var(--text);
  font-weight: 740;
}

.schedule-detail-lesson span small {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.schedule-detail-lesson strong {
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 680;
  text-align: right;
}

.schedule-extra-detail {
  border-style: dashed;
}

@media (max-width: 760px) {
  .schedule-preview-head strong,
  .schedule-detail-hero strong {
    white-space: normal;
  }

  .schedule-preview-days,
  .schedule-detail-meta-grid,
  .schedule-detail-lesson {
    grid-template-columns: 1fr;
  }

  .schedule-preview-card,
  .schedule-detail-card,
  .schedule-detail-hero,
  .schedule-day-detail {
    border-radius: var(--radius-lg);
  }

  .schedule-detail-lesson strong {
    text-align: left;
  }
}

/* stage-26-schedule-list-dashboard */
.schedule-section-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-section-stat {
  display: inline-grid;
  min-width: 86px;
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-border));
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 24% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 52%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  padding: 8px 10px;
}

.schedule-section-stat small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.schedule-section-stat strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.schedule-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-filter-chip small {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--label-schedule, #5f9073) 11%, var(--glass-surface));
  color: color-mix(in srgb, var(--label-schedule, #5f9073) 76%, var(--muted-strong));
  font-size: 0.72rem;
  font-weight: 820;
  padding-inline: 6px;
}

.schedule-entry-overview {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.schedule-entry-overview span {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 12%, var(--glass-border));
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 42%, transparent), color-mix(in srgb, var(--glass-surface) 88%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 11%, transparent);
  padding: 9px 10px;
}

.schedule-entry-overview small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-entry-overview strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-entry-next {
  border-color: color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 20%, var(--glass-border));
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--schedule-entry-color, var(--label-schedule, #5f9073)) 10%, transparent), transparent 8rem),
    color-mix(in srgb, var(--glass-surface) 78%, transparent);
}

.schedule-empty {
  display: grid;
  min-height: 132px;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--label-schedule, #5f9073) 22%, var(--glass-border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 9%, transparent), transparent 16rem),
    color-mix(in srgb, var(--glass-surface) 66%, transparent);
  color: var(--muted-strong);
  font-weight: 680;
  line-height: 1.45;
  text-align: center;
  padding: 20px;
}

@media (max-width: 760px) {
  .schedule-section-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .schedule-section-stat {
    min-width: 0;
  }

  .schedule-filter-chip {
    justify-content: center;
  }

  .schedule-entry-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-entry-card .schedule-entry-head,
  .schedule-entry-meta,
  .schedule-entry-card > small,
  .schedule-entry-card > p,
  .schedule-entry-overview,
  .schedule-entry-actions {
    grid-column: 1;
  }

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

  .schedule-entry-actions {
    grid-row: auto;
    justify-self: end;
  }
}

/* stage-27-schedule-mobile-flow */
.schedule-mobile-flow-shell {
  display: none;
}

.schedule-mobile-picker-card {
  display: none;
}

.schedule-mobile-sticky-actions {
  display: none;
}

.schedule-mobile-step-surface {
  display: none;
}

.schedule-mobile-safe-bottom {
  display: none;
}

@media (max-width: 640px) {
  #entryModal[data-action="schedule"] .modal-panel {
    width: 100vw;
    max-height: min(94dvh, calc(100dvh - 8px));
    border-radius: 30px 30px 0 0;
  }

  #entryModal[data-action="schedule"] .modal-fields {
    margin-inline: 14px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  #entryModal[data-action="schedule"] .modal-head {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .schedule-picker-shell,
  .schedule-wizard-shell,
  .schedule-mobile-flow-shell {
    display: grid;
    min-height: 0;
    gap: 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .schedule-picker-shell {
    align-content: start;
  }

  .schedule-picker-shell .schedule-type-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-type-card,
  .schedule-mobile-picker-card {
    display: grid;
    min-height: 92px;
    gap: 7px;
    border-radius: var(--radius-lg);
    padding: 15px 16px;
  }

  .schedule-type-card::before {
    width: 26px;
    height: 26px;
    border-radius: 11px;
  }

  .schedule-type-card strong {
    font-size: 1rem;
    line-height: 1.2;
  }

  .schedule-type-card span {
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .schedule-picker-actions,
  .schedule-wizard-shell .wizard-actions,
  .schedule-mobile-sticky-actions {
    position: sticky;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 6;
    justify-self: end;
    border-radius: 22px;
    background:
      radial-gradient(circle at 20% 0%, color-mix(in srgb, #fff 20%, transparent), transparent 54%),
      color-mix(in srgb, var(--glass-elevated) 82%, transparent);
    box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .schedule-wizard-shell {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .schedule-wizard-shell .wizard-topline,
  .schedule-wizard-shell .wizard-progress {
    position: sticky;
    top: 0;
    z-index: 4;
  }

  .schedule-wizard-shell .wizard-topline,
  .schedule-mobile-step-surface {
    border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
    border-radius: var(--radius-lg);
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 76%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
    box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .schedule-wizard-shell .wizard-card {
    overflow: auto;
    max-height: min(58dvh, 620px);
    border-radius: var(--radius-lg);
    padding: 14px;
    overscroll-behavior: contain;
  }

  .schedule-wizard-shell .wizard-card-head h3 {
    font-size: 1.02rem;
    line-height: 1.22;
  }

  .schedule-mobile-safe-bottom {
    display: block;
    height: max(12px, env(safe-area-inset-bottom));
  }
}
