/* Teaching tools: dense information stays readable without decorative panels. */
html:has(body[data-teacher-theme="dark"]:not(.student-mode)),
html:has(body.student-mode[data-student-theme="dark"]) {
  background: #191d25;
}
.teacher-task-side .route-panel-action {
  min-height: 44px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--blue);
  box-shadow: none;
}
.teacher-task-side .teacher-work-queue {
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
}
.teacher-work-queue .queue-section {
  padding: 0;
  background: transparent;
}
.teacher-work-queue .queue-section + .queue-section {
  margin-top: 24px;
}
.teacher-work-queue .queue-section > span {
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
  font-weight: 400;
}
.teacher-work-queue .queue-section > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.teacher-work-queue .queue-row {
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 4px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 0;
}
.teacher-work-queue .queue-row > :first-child {
  grid-column: 1;
  grid-row: 1/3;
  width: 18px;
  padding: 0;
}
.teacher-work-queue .queue-row > span:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}
.teacher-work-queue .queue-task-title {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.teacher-work-queue .queue-task-title b {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  word-break: normal;
  overflow-wrap: break-word;
}
.teacher-work-queue .queue-row.current .queue-task-title b {
  color: var(--blue);
  font-weight: 500;
}
.teacher-sidebar .roster-row {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  padding: 10px 8px;
}
.teacher-sidebar .roster-row.selected {
  background: var(--ice);
  color: #3454d1;
  border-radius: 6px;
}
.teacher-sidebar .roster-row.selected :is(b, span, small) {
  color: #3454d1;
}
.teacher-sidebar .roster-select {
  color: inherit;
  min-width: 0;
  background: transparent;
}
.teacher-sidebar .roster-select b {
  font-size: 14px;
  font-weight: 500;
}
.teacher-sidebar .roster-select span {
  font-size: 11px;
}
.teacher-sidebar .roster-select .student-direct-link {
  display: none;
}
.teacher-sidebar :is(.control-panel, .lesson-roster, .notification-center) {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 16px 0;
}
.teacher-sidebar .teacher-actions-grid button {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  min-height: 40px;
  border-radius: 5px;
}
.teacher-hint-form {
  padding: 18px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.teacher-hint-form label {
  font-size: 13px;
  color: var(--ink);
}
.teacher-hint-compose {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.teacher-hint-compose textarea {
  flex: 1;
  min-width: 180px;
  min-height: 84px;
  font: 400 14px/1.6 var(--font-ui);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
.teacher-hint-compose .photo-loader {
  position: relative;
  flex: 0 0 auto;
  padding: 12px;
  min-height: 42px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.teacher-hint-compose .photo-loader input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.teacher-hint-compose .photo-loader:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.teacher-question-card {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 16px;
}
.teacher-question-card p {
  color: var(--muted);
  font-size: 13px;
}
.teacher-question-card .teacher-helped-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 5px;
  font-size: 12px;
}
body[data-group-cabinet]
  :is(
    button.btn.primary,
    form button:not([type]):not(.quiet):not(.outline):not(.danger)
  ) {
  background: #3454d1;
  color: white;
}

body[data-group-cabinet] .taskrow .badge {
  background: var(--ice);
  color: #3454d1;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
body[data-group-cabinet]
  #app[data-view="pult"]
  .academy-session-materials
  > .grid
  > .card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
body[data-group-cabinet]
  #app[data-view="pult"]
  .academy-session-materials
  > .grid
  > .card
  + .card {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
body[data-group-cabinet][data-teacher-theme="dark"] .matrix .cell {
  background: #2b303a;
  color: #bbc0ca;
  border-color: #434955;
}
body[data-group-cabinet][data-teacher-theme="dark"] .matrix .cell.correct {
  background: #203e32;
  color: #a1ddba;
  border-color: #38624c;
}
body[data-group-cabinet][data-teacher-theme="dark"] .matrix .cell.wrong {
  background: #46282d;
  color: #f6b2b6;
  border-color: #734048;
}
body[data-group-cabinet][data-teacher-theme="dark"] .matrix tbody th {
  background: var(--surface);
}
@media (max-width: 760px) {
  .teacher-task-side .teacher-work-queue {
    grid-column: 1/-1;
  }
  .teacher-work-queue {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .teacher-work-queue .queue-section + .queue-section {
    margin-top: 0;
  }
  body[data-group-cabinet]
    #app[data-view="pult"]
    .academy-session-materials
    > .grid
    > .card
    + .card {
    border: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
  }
}

.homework-default-settings {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  border-radius: 6px;
}
body[data-group-cabinet][data-teacher-theme="dark"]
  .academy-module.locked
  .academy-module-art {
  opacity: 0.55;
  filter: grayscale(1);
}
body[data-group-cabinet][data-teacher-theme="dark"] .course-person {
  color: var(--ink);
}
body[data-group-cabinet][data-teacher-theme="dark"] .course-group-pin {
  color: #b9c8ff;
  background: #293454;
}
.directory-profile-details {
  border-top: 1px solid var(--line);
}
.directory-profile-details > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  list-style: none;
  padding: 18px 24px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.directory-profile-details > summary::-webkit-details-marker {
  display: none;
}
.directory-profile-details > summary > span:last-child {
  color: var(--blue);
}
.directory-profile-details > summary > span:last-child::after {
  content: " +";
  margin-left: 8px;
}
.directory-profile-details[open] > summary > span:last-child::after {
  content: " −";
}
.directory-student-card .directory-history-details {
  margin: 0 24px 20px;
}
.directory-student-head {
  padding: 20px 24px;
}
.directory-list {
  gap: 16px;
}
@media (max-width: 700px) {
  .directory-profile-details > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }
  .directory-student-head {
    padding: 16px;
    gap: 16px;
  }
}

body[data-group-cabinet] .practice-list .practice-option {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 400;
  font-size: 13px;
  padding: 12px;
  text-align: left;
}
body[data-group-cabinet] .practice-list .practice-option.active {
  background: var(--ice);
  color: #3454d1;
  border-color: #3454d1;
  font-weight: 500;
}
body[data-group-cabinet] .practice-list .practice-option:disabled {
  opacity: 0.5;
}
body[data-group-cabinet] .lesson-summary {
  gap: 28px;
  margin: 0 0 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
body[data-group-cabinet] .lesson-summary h3 {
  font-size: 16px;
}
body[data-group-cabinet] .lesson-summary p,
body[data-group-cabinet] .lesson-summary strong {
  font-size: 13px;
}
/* Roster controls must retain contrast on the light working surface. */
.teacher-sidebar .copy-student-link {
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 500;
  min-height: 38px;
}
.teacher-sidebar .launch-student {
  color: #fff;
  background: var(--blue);
}
.teacher-sidebar .roster-row.active .launch-student {
  color: #923a40;
  background: #f9e0de;
}
#plan .plan-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.6fr);
  gap: 32px;
  align-items: start;
}
#plan .plan-modules {
  display: grid;
  gap: 12px;
}
#plan .game-module {
  padding: 14px;
  border-radius: 14px;
}
#plan .module-select-surface {
  gap: 12px;
  padding: 0;
  grid-template-columns: 40px minmax(0, 1fr) auto;
}
#plan .module-badge {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
#plan .module-info small {
  font-size: 12px;
  line-height: 1.5;
}
#plan .module-title-line {
  flex-wrap: wrap;
  gap: 8px;
}
#plan .module-title-line b {
  font-size: 15px;
}
#plan .module-actions-row {
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}
#plan .module-actions-row button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}
#plan .teacher-homework-progress {
  margin: 0;
}
#plan .teacher-plan-profile {
  background: transparent;
  padding: 0;
}
#plan .teacher-plan-homeworks > h2 {
  font-size: 24px;
  margin: 0 0 24px;
}
@media (max-width: 850px) {
  #plan .plan-workspace {
    grid-template-columns: 1fr;
  }
  #plan .plan-actions {
    flex-wrap: wrap;
  }
}
#plan .game-module {
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
  opacity: 1;
}
#plan .game-module.current-module {
  border-color: var(--blue);
  box-shadow: inset 3px 0 var(--blue);
}
#plan .module-select-surface {
  display: grid;
  text-align: left;
}
#plan .grade {
  grid-column: 3;
  grid-row: 1;
  width: 34px;
  min-height: 32px;
  font-size: 13px;
  background: transparent;
}
#plan .module-badge {
  background: var(--ice);
  color: var(--blue);
}
#plan .game-module.locked .module-title-line b {
  color: var(--ink);
}
#plan .block-status {
  font-size: 11px;
  font-weight: 400;
}

