@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/inter-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #f6f8fa;
  --panel: #fff;
  --text: #202732;
  --muted: #68778b;
  --line: #dce2e9;
  --input: #ccd5e0;
  --orange: #f47616;
  --orange-soft: #fff2e5;
  --green: #168844;
  --green-soft: #e2f7ea;
  --red: #d95a68;
  --red-soft: #fdedf0;
  --header: 74px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #f4761660;
  outline-offset: 2px;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}
h2 {
  font-size: 26px;
  line-height: 1.3;
}
h3 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
}
p {
  white-space: pre-wrap;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.muted {
  color: var(--muted);
}
.normal {
  font-weight: 400;
}
.spacer {
  flex: 1;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.center {
  text-align: center;
}
.wide {
  width: 100%;
}
.divider {
  height: 24px;
  border-left: 1px solid var(--line);
  margin: 0 12px;
}
.eyebrow {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
  fill: none;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid var(--input);
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 450;
  line-height: 1.35;
}
.button:hover {
  background: #f5f7fa;
  border-color: #b0bdcd;
}
.button.primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.button.primary:hover {
  background: #e7660a;
}
.button.ghost {
  background: transparent;
  border-color: transparent;
}
.button.ghost:hover {
  background: #eef1f5;
}
.button.selected,
.button.tab.active {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange);
}
.icon-button {
  width: 42px;
  padding: 8px;
  flex: none;
}
.danger {
  color: var(--red);
}
.error-text {
  color: #b73842;
}
.button.error-text {
  border-color: #e3a8ae;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.field > span:first-child {
  font-size: 15px;
}
.field:last-child {
  margin-bottom: 0;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
textarea,
select {
  border: 1px solid var(--input);
  border-radius: 8px;
  background: white;
  min-height: 40px;
  padding: 10px 14px;
  max-width: 100%;
  width: 100%;
  outline-offset: 1px;
}
input::placeholder,
textarea::placeholder {
  color: #8b99ad;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.input-unit {
  position: relative;
}
.input-unit input {
  padding-right: 45px !important;
}
.input-unit > span {
  position: absolute;
  right: 14px;
  top: 10px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.status.success,
.success {
  color: var(--green);
}
.status.failed,
.failed {
  color: var(--red);
}
.status .icon {
  width: 20px;
  height: 20px;
}
.notice {
  padding: 16px;
  border-radius: 8px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0;
}
.loading {
  padding: 32px;
}
.app-header {
  height: var(--header);
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: white;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  flex: none;
  width: 280px;
  max-width: 28vw;
}
.brand img {
  width: 100%;
  height: auto;
  max-height: 50px;
  object-fit: contain;
}
.app-header h2 {
  font-size: 22px;
  margin-left: 24px;
}
.app-name {
  font-size: 18px;
  margin-left: 24px;
}
.app-header .button {
  flex: none;
}
.account-name {
  font-size: 14px;
}
.catalog-shell,
.login-shell {
  min-height: 100dvh;
}
.catalog {
  max-width: 1380px;
  margin: 0 auto;
  padding: 56px 32px;
}
.catalog-heading {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.catalog-heading p {
  margin-top: 10px;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.course-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 260px;
  background: white;
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  border-radius: 12px;
  padding: 24px;
}
.course-card h2 {
  font-size: 22px;
}
.course-card .button {
  align-self: flex-start;
}
.empty-state {
  padding: 64px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-direction: column;
  text-align: center;
  grid-column: 1/-1;
}
.empty-state > .icon {
  width: 44px;
  height: 44px;
  color: var(--muted);
}
.login-main {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - var(--header));
  padding: 40px 20px;
}
.login-card {
  width: 440px;
  max-width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
}
.login-card > p {
  margin: 8px 0 28px;
}
.login-card > h1 {
  font-size: 30px;
}
.login-card .eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
}
/* Constructor: approved 272 px stage sidebar; content scrolls independently. */
.constructor-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.constructor-menubar {
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 10px;
  height: 48px;
  background: white;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.constructor-workspace {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}
.stage-sidebar {
  background: #f4f6f8;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.stage-sidebar-heading {
  padding: 20px 24px 12px;
}
.stage-sidebar-heading p {
  margin-top: 4px;
  font-size: 14px;
}
.stage-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 12px;
  scrollbar-width: thin;
}
.stage-row {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-radius: 8px;
  position: relative;
}
.stage-row.active {
  background: var(--orange-soft);
  color: var(--orange);
}
.stage-row.active:before {
  content: "";
  width: 3px;
  height: 28px;
  background: var(--orange);
  position: absolute;
  left: 0;
  top: 13px;
  border-radius: 4px;
}
.stage-link {
  border: 0;
  background: none;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  padding: 12px 14px;
  gap: 14px;
  font-size: 14px;
  text-align: left;
}
.stage-link:hover {
  background: #e9edf1;
}
.stage-title {
  white-space: normal;
  overflow-wrap: anywhere;
}
.stage-index {
  color: var(--muted);
  font-size: 14px;
  flex: none;
}
.active .stage-index,
.active .stage-title {
  color: var(--orange);
}
.active .stage-title {
  font-weight: 600;
}
.stage-more {
  border: 0;
  background: transparent;
  width: 32px;
  min-height: 32px;
  visibility: hidden;
  padding: 6px;
}
.stage-row:hover .stage-more,
.stage-row.active .stage-more,
.stage-row:focus-within .stage-more {
  visibility: visible;
}
.stage-sidebar-actions {
  padding: 16px;
  display: grid;
  gap: 8px;
}
.stage-sidebar-actions .button {
  justify-content: flex-start;
}
.constructor-content {
  min-height: 0;
  overflow: auto;
  padding: 24px 40px 40px;
  scrollbar-width: thin;
}
.stage-heading {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.stage-intro {
  min-width: 0;
  flex: 1;
}
.stage-intro .title-input {
  border-color: transparent !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  height: 44px;
  border-radius: 4px !important;
}
.stage-intro .summary-input {
  border-color: transparent !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 18px;
  color: var(--muted);
  height: 32px;
  min-height: 32px !important;
}
.stage-intro input:hover,
.stage-intro input:focus {
  background: white !important;
  border-color: var(--input) !important;
}
.stage-settings-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 2px;
  flex: none;
}
.stage-settings-action .button {
  min-width: 220px;
}
.stage-settings-action small {
  font-size: 14px;
  padding-right: 28px;
}
.materials {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.material-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 15px 16px;
}
.material-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 26px;
}
.material-heading h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.material-heading h3 > .icon {
  color: var(--muted);
  width: 20px;
  height: 20px;
}
.material-heading .icon-button:last-child {
  border-color: transparent;
  width: 32px;
  min-height: 32px;
  padding: 5px;
}
.material-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.material-actions .button {
  min-height: 40px;
}
.material-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.material-body[hidden] {
  display: none;
}
.material-body textarea {
  min-height: 54px;
  resize: vertical;
}
.material-image {
  border-radius: 6px;
  background: #f7f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  height: clamp(220px, 34vh, 400px);
  overflow: hidden;
}
.material-image .annotated-image {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: var(--image-ratio, auto);
}
.material-image .annotated-image > img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.material-body video {
  max-height: 450px;
  width: 100%;
  background: #111;
}
.image-dropzone {
  min-height: 240px;
  border: 1px dashed #bac6d3;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  text-align: center;
}
.image-dropzone > .icon {
  height: 36px;
  width: 36px;
  color: var(--muted);
}
.image-dropzone.over {
  border-color: var(--orange);
  background: var(--orange-soft);
}
.editor-thumbnails {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: auto;
  padding-bottom: 2px;
}
.editor-thumb {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 178px;
  min-width: 178px;
  height: 62px;
  padding: 8px;
  text-align: left;
  font-size: 12px;
}
.editor-thumb.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}
.editor-thumb .annotated-image {
  width: 48px;
  height: 40px;
  flex: none;
  background: var(--bg);
  border-radius: 4px;
}
.editor-thumb .annotated-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.editor-thumb > span {
  max-height: 42px;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.gallery-details {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gallery-details > input {
  flex: 1;
  min-width: 0;
}
.gallery-details .icon-button {
  min-height: 32px;
  height: 32px;
  width: 32px;
  padding: 6px;
}
.constructor-footer {
  height: 53px;
  flex: none;
  background: white;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 0 24px;
  font-size: 14px;
}
.save-status {
  display: flex;
  align-items: center;
}
.save-status .button {
  font-size: 13px;
  min-height: 32px;
}
/* Shared image renderer: same normalized SVG coordinates in every view. */
.annotated-image {
  position: relative;
  display: block;
  line-height: 0;
  max-width: 100%;
}
.annotated-image > img {
  display: block;
  width: 100%;
  height: auto;
}
.annotation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.image-error {
  min-height: 120px;
}
.image-error:after {
  content: "Не удалось загрузить изображение";
  position: absolute;
  inset: 30px;
  color: var(--red);
  line-height: 1.4;
}
.explanations {
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1.5;
}
.explanations:empty {
  display: none;
}
.explanation {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 19px;
  font-weight: 600;
  flex: none;
  width: 40px;
  height: 40px;
}
.explanation p {
  padding-top: 6px;
}
.zoom-modal {
  width: min(1400px, 96vw) !important;
}
.zoom-scroll {
  overflow: auto;
  max-height: 70dvh;
  background: #edf1f5;
  padding: 16px;
}
.zoom-scroll .annotated-image {
  max-width: none;
  margin: auto;
}
.zoom-modal .explanations {
  margin-top: 20px;
}
/* Learner: uninterrupted content above a fixed bottom stage strip. */
.player-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.course-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  min-width: 0;
  max-width: 46%;
}
.course-picker .button {
  min-width: 200px;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: space-between;
  flex-direction: row-reverse;
}
.course-picker .button .icon {
  margin-left: auto;
}
.manual-mode {
  font-size: 14px;
}
.player-scroll {
  flex: 1;
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
}
.player-content {
  width: calc(100% - 64px);
  max-width: 1376px;
  margin: 0 auto;
  padding: 12px 0 16px;
}
.stage-summary {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 12px;
}
.learner-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.instruction-grid {
  display: grid;
  grid-template-columns: minmax(0, 60%) minmax(0, 40%);
  gap: 0;
}
.instruction-grid > .action-list {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  margin-left: 24px;
}
.learner-gallery {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.learner-image {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: white;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.learner-image > .annotated-image {
  max-height: clamp(260px, 43vh, 520px);
  width: auto;
  max-width: 100%;
}
.learner-image .annotated-image > img {
  max-height: clamp(260px, 43vh, 520px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.image-zoom {
  position: absolute;
  right: 8px;
  top: 8px;
  opacity: 0;
  background: #fffffff0;
}
.learner-image:hover .image-zoom,
.learner-image:focus-within .image-zoom {
  opacity: 1;
}
.learner-image .annotated-image {
  cursor: zoom-in;
}
.learner-thumbnails {
  display: flex;
  gap: 16px;
  overflow: auto;
  align-items: flex-start;
  padding: 1px;
}
.learner-thumb {
  width: calc((100% - 32px) / 3);
  min-width: 130px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
}
.learner-thumb > .annotated-image {
  height: 76px;
  border: 1px solid var(--line);
  background: #f4f6f8;
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
}
.learner-thumb.selected > .annotated-image {
  border: 2px solid var(--orange);
}
.learner-thumb > .annotated-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.learner-thumb > span {
  display: block;
  margin-top: 5px;
}
.image-caption {
  color: var(--muted);
  font-size: 14px;
}
.text-material {
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.6;
}
.note-material {
  display: flex;
  gap: 12px;
  border-radius: 8px;
  background: #fff7e9;
  padding: 16px;
  white-space: pre-wrap;
}
.note-material .icon {
  color: var(--orange);
}
.action-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 38px;
}
.action-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.action-list strong {
  display: block;
  font-size: 20px;
  padding-top: 5px;
  line-height: 1.4;
}
.action-list p {
  line-height: 1.5;
  margin-top: 4px;
  font-size: 16px;
}
.side-by-side {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.side-by-side figure {
  min-width: 0;
}
.side-by-side img {
  cursor: zoom-in;
}
.side-by-side figcaption {
  margin: 10px 0;
}
.video-material video {
  max-height: 520px;
  width: 100%;
  background: #111;
  border-radius: 6px;
}
.video-material figcaption {
  margin-top: 8px;
  color: var(--muted);
}
.confirmation {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fa;
  padding: 8px 16px;
  min-height: 56px;
  color: var(--text);
}
.confirmation.success {
  background: #f2fbf6;
}
.confirmation.failed {
  background: #fff6f7;
}
.confirmation > .icon {
  width: 26px;
  height: 26px;
  flex: none;
}
.confirmation.success > .icon {
  color: var(--green);
}
.confirmation.failed > .icon {
  color: var(--red);
}
.confirmation p {
  font-size: 14px;
  margin-top: 2px;
}
.confirmation .button {
  min-height: 34px;
  font-size: 14px;
  padding: 7px 16px;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -6px;
}
.comment-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.comment-row textarea {
  min-height: 38px;
  height: 38px;
  flex: 1;
  font-size: 14px;
  padding: 8px 12px;
}
.comment-row .button {
  font-size: 13px;
  min-height: 38px;
}
.attachments {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.attachment {
  position: relative;
}
.attachment img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.attachment > .button {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 3px;
}
.stage-bottom {
  flex: none;
  background: white;
  border-top: 1px solid var(--line);
  padding: 8px 24px 22px;
}
.stage-bottom-heading {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 10px;
  height: 32px;
}
.stage-bottom-heading .button {
  height: 32px;
  min-height: 32px;
}
.stage-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stage-strip > .button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
}
.stage-circles {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: auto;
  scrollbar-width: thin;
  min-width: 0;
  flex: 1;
  padding: 3px 0 5px;
}
.stage-circle {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  flex: none;
  background: #f6f8fa;
  color: var(--muted);
  font-size: 18px;
  position: relative;
}
.stage-circle.success {
  color: var(--green);
  background: var(--green-soft);
  border-color: #a2deba;
  font-weight: 600;
}
.stage-circle.failed {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f5bbc2;
  font-weight: 600;
}
.stage-circle.current {
  border: 2px solid var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
  font-weight: 600;
}
.circle-state {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 17px;
  height: 17px;
  border: 1.5px solid white;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.failed .circle-state {
  background: var(--red);
}
.circle-state .icon {
  width: 12px;
  height: 12px;
}
.player-footer {
  height: 66px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 26px;
  border-top: 1px solid var(--line);
  background: white;
}
.player-footer .next-button {
  min-width: 210px;
  flex-direction: row-reverse;
  justify-content: space-between;
}
.player-footer .back-button {
  min-width: 150px;
  justify-content: flex-start;
}
.player-footer .ghost {
  color: var(--muted);
}
.player-save {
  white-space: nowrap;
}
.summary-page {
  padding-top: 24px;
  padding-bottom: 30px;
}
.summary-page > .stage-summary {
  font-size: 16px;
  margin: 4px 0 20px;
}
.summary-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.count-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 18px;
  color: var(--text);
}
.count-card .icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  background: #edf1f5;
  border-radius: 50%;
  color: var(--muted);
}
.count-card strong {
  font-size: 32px;
  color: var(--muted);
  margin-right: 12px;
}
.count-card.success .icon {
  color: var(--green);
  background: var(--green-soft);
}
.count-card.success strong {
  color: var(--green);
}
.count-card.failed .icon {
  color: var(--red);
  background: var(--red-soft);
}
.count-card.failed strong {
  color: var(--red);
}
.summary-grid {
  display: grid;
  grid-template-columns: 1.54fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.summary-stage-card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 24px;
}
.summary-stage-card > .row {
  margin: 0 -24px;
  padding: 0 24px 18px;
  border-bottom: 1px solid var(--line);
}
.summary-opinion {
  display: grid;
  gap: 16px;
}
.panel > h3 {
  margin-bottom: 8px;
}
.panel > p {
  font-size: 14px;
}
.panel textarea {
  margin-top: 6px;
}
.ratings {
  display: flex;
  gap: 5px;
  margin: 20px 0 14px;
}
.ratings .button {
  flex: 1;
  font-size: 24px;
  min-height: 62px;
  padding: 10px;
}
.results-table {
  max-height: 400px;
  overflow: auto;
  scrollbar-width: thin;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th {
  font-weight: 400;
  color: var(--muted);
  text-align: left;
  padding: 16px 0;
  font-size: 13px;
}
td {
  padding: 8px 0;
  border-bottom: 1px solid #eef1f4;
}
td .button {
  justify-content: flex-start;
  white-space: normal;
  text-align: left;
  padding-left: 0;
  font-size: 14px;
}
td .status {
  white-space: nowrap;
}
td:nth-child(2) {
  padding-right: 20px;
}
.participant-data {
  margin-bottom: 16px;
}
.participant-data > .row {
  margin-bottom: 10px;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.two-columns .field {
  margin-bottom: 0;
}
/* Modal geometry comes from the auxiliary/workflow SVGs. */
.modal {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--text);
  padding: 0;
  width: min(800px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  box-shadow:
    8px 12px 0 #2027320b,
    0 8px 32px #20273216;
  overflow: auto;
}
.modal::backdrop {
  background: #2027323d;
}
.modal-heading {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  justify-content: space-between;
  padding: 22px 30px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-heading h2 {
  font-size: 28px;
}
.modal-heading p {
  margin-top: 6px;
  font-size: 15px;
}
.modal-heading .icon-button {
  border-color: transparent;
  color: var(--muted);
  margin-right: -6px;
}
.modal-body {
  padding: 24px 30px;
}
.modal-body > h3 {
  margin-bottom: 12px;
}
.modal-body > p + p {
  margin-top: 16px;
}
.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  background: white;
}
.modal-footer > .muted {
  font-size: 13px;
}
.modal-footer .button {
  min-width: 128px;
}
.small-modal {
  width: min(480px, calc(100vw - 32px));
}
.small-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.small-modal .wide {
  justify-content: flex-start;
}
.small-modal .field {
  margin: 0;
}
.mode-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.mode-option {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  padding: 16px 14px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mode-option strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.mode-option strong > .icon {
  width: 18px;
  height: 18px;
}
.mode-option > span {
  font-size: 14px;
  line-height: 1.5;
}
.mode-option.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
}
.mode-option.selected .icon {
  color: var(--orange);
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin: -12px -30px 24px;
  padding: 0 30px;
}
.button.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 12px;
  background: transparent;
  color: var(--muted);
}
.button.tab.active {
  background: transparent;
  border-bottom-color: var(--orange);
  color: var(--orange);
  font-weight: 600;
}
.all-stages-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.all-stages-list {
  max-height: 55vh;
  overflow: auto;
}
.all-stage-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 6px;
  white-space: normal;
  text-align: left;
}
.all-stage-row .status {
  font-size: 13px;
  white-space: nowrap;
}
/* Full-window annotation editor. */
.image-editor {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.image-editor:not([open]) {
  display: none;
}
.image-editor::backdrop {
  background: #fff;
}
.sourcebar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 16px;
  background: white;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sourcebar .muted {
  font-size: 14px;
  margin-right: 32px;
}
.image-editor-workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
}
.annotation-tools {
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  overflow: auto;
}
.button.tool {
  flex-direction: column;
  gap: 8px;
  min-height: 72px;
  width: 76px;
  padding: 10px 4px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  border-radius: 8px;
}
.button.tool .icon {
  color: var(--text);
  width: 24px;
  height: 24px;
}
.button.tool.active {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange);
}
.button.tool.active .icon {
  color: var(--orange);
}
.annotation-main {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
}
.annotation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 16px;
  min-height: 360px;
  flex: 1;
}
.editor-viewport {
  background: #edf1f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  min-height: 0;
  padding: 16px;
  position: relative;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  scrollbar-width: thin;
}
.editor-surface {
  position: relative;
  flex: none;
  background: white;
  line-height: 0;
  user-select: none;
  touch-action: none;
  box-shadow: 0 0 0 1px var(--line);
}
.editor-surface > img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.editor-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.annotation-properties {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px 20px 20px;
  overflow: auto;
}
.annotation-properties h3 {
  font-size: 20px;
  margin-bottom: 18px;
}
.annotation-properties > .muted {
  margin-bottom: 18px;
}
.property-kind {
  display: flex;
  align-items: center;
  gap: 10px;
}
.property-kind .icon {
  color: var(--orange);
}
.annotation-properties hr {
  margin: 20px 0 16px;
}
.annotation-properties .field {
  margin-bottom: 24px;
  gap: 8px;
}
.annotation-properties .field > span:first-child {
  font-size: 14px;
  color: var(--muted);
}
.annotation-properties .row .button {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
}
.annotation-properties .wide {
  font-size: 14px;
  min-height: 42px;
}
.annotation-properties small {
  display: block;
  font-size: 12px;
  margin-top: 10px;
}
.color-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.swatch {
  background: var(--swatch);
  border: 1px solid #dce2e9;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  position: relative;
}
.swatch.selected:after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--orange);
  border-radius: 50%;
}
.color-swatches input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
}
.annotation-notes {
  flex: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 20px 18px;
  max-height: 220px;
  overflow: auto;
  min-height: 100px;
}
.annotation-notes > .row {
  margin-bottom: 14px;
}
.annotation-notes h3 {
  font-size: 20px;
}
.annotation-notes small {
  font-size: 13px;
}
.explanation-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}
.explanation-row > .number-badge {
  width: 32px;
  height: 32px;
  font-size: 18px;
}
.explanation-row > input {
  flex: 1;
  min-width: 0;
}
.explanation-row > .button {
  width: 40px;
  height: 40px;
  padding: 8px;
}
.editor-footer {
  height: 53px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-top: 1px solid var(--line);
  padding: 0 26px;
  flex: none;
}
.editor-footer > .muted {
  font-size: 14px;
}
.editor-footer > .button {
  min-height: 38px;
}
.editor-footer input {
  width: 76px !important;
  min-height: 38px !important;
  padding: 8px !important;
  text-align: center;
}
.capture-modal {
  width: min(1200px, 96vw);
}
.crop-area {
  position: relative;
  line-height: 0;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
  width: fit-content;
  margin: auto;
}
.crop-area img {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  pointer-events: none;
}
.crop-selection {
  position: absolute;
  border: 2px solid var(--orange);
  background: #f476161a;
  pointer-events: none;
}
.crop-selection[hidden] {
  display: none;
}
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 9999;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 8px;
  background: #202732;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: 0.15s;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%);
}
#toast.error {
  background: #8c303b;
}
dialog #toast {
  z-index: 10000;
}
@media (min-width: 1500px) {
  .player-content {
    padding-top: 12px;
  }
  .constructor-content {
    padding-top: 24px;
  }
  .material-image {
    height: 380px;
  }
  .annotation-grid {
    min-height: 400px;
  }
}
@media (max-width: 1200px) {
  .brand {
    width: 240px;
  }
  .app-header {
    padding: 0 20px;
    gap: 12px;
  }
  .course-picker {
    gap: 8px;
  }
  .course-picker .button {
    min-width: 180px;
    max-width: 280px;
  }
  .manual-mode {
    display: none;
  }
  .constructor-workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .constructor-content {
    padding: 24px;
  }
  .stage-settings-action .button {
    min-width: 190px;
  }
  .material-heading {
    flex-wrap: wrap;
  }
  .material-actions .button {
    padding: 9px 12px;
  }
  .annotation-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .annotation-properties {
    padding: 14px;
  }
  .sourcebar {
    gap: 4px;
  }
  .sourcebar .button {
    padding: 10px;
  }
  .sourcebar .muted {
    margin-right: 8px;
  }
  .player-content {
    width: calc(100% - 48px);
  }
  .action-list strong {
    font-size: 18px;
  }
  .action-list p {
    font-size: 14px;
  }
  .summary-grid {
    grid-template-columns: 1.35fr 1fr;
  }
  .player-footer > .muted {
    display: none;
  }
}
@media (max-width: 900px) {
  :root {
    font-size: 14px;
    --header: 66px;
  }
  .brand {
    width: 200px;
  }
  .app-header h2 {
    font-size: 18px;
    margin-left: 0;
  }
  .app-name,
  .account-name,
  .course-picker > strong {
    display: none;
  }
  .course-picker {
    margin-left: 0;
  }
  .course-picker .button {
    min-width: 140px;
    max-width: 220px;
  }
  .constructor-workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .constructor-content {
    padding: 20px;
  }
  .stage-heading {
    flex-direction: column;
    gap: 8px;
  }
  .stage-intro {
    width: 100%;
  }
  .stage-settings-action {
    flex-direction: row;
    align-items: center;
  }
  .stage-settings-action small {
    padding: 0;
  }
  .stage-intro .title-input {
    font-size: 26px;
  }
  .material-heading h3 {
    font-size: 16px;
  }
  .material-actions {
    order: 2;
    width: 100%;
    margin: 4px 0;
  }
  .material-image {
    height: 300px;
  }
  .stage-link {
    padding: 10px;
    font-size: 13px;
  }
  .stage-sidebar-actions {
    padding: 12px;
  }
  .stage-sidebar-actions .button {
    padding: 10px;
  }
  .instruction-grid {
    grid-template-columns: 1fr;
  }
  .instruction-grid > .action-list {
    border-left: 0;
    padding: 20px 0 0;
    margin-left: 0;
    gap: 20px;
  }
  .learner-image > .annotated-image,
  .learner-image .annotated-image > img {
    max-height: 440px;
  }
  .confirmation {
    flex-wrap: wrap;
  }
  .confirmation > .spacer {
    display: none;
  }
  .player-footer {
    padding: 10px 16px;
    gap: 8px;
  }
  .player-footer .next-button {
    min-width: 130px;
  }
  .player-footer .back-button {
    min-width: 100px;
  }
  .player-footer > .ghost {
    font-size: 0;
    gap: 0;
  }
  .player-footer > .ghost .icon {
    width: 20px;
  }
  .annotation-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .image-editor-workspace {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .annotation-tools {
    padding: 10px 6px;
    gap: 4px;
  }
  .button.tool {
    width: 64px;
    min-height: 66px;
  }
  .annotation-main {
    padding: 12px;
  }
  .annotation-properties .field {
    margin-bottom: 14px;
  }
  .annotation-properties .row {
    gap: 6px;
  }
  .annotation-properties .row .button {
    font-size: 12px;
    padding: 8px;
    gap: 4px;
  }
  .sourcebar .button {
    font-size: 12px;
    gap: 6px;
  }
  .sourcebar .muted {
    display: none;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .summary-counts {
    gap: 10px;
  }
  .count-card {
    padding: 14px;
    gap: 10px;
  }
  .count-card strong {
    margin: 0;
  }
  .summary-opinion {
    grid-template-columns: 1fr 1fr;
  }
  .all-stage-row .status {
    font-size: 12px;
  }
}
@media (max-width: 650px) {
  :root {
    --header: 62px;
  }
  .app-header {
    padding: 0 12px;
    gap: 8px;
  }
  .brand {
    width: 160px;
    max-width: 40vw;
  }
  .app-header .button {
    font-size: 12px;
    padding: 8px;
    gap: 6px;
    min-height: 36px;
  }
  .app-header .button .icon {
    width: 18px;
    height: 18px;
  }
  .course-picker {
    display: none;
  }
  .constructor-workspace {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .stage-sidebar-heading {
    padding: 16px 10px;
  }
  .stage-sidebar-heading h3 {
    font-size: 15px;
  }
  .stage-list {
    padding: 0 5px;
  }
  .stage-link {
    gap: 7px;
    padding: 10px 6px;
    font-size: 12px;
  }
  .stage-more {
    width: 24px;
  }
  .stage-sidebar-actions {
    padding: 8px;
  }
  .stage-sidebar-actions .button {
    font-size: 11px;
    padding: 8px;
    gap: 5px;
  }
  .stage-sidebar-actions .icon {
    width: 17px;
  }
  .constructor-content {
    padding: 16px 12px;
  }
  .stage-settings-action small {
    display: none;
  }
  .stage-intro .title-input {
    font-size: 23px;
  }
  .stage-intro .summary-input {
    font-size: 14px;
  }
  .stage-settings-action .button {
    font-size: 12px;
    min-width: 0;
  }
  .material-card {
    padding: 10px;
  }
  .material-actions {
    flex-wrap: wrap;
  }
  .material-actions .button {
    font-size: 12px;
    padding: 7px;
    gap: 5px;
    min-height: 34px;
  }
  .material-image {
    height: 220px;
  }
  .image-dropzone {
    padding: 20px 10px;
  }
  .image-dropzone .row {
    flex-direction: column;
  }
  .image-dropzone h3 {
    font-size: 15px;
  }
  .image-dropzone p {
    font-size: 12px;
  }
  .constructor-menubar {
    padding: 0 10px;
  }
  .constructor-menubar > .muted {
    display: none;
  }
  .constructor-footer {
    padding: 8px 12px;
    height: auto;
    min-height: 48px;
    gap: 10px;
    font-size: 12px;
  }
  .constructor-footer .course-name {
    max-width: 35%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .constructor-footer .status {
    font-size: 12px;
  }
  .player-content {
    width: calc(100% - 24px);
    padding-top: 16px;
  }
  h1 {
    font-size: 25px;
  }
  .stage-summary {
    font-size: 16px;
  }
  .learner-card {
    padding: 12px;
  }
  .comment-row {
    flex-direction: column;
  }
  .comment-row textarea {
    width: 100%;
    flex: auto;
  }
  .stage-bottom {
    padding: 8px 12px 12px;
  }
  .stage-bottom-heading {
    gap: 10px;
  }
  .stage-bottom-heading h3 {
    font-size: 15px;
  }
  .stage-bottom-heading > .muted {
    font-size: 12px;
  }
  .stage-bottom-heading .button {
    font-size: 12px;
    padding: 6px;
  }
  .stage-bottom-heading .icon {
    display: none;
  }
  .stage-strip > .button,
  .stage-circle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .stage-circles {
    gap: 6px;
  }
  .stage-strip {
    gap: 6px;
  }
  .player-footer {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
  }
  .player-footer .divider {
    display: none;
  }
  .player-footer .status {
    font-size: 12px;
  }
  .player-footer .back-button {
    min-width: 0;
  }
  .player-footer .next-button {
    min-width: 100px;
  }
  .player-footer .button {
    font-size: 13px;
    padding: 8px;
    min-height: 36px;
  }
  .confirmation {
    gap: 10px;
    padding: 12px;
  }
  .confirmation .button {
    font-size: 12px;
    padding: 7px 10px;
  }
  .summary-counts {
    grid-template-columns: 1fr;
  }
  .count-card {
    padding: 10px 16px;
  }
  .count-card .icon {
    width: 32px;
    height: 32px;
    padding: 5px;
  }
  .count-card strong {
    font-size: 25px;
  }
  .summary-opinion,
  .two-columns {
    grid-template-columns: 1fr;
  }
  .summary-stage-card,
  .panel {
    padding: 16px;
  }
  .summary-stage-card > .row {
    margin: 0;
    padding: 0 0 12px;
  }
  .results-table {
    overflow-x: auto;
  }
  td .status {
    font-size: 12px;
  }
  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  .modal-heading {
    padding: 20px;
  }
  .modal-heading h2 {
    font-size: 24px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-footer {
    padding: 16px 20px;
    gap: 10px;
  }
  .modal-footer > .muted,
  .modal-footer > .spacer {
    display: none;
  }
  .modal-footer .button {
    min-width: 0;
  }
  .mode-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .mode-option {
    min-height: 0;
    padding: 12px;
  }
  .mode-option > span {
    font-size: 13px;
  }
  .tabs {
    margin: -10px -20px 20px;
    padding: 0 14px;
    gap: 4px;
  }
  .button.tab {
    padding: 12px 6px;
    font-size: 13px;
  }
  .all-stage-row .status {
    max-width: 100px;
    white-space: normal;
  }
  .annotation-grid {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .editor-viewport {
    min-height: 340px;
    flex: none;
  }
  .annotation-properties {
    max-height: 280px;
    flex: none;
  }
  .image-editor .brand {
    width: 130px;
  }
  .image-editor .app-header h2 {
    font-size: 14px;
    max-width: 110px;
  }
  .image-editor .app-header .button {
    font-size: 11px;
    padding: 8px;
    gap: 3px;
  }
  .sourcebar {
    height: auto;
    min-height: 50px;
    flex-wrap: wrap;
    padding: 6px;
  }
  .sourcebar .divider {
    display: none;
  }
  .sourcebar .button {
    padding: 6px;
    font-size: 11px;
    min-height: 32px;
  }
  .sourcebar .icon {
    width: 18px;
    height: 18px;
  }
  .image-editor-workspace {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .annotation-tools {
    padding: 8px 4px;
  }
  .button.tool {
    width: 54px;
    min-height: 62px;
    font-size: 10px;
  }
  .annotation-main {
    padding: 8px;
  }
  .annotation-notes {
    min-height: 120px;
    max-height: none;
  }
  .annotation-notes h3 {
    font-size: 16px;
  }
  .annotation-notes small {
    display: none;
  }
  .explanation-row {
    gap: 8px;
  }
  .editor-footer {
    padding: 0 10px;
    gap: 4px;
  }
  .editor-footer > .muted {
    display: none;
  }
  .editor-footer .button {
    font-size: 12px;
    padding: 8px;
  }
  .catalog {
    padding: 28px 20px;
  }
  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
}

/* Match the 1600 px references without reserving space for hidden row menus. */
.stage-more {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}
.stage-link {
  padding-right: 18px;
}
.stage-row.active .stage-link,
.stage-row:hover .stage-link {
  padding-right: 30px;
}
.stage-intro .title-input {
  height: 40px;
  min-height: 40px !important;
}
.stage-intro .summary-input {
  height: 28px;
  min-height: 28px !important;
}
.material-heading > .icon-button {
  min-height: 28px;
  height: 28px;
  width: 28px;
  padding: 4px;
}
.material-body > textarea {
  height: 54px;
}
.gallery-details {
  display: none;
}
.material-card:focus-within .gallery-details {
  display: flex;
}
@media (max-width: 650px) {
  .player-footer:has(.next-button) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .player-footer:has(.next-button) > .spacer {
    display: none;
  }
  .player-footer:has(.next-button) > .ghost {
    font-size: 12px;
    justify-self: end;
    gap: 6px;
  }
  .player-footer:has(.next-button) > .back-button,
  .player-footer:has(.next-button) > .next-button {
    width: 100%;
  }
}
.constructor-menubar > .button:first-child {
  flex-direction: row-reverse;
}
