@import url("./player/player-core.css");
@import url("./player/design/layouts/standard-lms/shell.css");

/* Consistent keyboard focus visibility across interactive controls. */
button:focus-visible,
a[href]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--nls-color-primary, #2563eb);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--nls-color-primary-bg, #dbeafe) 78%, transparent);
}

/* Slightly larger hit targets for key navigation toggles. */
.dev-sidebar .dev-nav-icon,
.panel-toggle,
.dev-section-toggle,
.brand-builder-toggle {
  min-height: 2.5rem;
}

/* Improve readability of dynamic status and message copy. */
.panel-message,
.auth-meta,
#player-status {
  line-height: 1.38;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.landing-auth-panel[hidden] {
  display: none !important;
}

body.is-logged-out .dev-sidebar {
  display: none !important;
}

body.is-logged-out .dev-shell {
  grid-template-columns: 1fr;
}

body.is-logged-out .player-region {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  overflow: visible;
}

body.is-logged-out #layout-shell-region {
  display: none !important;
}

body.is-logged-out #player-panel {
  order: 1;
  width: 100%;
}

body.is-logged-out #player-container {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(320px, 560px);
  grid-template-areas:
    "auth main"
    "footer footer";
  column-gap: 1rem;
  row-gap: 0.75rem;
  align-items: start;
  justify-content: center;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

body.is-logged-out .legacy-player__status {
  display: none;
}

body.is-logged-out .legacy-player__layout {
  grid-area: main;
  flex: 0 0 auto;
  height: auto;
  width: 100%;
  max-width: 560px;
}

body.is-logged-out #player-main {
  height: auto;
  min-height: 0;
  padding: 0;
}

body.is-logged-out .player-fallback {
  grid-area: footer;
  margin-top: auto;
  border-radius: 12px;
  overflow: hidden;
}

body.is-logged-out .player-fallback .player-note {
  text-align: center;
  margin-bottom: 0;
}

.landing-auth-panel {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
}

.landing-auth-slot {
  display: flex;
  justify-content: center;
  padding: 0 16px 12px;
}

body.is-logged-out .landing-auth-slot {
  grid-area: auth;
  justify-content: stretch;
  align-self: start;
  padding: 0;
  width: 100%;
  max-width: 560px;
  height: auto;
}

.landing-auth-panel--in-fallback {
  margin: 0.75rem auto 0.65rem;
  padding: 1.2rem;
  width: min(100%, 560px);
  border-radius: 16px;
  border: 1px solid var(--nls-color-border-soft);
  background: var(--nls-color-surface);
  box-shadow: 0 12px 30px var(--nls-shadow-color-soft);
}

body.is-logged-out .landing-auth-panel--in-fallback {
  width: 100%;
  margin: 0;
  height: auto;
  box-sizing: border-box;
}

body.is-logged-out[data-theme="dev-view"] .player-placeholder {
  width: 100%;
  margin: 0;
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--nls-color-border-soft);
  background: var(--nls-color-surface);
  box-shadow: 0 12px 30px var(--nls-shadow-color-soft);
  overflow: visible;
  height: auto;
  box-sizing: border-box;
  align-items: start;
}

@media (max-width: 900px) {
  body.is-logged-out #player-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "auth"
      "main"
      "footer";
    max-width: 560px;
    margin: 0 auto;
  }

  body.is-logged-out .legacy-player__layout,
  body.is-logged-out .landing-auth-slot {
    max-width: 100%;
    height: auto;
  }

  body.is-logged-out[data-theme="dev-view"] .player-placeholder {
    width: 100%;
    height: auto;
  }

  body.is-logged-out .landing-auth-panel--in-fallback {
    height: auto;
  }
}

.landing-auth-panel--in-fallback .panel-header {
  margin-bottom: 0.35rem;
}

.landing-auth-panel--in-fallback .panel-title {
  font-size: 0.95rem;
  color: var(--nls-color-text);
}

.landing-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.landing-auth-form .auth-grid {
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.landing-auth-form .auth-grid label {
  align-items: flex-start;
  gap: 0.3rem;
}

.landing-auth-form .auth-grid label > span {
  font-weight: 600;
  color: var(--nls-color-text-soft);
}

.landing-auth-form .auth-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  width: 100%;
}

.landing-auth-form .auth-actions button,
.account-summary button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.landing-auth-form .auth-actions button {
  width: 100%;
  min-width: 0;
}

.landing-auth-form .auth-actions > button:only-child {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .landing-auth-form .auth-actions {
    grid-template-columns: 1fr;
  }
}

.landing-auth-form #login-btn {
  order: 1;
  background: var(--nls-color-primary);
  color: var(--nls-color-surface);
}

.landing-auth-form #register-btn {
  order: 2;
  background: var(--nls-brand-secondary, var(--nls-color-text));
  color: var(--nls-color-surface);
}

.landing-auth-form #register-btn[hidden] {
  display: none !important;
}

.landing-auth-form #register-btn:hover,
.landing-auth-form #login-btn:hover {
  opacity: 0.92;
}

.landing-auth-forgot {
  align-self: center;
  font-size: 0.78rem;
  color: var(--nls-color-primary-ink);
  border: none;
  background: transparent;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
}

