
/* v58 — grouped rows, consistent with the Google account-menu reference. */
body:not(.cosmic-theme){--group-row:#0d1929;--group-outer:#172437;--group-gap:3px;--group-radius:26px}
body.light-theme:not(.cosmic-theme){--group-row:#e9eff8;--group-outer:#fff}
body:not(.cosmic-theme) dialog.material-modal .day-column{background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible}
body:not(.cosmic-theme) dialog.material-modal .day-header{margin:0 0 10px;border-radius:24px!important}
body:not(.cosmic-theme) dialog.material-modal .lessons{display:flex;flex-direction:column;gap:var(--group-gap)!important;padding:0!important}
body:not(.cosmic-theme) dialog.material-modal .lessons>.lesson-view{background:var(--group-row)!important;background-image:none!important;border:0!important;border-radius:5px!important;box-shadow:none!important;padding:16px 14px!important;margin:0!important;min-height:90px}
body:not(.cosmic-theme) dialog.material-modal .lessons>.lesson-view:first-child{border-top-left-radius:var(--group-radius)!important;border-top-right-radius:var(--group-radius)!important}
body:not(.cosmic-theme) dialog.material-modal .lessons>.lesson-view:nth-last-child(1 of .lesson-view){border-bottom-left-radius:var(--group-radius)!important;border-bottom-right-radius:var(--group-radius)!important}
body:not(.cosmic-theme) dialog.material-modal .lessons>.lesson-view.activity-lesson{background:#26364f!important}
body.light-theme:not(.cosmic-theme) dialog.material-modal .lessons>.lesson-view.activity-lesson{background:#d8e3f3!important}
body:not(.cosmic-theme) dialog.material-modal .lessons>.add-activity{margin-top:12px!important;flex-shrink:0}
body:not(.cosmic-theme) dialog.material-modal :is(.members-list,.holiday-view-list,.holiday-list,.task-list,.quick-list,.homework-list){display:flex;flex-direction:column;gap:var(--group-gap)!important;border:0!important;background:transparent!important;overflow:visible}
body:not(.cosmic-theme) dialog.material-modal :is(.members-list>.member-row,.holiday-view-list>.holiday-view-row,.holiday-list>.holiday-row,.task-list>.task-card,.quick-list>.quick-card,.homework-list>.homework-unit){border-radius:5px!important;margin-block:0!important;box-shadow:none!important;border:0!important}
body:not(.cosmic-theme) dialog.material-modal :is(.member-row,.holiday-view-row,.holiday-row,.task-card,.quick-card,.homework-unit):not(.saved):not(.is-completed){background:var(--group-row)!important;background-image:none!important}
body:not(.cosmic-theme) dialog.material-modal :is(.members-list,.holiday-view-list,.holiday-list,.task-list,.quick-list,.homework-list)>:first-child{border-top-left-radius:var(--group-radius)!important;border-top-right-radius:var(--group-radius)!important}
body:not(.cosmic-theme) dialog.material-modal :is(.members-list,.holiday-view-list,.holiday-list,.task-list,.quick-list,.homework-list)>:last-child{border-bottom-left-radius:var(--group-radius)!important;border-bottom-right-radius:var(--group-radius)!important}
body:not(.cosmic-theme) dialog.material-modal .bell-table{background:transparent!important;border:0!important;box-shadow:none!important}
body:not(.cosmic-theme) dialog.material-modal .bell-row{background:var(--group-row)!important;border:0!important;border-radius:5px!important;margin-block:3px!important;padding:12px!important}
body:not(.cosmic-theme) dialog.material-modal .bell-row:nth-child(2){border-top-left-radius:24px!important;border-top-right-radius:24px!important}
body:not(.cosmic-theme) dialog.material-modal .bell-row:last-child{border-bottom-left-radius:24px!important;border-bottom-right-radius:24px!important}
@media(min-width:721px){
body:not(.cosmic-theme) dialog.material-modal :is(.primary,.secondary,.text-button,.member-menu button,.choice-option,.settings-theme-options button,.segmented button,.tabs button){font-size:16px!important}
body:not(.cosmic-theme) dialog.material-modal .settings-menu-row strong{font-size:16px!important}
body:not(.cosmic-theme) dialog.material-modal .settings-menu-row small{font-size:13px!important}
body:not(.cosmic-theme) dialog.material-modal :is(.settings-menu-group>strong,.settings-theme-group>strong){font-size:15px!important}
body:not(.cosmic-theme) dialog.material-modal .settings-menu-row{min-height:54px!important}
body:not(.cosmic-theme) dialog.material-modal :is(.secondary,.text-button,.segmented button){line-height:1.35}
}
/* Distinct elevation levels in dark Material; no changes to Cosmic. */
body:not(.light-theme):not(.cosmic-theme){--group-row:#23334a;--group-outer:#121e2e}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal{background:#142133!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .modal-heading{background:#142133!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .lesson-edit{background:#23334a!important;border:1px solid #42536a!important;border-radius:20px!important;padding:16px!important;margin-bottom:8px!important;box-shadow:none!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .lesson-edit input{background:#101c2d!important;border:1px solid #465a75!important;color:#ecf2fb!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .lesson-edit input::placeholder{color:#a5b5cb!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal :is(.lesson-top,.subgroup-label,.lesson-time-range){color:#b5c9e7!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .bell-row{background:#23334a!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .time-field{background:#101c2d!important;border:1px solid #465a75!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .day-header{background:#31465f!important}
body:not(.light-theme):not(.cosmic-theme) dialog.material-modal .lesson-view.activity-lesson{background:#35405b!important}

.member-account-selection {
  display: grid;
  gap: 10px;
  margin-block: 12px;
}

.member-account-selection p {
  margin: 0;
}

.member-account-selection > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body dialog.modal .member-account-checkbox {
  appearance: auto;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  accent-color: #92bafa;
  cursor: pointer;
}

body dialog.modal .member-account-group-toggle {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.member-account-group-toggle svg {
  flex: none;
  margin-right: 6px;
  transition: transform .18s ease;
}

.member-account-group-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.member-account-group-content {
  margin: 6px 0 8px 14px;
  padding-left: 8px;
  border-left: 2px solid #9dbfff40;
}

.member-account-group-content:not([hidden]) {
  display: grid;
  gap: 4px;
}

.member-account-ungroup {
  justify-self: end;
  margin-top: 5px;
}


body dialog.material-modal :is(.members-list > .member-account-group > .member-account-group-toggle,.member-account-group-content > .member-row) {
  border-radius: 5px !important;
}

body dialog.material-modal :is(.members-list > .member-account-group:first-child > .member-account-group-toggle,.member-account-group-content > .member-row:first-child) {
  border-top-left-radius: var(--group-radius, 22px) !important;
  border-top-right-radius: var(--group-radius, 22px) !important;
}

body dialog.material-modal :is(.members-list > .member-account-group:last-child > .member-account-group-toggle[aria-expanded="false"],.member-account-group-content > .member-row:nth-last-child(1 of .member-row)) {
  border-bottom-left-radius: var(--group-radius, 22px) !important;
  border-bottom-right-radius: var(--group-radius, 22px) !important;
}