.directory-enrollment{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}.directory-enrollment>a,.directory-enrollment>span{padding:3px 10px;border-radius:8px;background:#e5ebfc;color:#2946b6;font-size:12px}.directory-enrollment small{font-size:11px;color:#687080}

.student-products .product-toggle{display:flex;align-items:center;gap:12px;font-size:15px}.student-products .product-toggle input{width:20px;height:20px;accent-color:#3454d1;flex:none}.student-products-help{font-size:12px;color:#687080;margin:8px 0}.product-choice{display:block;margin:12px auto}

#studentEditModal .builder-form-actions{position:sticky;bottom:-20px;z-index:2;background:var(--academy-paper,#fffefa);padding:16px 0;margin-top:8px;border-top:1px solid #d8dce3}

.academy-welcome-copy .academy-live-lesson {
  display: inline-flex; vertical-align: middle; flex-direction: column; gap: 5px;
  margin: 12px 0 0 16px; padding: 12px 22px; border-radius: 14px;
  color: #fff; background: #2449c4; border: 1px solid #819dff;
  box-shadow: 0 0 24px #3454d14d; text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.academy-welcome-copy .academy-live-lesson:hover {box-shadow: 0 0 32px #3454d17a;transform: translateY(-2px)}
.academy-live-status {font: 500 12px/1.4 sans-serif;display:flex;align-items:center;gap:7px}
.academy-live-status i {width:7px;height:7px;background:#8bffd1;border-radius:50%;box-shadow:0 0 9px #8bffd1}
@media(max-width:600px){.academy-welcome-copy .academy-live-lesson {margin-left:0;margin-right:12px}}
.group-whiteboard {border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.group-whiteboard .board-tools {background:#f0f3f7;color:#183453;gap:6px}
.group-whiteboard .board-tool {min-width:38px;min-height:38px;padding:6px;border:1px solid #d0d8e3;border-radius:8px;background:#fff;color:#183453;font-size:19px;cursor:pointer}
.group-whiteboard .board-tool.active {background:#3454d1;color:#fff;border-color:#3454d1}
.group-whiteboard .group-brush-size {display:flex;align-items:center;gap:6px;font-size:12px;margin:0}
.group-whiteboard .group-brush-size input {width:75px;margin:0;padding:0}
.group-whiteboard canvas {background-color:#fff;background-image:linear-gradient(#dfe5ee 1px,transparent 1px),linear-gradient(90deg,#dfe5ee 1px,transparent 1px);background-size:24px 24px;cursor:crosshair}
.group-whiteboard:fullscreen {display:flex;flex-direction:column;border-radius:0}
.group-whiteboard:fullscreen canvas {flex:1;height:calc(100vh - 100px)}
.prototype-quick {margin:8px 0}
.prototype-quick button {min-width:36px;min-height:36px}