.landing-auth-forgot[hidden] {
  display: none !important;
}

.landing-auth-forgot:hover {
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg) 72%,
    transparent 28%
  );
}

.notices-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#messages-tools > button {
  width: 100%;
}

#messages-tools {
  display: grid;
  grid-template-columns: 1fr;
}

#messages-tools > button.is-active {
  border-color: var(--nls-color-primary);
  background: var(--nls-color-primary-bg);
  color: var(--nls-color-primary-strong);
}

.notices-compose {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 12px;
}

.notices-compose label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.notices-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.notices-card {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 12px;
  padding: 0.65rem;
  background: var(--nls-color-surface);
}

.notices-card__meta {
  font-size: 0.78rem;
  color: var(--nls-color-text-soft);
  display: grid;
  gap: 0.2rem;
}

.notices-card__sender {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--nls-color-text);
  font-weight: 600;
}

.notices-card__sender-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.notice-inline-action {
  font-size: 0.68rem;
  line-height: 1;
  padding: 0.12rem 0.36rem;
  min-height: 1.1rem;
  border-radius: 999px;
}

.notices-card__details {
  color: var(--nls-color-text-soft);
}

.notices-card__body {
  margin: 0.4rem 0 0.55rem;
  line-height: 1.35;
}

.notices-card__body > :first-child {
  margin-top: 0;
}

.notices-card__body > :last-child {
  margin-bottom: 0;
}

.notices-card__actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.notice-composer-player .account-editor-grid {
  align-items: end;
}

.notice-compose__toolbar {
  margin: 0.3rem 0 0.45rem;
}

.notice-compose__input {
  width: 100%;
  min-height: 8.2rem;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 12px;
  background: var(--nls-color-surface-soft);
  color: var(--nls-color-text);
  padding: 0.65rem 0.7rem;
  font: inherit;
  line-height: 1.35;
  resize: vertical;
}

.notice-compose__input--reason {
  min-height: 5.2rem;
}

.notice-compose-students__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 0.45rem;
}

.notices-card__edit-meta {
  margin: -0.2rem 0 0.45rem;
  font-size: 0.74rem;
  color: var(--nls-color-text-soft);
}

.notices-card__edit-history {
  margin: 0.15rem 0 0.55rem;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-soft);
  padding: 0.35rem 0.45rem;
}

.notices-card__edit-history > summary {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nls-color-text-soft);
}

.notices-card__edit-history-row {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--nls-color-border-soft);
  display: grid;
  gap: 0.28rem;
}

.notices-card__edit-history-head,
.notices-card__edit-history-reason {
  margin: 0;
  font-size: 0.72rem;
  color: var(--nls-color-text-soft);
}

.notices-card__edit-history-body {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 8px;
  background: var(--nls-color-surface);
  padding: 0.34rem 0.45rem;
  font-size: 0.76rem;
  line-height: 1.3;
}

.notices-card__edit-history-body--previous::before {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nls-color-text-soft);
  margin-bottom: 0.18rem;
}

.notices-card__edit-history-body--previous::before {
  content: "Previous version";
}

.notice-compose-students__list {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-soft);
  max-height: 10rem;
  overflow: auto;
  padding: 0.35rem 0.45rem;
  display: grid;
  gap: 0.2rem;
}

.notice-compose-students__option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.84rem;
}

.notice-compose-students__option input[type="checkbox"] {
  margin: 0;
}

.notice-compose-students__option label {
  margin: 0;
  cursor: pointer;
}

.notice-composer-player .account-editor-grid > button {
  width: 100%;
}

.notice-modal-host[hidden] {
  display: none !important;
}

.notice-modal-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
}

.notice-modal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4rem;
  background: rgba(0, 0, 0, 0.36);
  pointer-events: auto;
}

.notice-modal-card {
  width: min(540px, calc(100% - 2rem));
  background: var(--nls-color-surface);
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 16px 36px var(--nls-shadow-color-soft);
}

.notice-modal-card p {
  margin: 0.45rem 0 0.8rem;
  white-space: pre-wrap;
}

.notice-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.app-popup-host[hidden] {
  display: none !important;
}

.app-popup-host {
  position: fixed;
  inset: 0;
  z-index: 1400;
}

.app-popup-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--nls-color-text) 38%, transparent);
}

.app-popup-dialog {
  width: min(520px, calc(100% - 1rem));
  border-radius: 14px;
  border: 1px solid var(--nls-color-border-soft);
  background: var(--nls-color-surface);
  box-shadow: 0 18px 48px var(--nls-shadow-color-soft);
  padding: 0.95rem;
  display: grid;
  gap: 0.7rem;
}

.app-popup-dialog__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.app-popup-dialog__message {
  margin: 0;
  white-space: pre-wrap;
  color: var(--nls-color-text-soft);
}

.app-popup-dialog__input {
  width: 100%;
}

.app-popup-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

