.piece-theory-complete-toggle {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0.1rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.piece-theory-complete-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.piece-theory-complete-toggle .piece-publish-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.18s ease;
}

.piece-theory-complete-toggle .piece-publish-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(24, 40, 34, 0.24);
  transition: transform 0.18s ease;
}

.piece-theory-complete-toggle input:checked + .piece-publish-switch {
  background: var(--accent);
}

.piece-theory-complete-toggle input:checked + .piece-publish-switch::after {
  transform: translateX(16px);
}

.piece-theory-complete-toggle input:focus-visible + .piece-publish-switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.piece-theory-complete-toggle input:disabled + .piece-publish-switch {
  opacity: 0.55;
}

.student-theory-complete-button {
  margin-top: 0.9rem;
}
