/* Shared modal readability layer for every Studerria screen. */
html body.studerria-theme .modal-backdrop,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .modal-backdrop {
  z-index: 1070 !important;
  background: rgba(4, 8, 20, 0.56) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  transition: opacity 220ms ease !important;
}

html body.theme-light.studerria-theme .modal-backdrop,
html body.theme-light.studerria-theme:is(.modal-open, .studerria-changelog-open) .modal-backdrop {
  background: rgba(232, 238, 251, 0.42) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body.studerria-theme .modal,
html body.studerria-theme .modal.show {
  z-index: 1080 !important;
}

html body.studerria-theme .modal-backdrop.show,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open, .confirm-modal-open) .modal-backdrop.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

html body.studerria-theme.modal-open,
html body.studerria-theme.studerria-changelog-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

html body.studerria-theme .modal.show .modal-dialog .modal-content,
html body.studerria-theme #confirmActionModal.modal.show .modal-content,
html body.studerria-theme #journalCellModal.modal.show .modal-content,
html body.studerria-theme #mobileMenuModal.modal.show .modal-content,
html body.studerria-theme .changelog-liquid-modal.modal.show .modal-content {
  background: linear-gradient(180deg, rgba(19, 26, 48, 0.985), rgba(8, 13, 28, 0.995)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(191, 219, 254, 0.16) !important;
  border-radius: 28px !important;
  background-clip: padding-box;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 36px 110px rgba(2, 6, 23, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

html body.theme-light.studerria-theme .modal.show .modal-dialog .modal-content,
html body.theme-light.studerria-theme #confirmActionModal.modal.show .modal-content,
html body.theme-light.studerria-theme #journalCellModal.modal.show .modal-content,
html body.theme-light.studerria-theme #mobileMenuModal.modal.show .modal-content,
html body.theme-light.studerria-theme .changelog-liquid-modal.modal.show .modal-content {
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.99), rgba(239, 244, 255, 0.996)) !important;
  color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 30px 88px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

html body.studerria-theme .modal.show .modal-header,
html body.studerria-theme .modal.show .modal-footer,
html body.studerria-theme .modal.show .modal-body {
  background: transparent !important;
  color: inherit !important;
}

html body.studerria-theme .modal.show .modal-header,
html body.studerria-theme .modal.show .modal-footer {
  border-color: rgba(191, 219, 254, 0.12) !important;
}

html body.theme-light.studerria-theme .modal.show .modal-header,
html body.theme-light.studerria-theme .modal.show .modal-footer {
  border-color: rgba(148, 163, 184, 0.2) !important;
}

html body.studerria-theme .modal.show .modal-title,
html body.studerria-theme .modal.show .modal-body,
html body.studerria-theme .modal.show .modal-body p,
html body.studerria-theme .modal.show .modal-body li,
html body.studerria-theme .modal.show .modal-body label,
html body.studerria-theme .modal.show .modal-body .text-muted,
html body.studerria-theme .modal.show .modal-body .small {
  color: inherit !important;
}

html body.theme-dark.studerria-theme .modal.show .modal-body .text-muted,
html body.theme-dark.studerria-theme .modal.show .modal-body .small {
  color: rgba(226, 232, 240, 0.82) !important;
}

html body.theme-light.studerria-theme .modal.show .modal-body .text-muted,
html body.theme-light.studerria-theme .modal.show .modal-body .small {
  color: rgba(51, 65, 85, 0.76) !important;
}

html body.studerria-theme .modal,
html body.studerria-theme .modal-backdrop,
html body.studerria-theme .modal-dialog,
html body.studerria-theme .modal-dialog-scrollable .modal-content,
html body.studerria-theme .modal-content,
html body.studerria-theme .modal-header,
html body.studerria-theme .modal-body,
html body.studerria-theme .modal-footer,
html body.studerria-theme .modal-content::before,
html body.studerria-theme .modal-content::after,
html body.studerria-theme .modal-header::before,
html body.studerria-theme .modal-header::after,
html body.studerria-theme .modal-footer::before,
html body.studerria-theme .modal-footer::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* While a modal is open, turn off page-level glass blur layers so the viewport stays sharp behind the overlay. */
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .glass,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .glass-card,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .glass-panel,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .glass-inset,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .glass-dock,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .surface,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .surface--elevated,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .card,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .topbar,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .app-footer,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .app-footer .footer-meta,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .schedule-content,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .schedule-shell,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .week-pager,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .cockpit-page,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .week-hero,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .schedule-panel,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .day-card,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .density-summary,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .week-rail,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .schedule-card,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-nav,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-viewas-form,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-sidebar,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-sidebar-inner,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-header-rail,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-course-chip,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-topbar-btn,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .session-health-chip,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .bulk-bar,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .flash-alert,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-toast,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .admin-preview-form,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .role-studio-role-card,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .dropdown-menu,
html body.studerria-theme:is(.modal-open, .studerria-changelog-open) .topbar.topbar--title-spotlight.studerria-nav-shell {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

html body.studerria-theme #welcomeModal .modal-dialog,
html body.studerria-theme #welcomeModal .modal-content,
html body.studerria-theme #welcomeModal .modal-body,
html body.studerria-theme #welcomeModal .modal-body > *,
html body.studerria-theme #welcomeModal .welcome-cta {
  pointer-events: auto !important;
}

html body.studerria-theme #welcomeModal .modal-content,
html body.studerria-theme #welcomeModal .modal-body {
  position: relative;
}

html body.studerria-theme #welcomeModal .modal-body > * {
  position: relative;
  z-index: 1;
}

html body.studerria-theme #welcomeModal .welcome-cta {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10.5rem;
  min-height: 2.8rem;
  padding-inline: 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.42);
  box-shadow: 0 16px 30px rgba(99, 102, 241, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  touch-action: manipulation;
}

html body.theme-light.studerria-theme #welcomeModal .welcome-cta {
  border-color: rgba(99, 102, 241, 0.24);
  box-shadow: 0 14px 26px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.54);
}