button.danger {
  background: var(--nls-color-danger-strong, #b91c1c);
  color: var(--nls-color-surface, #fff);
  border-color: var(--nls-color-danger-strong, #b91c1c);
}

button.danger:hover,
button.danger:focus-visible {
  background: color-mix(
    in srgb,
    var(--nls-color-danger-strong, #b91c1c) 86%,
    var(--nls-color-text) 14%
  );
  border-color: color-mix(
    in srgb,
    var(--nls-color-danger-strong, #b91c1c) 86%,
    var(--nls-color-text) 14%
  );
}

.account-action__icon {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-flex;
}

.account-action__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.account-summary {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.account-summary__identity {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.account-summary__name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.28;
  color: var(--nls-color-text);
  font-weight: 600;
}

.inline-user-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.inline-user-identity__name {
  overflow-wrap: anywhere;
}

.account-summary button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.12rem;
}

.account-groups {
  border-top: 1px solid var(--nls-color-border-soft);
  padding-top: 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.account-groups__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--nls-color-text);
}

.account-groups__list {
  font-size: 0.75rem;
  line-height: 1.35;
}

.account-groups__tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.account-groups__tree ul {
  list-style: none;
  margin: 0.25rem 0 0 0.85rem;
  padding: 0 0 0 0.55rem;
  border-left: 1px solid var(--nls-color-border-soft);
  display: grid;
  gap: 0.22rem;
}

.account-groups__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.account-groups__name {
  color: var(--nls-color-text);
  overflow-wrap: anywhere;
}

.account-groups__meta {
  font-size: 0.68rem;
  color: var(--nls-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.role-tools {
  display: grid;
  gap: 0.6rem;
}

/* Tighten side-panel vertical rhythm uniformly across tabs. */
.panel.side-panel .module-body[data-panel-body] {
  margin-top: 0;
  padding-top: 0.2rem;
  gap: 0.45rem;
  padding-bottom: 0.2rem;
}

.panel.side-panel .module-body[data-panel-body] > section {
  margin: 0;
}

.panel.side-panel .panel-header {
  margin-bottom: 0;
}

.panel.side-panel .panel-title {
  line-height: 1.2;
}

.panel.side-panel .panel-toggle {
  min-height: 2.1rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.panel.side-panel .panel-message {
  min-height: 0;
}

.panel.side-panel .panel-message:empty {
  display: none;
}

.role-tools .dev-section-title {
  margin: 0.35rem 0 0;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.panel.side-panel[data-panel-content="admin"] .admin-tools-grid > button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

/* Non-Dev-Tools sidebar actions: smaller card-like button language. */
.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  .course-action,
.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  button.secondary,
.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  button.ghost {
  border: 1px solid var(--nls-color-primary-border-strong);
  border-radius: 10px;
  padding: 0.28rem 0.62rem;
  min-height: 1.9rem;
  font-size: 0.76rem;
  line-height: 1.15;
  justify-content: flex-start;
  text-align: left;
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg-light) 82%,
    var(--nls-color-surface) 18%
  );
  color: var(--nls-color-primary-ink);
}

.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  .course-action__icon {
  order: -1;
  margin-left: 0;
  margin-right: 0.35rem;
}

.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  .course-action:is(:hover, :focus-visible),
.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  button.secondary:is(:hover, :focus-visible),
.panel.side-panel[data-panel-content]:not([data-panel-content="developer"])
  .module-body
  button.ghost:is(:hover, :focus-visible) {
  border-color: var(--nls-color-primary);
  background: var(--nls-color-primary-bg);
  color: var(--nls-color-primary-strong);
}

/* Dev Tools primary actions only (not utility controls). */
.panel.side-panel[data-panel-content="developer"] .dev-actions > button,
.panel.side-panel[data-panel-content="developer"] .progress-devtools-actions > button {
  border: 1px solid var(--nls-color-primary-border-strong);
  border-radius: 10px;
  padding: 0.28rem 0.62rem;
  min-height: 1.9rem;
  font-size: 0.76rem;
  line-height: 1.15;
  justify-content: flex-start;
  text-align: left;
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg-light) 82%,
    var(--nls-color-surface) 18%
  );
  color: var(--nls-color-primary-ink);
}

.panel.side-panel[data-panel-content="developer"] .dev-actions > button:is(:hover, :focus-visible),
.panel.side-panel[data-panel-content="developer"]
  .progress-devtools-actions
  > button:is(:hover, :focus-visible) {
  border-color: var(--nls-color-primary);
  background: var(--nls-color-primary-bg);
  color: var(--nls-color-primary-strong);
}

/* Prevent label truncation when button copy is long in narrow sidebars. */
.panel.side-panel .module-body button {
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-tool-group {
  display: grid;
  gap: 0.35rem;
}

.teacher-classes-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.classes-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.55rem;
}

.classes-action-btn {
  font-size: 0.78rem;
  padding: 0.24rem 0.45rem;
}

#classes-message:empty {
  display: none;
}

#progress-courses-message:empty {
  display: none;
}

.teacher-class-btn {
  width: 100%;
  text-align: left;
}

.teacher-class-btn--hierarchy {
  --hierarchy-indent-step: 0.62rem;
  --hierarchy-indent: calc(var(--hierarchy-depth, 0) * var(--hierarchy-indent-step));
  width: calc(100% - var(--hierarchy-indent));
  margin-left: var(--hierarchy-indent);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 0;
  padding: 0.32rem 0.46rem;
  white-space: normal;
  border-radius: 10px;
  border-color: color-mix(in srgb, var(--nls-color-border-soft) 70%, #ffffff 30%);
  background: color-mix(in srgb, var(--nls-color-surface) 84%, #ffffff 16%);
}

.teacher-classes-list--hierarchy {
  gap: 0.3rem;
}

@media (max-width: 900px) {
  .panel.side-panel .module-body[data-panel-body] {
    padding-top: 0.16rem;
    gap: 0.4rem;
    padding-bottom: 0.12rem;
  }
}

.teacher-class-btn--hierarchy:hover {
  border-color: var(--nls-color-primary-border-strong);
  background: color-mix(in srgb, var(--nls-color-primary-bg) 40%, #ffffff 60%);
}

.teacher-class-btn--hierarchy.is-active {
  border-color: var(--nls-color-primary-border-strong);
  background: color-mix(in srgb, var(--nls-color-primary-bg) 64%, #ffffff 36%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nls-color-primary) 18%, transparent);
}

.hierarchy-row {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: min-content;
  align-items: start;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}

.hierarchy-row__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.08rem 0.34rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--nls-color-primary) 36%, transparent);
  background: color-mix(in srgb, var(--nls-color-primary-bg) 75%, #ffffff 25%);
  color: color-mix(in srgb, var(--nls-color-primary-ink) 80%, var(--nls-color-text) 20%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.hierarchy-row__name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--nls-color-text);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.15;
}

.hierarchy-row__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.22rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--nls-color-border-soft) 80%, #ffffff 20%);
  color: var(--nls-color-text-muted);
  background: color-mix(in srgb, var(--nls-color-surface-alt) 70%, #ffffff 30%);
  font-size: 0.66rem;
  font-weight: 700;
}

.hierarchy-row__count:empty {
  display: none;
}

@media (max-width: 900px) {
  .teacher-class-btn--hierarchy {
    --hierarchy-indent-step: 0.45rem;
    padding: 0.3rem 0.42rem;
  }

  .hierarchy-row__name {
    font-size: 0.76rem;
  }
}

.teacher-roster-list {
  display: grid;
  gap: 0.4rem;
}

.teacher-roster-list--expanded {
  gap: 0.55rem;
}

.teacher-roster-btn {
  width: 100%;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 8px;
  background: var(--nls-color-surface-alt);
  color: var(--nls-color-text);
  text-align: left;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

.teacher-roster-btn:is(:hover, :focus-visible) {
  border-color: var(--nls-color-primary-border-strong);
}

.teacher-roster-btn__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.teacher-roster-btn__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.teacher-roster-btn__meta {
  font-size: 0.74rem;
  color: var(--nls-color-text-muted);
}

.teacher-roster-btn__sub {
  margin-top: 0.2rem;
  font-size: 0.74rem;
  color: var(--nls-color-text-soft);
}

.teacher-course-list {
  display: grid;
  gap: 0.35rem;
}

.teacher-course-btn {
  width: 100%;
  text-align: left;
}

.teacher-student-node {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-alt);
  overflow: hidden;
}

.teacher-student-node__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  display: grid;
  gap: 0.28rem;
}

.teacher-student-node__summary::-webkit-details-marker {
  display: none;
}

.teacher-student-node__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.teacher-student-node__name {
  font-weight: 700;
  color: var(--nls-color-text);
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.teacher-student-node__meta {
  font-size: 0.75rem;
  color: var(--nls-color-text-muted);
}

.teacher-student-node__sub {
  font-size: 0.73rem;
  color: var(--nls-color-text-soft);
}

.teacher-student-node__status {
  justify-self: start;
}

.teacher-student-node__courses {
  border-top: 1px solid var(--nls-color-border-soft);
  padding: 0.5rem 0.6rem;
  display: grid;
  gap: 0.42rem;
}

.teacher-course-progress {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 9px;
  background: var(--nls-color-surface);
  padding: 0.4rem 0.5rem;
  display: grid;
  gap: 0.32rem;
}

.teacher-class-summary {
  margin-bottom: 0.35rem;
}

.teacher-class-view > .progress-player-detail__title {
  margin-bottom: 0.45rem;
}

.teacher-class-container {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-alt);
  padding: 0.45rem 0.5rem 0.5rem;
}

.teacher-course-progress--student {
  margin-bottom: 0.35rem;
}

.teacher-course-progress__title {
  font-weight: 700;
  color: var(--nls-color-text);
}

.teacher-course-progress__stats {
  font-size: 0.74rem;
  color: var(--nls-color-text-soft);
}

.teacher-course-progress__metrics {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.teacher-course-progress .progress-open-inline {
  justify-self: start;
}

.teacher-course-progress__expanded {
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--nls-color-border-soft);
}

.teacher-course-progress__expanded .progress-player-detail__tree {
  margin: 0;
}

.teacher-course-progress__bar {
  width: 120px;
  height: 0.44rem;
  border-radius: 999px;
  background: var(--nls-color-border-soft);
  overflow: hidden;
}

.teacher-course-progress__bar-fill {
  display: block;
  height: 100%;
  background: var(--nls-color-primary);
}

.teacher-activity-list {
  display: grid;
  gap: 0.28rem;
}

.teacher-activity-row {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 8px;
  background: var(--nls-color-surface-alt);
  padding: 0.35rem 0.45rem;
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
}

.teacher-activity-row__id {
  overflow-wrap: anywhere;
  color: var(--nls-color-text);
}

.teacher-activity-row__score {
  color: var(--nls-color-text-muted);
  white-space: nowrap;
}

.design-sources-toggle {
  margin-top: 0.25rem;
}

.design-sources-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
}

.design-sources-copy-all {
  white-space: nowrap;
  flex: 0 0 auto;
}

.design-sources {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.design-sources[hidden] {
  display: none !important;
}

.design-sources__section {
  border: 1px solid var(--nls-color-border);
  border-radius: 10px;
  overflow: hidden;
}

.design-sources__heading {
  background: var(--nls-color-surface-muted);
  color: var(--nls-color-text);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}

.design-sources__row {
  padding: 0.35rem 0.6rem;
  background: var(--nls-color-surface);
  border-top: 1px solid var(--nls-color-border-soft);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.design-sources__text {
  flex: 1;
}

.design-sources__copy {
  appearance: none;
  border: 1px solid var(--nls-color-border);
  background: var(--nls-color-surface-alt);
  color: var(--nls-color-text-muted);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}

.design-sources__copy:hover {
  border-color: var(--nls-color-primary-border-strong);
  color: var(--nls-color-text);
}

#auth-message {
  color: var(--nls-color-text);
}

#auth-message.is-error,
.courses-panel-message.is-error {
  color: var(--nls-color-danger-strong);
}

.progress-dashboard {
  margin-top: 0;
}

.courses-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.courses-add-button {
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  gap: 0.42rem;
  min-height: 1.9rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--nls-color-primary-ink);
  border-color: var(--nls-color-primary-border-strong);
  border-style: solid;
  border-radius: 10px;
  padding: 0.28rem 0.62rem;
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg-light) 82%,
    var(--nls-color-surface) 18%
  );
}

.courses-add-button:hover {
  border-color: var(--nls-color-primary);
  color: var(--nls-color-primary-strong);
  background: var(--nls-color-primary-bg);
}

.courses-add-button__icon {
  width: 0.9rem;
  height: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.courses-add-button__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.courses-panel-message {
  color: var(--nls-color-text-soft);
  font-size: 0.82rem;
}

.courses-panel-message[hidden] {
  display: none !important;
}

.dev-section-subtitle {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--nls-color-text);
}

.progress-courses-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-history-button {
  width: 100%;
  margin-top: 0.55rem;
}

.progress-history-button[hidden] {
  display: none !important;
}

.progress-history-button .courses-add-button__icon {
  order: -1;
}

.course-actions--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.courses-player-view {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.courses-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.courses-my-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.courses-my-course-button {
  flex: 1;
}

.courses-my-resume-btn {
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
}

.courses-my-resume-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.courses-catalog-item {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-alt);
  padding: 0.5rem;
}

.courses-catalog-pushdown {
  margin-top: 0.45rem;
  border: 1px dashed var(--nls-color-border-soft);
  border-radius: 8px;
  padding: 0.5rem;
  background: var(--nls-color-surface);
}

.courses-catalog-pushdown[hidden] {
  display: none !important;
}

.courses-catalog-pushdown--purchase {
  padding: 0.55rem;
}

.courses-payment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.courses-payment-tile {
  min-height: 124px;
  border-radius: 10px;
  border: 1px solid var(--nls-color-border-soft);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--nls-color-surface) 80%, #fff 20%),
    var(--nls-color-surface-alt)
  );
  padding: 0.5rem;
  display: grid;
  align-content: start;
  gap: 0.2rem;
  opacity: 0.62;
  filter: grayscale(0.25);
  position: relative;
  overflow: hidden;
}

.courses-payment-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  pointer-events: none;
}

.courses-payment-tile__brand {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--nls-color-text);
}

.courses-payment-tile__sub {
  font-size: 0.7rem;
  color: var(--nls-color-text-muted);
  margin-bottom: 0.1rem;
}

.courses-payment-tile__meta {
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--nls-color-text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.courses-payment-tile--gpay {
  border-color: color-mix(in srgb, #5f6368 28%, var(--nls-color-border-soft));
}

.courses-payment-tile--card {
  border-color: color-mix(in srgb, #1a73e8 22%, var(--nls-color-border-soft));
}

.courses-payment-tile--paypal {
  border-color: color-mix(in srgb, #003087 22%, var(--nls-color-border-soft));
}

.course-action.is-active {
  border-color: var(--nls-color-primary-border-strong);
  background: var(--nls-color-primary-bg-light);
}

@media (max-width: 560px) {
  .courses-payment-grid {
    grid-template-columns: 1fr;
  }
}

.course-action--muted {
  color: var(--nls-color-text-muted);
  border-color: var(--nls-color-border-soft);
}

.courses-info-html,
.courses-info-lead,
.courses-info-bullets,
.courses-info-images {
  margin: 0;
}

.courses-info-html {
  color: var(--nls-color-text);
}

.courses-info-html img,
.courses-info-images img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

.courses-info-bullets {
  padding-left: 1.2rem;
  color: var(--nls-color-text);
}

.courses-info-images {
  display: grid;
  gap: 0.5rem;
}

.courses-player-back {
  align-self: flex-start;
  margin-top: 0.3rem;
}

.courses-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.courses-progress-label {
  font-size: 0.82rem;
  color: var(--nls-color-text-soft);
  font-weight: 600;
}

.courses-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.courses-progress-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--nls-color-border);
  background: var(--nls-color-surface-alt);
}

.courses-progress-dot.is-filled {
  border-color: var(--nls-color-primary-border-strong, #1d4ed8);
  background: var(--nls-color-primary, #1d4ed8);
}

.course-action:disabled {
  opacity: 1;
  color: var(--nls-color-text-muted);
  border-color: var(--nls-color-border-soft);
  background: var(--nls-color-surface-muted, var(--nls-color-surface-alt));
  cursor: not-allowed;
}

.progress-devtools-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem;
}

.progress-devtools-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.progress-devtools-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.progress-devtools-actions button {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 7px;
  border-width: 1px;
  white-space: nowrap;
}

.flush-tools-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bulk-row-tools-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
}

.bulk-row-tools-inline .progress-inline-input {
  width: 5.5rem;
  flex: 0 0 5.5rem;
}

.bulk-row-tools-inline button {
  width: auto;
  flex: 0 0 auto;
}

.progress-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.35rem;
}

.progress-field span {
  font-size: 0.8rem;
  color: var(--nls-color-text-soft);
  font-weight: 600;
  min-width: 0;
  line-height: 1.2;
}

.progress-field input,
.progress-field select {
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  min-width: 0;
}

.create-class-course-list {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 8px;
  padding: 0.45rem;
  max-height: 13rem;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
  background: var(--nls-color-surface-alt);
}

.create-class-course-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--nls-color-text-soft);
  text-align: left;
}

.create-class-course-option input[type="checkbox"] {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.create-class-course-option span {
  display: inline !important;
  line-height: 1.35;
}

.progress-maintenance {
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--nls-color-border-soft);
}

.progress-maintenance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.progress-maintenance-actions button {
  width: 100%;
  border-radius: 7px;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.2rem 0.45rem;
  border-width: 1px;
}

.progress-toggle {
  margin-top: 0.35rem;
}

.progress-toggle span {
  font-size: 0.84rem;
  line-height: 1.2;
}

@media (max-width: 520px) {
  .progress-devtools-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-devtools-actions button:nth-child(3) {
    grid-column: 1 / -1;
  }

  .progress-maintenance-actions {
    grid-template-columns: 1fr;
  }
}

.progress-course-card {
  border: 1px solid var(--nls-color-primary-border-strong);
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg-light) 82%,
    var(--nls-color-surface) 18%
  );
  padding: 0.28rem 0.62rem;
}

.progress-course-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--nls-color-primary-ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  cursor: pointer;
  padding: 0;
  min-height: 1.25rem;
  font-size: 0.76rem;
  line-height: 1.15;
}

.progress-course-button:is(:hover, :focus-visible) .progress-course-title {
  color: var(--nls-color-primary-strong);
  text-decoration: none;
}

.progress-course-title {
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.progress-course-meta {
  font-size: 0.75rem;
  color: var(--nls-color-text-muted);
}

.progress-course-stats {
  font-size: 0.72rem;
  color: var(--nls-color-text-soft);
}

.progress-node {
  border: 1px solid var(--nls-color-border);
  border-radius: 10px;
  background: var(--nls-color-surface);
  margin-top: 0.45rem;
  padding: 0.45rem 0.6rem;
}

.progress-node__summary {
  cursor: pointer;
  list-style: none;
}

.progress-node__summary::-webkit-details-marker {
  display: none;
}

.progress-node__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.progress-node__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex: 0 0 auto;
  align-self: flex-start;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 180px;
}

.progress-node__stats {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  align-self: flex-start;
  min-width: 220px;
}

.progress-open-inline {
  border: 1px solid var(--nls-color-border-soft);
  background: var(--nls-color-surface-alt);
  color: var(--nls-color-text);
  border-radius: 999px;
  padding: 0.08rem 0.52rem;
  font-size: 0.68rem;
  cursor: pointer;
}

.progress-open-inline:is(:hover, :focus-visible) {
  border-color: var(--nls-color-primary-border-strong);
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg-light) 72%,
    var(--nls-color-surface) 28%
  );
}

.progress-node__main {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.progress-node__label {
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.progress-node__bar-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.progress-node__bar {
  width: 110px;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--nls-color-border-soft);
  overflow: hidden;
}

.progress-node__bar-fill {
  display: block;
  height: 100%;
  background: var(--nls-color-primary, #1d4ed8);
}

.progress-node__bar-text {
  font-size: 0.68rem;
  color: var(--nls-color-text-muted);
}

.progress-node__metrics {
  font-size: 0.72rem;
  color: var(--nls-color-text-soft);
  white-space: nowrap;
}

.progress-node__meta {
  margin-top: 0.2rem;
  font-size: 0.74rem;
  color: var(--nls-color-text-muted);
}

.progress-chip {
  border-radius: 999px;
  border: 1px solid var(--nls-color-border);
  padding: 0.1rem 0.5rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-width: 102px;
  text-align: center;
}

.progress-chip--completed {
  border-color: var(--nls-color-success-strong, #16803b);
  color: var(--nls-color-success-strong, #16803b);
}

.progress-chip--in-progress {
  border-color: var(--nls-color-warning-strong, #a15a00);
  color: var(--nls-color-warning-strong, #a15a00);
}

.progress-chip--not-started,
.progress-chip--info {
  color: var(--nls-color-text-muted);
}

.progress-chip--not-enrolled {
  color: var(--nls-color-text-muted);
  border-color: var(--nls-color-border-soft);
  background: color-mix(in srgb, var(--nls-color-surface-alt) 75%, #fff 25%);
}

.progress-target {
  margin-top: 0.25rem;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 8px;
  background: var(--nls-color-surface-alt);
  padding: 0.3rem 0.45rem;
  width: 100%;
  text-align: left;
  color: var(--nls-color-text);
}

.progress-target:is(:hover, :focus-visible) {
  border-color: var(--nls-color-primary-border-strong);
  background: color-mix(
    in srgb,
    var(--nls-color-primary-bg-light) 68%,
    var(--nls-color-surface) 32%
  );
}

.progress-tree {
  margin-top: 0.35rem;
}

.progress-dashboard--devtools {
  margin-top: 0.9rem;
  border-top: 1px solid var(--nls-color-border-soft);
  padding-top: 0.55rem;
}

.progress-player-detail {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem;
}

.progress-player-detail__title {
  margin: 0;
  font-size: 1.1rem;
}

.progress-player-detail__subtitle {
  margin: 0.35rem 0 0.8rem;
  color: var(--nls-color-text-muted);
  font-size: 0.86rem;
}

.progress-player-detail__course-rollup {
  margin: 0 0 0.55rem;
  display: flex;
  justify-content: flex-end;
}

.progress-player-detail__tree {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.progress-history-item {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-alt);
  padding: 0.45rem;
  overflow: hidden;
}

.progress-history-toggle {
  width: 100%;
  border: 1px solid var(--nls-color-border-soft);
  background: var(--nls-color-surface);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  box-sizing: border-box;
}

.progress-history-toggle:hover {
  border-color: var(--nls-color-primary-border-strong);
}

.progress-history-toggle__title {
  font-weight: 700;
  color: var(--nls-color-text);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.progress-history-toggle__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.progress-history-toggle__meta {
  font-size: 0.76rem;
  color: var(--nls-color-text-soft);
}

.progress-history-toggle__stats {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 0 1 auto;
  align-self: flex-start;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}

@media (max-width: 900px) {
  .progress-history-toggle__stats {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

.progress-history-panel {
  margin-top: 0.5rem;
}

#progress-output {
  max-height: 260px;
  overflow: auto;
}

.progress-player-detail__payload {
  margin: 0;
  max-height: min(70vh, 760px);
  overflow: auto;
}

.progress-player-detail__actions {
  margin-top: 0.55rem;
  display: flex;
  justify-content: flex-start;
}

.progress-player-detail__copy {
  min-width: 88px;
}

.account-editor-form {
  display: grid;
  gap: 0.65rem;
}

.account-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.account-editor-grid label {
  display: grid;
  gap: 0.3rem;
}

.account-editor-grid label.account-editor-grid__full {
  grid-column: 1 / -1;
}

.account-editor-grid span {
  font-size: 0.8rem;
  color: var(--nls-color-text-soft);
  font-weight: 600;
}

.account-editor-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.account-editor-label-with-icon__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-editor-grid input,
.account-editor-grid select {
  color: var(--nls-color-text) !important;
  -webkit-text-fill-color: var(--nls-color-text) !important;
}

.account-editor-grid input[disabled],
.account-editor-grid select[disabled] {
  color: var(--nls-color-text-muted) !important;
  -webkit-text-fill-color: var(--nls-color-text-muted) !important;
  opacity: 1;
}

.account-editor-readonly-value {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 8px;
  background: var(--nls-color-surface-alt);
  color: var(--nls-color-text);
  padding: 0.45rem 0.55rem;
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-editor-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.account-editor-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--nls-color-text-muted);
}

.profile-avatar-editor {
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-alt);
  padding: 0.65rem;
  display: grid;
  gap: 0.6rem;
}

.profile-avatar-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.profile-avatar-editor__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.profile-avatar-editor__header-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-editor__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--nls-color-text);
}

.profile-avatar-editor__details {
  display: grid;
  gap: 0.6rem;
}

.profile-avatar-editor__details[hidden] {
  display: none !important;
}

.profile-avatar-editor__preview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.profile-avatar-preview {
  --avatar-bg: #dbeafe;
  --avatar-fg: #1e3a8a;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--nls-color-border-soft);
  background: var(--avatar-bg);
  color: var(--avatar-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.profile-avatar-preview.profile-avatar-preview--rounded {
  border-radius: 12px;
}

.profile-avatar-preview--lg {
  width: 72px;
  height: 72px;
}

.profile-avatar-preview--xs {
  width: 18px;
  height: 18px;
}

.profile-avatar-role-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 42%;
  min-width: 8px;
  min-height: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--nls-color-surface, #fff) 80%, transparent);
  background: color-mix(in srgb, var(--nls-color-surface, #fff) 88%, transparent);
  color: var(--nls-color-text-soft, #6b7280);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.profile-avatar-role-badge svg {
  width: 72%;
  height: 72%;
}

.profile-avatar-role-badge--teacher {
  color: #475569;
}

.profile-avatar-role-badge--admin {
  color: #7c2d12;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-preview__emoji {
  font-size: 1.15rem;
}

.profile-avatar-preview--lg .profile-avatar-preview__emoji {
  font-size: 1.65rem;
}

.profile-avatar-preview--xs .profile-avatar-preview__emoji {
  font-size: 0.65rem;
}

.profile-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 0.45rem;
}

.profile-avatar-filter {
  display: grid;
  gap: 0.3rem;
  max-width: 260px;
}

.profile-avatar-filter span {
  font-size: 0.78rem;
  color: var(--nls-color-text-soft);
  font-weight: 600;
}

.profile-avatar-option {
  --avatar-bg: #dbeafe;
  --avatar-fg: #1e3a8a;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface);
  color: var(--nls-color-text);
  padding: 0.5rem;
  display: grid;
  justify-items: center;
  align-items: center;
}

.profile-avatar-option:hover {
  border-color: var(--nls-color-primary, #2563eb);
}

.profile-avatar-option.is-selected {
  border-color: var(--nls-color-primary, #2563eb);
  box-shadow: 0 0 0 2px var(--nls-color-primary-bg, rgba(37, 99, 235, 0.18));
}

.profile-avatar-option__emoji {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  overflow: hidden;
}

.profile-avatar-option__emoji img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-user-inline-error {
  align-self: center;
  font-size: 0.76rem;
  color: var(--nls-color-danger-strong);
  min-height: 1em;
}

.create-user-inline-error:not(.is-visible) {
  visibility: hidden;
}

@media (max-width: 700px) {
  .account-editor-grid {
    grid-template-columns: 1fr;
  }
}

.whisper-player-debug {
  margin-top: 0.7rem;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 10px;
  background: var(--nls-color-surface-alt);
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.whisper-player-debug__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--nls-color-text);
}

.whisper-player-debug__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--nls-color-text-muted);
}

.whisper-player-debug__row--stack {
  display: grid;
  gap: 0.25rem;
}

.whisper-player-debug__row--stack pre {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.74rem;
  color: var(--nls-color-text);
}

/* Keep response payloads in the player pane, not sidebar. */
#auth-response,
#courses-response,
#progress-output {
  display: none !important;
}

.simulation-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  z-index: 8;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--nls-color-warning, #c48f00);
  border-radius: 999px;
  background: var(--nls-color-warning-bg, rgba(196, 143, 0, 0.16));
  color: var(--nls-color-warning-text, #8a6500);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.autotest-live-panel {
  position: fixed;
  top: 0.45rem;
  right: 0.55rem;
  z-index: 40;
  min-width: 176px;
  border: 1px solid var(--nls-color-border-soft);
  border-radius: 9px;
  background: var(--nls-color-surface-alt);
  box-shadow: 0 5px 12px var(--nls-shadow-color-light);
  padding: 0.3rem 0.35rem;
  display: grid;
  gap: 0.24rem;
}

.autotest-live-panel[hidden] {
  display: none !important;
}

.autotest-live-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.68rem;
  color: var(--nls-color-text-muted);
}

.autotest-live-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.autotest-live-panel__pause,
.autotest-live-panel__close {
  min-height: 1.15rem;
  min-width: 2.2rem;
  padding: 0.04rem 0.25rem;
  border-radius: 6px;
  font-size: 0.6rem;
  border-width: 1px;
}

.autotest-live-panel .toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  column-gap: 0.45rem;
  justify-content: initial;
  width: 100%;
  margin: 0;
}

.autotest-live-panel .dev-toggle-inline {
  grid-template-columns: minmax(0, 1fr) 52px;
}

.autotest-live-panel .dev-toggle-inline .dev-toggle-inline__lead {
  display: grid !important;
  grid-template-columns: 0.9rem minmax(0, 4rem);
  align-items: center;
  column-gap: 0.25rem;
  min-width: 0;
}

.autotest-live-panel .dev-toggle-inline span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  width: auto;
  min-width: 0;
  color: var(--nls-color-text-muted);
}

.autotest-live-panel .dev-toggle-inline span svg,
.autotest-live-panel .dev-toggle-inline__lead svg {
  width: 0.86rem;
  height: 0.86rem;
  flex: 0 0 auto;
}

.autotest-live-panel .dev-toggle-counter {
  width: 100%;
  min-width: 3.3rem;
  text-align: left;
  padding: 0.13rem 0.28rem !important;
  border-radius: 7px !important;
  border-width: 1px !important;
  min-height: 1.15rem;
  font-size: 0.66rem;
  justify-self: start;
}

.autotest-live-panel .toggle > input[type="checkbox"] {
  margin-left: 0;
  flex: 0 0 auto;
  justify-self: end;
  transform: translateX(8px);
}

